/* ============================================================
   VULCORE TOKENS
   The only file that holds a color, font, type size, or spacing
   value. Every surface links it first: website pages, decks,
   sheets, the product console. Rules live in brand-kit/BRAND.md.

   Cascade on a web page:
     1. /brand-kit/tokens.css     values (this file)
     2. /assets/vulcore.css       shared components
     3. the page's own <style>    page-only layout

   Pages never redefine a token on :root. A page that needs a
   different value scopes it to a selector (body.deck, .sheet).
   ============================================================ */

:root {
  /* ---- brand constants: never change these ---- */
  --vc-black:        #050607;
  --vc-steel:        #D8D8D2;   /* logo silver, primary text on dark */
  --vc-amber:        #D79A2B;   /* signal amber on dark grounds */
  --vc-amber-bright: #F2A93B;   /* the key number on dark */
  --vc-amber-deep:   #B7751B;   /* amber rules on light; logo core on light */
  --vc-amber-text:   #8F5A10;   /* amber TEXT on light grounds (5.8:1 on white) */

  /* ---- type families ---- */
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, ui-monospace, monospace;
  --vc-sans: var(--sans);
  --vc-mono: var(--mono);

  /* ---- website type scale (fluid, container 1320) ---- */
  --t-display:   clamp(40px, 5vw, 66px);
  --t-head:      clamp(32px, 4.4vw, 56px);
  --t-statement: clamp(27px, 3.2vw, 40px);
  --t-title:     21px;
  --t-body:      17px;
  --t-body-sm:   15.5px;
  --t-label:     11.5px;

  /* ---- website layout ---- */
  --container: 1320px;
  --gutter:    56px;
  --section-y: 150px;   /* vertical rhythm for every section */
  --head-mb:   64px;    /* space under a section head */
  --measure:   62ch;    /* max line length for body copy */

  /* ---- motion (rules in BRAND.md section 11) ---- */
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);   /* the house ease-out: enters, exits, reveals, hovers */
  --ease-out:    var(--ease);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);   /* things that travel while visible */
  --ease-soft:   cubic-bezier(0.33, 1, 0.68, 1);   /* long quiet reveals, a render drifting */
  --t-press:     140ms;   /* a button giving under the hand */
  --t-hover:     180ms;   /* color, border, underline on hover */
  --t-ui:        240ms;   /* menus, popovers, state changes */
  --t-reveal:    800ms;   /* a section's parts arriving, once */
  --t-shutter:   1100ms;  /* one image or drawing opening, once per page */
}

/* ------------------------------------------------------------
   DARK THEME (default): website, decks
   Text is one color, steel, at four opacities. Every step passes
   4.5:1 on every dark surface below (muted is 5.2:1 on surface-2).
   Solid equivalents on #050607 are given for tools that cannot
   take an alpha (SVG attributes, Design, decks).
   ------------------------------------------------------------ */
:root,
.vc-dark,
[data-theme="dark"] {
  /* surfaces */
  --bg:        #050607;   /* page, deck cover */
  --bg-2:      #0B0D10;   /* bands, deck slide ground */
  --surface:   #15191D;   /* cards, panels */
  --surface-2: #1B2026;   /* hover, nested panels */
  --surface-3: #2C3136;   /* only as a wash behind callouts, never under text */

  /* text: steel at four opacities */
  --text:   var(--vc-steel);                  /* 1.00  #D8D8D2  headlines, primary */
  --text-2: rgba(216, 216, 210, 0.84);        /* 0.84  #B6B6B2  body copy */
  --text-3: rgba(216, 216, 210, 0.72);        /* 0.72  #9D9D99  secondary, nav, labels */
  --muted:  rgba(216, 216, 210, 0.62);        /* 0.62  #888885  dim headline line, captions, sources, footer meta */

  /* lines */
  --line-soft:   rgba(216, 216, 210, 0.07);   /* row dividers inside a component */
  --line:        rgba(216, 216, 210, 0.14);   /* card borders, section rules */
  --line-strong: rgba(216, 216, 210, 0.26);   /* buttons, fields, emphasis */

  /* signal: one amber */
  --accent:      var(--vc-amber);
  --accent-hi:   var(--vc-amber-bright);
  --accent-deep: var(--vc-amber-deep);
  --accent-wash: rgba(215, 154, 43, 0.06);
  --error:       #C76B5C;                     /* form errors only, never decorative */

  /* retired logo gradients (silver body, amber core); the logo is flat since v0.3. Kept for the deck export */
  --silver-0: #F4F2EA;
  --silver-1: #D8D8D2;
  --silver-2: #A9A9A2;
  --amber-0:  #F5BC4A;
  --amber-1:  #B7751B;

  /* legacy names used by site CSS written before Oct 2026.
     New CSS uses the names above. */
  --vulcore-black: var(--bg);
  --graphite:      var(--surface);
  --graphite-2:    var(--surface-2);
  --iron:          var(--surface-3);
  --steel:         var(--text);
  --ink-body:      var(--text-2);
  --silver:        var(--text-3);
  --dim:           var(--muted);
  --faint:         var(--muted);
  --signal-amber:  var(--accent);
  --deep-amber:    var(--accent-deep);
  --amber-wash:    var(--accent-wash);

  /* icons (assets/icons.svg): primary stroke, secondary stroke, the one amber detail */
  --ico-1:     #D8D8D2;
  --ico-2:     #9A9A92;
  --ico-amber: #D79A2B;
}

