/* ============================================================
   KIREAS Design System — colors_and_type.css
   Tokens for color, type, spacing, radii, elevation, motion.
   Import this file once at the root of any KIREAS surface.
   ============================================================ */

/* ----- Fonts (KIREAS: General Sans display + Manrope body + JBM mono; Velotic's own typeface is Host Grotesk) ----- */
/* General Sans — explicit @font-face (woff2) so the offline bundler can inline
   it; the Fontshare CSS @import endpoint is not fetchable by the bundler. */
@font-face {
  font-family: 'General Sans'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('https://cdn.fontshare.com/wf/MFQT7HFGCR2L5ULQTW6YXYZXXHMPKLJ3/YWQ244D6TACUX5JBKATPOW5I5MGJ3G73/7YY3ZAAE3TRV2LANYOLXNHTPHLXVWTKH.woff2') format('woff2');
}
@font-face {
  font-family: 'General Sans'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('https://cdn.fontshare.com/wf/3RZHWSNONLLWJK3RLPEKUZOMM56GO4LJ/BPDRY7AHVI3MCDXXVXTQQ76H3UXA63S3/SB2OEB6IKZPRR6JT4GFJ2TFT6HBB6AZN.woff2') format('woff2');
}
@font-face {
  font-family: 'General Sans'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('https://cdn.fontshare.com/wf/K46YRH762FH3QJ25IQM3VAXAKCHEXXW4/ISLWQPUZHZF33LRIOTBMFOJL57GBGQ4B/3ZLMEXZEQPLTEPMHTQDAUXP5ZZXCZAEN.woff2') format('woff2');
}
@font-face {
  font-family: 'General Sans'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('https://cdn.fontshare.com/wf/KWXO5X3YW4X7OLUMPO4X24HQJGJU7E2Q/VOWUQZS3YLP66ZHPTXAFSH6YACY4WJHT/NIQ54PVBBIWVK3PFSOIOUJSXIJ5WTNDP.woff2') format('woff2');
}
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* ============================================================
     COLOR — KIREAS Core
     The KIREAS palette is the brand's industrial-precision voice:
     deep navy as the structural primary, crimson as the
     measured-but-confident accent (from the logo's red rotor).
     ============================================================ */

  /* Navy (primary) — from the KIREAS K-monogram */
  --k-navy-950: #060E1C;   /* op-deck black */
  --k-navy-900: #0A1729;   /* terminal / SCADA dark */
  --k-navy-800: #112743;
  --k-navy-700: #1A3A63;   /* PRIMARY — buttons, links, h1 */
  --k-navy-600: #1F4575;   /* logo navy — the canonical brand value */
  --k-navy-500: #2D5990;
  --k-navy-400: #5B7FA8;
  --k-navy-300: #93AAC8;
  --k-navy-200: #C3D0E0;
  --k-navy-100: #DFE7F1;
  --k-navy-50:  #EFF3F9;

  /* Crimson (accent) — from the KIREAS logo's red rotor & wordmark */
  --k-crimson-950: #2F0B0F;
  --k-crimson-900: #5B161B;
  --k-crimson-700: #9A2530;
  --k-crimson-600: #C9313C;   /* ACCENT — used sparingly */
  --k-crimson-500: #DD4853;
  --k-crimson-400: #E8717A;
  --k-crimson-200: #F6CDD1;
  --k-crimson-100: #FBE7E9;

  /* ============================================================
     COLOR — Steel Neutrals
     Cool greys with a slight blue cast — reads as engineering /
     precision-instrument rather than warm corporate.
     ============================================================ */
  --steel-950: #0C1118;
  --steel-900: #141A23;
  --steel-800: #1E252F;
  --steel-700: #2F3845;
  --steel-600: #4A5462;
  --steel-500: #6B7585;
  --steel-400: #9099A8;
  --steel-300: #BFC5CF;
  --steel-200: #DEE2E8;
  --steel-100: #ECEFF3;
  --steel-50:  #F6F7F9;
  --paper:     #FAFBFC;
  --white:     #FFFFFF;
  --black:     #000000;

  /* ============================================================
     COLOR — Signal / Plant-floor state colors
     Used for runtime / SCADA-style status. Tuned to read clearly
     against both --paper and --k-navy-900.
     ============================================================ */
  --sig-online:  #2DB47A;   /* running, OK, in-spec   */
  --sig-warning: #E0A220;   /* degraded, drift       */
  --sig-fault:   #D6433A;   /* alarm, fault, offline */
  --sig-info:    #2C7CC2;   /* info, neutral status  */
  --sig-online-tint:  #E3F4EC;
  --sig-warning-tint: #FBEFD3;
  --sig-fault-tint:   #FBE3E1;
  --sig-info-tint:    #DDEAF7;

  /* ============================================================
     COLOR — Partner accents
     Used ONLY on co-branded surfaces (presentation cover slides,
     joint web pages, partner-named solutions). When a partner
     accent is active, the KIREAS crimson is suppressed in
     supporting elements to avoid color clash.
     ============================================================ */
  /* Velotic values from the Velotic brand guidelines v1.0 (Mar 2026) p.39/41.
     Velotic rule: type is never orange or steel; black is for logo and text only. */
  --velotic-orange:      #FF4D00;   /* Bright Orange, Pantone 1655 C, CMYK 0/77/100/0 */
  --velotic-orange-dark: #C53A00;   /* KIREAS hover shade only, not a Velotic colour; never on Velotic-supplied assets */
  --velotic-ink:         #000000;   /* Velotic black */
  --velotic-steel:       #C1D7E5;   /* Velotic secondary */
  --velotic-aluminum:    #EAE8E7;   /* Velotic secondary */
  --secomea-navy:        #003B5C;
  --secomea-sky:         #4FA9D8;

  /* ============================================================
     SEMANTIC TOKENS — what to actually use in components
     ============================================================ */
  --bg-page:        var(--paper);
  --bg-surface:     var(--white);
  --bg-sunken:      var(--steel-50);
  --bg-inverse:     var(--k-navy-900);

  --fg-default:     var(--steel-900);    /* body text */
  --fg-muted:       var(--steel-600);    /* secondary text */
  --fg-subtle:      var(--steel-500);    /* captions, meta */
  --fg-disabled:    var(--steel-400);
  --fg-on-inverse:  var(--steel-100);
  --fg-on-brand:    var(--white);

  --border-default: var(--steel-200);
  --border-strong:  var(--steel-300);
  --border-subtle:  var(--steel-100);

  --brand-primary:        var(--k-navy-700);
  --brand-primary-hover:  var(--k-navy-800);
  --brand-primary-active: var(--k-navy-900);
  --brand-accent:         var(--k-crimson-600);
  --brand-accent-hover:   var(--k-crimson-700);

  --link:        var(--k-navy-700);
  --link-hover:  var(--k-crimson-600);

  /* ============================================================
     TYPE — Families
     - Display: General Sans (Fontshare) — geometric
       grotesk with subtle humanist details. Used for all headlines.
     - Body / UI: Manrope — clean modern sans, wide weight range.
     - Mono: JetBrains Mono — terminal / tag-name / data values.
     ============================================================ */
  --font-display: "General Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Manrope", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Weight tokens (Manrope/Space Grotesk both cover) */
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;

  /* ----- Type scale (rem-based, 16px root) ----- */
  --fs-12: 0.75rem;    /* 12 — micro labels, badges */
  --fs-13: 0.8125rem;  /* 13 — table cells, meta */
  --fs-14: 0.875rem;   /* 14 — UI body, captions */
  --fs-16: 1rem;       /* 16 — default body */
  --fs-18: 1.125rem;   /* 18 — large body, lead */
  --fs-20: 1.25rem;    /* 20 — small heading */
  --fs-24: 1.5rem;     /* 24 — h3 */
  --fs-30: 1.875rem;   /* 30 — h2 */
  --fs-38: 2.375rem;   /* 38 — h1 */
  --fs-48: 3rem;       /* 48 — display sm */
  --fs-64: 4rem;       /* 64 — display md */
  --fs-88: 5.5rem;     /* 88 — display lg (slide titles) */

  /* Line heights paired by use */
  --lh-tight:    1.08;   /* display */
  --lh-snug:     1.2;    /* h1–h3 */
  --lh-default:  1.5;    /* body */
  --lh-loose:    1.65;   /* long-form prose */

  /* Tracking (letter-spacing) — small, deliberate */
  --ls-display:  -0.02em;  /* tighten display */
  --ls-heading:  -0.01em;
  --ls-body:      0;
  --ls-eyebrow:   0.14em;  /* WIDELY-TRACKED UPPERCASE LABELS */
  --ls-code:      0;

  /* ============================================================
     SPACING — 4px base grid
     ============================================================ */
  --sp-0:  0;
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* ============================================================
     RADII — small, controlled. Engineering precision means
     restraint — nothing is overly pill-y or pebble-y.
     ============================================================ */
  --r-0:    0px;
  --r-2:    2px;   /* tags, micro badges */
  --r-4:    4px;   /* default buttons, inputs, chips */
  --r-6:    6px;   /* cards, panels */
  --r-8:    8px;   /* feature cards */
  --r-12:   12px;  /* hero panels, modals */
  --r-full: 999px; /* status dots, avatars only */

  /* ============================================================
     ELEVATION — flat-first. Shadows are precise & low-contrast,
     not lofted. Most KIREAS surfaces use a 1px border for
     elevation, not a shadow.
     ============================================================ */
  --shadow-0: none;
  --shadow-1: 0 1px 2px rgba(10, 23, 41, 0.06), 0 0 0 1px rgba(10, 23, 41, 0.04);
  --shadow-2: 0 2px 6px rgba(10, 23, 41, 0.08), 0 0 0 1px rgba(10, 23, 41, 0.05);
  --shadow-3: 0 8px 24px rgba(10, 23, 41, 0.10), 0 0 0 1px rgba(10, 23, 41, 0.06);
  --shadow-pop: 0 16px 40px rgba(10, 23, 41, 0.18);

  /* Focus ring — accessible, brand-tinted */
  --ring: 0 0 0 3px rgba(45, 89, 144, 0.35);
  --ring-accent: 0 0 0 3px rgba(201, 49, 60, 0.35);

  /* ============================================================
     MOTION — precise, quick, never bouncy.
     ============================================================ */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-snap:   cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:    120ms;
  --dur-base:    180ms;
  --dur-slow:    280ms;

  /* ============================================================
     LAYOUT
     ============================================================ */
  --container-narrow: 880px;
  --container-base:   1120px;
  --container-wide:   1320px;
  --container-max:    1440px;
  --grid-gutter:      24px;
}

