/* ──────────────────────────────────────────────────────────────
   FYI DIGITAL — colors & type
   Core tokens for the entire system. Import first, above everything.
   ────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT,WONK@0,9..144,100..900,0..100,0..1;1,9..144,100..900,0..100,0..1&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

:root {
  /* ── Palette: Core ─────────────────────────────────────────── */
  --fyi-navy:         #0D1B2A;   /* primary dark surface          */
  --fyi-navy-deep:    #07111C;   /* deeper variant — aurora base  */
  --fyi-navy-soft:    #162B42;   /* card on navy                  */
  --fyi-teal:         #0D9488;   /* brand accent on light         */
  --fyi-teal-a11y:    #2DD4BF;   /* brand accent on dark          */
  --fyi-teal-deep:    #0A6E66;   /* pressed / hover-dark state    */
  --fyi-warm-white:   #F7F5F2;   /* primary light surface         */
  --fyi-warm-white-2: #EEEAE2;   /* muted light surface           */
  --fyi-paper:        #FAF8F5;   /* ultra-subtle off-white        */

  /* ── Palette: Ink (text on light) ──────────────────────────── */
  --ink-100: #0D1B2A;  /* primary text */
  --ink-80:  #1F2B3D;  /* body strong */
  --ink-60:  #4A5767;  /* body */
  --ink-40:  #7A8494;  /* muted / meta */
  --ink-20:  #B5BCC7;  /* disabled / borders strong */
  --ink-10:  #D8DCE2;  /* hairlines */
  --ink-5:   #E8EAEE;  /* dividers */

  /* ── Palette: Paper (text on dark) ─────────────────────────── */
  --paper-100: #F7F5F2;
  --paper-80:  #D8D2C8;
  --paper-60:  #A8A196;
  --paper-40:  #6E6B63;
  --paper-20:  #3A3D44;
  --paper-10:  #1F2633;

  /* ── Aurora / atmosphere ───────────────────────────────────── */
  --aurora-1: #0D9488;
  --aurora-2: #2DD4BF;
  --aurora-3: #1E3A8A;
  --aurora-4: #0B4A43;

  /* ── Cerulean · editorial accent (from site) ──────────────── */
  --cerulean-900: #1E3A8A;
  --cerulean-500: #3B82F6;
  --cerulean-400: #60A5FA;
  --cerulean-50:  #DBEAFE;

  /* ── Signal colors (data viz + states) ─────────────────────── */
  --signal-pos:   #10B981;  /* gains, ROAS up */
  --signal-neg:   #E11D48;  /* losses, CPA up */
  --signal-warn:  #F59E0B;  /* watch / caution */
  --signal-info:  #3B82F6;

  /* ── Semantic surface ──────────────────────────────────────── */
  --surface-0:    var(--fyi-warm-white);
  --surface-1:    var(--fyi-paper);
  --surface-2:    #FFFFFF;
  --surface-inv:  var(--fyi-navy);
  --surface-inv-2: var(--fyi-navy-soft);

  /* ── Borders ───────────────────────────────────────────────── */
  --border-hair:   color-mix(in oklch, var(--ink-100) 8%, transparent);
  --border-soft:   color-mix(in oklch, var(--ink-100) 12%, transparent);
  --border-strong: color-mix(in oklch, var(--ink-100) 24%, transparent);
  --border-inv-hair:   color-mix(in oklch, var(--paper-100) 10%, transparent);
  --border-inv-soft:   color-mix(in oklch, var(--paper-100) 16%, transparent);
  --border-inv-strong: color-mix(in oklch, var(--paper-100) 28%, transparent);

  /* ── Typography: families ──────────────────────────────────── */
  --font-serif: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-sans:  'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* ── Type scale (fluid-ish, bias editorial) ────────────────── */
  --fs-xs:   11px;
  --fs-sm:   13px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  36px;
  --fs-3xl:  48px;
  --fs-4xl:  64px;
  --fs-5xl:  88px;
  --fs-6xl:  120px;
  --fs-7xl:  168px;

  /* ── Weight scale ──────────────────────────────────────────── */
  --fw-thin: 200;
  --fw-reg:  400;
  --fw-med:  500;
  --fw-semi: 600;
  --fw-bold: 700;
  --fw-black: 900;

  /* ── Line-heights ──────────────────────────────────────────── */
  --lh-tight: 0.95;
  --lh-snug:  1.08;
  --lh-head:  1.15;
  --lh-body:  1.55;
  --lh-loose: 1.7;

  /* ── Letter-spacing ────────────────────────────────────────── */
  --tr-tight:  -0.04em;
  --tr-snug:   -0.02em;
  --tr-normal:  0;
  --tr-wide:    0.04em;
  --tr-eyebrow: 0.14em;  /* uppercase eyebrows */

  /* ── Spacing scale (4px baseline) ──────────────────────────── */
  --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;
  --sp-40: 160px;

  /* ── Radii (restrained — editorial, not bubbly) ────────────── */
  --r-0:   0;
  --r-xs:  2px;
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-2xl: 24px;
  --r-pill: 999px;

  /* ── Shadows (used sparingly — prefer borders + space) ─────── */
  --sh-hair:  0 1px 0 rgba(13, 27, 42, 0.04);
  --sh-sm:    0 1px 2px rgba(13, 27, 42, 0.06), 0 1px 1px rgba(13,27,42,0.04);
  --sh-md:    0 8px 24px -8px rgba(13, 27, 42, 0.12), 0 2px 4px rgba(13,27,42,0.04);
  --sh-lg:    0 24px 56px -16px rgba(13, 27, 42, 0.18), 0 4px 8px rgba(13,27,42,0.06);
  --sh-glass: 0 1px 0 inset rgba(255,255,255,0.08), 0 8px 32px -4px rgba(0,0,0,0.32);

  /* ── Motion ────────────────────────────────────────────────── */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out:    cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:    140ms;
  --dur-base:    240ms;
  --dur-slow:    480ms;
  --dur-epic:    880ms;

  /* ── Layout constants ──────────────────────────────────────── */
  --container:   1280px;
  --container-narrow: 920px;
  --gutter:      clamp(16px, 4vw, 32px);
}