/* ------------------------------------------------------------
   LIGHT THEME: one-pagers, sheets, print
   Must survive black-and-white printing: never carry meaning
   with amber alone.
   ------------------------------------------------------------ */
.vc-light,
[data-theme="light"] {
  --bg:        #FFFFFF;
  --bg-2:      #F4F4F1;
  --surface:   #F4F4F1;   /* callouts, panels */
  --surface-2: #EBEBE7;
  --surface-3: #DEDED9;

  --text:   #16181A;      /* ink: headlines, values, emphasis */
  --text-2: #3E4246;      /* body */
  --text-3: #5C6166;      /* grey mono: meta, captions, footers */
  --muted:  #5C6166;

  --line-soft:   rgba(22, 24, 26, 0.09);   /* hairlines between rows */
  --line:        rgba(22, 24, 26, 0.17);   /* hairlines between major zones */
  --line-strong: rgba(22, 24, 26, 0.30);

  --accent:      var(--vc-amber-text);     /* amber TEXT: section labels */
  --accent-hi:   var(--vc-amber-text);
  --accent-deep: var(--vc-amber-deep);     /* amber RULES: figure-card tops, callout borders */
  --accent-rule: var(--vc-amber-deep);
  --accent-wash: rgba(183, 117, 27, 0.08);
  --error:       #A8483A;

  --vulcore-black: var(--bg);
  --graphite:      var(--surface);
  --graphite-2:    var(--surface-2);
  --iron:          var(--surface-3);
  --steel:         var(--text);
  --ink-body:      var(--text-2);
  --silver:        var(--text-3);
  --dim:           var(--muted);
  --faint:         var(--muted);
  --signal-amber:  var(--accent);
  --deep-amber:    var(--accent-deep);
  --amber-wash:    var(--accent-wash);

  /* icons: ink on light, amber drawn deep so it separates in grayscale */
  --ico-1:     var(--text);
  --ico-2:     var(--text-3);
  --ico-amber: var(--vc-amber-deep);
}

/* ------------------------------------------------------------
   PRODUCT UI: the operator console and internal tools
   Denser and rounder than the marketing pages, and it needs
   status colors. Marketing pages never use these tokens.
   ------------------------------------------------------------ */
