/* WWOW Design System v2 · tokens
   Extracted from the locked website prototype "Direction A v3" (Rounds 6–13). Nothing here is new design:
   every value exists in the pages or in the website's ds/tokens.css. See decisions.md for every change.
   Layers: 1 primitives → 2 semantic roles → 3 component tokens → 4 context (light/dark switching).
   Rules from the decisions log sit as comments next to the values they govern.
   DEPRECATED aliases (kept for one release, the website pages still use them) are marked "deprecated". */
:root {
  /* ─── 1 · PRIMITIVES ─────────────────────────────────────────────── */
  /* Brand, fixed. The only two brand colours. */
  --wwow-navy: #002A4F;
  --wwow-orange: #F76300;

  /* Navy scale (lightness order). Dark grounds always step around WWOW Navy. */
  --p-navy-950: #00172D;
  --p-navy-900: #001D38;
  --p-navy-850: var(--wwow-navy);
  --p-navy-800: #0E3456;
  --p-navy-750: #0A3A63;
  --p-navy-700: #164369;
  --p-navy-650: #134A78;
  --p-navy-600: #1D4A72;
  --p-navy-550: #2E5A84;
  --p-navy-500: #33608A;
  --p-navy-450: #4A739B;
  --p-navy-300: #86A9CC;   /* hex pattern stroke only (inside SVG data URIs) */
  --p-navy-280: #8FA6BE;
  --p-navy-250: #9FB4CA;
  --p-navy-200: #C3D2E1;
  --p-navy-150: #DCE4EE;
  --p-navy-100: #E3ECF5;
  --p-navy-75: #EEF2F6;
  --p-navy-50: #F2F6FA;

  /* Orange scale. Hover and pressed are approved darker shades (Round 6); the tint is for chips only. */
  --p-orange-500: var(--wwow-orange);
  --p-orange-600: #DD5800;
  --p-orange-700: #C24E00;
  --p-orange-800: #A84300;
  --p-orange-100: #FFE8D6;

  /* Neutrals: cool greys for text, warm greys for light grounds and lines */
  --p-grey-900: #1A1A1A;
  --p-grey-800: #3D3D3D;
  --p-grey-750: #505050;
  --p-grey-700: #5E5E5E;
  --p-grey-550: #858585;
  --p-grey-450: #9A9A9A;
  --p-grey-350: #C4C4C4;
  --p-warm-300: #E4DFD7;
  --p-warm-200: #ECE8E1;
  --p-warm-100: #F6F4F0;
  --p-white: #FFFFFF;

  /* Error reds */
  --p-red-700: #C62828;
  --p-red-300: #FF8A80;

  /* ─── 2 · SEMANTIC ROLES ─────────────────────────────────────────── */
  /* Grounds */
  --ground-darkest: var(--p-navy-950);      /* footer */
  --ground-dark: var(--p-navy-900);         /* hero, header, mobile menu, plan finder, dark sections and panels */
  --ground-dark-raised: var(--p-navy-850);  /* customer strip, closing band, submenu, diagram cards, reach cards */
  --ground-dark-inset: var(--p-navy-650);   /* diagram rows, the bottom layer of the HCL Domino stack, "You" cells */
  --ground-light: var(--p-warm-100);        /* warm off-white sections */
  --ground-white: var(--p-white);           /* cards, white sections, tables, dialog */
  --ground-selected: var(--p-navy-75);      /* matching plan row, plan summary, notices, "Included" tiles */
  --placeholder-dark: var(--p-navy-750);    /* photo slot on a dark ground */
  --placeholder-light: var(--p-warm-200);   /* photo slot on a light ground */
  --placeholder-stripe-dark: rgba(255, 255, 255, 0.05);
  --placeholder-stripe-light: rgba(0, 42, 79, 0.06);
  /* Card rule (Round 12): on --ground-light, cards are --ground-white with no border.
     On --ground-white, cards are --ground-white with a 1px --line-light border. No grey card on a white ground.
     Tables keep their 1px --line-light border on either ground. Five card types only: plain, bordered,
     orange edge, selected tint, dark outline. A stretched link is a behaviour any card can take, not a type.
     Dark ground rule (Round 12): at most one dark content section between the hero and the closing band,
     and never directly before the closing band. The Home proof marquee counts as the base of the hero.
     Section rhythm: light sections alternate --ground-light and --ground-white; never three of one in a row. */

  /* Tints and marks */
  --tint-navy: var(--p-navy-150);           /* navy-grey chip, "Best fit", spec chips, the "Included" tile border · text --text-heading 11:1 */
  --mark-you: var(--p-navy-280);            /* "You" mark in the matrix (solid dot, and the navy half of Shared) */
  --chip-bg: var(--p-orange-100);           /* light orange fill: chips, step numbers, selected reply chip */
  --chip-fg: var(--p-orange-800);           /* 5.6:1 on --chip-bg */

  /* Text on light grounds: neutral grey, headings navy */
  --text-heading: var(--wwow-navy);
  --text-ink: var(--p-grey-900);
  --text-body: var(--p-grey-800);
  --text-body-soft: var(--p-grey-750);
  --text-muted: var(--p-grey-700);          /* 5.8:1 on --ground-light */
  --text-faint: var(--p-grey-450);          /* decorative only, never text */

  /* Text on dark grounds: one navy-tinted set */
  --text-on-dark-strong: var(--p-navy-50);  /* headings, values, current item */
  --text-on-dark: var(--p-navy-100);        /* nav, links, body */
  --text-on-dark-soft: var(--p-navy-200);   /* lead, captions, diagram labels */
  --text-on-dark-muted: var(--p-navy-250);  /* labels, help, meta · 6.8:1 on --ground-dark-raised */

  /* Lines */
  --line-light: var(--p-warm-300);
  --line-light-soft: var(--p-warm-200);
  --line-light-control: var(--p-grey-350);  /* outline button and icon button on light */
  --line-darkest: var(--p-navy-800);        /* footer */
  --line-dark: var(--p-navy-700);           /* header, sections on --ground-dark */
  --line-dark-raised: var(--p-navy-600);    /* raised panels, submenus */
  --line-dark-strong: var(--p-navy-550);    /* diagram edges, reach cards, step rule on dark */
  --line-dark-input: var(--p-navy-500);     /* input dividers on dark */
  --line-dark-control: var(--p-navy-450);   /* outline button and icon button on dark */
  --line-selected: var(--wwow-navy);        /* matching plan card edge (mobile) */

  /* Action */
  --action: var(--wwow-orange);
  --action-hover: var(--p-orange-600);
  --action-pressed: var(--p-orange-700);
  --action-label: var(--p-white);           /* 3.1:1 on --action. Accepted exception, designer's decision */
  --accent: var(--wwow-orange);             /* icons, arrows, markers, rays; orange TEXT on navy only */
  --accent-text-on-light: var(--p-orange-700); /* orange text on light grounds (step digits) · 4.8:1 on white */
  --link-hover: var(--wwow-orange);         /* link label, outline label + border on hover. Links have no underline in any state */

  /* Focus */
  --focus: var(--p-orange-600);             /* ≥3:1 on every ground: 3.5 light, 3.8 white, 4.4 dark, 3.9 navy */
  --focus-width: 2px;
  --focus-offset: 2px;
  --focus-on-primary-dark: var(--text-on-dark-strong); /* ring on the orange primary button, dark grounds */
  --focus-on-primary-light: var(--wwow-navy);          /* ring on the orange primary button, light grounds */

  /* Error · Error rule (Round 13): on any dark ground, field border, error icon and message use --error-on-dark.
     On light grounds they use --error. Orange is for focus only. */
  --error: var(--p-red-700);                /* 5.6:1 on white */
  --error-line: var(--error);
  --error-on-dark: var(--p-red-300);        /* 7.7:1 on --ground-dark */

  /* ─── Type ─── */
  --f-head: 'Space Grotesk', system-ui, sans-serif;  /* @kind font */ /* 600 only: headings, buttons, action links with arrow, display numbers, FAQ questions */
  --f-body: 'Google Sans', system-ui, sans-serif;    /* @kind font */ /* 400 body, forms, tables · 500 navigation · 600 inline links, labels, field labels, errors */
  --f-mono: 'Space Mono', ui-monospace, monospace;   /* @kind font */ /* raw values only (25 GB, RAID 1), always --fs-mono. Words around them stay --f-body */
  --f-icon: 'Material Symbols Rounded';              /* @kind font */ /* always 'wght' 300; 'FILL' 1 only on status and error icons */
  --w-regular: 400; /* @kind font */
  --w-nav: 500;     /* @kind font */ /* header nav, submenu, mobile nav, breadcrumb, customer strip, matrix cell labels */
  --w-strong: 600;  /* @kind font */ /* inline links, labels, eyebrows, field labels, error text */
  --w-head: 600;    /* @kind font */
  --w-action: 600;  /* @kind font */

  --fs-h1: clamp(40px, 5.2vw, 72px);   /* @kind font */
  --fs-h2: clamp(28px, 3.4vw, 46px);   /* @kind font */
  --fs-h3: clamp(22px, 1.9vw, 26px);   /* @kind font */
  --fs-h4: 20px;      /* @kind font */
  --fs-lead: 17px;    /* @kind font */
  --fs-body: 15px;    /* @kind font */
  --fs-sm: 14px;      /* @kind font */
  --fs-xs: 13px;      /* @kind font */
  --fs-label: 12px;   /* @kind font */ /* sentence case, weight 600, normal tracking. No uppercase labels anywhere */
  --fs-mono: 13px;    /* @kind font */ /* the only Space Mono size */
  --fs-price: 32px;   /* @kind font */ /* display price only (Home plan cards). Table and dialog prices stay at their table sizes */
  --fs-input: 16px;   /* @kind font */ /* stops iOS zooming on focus */
  --fs-nav: var(--fs-sm); /* @kind font */
  --fs-marquee: clamp(24px, 2.4vw, 32px); /* @kind font */

  --t-h1: -0.04em;    /* @kind font */
  --t-h2: -0.035em;   /* @kind font */ /* H2, timeline years, marquee figures */
  --t-h3: -0.03em;    /* @kind font */ /* H3, H4, prices, large call links */

  /* Line-heights (8 roles, replacing 15 literals; see decisions.md D-04 for the snap table) */
  --lh-tight: 1;      /* @kind font */ /* single-line display numbers, icons, chips, years */
  --lh-h1: 1.02;      /* @kind font */
  --lh-h2: 1.1;       /* @kind font */
  --lh-h3: 1.15;      /* @kind font */
  --lh-h4: 1.25;      /* @kind font */ /* H4, FAQ questions, step titles */
  --lh-ui: 1.5;       /* @kind font */ /* UI text, lists, small text, captions */
  --lh-body: 1.6;     /* @kind font */
  --lh-lead: 1.6;     /* @kind font */

  /* Measure (line length) */
  --measure-s: 46ch;  /* @kind spacing */
  --measure: 58ch;    /* @kind spacing */ /* body and leads, hero leads included */
  --h2-measure: 28ch; /* @kind spacing */ /* H2 cap: two balanced lines, never 3–5 short ones */

  /* ─── Space and layout ─── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --page-max: 1280px;
  --page-gutter: clamp(20px, 4vw, 48px);      /* @kind spacing */
  --section-y: clamp(64px, 8vw, 112px);       /* @kind spacing */
  /* Hero padding rule (v2): every hero, Home and interior, uses --hero-top and --hero-bottom. */
  --hero-top: clamp(56px, 6.5vw, 96px);       /* @kind spacing */
  --hero-bottom: clamp(48px, 6vw, 88px);      /* @kind spacing */
  /* Breakpoints (media queries can't read variables: these are the values to write, and for JS)
     1024 layout and navigation switch · 768 timeline turns vertical · 640 footer and small grids.
     Grids otherwise reflow with auto-fit + clamp(). Three-card rule: 3 across or stacked, never 2 + 1. */
  --bp-l: 1024px;     /* @kind other */
  --bp-m: 768px;      /* @kind other */
  --bp-s: 640px;      /* @kind other */

  /* ─── Radius ─── */
  --radius-xs: 4px;     /* tags, diagram rows, layer-grid cells, focus ring */
  --radius-s: 6px;      /* inputs, selects, stepper */
  --radius-m: 8px;      /* plan summary, soft warning, CAPTCHA panel, icon tiles, coverage labels, photo caption */
  --radius-menu: 10px;  /* header dropdowns */
  --radius-l: 12px;     /* cards, tiles, tables, photo slots and image slots */
  --radius-xl: 16px;    /* dialog, two-location site cards */
  --radius-pill: 999px; /* buttons, chips, nav indicators */

  /* ─── Shadow, overlay ─── */
  --shadow-header: 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-menu: 0 24px 48px -16px rgba(0, 0, 0, 0.6);   /* dropdowns, two-location site cards */
  --shadow-modal: 0 32px 64px -24px rgba(0, 0, 0, 0.5);
  --scrim: rgba(0, 23, 45, 0.64);

  /* ─── 3 · COMPONENT TOKENS ───────────────────────────────────────── */
  /* Buttons · variants: primary, outline, link, icon. Pill radius.
     States: hover (primary → --action-hover; outline/link → --link-hover on label and border), focus,
     pressed and loading on primary only, disabled at 50% on every variant. */
  --btn-radius: var(--radius-pill);
  --btn-m-h: 32px;  --btn-m-fs: 14px; --btn-m-px: 14px; --btn-m-gap: 6px;
  --btn-l-h: 36px;  --btn-l-fs: 15px; --btn-l-px: 16px; --btn-l-icon: 20px; --btn-l-gap: 8px;
  --btn-disabled-opacity: 0.5; /* @kind other */
  /* Main actions: M on desktop, L below 1024px (switched below) */
  --btn-main-h: var(--btn-l-h);  --btn-main-fs: var(--btn-l-fs);

  /* Header */
  --header-h: 60px;
  --header-h-compact: 46px;          /* after 80px of scroll, 200ms ease, plus --shadow-header */
  --logo-h: 31px;
  --logo-h-compact: 22px;
  --header-btn-h-compact: 28px;      /* Contact us in the compact header */
  --header-btn-fs-compact: 13px;
  --header-btn-px-compact: 12px;

  /* Closing band figure: base height of the waist-up cut-out (width:auto). Per-figure scale and shift belong to the page. */
  --cf-height: clamp(260px, 26vw, 380px); /* @kind spacing */

  /* Footer */
  --footer-top: 64px;
  --footer-top-s: 40px;              /* below 640px: logo hidden, 2-column link grid */
  --logo-footer-h: 28px;
  --logo-partner-h: 24px;

  /* Inputs */
  --input-h: 44px;                   /* hit target on mobile; also the icon-tile size */
  --input-bg: var(--ground-white);
  --input-line: var(--p-grey-550);   /* 3.6:1 on white, 3.3:1 on --ground-light */

  /* Chips and list markers. Markers (Round 12), two only:
     hollow ring = what's included, features, topics · tick (check_circle, FILL 0, --accent) = who it's for, qualifications. */
  --chip-h: 24px;                    /* also the step-number circle */
  --bullet-size: 7px;
  --bullet-line: 1.5px;
  --bullet-color: var(--accent);
  /* Step rule (v2): one step, two layouts. A 24px --chip-bg circle with the number (--f-head 600, --fs-sm, --chip-fg),
     then the H3 (--fs-h4) and its text. Columns: a 1px --line-light top rule per step (Hosting, Modernization).
     Row list: number on the left, 1px --line-light rules between rows (Home "How we work").
     Compact use (Contact "What happens next", About "How we work"): the same at --fs-sm, no H3.
     The 2px navy rule with a bare number is retired. A set of topics is a list with a marker, not steps. */

  /* Icons · Material Symbols Rounded, 'wght' 300 */
  --icon-s: 18px;
  --icon-m: 20px;
  --icon-l: 24px;
  --icon-feature: 32px;              /* feature icons on cards */
  --icon-xl: 40px;                   /* reach cards, fact cards, spot icons */
  --spot-h: 64px;                    /* white circle behind a spot icon */

  /* Eyebrow, marquee, motion */
  --eyebrow-mark: 14px;              /* orange WWOW symbol (wwow-symbol-clean.svg) before every hero eyebrow */
  --eyebrow-spin: 14.5;              /* @kind other */ /* seconds per linear turn; still under reduced motion */
  --marquee-mark: clamp(22px, 2.2vw, 30px); /* @kind spacing */
  --marquee-mark-spin: 16;           /* @kind other */ /* seconds per turn of the marquee separators */
  --marquee-fade: clamp(32px, 8vw, 120px);  /* @kind spacing */
  --marquee-gap: clamp(24px, 3vw, 40px);    /* @kind spacing */
  --marquee-speed: 48;               /* @kind other */ /* px per second, read by JS */
  --ease-out: cubic-bezier(.2, .7, .2, 1); /* @kind other */ /* reveal */

  /* Data */
  --node-size: 8px;                  /* timeline node */
  --meter-w: 8px;                    /* priority meter bar: --wwow-navy for Low and Normal, --accent for High and Urgent */
  --meter-h: 16px;
  --modal-max: 640px;
  --card-edge: linear-gradient(135deg, var(--ground-white) 35%, var(--accent)); /* 1px orange edge: HCL Domino "Built for…", About "Who we work with", Modernization assessment items */

  /* Hex pattern (written inside SVG data URIs, so these are reference values, not live variables)
     stroke --p-navy-300 #86A9CC at 0.14 in heroes and 0.2 in closing bands; navy #002A4F at 0.09 on white (About contact band). */
  --hex-tile-w: 84px;
  --hex-tile-h: 145.5px;

  /* ─── 4 · CONTEXT (light by default; dark grounds override these in components.css) ─── */
  --ctx-heading: var(--text-heading);
  --ctx-ink: var(--text-ink);
  --ctx-text: var(--text-body);
  --ctx-soft: var(--text-body-soft);
  --ctx-muted: var(--text-muted);
  --ctx-line: var(--line-light);
  --ctx-line-soft: var(--line-light-soft);
  --ctx-control: var(--line-light-control);
  --ctx-input-line: var(--input-line);
  --ctx-error: var(--error);
  --ctx-ring-primary: var(--focus-on-primary-light);
  --ctx-accent-text: var(--accent-text-on-light);
  --ctx-surface: var(--ground-white);

  /* ─── DEPRECATED aliases (one release; remove once the website pages are migrated) ─── */
  --w-label: var(--w-strong);        /* @kind font */ /* deprecated → --w-strong */
  --f-ui: var(--f-body);             /* @kind font */ /* deprecated → --f-body */
  --f-table: var(--f-body);          /* @kind font */ /* deprecated → --f-body */
  --chip-navy-bg: var(--tint-navy);  /* deprecated → --tint-navy */
  --ground-sunken: var(--placeholder-light); /* deprecated → --placeholder-light */
}
@media (min-width: 1024px) {
  :root { --btn-main-h: var(--btn-m-h); --btn-main-fs: var(--btn-m-fs); }
}
/* Touch: below 1024px every button reaches a 44px (L) / 40px (M) hit target */
@media (max-width: 1023px) {
  :root { --btn-l-h: 44px; --btn-m-h: 40px; }
}