/* ──────────────────────────────────────────────────────────────
   Semantic type — use these in components via class or @apply-style
   ────────────────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-med);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--ink-60);
}
.eyebrow--inv { color: var(--paper-60); }
.eyebrow::before { content: "— "; opacity: 0.6; }

.h-display {
  font-family: var(--font-serif);
  font-weight: var(--fw-reg);
  font-size: clamp(56px, 9vw, var(--fs-7xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
}
.h1 {
  font-family: var(--font-serif);
  font-weight: var(--fw-reg);
  font-size: clamp(40px, 6vw, var(--fs-5xl));
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  font-variation-settings: "opsz" 96, "SOFT" 30;
}
.h2 {
  font-family: var(--font-serif);
  font-weight: var(--fw-reg);
  font-size: clamp(32px, 4.5vw, var(--fs-4xl));
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  font-variation-settings: "opsz" 72;
}
.h3 {
  font-family: var(--font-serif);
  font-weight: var(--fw-reg);
  font-size: var(--fs-2xl);
  line-height: var(--lh-head);
  letter-spacing: var(--tr-snug);
  font-variation-settings: "opsz" 48;
}
.h4 {
  font-family: var(--font-sans);
  font-weight: var(--fw-semi);
  font-size: var(--fs-xl);
  line-height: var(--lh-head);
  letter-spacing: var(--tr-snug);
}
.h5 {
  font-family: var(--font-sans);
  font-weight: var(--fw-semi);
  font-size: var(--fs-lg);
  line-height: var(--lh-head);
}
.lede {
  font-family: var(--font-sans);
  font-weight: var(--fw-reg);
  font-size: var(--fs-lg);
  line-height: var(--lh-body);
  color: var(--ink-80);
  text-wrap: pretty;
}
.body {
  font-family: var(--font-sans);
  font-weight: var(--fw-reg);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--ink-60);
}
.meta {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  color: var(--ink-40);
}
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0;
}
.metric {
  font-family: var(--font-serif);
  font-weight: var(--fw-reg);
  font-size: var(--fs-4xl);
  letter-spacing: var(--tr-tight);
  font-variation-settings: "opsz" 96;
  font-feature-settings: "tnum" 1, "ss01" 1;
}
.pullquote {
  font-family: var(--font-serif);
  font-weight: var(--fw-reg);
  font-style: italic;
  font-size: var(--fs-2xl);
  line-height: var(--lh-head);
  letter-spacing: var(--tr-snug);
  font-variation-settings: "opsz" 72, "SOFT" 100;
  color: var(--ink-100);
  text-wrap: balance;
}

/* ──────────────────────────────────────────────────────────────
   Base layer — sensible defaults so bare HTML already looks on-brand
   ────────────────────────────────────────────────────────────── */

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--ink-80);
  background: var(--fyi-warm-white);
}
::selection { background: var(--fyi-teal); color: var(--fyi-warm-white); }

a { color: inherit; text-decoration: none; }
a.link {
  color: var(--fyi-teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklch, var(--fyi-teal) 40%, transparent);
  transition: text-decoration-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
a.link:hover { text-decoration-color: var(--fyi-teal); }

hr { border: 0; border-top: 1px solid var(--border-soft); margin: var(--sp-8) 0; }

/* Film grain overlay — apply to a full-bleed ::after on dark sections */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