/* ============================================================
   DARK SURFACE OVERRIDES
   Apply by setting class="surface-dark" on a container. Used
   for SCADA / op-deck panels and dark slide layouts.
   ============================================================ */
.surface-dark {
  --bg-page:    var(--k-navy-950);
  --bg-surface: var(--k-navy-900);
  --bg-sunken:  var(--k-navy-800);
  --fg-default: var(--steel-100);
  --fg-muted:   var(--steel-300);
  --fg-subtle:  var(--steel-400);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-strong:  rgba(255, 255, 255, 0.18);
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --link:       var(--k-navy-300);
  background: var(--bg-page);
  color: var(--fg-default);
}

/* ============================================================
   PARTNERSHIP SHIFTS
   When a surface is co-branded with a partner, set the class
   on the outer container. This re-routes a few accent tokens
   so the surface signals "joint" without losing KIREAS identity
   (navy primary stays; the crimson accent yields to the
   partner's color for highlights, dividers, and pill chips).
   ============================================================ */
.partner-velotic {
  --brand-accent:       var(--velotic-orange);
  --brand-accent-hover: var(--velotic-orange-dark);
  --link-hover:         var(--k-navy-900);   /* no orange type (Velotic rule) */
  --ring-accent:        0 0 0 3px rgba(255, 77, 0, 0.32);
}
/* Orange stays on fills, rules and chips only: text that would take the accent stays default. */
.partner-velotic .t-eyebrow,
.partner-velotic .brand-period { color: var(--fg-default); }
.partner-velotic .surface-dark,
.surface-dark.partner-velotic { --link-hover: var(--steel-100); }
.partner-secomea {
  --brand-accent:       var(--secomea-navy);
  --brand-accent-hover: #00263A;
  --link-hover:         var(--secomea-sky);
  --ring-accent:        0 0 0 3px rgba(0, 59, 92, 0.35);
}

