/* Zentrion design system v0.1: tokens
   Three layers. 1 primitives (raw values, never used in components).
   2 semantic roles (what components use). 3 product themes (a product
   changes only --accent and its companions; the house stays the same).
   Brand architecture: Zentrion is the house (navy, graphite, warm white,
   no accent of its own beyond platinum). AuthorityIQ = gold. Industrial
   Intelligence = teal. Reserved for future segments: terracotta, sage, cobalt.
   AuthorityIQ values match the shipped app (AETheme) so web and app agree. */

@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-21FF, U+2212, U+2215, U+2260, U+25A0-25FF; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-21FF, U+2212, U+2215, U+2260, U+25A0-25FF; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-21FF, U+2212, U+2215, U+2260, U+25A0-25FF; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.woff") format("woff"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-21FF, U+2212, U+2215, U+2260, U+25A0-25FF; }

:root {
  /* 1. primitives */
  --p-navy-950: #070B14;  --p-navy-900: #0C1224;  --p-navy-800: #0F172A;
  --p-navy-700: #1A2238;  --p-navy-600: #243049;  --p-graphite: #2B303B;
  --p-white-warm: #F4F0E7; --p-cream: #F3EBDD;    --p-paper: #FBF9F4;
  --p-ink: #141821;        --p-slate-300: #CBD5E1; --p-slate-400: #94A3B8; --p-slate-600: #556070;
  --p-platinum: #C9D1DC;
  --p-gold: #E7BE53;  --p-gold-soft: #F0D17E;  --p-gold-deep: #8A6D1A;
  --p-teal: #78D7CF;  --p-teal-soft: #A6E7E1;  --p-teal-deep: #1F6B66;
  /* segment accents: each has a navy-ground value and a warm-white value, both >= 4.5:1 for text */
  --p-gold-ink: #965F00;                            /* AuthorityIQ on warm white (AA) */
  --p-terracotta: #E27A6F; --p-terracotta-ink: #A33A2A;   /* reserved */
  --p-sage: #9DB88A;       --p-sage-ink: #4F6B3E;         /* reserved */
  --p-cobalt: #7EA2F0;     --p-cobalt-ink: #2F55B5;       /* reserved */

  /* 2. semantic roles: dark ground (default) */
  --ground: var(--p-navy-900);
  --ground-deep: var(--p-navy-950);
  --surface: var(--p-navy-700);
  --surface-raised: var(--p-navy-600);
  --line: rgba(201, 209, 220, 0.16);
  --text: #F8FAFC;
  --text-soft: var(--p-slate-300);
  --text-quiet: var(--p-slate-400);
  --accent: var(--p-platinum);          /* the house: neutral */
  --accent-strong: #FFFFFF;
  --on-accent: var(--p-navy-900);
  --focus: var(--p-gold-soft);

  /* type: one family, a spoken-line serif from the system */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-spoken: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  /* scale 1.25, fluid at the top */
  --t-display: clamp(2.5rem, 1.4rem + 4.6vw, 4.75rem);   /* one per page */
  --t-h1: clamp(2rem, 1.3rem + 2.8vw, 3.25rem);
  --t-h2: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  --t-h3: 1.25rem;
  --t-h4: 1.125rem;      /* m22n: names inside a group (a row title, a card title) */
  --t-lead: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
  --t-body: 1rem;        /* running text */
  --t-small: 0.9375rem;  /* m22n: dense running text, never below 15px (was 14px) */
  --t-micro: 0.8125rem;  /* captions, chips, table meta: the floor, 13px */
  --t-meta: var(--t-micro);
  --t-label: 0.875rem;   /* m22n: group names and field labels, normal case */
  --lh-tight: 1.06; --lh-head: 1.18; --lh-body: 1.6;
  --track-display: -0.03em; --track-head: -0.015em; --track-label: 0.04em;
  --measure: 62ch;

  /* space: 4 px base, same steps as the app */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 40px; --s-7: 64px; --s-8: 96px; --s-9: 144px;
  --gutter: clamp(16px, 4vw, 40px);
  --page: 1200px;
  --section: clamp(64px, 9vw, 144px);
  /* m22n: one section rhythm for every page, three steps */
  --sec-tight: clamp(40px, 4.5vw, 64px);
  --sec-normal: clamp(64px, 7.5vw, 112px);
  --sec-loose: clamp(88px, 10vw, 144px);

  /* shape and depth: hierarchy decides the radius, not habit */
  --r-control: 8px;   /* buttons, inputs */
  --r-card: 14px;     /* cards, product doors */
  --r-stage: 22px;    /* the stage / hero media only */
  --shadow-stage: 0 30px 80px -30px rgba(0, 0, 0, 0.65);
  --tap: 48px;

  /* motion: answers an action; one orchestrated entrance at most */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 160ms; --base: 320ms; --slow: 640ms;
}

/* light ground: any block with this attribute swaps the semantic roles */
[data-ground="light"] {
  --ground: var(--p-white-warm);
  --ground-deep: var(--p-cream);
  --surface: var(--p-paper);
  --surface-raised: #FFFFFF;
  --line: rgba(20, 24, 33, 0.14);
  --text: var(--p-ink);
  --text-soft: #3A4250;
  --text-quiet: var(--p-slate-600);
  --accent: var(--p-navy-800);
  --accent-strong: var(--p-navy-950);
  --on-accent: #FFFFFF;
  --focus: var(--p-gold-deep);
}