:root {
  /* status, by meaning. Amber means attention, never health. */
  --status-ok:        #5FCF86;   /* live, healthy, within limits */
  --status-ok-soft:   #48A86A;
  --status-ok-glow:   rgba(95, 207, 134, 0.42);
  --status-warn:      var(--accent);
  --status-warn-glow: rgba(215, 154, 43, 0.45);
  --status-crit:      #E0796D;   /* fault, offline, breach */
  --status-crit-glow: rgba(224, 121, 109, 0.45);
  --status-info:      #6FA8CC;   /* activity that is neither good nor bad */
  --status-info-glow: rgba(111, 168, 204, 0.40);

  /* categorical data, product UI only (model and console charts).
     Series 1 is always Vulcore or the answer; the rest are context.
     Decks and marketing charts stay on grey plus amber (BRAND 3.4). */
  --cat-1: var(--accent);
  --cat-2: #6FA8CC;
  --cat-3: #3BA88A;
  --cat-4: #8B7FD0;
  --cat-5: #D2734A;
  --cat-neutral: #7A828C;

  /* corners: marketing is 0; dense UI gets two radii and a pill */
  --r-ui:    12px;   /* panels, cards, map frames */
  --r-ui-sm: 8px;    /* inputs, chips, buttons inside panels */
  --r-ui-xs: 4px;    /* bars, swatches, table cells */
  --r-pill:  999px;

  /* elevation, product UI only (marketing surfaces are flat) */
  --ui-shadow:    0 1px 0 rgba(216, 216, 210, 0.045) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.7), 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --ui-shadow-hi: 0 1px 0 rgba(216, 216, 210, 0.08) inset, 0 20px 48px -16px rgba(0, 0, 0, 0.8);

  /* console roles (BRAND.md 10.5): where each surface goes, so a page names a role, not a step */
  --ui-canvas:     var(--bg);        /* behind the cards */
  --ui-card:       var(--surface);   /* panels, KPI cards, pinned callouts */
  --ui-card-2:     var(--surface-2); /* nested panels, hover */
  --ui-well:       var(--bg-2);      /* maps, drawings, tracks: anything set into a card */
  --ui-fill-amber: var(--accent);    /* amber as a fill: the selected tab, bars, the one primary action */
  --ui-on-amber:   var(--bg);        /* text on that fill */
  --ui-pill-mix:   15%;              /* a status pill's fill is its color at this share */
  --ui-iso-dark:   var(--bg);        /* the dark that shades the side faces of a drawing */
  --ui-shade:      #000000;          /* shadow ink */

  /* density type scale */
  --t-ui-body:  14px;
  --t-ui-sm:    12.5px;
  --t-ui-label: 10.5px;   /* mono, uppercase, 0.16 to 0.26em */
}

/* ---- responsive layout tokens (website) ---- */
@media (max-width: 1024px) {
  :root { --section-y: 130px; --head-mb: 72px; --gutter: 32px; }
}
@media (max-width: 600px) {
  :root { --gutter: 22px; }
}

/* ------------------------------------------------------------
   PRODUCT UI ON LIGHT: the console's Paper mode
   The console runs Night (the dark tokens) or Paper (the light
   theme above). Status and categorical colors darken here so
   text in a status color passes 4.5:1 on white, on #F4F4F1 and
   inside a 12% pill of its own color. BRAND.md 10.5.
   ------------------------------------------------------------ */
.vc-light,
[data-theme="light"] {
  --status-ok:        #1A7343;   /* 5.9:1 on white */
  --status-ok-soft:   #2E8A55;
  --status-ok-glow:   rgba(26, 115, 67, 0.22);
  --status-warn:      var(--accent);
  --status-warn-glow: rgba(183, 117, 27, 0.24);
  --status-crit:      #B23A2E;   /* 5.9:1 on white */
  --status-crit-glow: rgba(178, 58, 46, 0.22);
  --status-info:      #2B6A93;   /* 5.9:1 on white */
  --status-info-glow: rgba(43, 106, 147, 0.22);

  --cat-1: var(--accent-deep);   /* the Vulcore line on light, drawn heavier */
  --cat-2: #2B6A93;
  --cat-3: #1F7F66;
  --cat-4: #5E50B0;
  --cat-5: #A84E26;
  --cat-neutral: #5C6166;

  --ui-canvas:     var(--surface-2); /* grey canvas, white cards: contrast on the figures, not the frame */
  --ui-card:       var(--bg);
  --ui-card-2:     var(--surface);
  --ui-well:       var(--surface);
  --ui-fill-amber: var(--accent-deep);
  --ui-on-amber:   var(--text);      /* 4.7:1 on deep amber */
  --ui-pill-mix:   12%;
  --ui-iso-dark:   var(--text);
  --ui-shade:      rgba(22, 24, 26, 0.30);

  --ui-shadow:    0 1px 2px rgba(22, 24, 26, 0.06), 0 10px 28px -14px rgba(22, 24, 26, 0.20);
  --ui-shadow-hi: 0 2px 4px rgba(22, 24, 26, 0.07), 0 20px 44px -18px rgba(22, 24, 26, 0.28);
}