/* ============================================================
   GLOBAL TYPE — element-level defaults
   ============================================================ */
html { font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: var(--lh-default);
  letter-spacing: var(--ls-body);
  color: var(--fg-default);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-semi);
  color: var(--k-navy-900);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--fs-38); line-height: var(--lh-snug); letter-spacing: var(--ls-heading); }
h2 { font-size: var(--fs-30); line-height: var(--lh-snug); letter-spacing: var(--ls-heading); }
h3 { font-size: var(--fs-24); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-20); line-height: var(--lh-snug); }
h5 { font-size: var(--fs-16); line-height: var(--lh-snug); font-weight: var(--fw-bold); }
h6 { font-size: var(--fs-14); line-height: var(--lh-snug); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-eyebrow); color: var(--fg-muted); }

p { margin: 0; text-wrap: pretty; }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--link-hover); }

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
  font-feature-settings: "tnum", "zero";
}

small { font-size: var(--fs-13); color: var(--fg-muted); }

/* ============================================================
   UTILITY TYPE CLASSES — composable, optional
   ============================================================ */
.t-display-lg { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-88); line-height: var(--lh-tight); letter-spacing: var(--ls-display); color: var(--k-navy-900); }
.t-display-md { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-64); line-height: var(--lh-tight); letter-spacing: var(--ls-display); color: var(--k-navy-900); }
.t-display-sm { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-48); line-height: var(--lh-tight); letter-spacing: var(--ls-display); color: var(--k-navy-900); }
.t-h1 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-38); line-height: var(--lh-snug); letter-spacing: var(--ls-heading); color: var(--k-navy-900); }
.t-h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-30); line-height: var(--lh-snug); letter-spacing: var(--ls-heading); color: var(--k-navy-900); }
.t-h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-24); line-height: var(--lh-snug); color: var(--k-navy-900); }
.t-lead { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-18); line-height: var(--lh-default); color: var(--fg-muted); }
.t-body { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-16); line-height: var(--lh-default); color: var(--fg-default); }
.t-small { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-14); line-height: var(--lh-default); color: var(--fg-muted); }
.t-meta { font-family: var(--font-body); font-weight: 500; font-size: var(--fs-13); line-height: var(--lh-default); color: var(--fg-subtle); }
.t-eyebrow { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-12); text-transform: uppercase; letter-spacing: var(--ls-eyebrow); color: var(--brand-accent); }
.t-code { font-family: var(--font-mono); font-size: 0.92em; }
.t-tnum { font-feature-settings: "tnum", "zero"; }