/* 3. segment themes: a segment changes only its accent. One block per segment:
      --seg (navy ground), --seg-strong (navy ground, hover/emphasis), --seg-ink (warm-white ground).
      All three meet 4.5:1 for text on their ground; hues sit at least 38 degrees apart; never purple. */
[data-product="authorityiq"] { --seg: var(--p-gold);       --seg-strong: var(--p-gold-soft); --seg-ink: var(--p-gold-ink); }
[data-product="industrial"]  { --seg: var(--p-teal);       --seg-strong: var(--p-teal-soft); --seg-ink: var(--p-teal-deep); }
[data-product="example"]     { --seg: var(--p-terracotta); --seg-strong: #F0A79E;            --seg-ink: var(--p-terracotta-ink); }  /* demo pages only */
[data-product="example-two"] { --seg: var(--p-cobalt);     --seg-strong: #B3C8F6;            --seg-ink: var(--p-cobalt-ink); }      /* demo pages only */
/* reserved, unused until a segment exists (copy one line, change the id):
   [data-product="<id>"] { --seg: var(--p-sage);   --seg-strong: #C3D6B6; --seg-ink: var(--p-sage-ink); }
 */
[data-product] { --accent: var(--seg); --accent-strong: var(--seg-strong); --on-accent: var(--p-navy-900); }
[data-ground="light"][data-product], [data-ground="light"] [data-product] { --accent: var(--seg-ink); --accent-strong: var(--seg-ink); --on-accent: #FFFFFF; }

/* base rules every page shares */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 var(--t-body)/var(--lh-body) var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 600; line-height: var(--lh-head); letter-spacing: var(--track-head); text-wrap: balance; margin: 0; }
p { margin: 0; max-width: var(--measure); }
img, svg { max-width: 100%; display: block; }
/* m22n: browser surfaces from the palette. One focus ring: a cream ring with a navy halo, visible on navy and on cream. */
:focus-visible { outline: 2px solid #F4F0E7; outline-offset: 2px; box-shadow: 0 0 0 5px #0A1120; border-radius: 4px; }
::selection { background: rgba(231, 190, 83, 0.42); color: inherit; }
.x-dark::selection, .x-dark ::selection { background: rgba(120, 215, 207, 0.38); color: #F8FAFC; }
.bf ::selection { background: Highlight; color: HighlightText; }  /* the protected hero keeps the browser's own selection */
html { accent-color: var(--p-gold); caret-color: var(--p-gold-ink); }
.x-dark { caret-color: var(--p-gold); }
/* internal scrollers only (the page's own scrollbar is left to the browser) */
body * { scrollbar-color: rgba(148, 163, 184, 0.55) transparent; scrollbar-width: thin; }
body *::-webkit-scrollbar { width: 10px; height: 10px; }
body *::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.55); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
body *::-webkit-scrollbar-track { background: transparent; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* component contracts (names fixed; layout is the page's own)
   .z-button            primary action: background var(--accent), color var(--on-accent), radius var(--r-control), min-height var(--tap)
   .z-button--quiet     text + 1px var(--line) border
   .z-status            product status ("In development"): small text, 1px border in var(--accent), no fill
   .z-door              product door (card): surface, radius var(--r-card), carries data-product
   .z-stage             the rehearsal stage: radius var(--r-stage), shadow var(--shadow-stage), data-product="authorityiq"
   .z-spoken            a spoken line: var(--font-spoken), quotation marks, never italic
   .z-drawing           engineering drawing (inline SVG): stroke var(--accent), 1 to 1.5 px lines, no fills except 8% tints
   .z-chain             the four-part chain Packed / In transit / Arrived / Verified */

/* ---------- z-sig: the signature line ----------
   A thin line of light, gold on the left into teal on the right, with a soft glow.
   Drawn once when it scrolls into view (motion.js adds .drawn); static without JS,
   under reduced motion and with ?still=1. Use sparingly: hero-to-body divider,
   between the two pillars, top of a closing call to action. */
.z-sig{display:block;position:relative;height:2px;width:100%;border-radius:2px;
  background:linear-gradient(90deg,rgba(231,190,83,0) 0%,var(--p-gold) 14%,var(--p-gold) 40%,var(--p-teal) 60%,var(--p-teal) 86%,rgba(120,215,207,0) 100%);
  transform-origin:left center}
.z-sig::after{content:"";position:absolute;left:0;right:0;top:-3px;height:8px;background:inherit;filter:blur(5px);opacity:.75;border-radius:8px}
.anim .z-sig:not(.drawn){transform:scaleX(0);opacity:0}
.anim .z-sig.drawn{transform:scaleX(1);opacity:1;transition:transform 1.4s cubic-bezier(.22,.7,.2,1),opacity .4s}
.z-sig-inline{display:inline-block;width:56px;vertical-align:middle;flex:none}
@media (prefers-reduced-motion: reduce){ .z-sig,.anim .z-sig:not(.drawn){transform:none;opacity:1;transition:none} }
