/* ============================================================
   NeuroFlow design foundation — tokens (reformation, Phase 2)
   Marketing. Content. AI + Systems.
   Cinematic black & white; colour only as thin "strands" of light.
   Extends the current site's DNA (black canvas, Playfair + Inter);
   does not depend on assets/css/styles.css.
   ============================================================ */

/* Metric-matched fallbacks, so the web-font swap doesn't reflow text (the only
   layout shift on the current site was the Playfair swap on the hero italic).
   Values were MEASURED in Chrome against the loaded fonts (canvas text width over
   headline samples, font-box ascent/descent): Playfair regular = 101.6% of Georgia,
   Playfair italic = 93.4% of Georgia Italic, Inter = 105.9% of Helvetica Neue,
   107.7% of Arial. Overrides are divided by size-adjust because the browser
   scales them by it. Re-measure if the font weights change. */
@font-face {
  font-family: 'Playfair Fallback'; font-style: normal;
  src: local('Georgia'), local('Georgia-Regular');
  size-adjust: 101.6%; ascent-override: 106.3%; descent-override: 24.6%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Playfair Fallback'; font-style: italic;
  src: local('Georgia Italic'), local('Georgia-Italic');
  size-adjust: 93.4%; ascent-override: 115.6%; descent-override: 26.8%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Helvetica Neue'), local('HelveticaNeue');
  size-adjust: 105.9%; ascent-override: 91.6%; descent-override: 22.7%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback Arial';
  src: local('Arial'), local('ArialMT');
  size-adjust: 107.7%; ascent-override: 90.1%; descent-override: 22.3%; line-gap-override: 0%;
}

:root {
  color-scheme: dark;

  /* ---------- neutrals ---------- */
  --nf-ink:        #050506;  /* page */
  --nf-ink-2:      #0A0A0C;  /* alternate band */
  --nf-graphite:   #0E0F12;  /* raised surface */
  --nf-bone:       #F2F1EE;  /* primary text, logo white is #FFF */
  --nf-ash:        #A4A5AC;  /* secondary text — 8.30:1 on ink, 7.81:1 on graphite */
  --nf-smoke:      #7C7D85;  /* tertiary text / labels — 4.98:1 on ink, 4.67:1 on graphite (AA) */
  --nf-line:       rgba(255, 255, 255, 0.10);
  --nf-line-2:     rgba(255, 255, 255, 0.18);
  --nf-white:      #FFFFFF;

  /* ---------- strands: accent colour, never a background ---------- */
  --nf-marketing:  #5B7CFF;  /* electric blue — lead pillar */
  --nf-content:    #9D7BFF;  /* aurora violet */
  --nf-systems:    #8BE9FF;  /* ice cyan — AI + Systems */
  --nf-results:    #3DDC97;  /* emerald — verified outcomes only */
  --nf-catalyst:   #B98CFF;  /* restrained aurora purple — The Company Catalyst */
  --nf-signal:     #BD4B3C;  /* Diagnostic Suite marker (existing suite identity) — non-text only (4.11:1) */

  /* The strand itself is a 1px line that fades in and out at its ends:
       background: linear-gradient(90deg, transparent, var(--strand-color) 22%, var(--strand-color) 78%, transparent);
     Write it on the element (see .strand in site.css), not as a :root token —
     a var() inside a :root custom property resolves at :root, so a per-element
     --strand-color would be ignored. */

  /* ---------- type ---------- */
  --nf-font-display: 'Playfair Display', 'Playfair Fallback', Georgia, serif;
  --nf-font-body:    'Inter', 'Inter Fallback', 'Inter Fallback Arial', system-ui, -apple-system, sans-serif;

  /* fluid scale (min @ 360px → max @ 1440px) */
  --nf-text-xs:   0.75rem;                                   /* labels, legal */
  --nf-text-sm:   0.875rem;
  --nf-text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --nf-text-lg:   clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);   /* lead paragraphs */
  --nf-text-xl:   clamp(1.4rem, 1.2rem + 0.9vw, 2rem);         /* sub-heads */
  --nf-text-2xl:  clamp(2rem, 1.5rem + 2.4vw, 3.4rem);         /* section titles */
  --nf-text-3xl:  clamp(2.6rem, 1.6rem + 4.6vw, 5.6rem);       /* page headlines */
  --nf-text-hero: clamp(3rem, 1.4rem + 7vw, 7.4rem);           /* the one hero line */
  --nf-text-mega: clamp(3.6rem, 0.8rem + 12.4vw, 13rem);       /* the lead-pillar word */

  --nf-leading-tight: 0.96;
  --nf-leading-snug:  1.15;
  --nf-leading-body:  1.65;
  --nf-tracking-display: -0.025em;
  --nf-tracking-label:   0.32em;

  /* ---------- space (4px base, used as rhythm not decoration) ---------- */
  --nf-space-1: 0.25rem;  --nf-space-2: 0.5rem;  --nf-space-3: 0.75rem; --nf-space-4: 1rem;
  --nf-space-5: 1.5rem;   --nf-space-6: 2rem;    --nf-space-7: 3rem;    --nf-space-8: 4rem;
  --nf-space-9: 6rem;     --nf-space-10: 8rem;   --nf-space-11: 12rem;
  --nf-section: clamp(5rem, 3rem + 9vw, 11rem);   /* vertical rhythm between sections */
  --nf-gutter:  clamp(1.25rem, 0.6rem + 3vw, 3rem);

  /* ---------- layout ---------- */
  --nf-max:      1320px;   /* page frame */
  --nf-measure:  62ch;     /* longest comfortable paragraph */
  --nf-measure-s: 44ch;
  --nf-nav-h:    76px;

  /* ---------- shape ---------- */
  --nf-radius-pill: 999px;
  --nf-radius-s: 10px;
  --nf-radius-m: 18px;

  /* ---------- motion ---------- */
  --nf-ease-out:   cubic-bezier(0.22, 1, 0.36, 1);   /* arrivals */
  --nf-ease-inout: cubic-bezier(0.65, 0, 0.35, 1);   /* state changes */
  --nf-dur-1: 160ms;   /* hover, press */
  --nf-dur-2: 320ms;   /* menus, toggles */
  --nf-dur-3: 700ms;   /* reveals */
  --nf-dur-4: 1200ms;  /* strand draws */

  /* ---------- focus ---------- */
  --nf-focus: 0 0 0 2px var(--nf-ink), 0 0 0 4px var(--nf-bone);

  /* ---------- layers ---------- */
  --nf-z-stage: 0; --nf-z-canvas: 1; --nf-z-content: 3; --nf-z-nav: 50; --nf-z-menu: 60; --nf-z-skip: 100;
}

@media (prefers-reduced-motion: reduce) {
  :root { --nf-dur-1: 0ms; --nf-dur-2: 0ms; --nf-dur-3: 0ms; --nf-dur-4: 0ms; }
}