/* Numerals — KIREAS uses tabular numerals for any tabular data,
   KPIs, and runtime values. */
.kpi-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-feature-settings: "tnum", "zero", "ss01";
  letter-spacing: -0.02em;
}

/* ============================================================
   BRAND PERIOD — KIREAS accent period after display lines
   Use as: <h1>Make it work<span class="brand-period">.</span></h1>
   Renders the period in the brand accent color, slightly oversized
   and pulled in for optical balance. A KIREAS brand cue.
   ============================================================ */
.brand-period {
  color: var(--brand-accent);
  display: inline-block;
  margin-left: -0.04em;
  font-weight: inherit;
}

/* ============================================================
   FULL-BLEED PHOTO — KIREAS image treatment. Never on Velotic photos or
   Velotic-supplied assets: Velotic forbids filters and overlays (guidelines pp.56–57).
   Use on a container holding an <img> + caption stack. Image fills,
   gets a subtle dark gradient at the bottom for caption legibility.
   ============================================================ */
.photo-bleed {
  position: relative; overflow: hidden;
  background: var(--k-navy-900);
}
.photo-bleed > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
}
.photo-bleed::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(6, 14, 28, 0.10) 0%,
    rgba(6, 14, 28, 0.10) 55%,
    rgba(6, 14, 28, 0.80) 100%);
  pointer-events: none;
}
.photo-bleed > .photo-caption,
.photo-bleed > .photo-stack {
  position: relative; z-index: 1;
}
.photo-caption {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}
