/* ============================================================================
   ThatDeveloperGuy.com — Design System v2
   "The thinking substrate" — editorial + neural
   ============================================================================ */

/* ---------- Self-hosted fonts ---------- */
/* Display: Fraunces (variable, opsz 9..144, wght 300..900, italic) */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-roman.woff2") format("woff2-variations"),
       url("/fonts/fraunces-roman.woff2") format("woff2");
  font-weight: 300 900;
  font-stretch: 25% 151%;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic.woff2") format("woff2-variations"),
       url("/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 900;
  font-stretch: 25% 151%;
  font-style: italic;
  font-display: optional;
}

/* Body: IBM Plex Sans */
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/plex-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: optional; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/plex-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: optional; }

/* Mono: JetBrains Mono (already loaded in Part 3) */
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: optional; }

/* Legacy fonts still referenced by preserved pages */
@font-face { font-family: "Inter"; src: url("/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: optional; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: optional; }
@font-face { font-family: "Sora"; src: url("/fonts/sora-700.woff2") format("woff2"); font-weight: 700; font-display: optional; }

/* ---------- Design tokens v3: Starry Night ---------- */
:root {
  /* Van Gogh's Starry Night palette */
  --sky-deep: #0a1635;
  --sky-mid: #132a55;
  --sky-high: #1a3a7a;
  --sky-glow: #3957a8;
  --sky-swirl: #5677c7;
  --star-core: #fdf5c9;
  --star-halo: #f2d068;
  --moon: #f7e28e;
  --cypress: #0f1410;
  --lamp: #e0a24a;

  /* Backward compatible tokens, now painted */
  --bg: #070d22;
  --bg-elev: rgba(19, 42, 85, 0.65);
  --bg-card: rgba(10, 22, 53, 0.72);
  --bg-deep: #050918;
  --ink: #f3edd4;
  --ink-warm: #e6dbb0;
  --ink-soft: #a79c7a;
  --ink-faint: #615a4a;
  --border: rgba(242, 208, 104, 0.12);
  --border-strong: rgba(242, 208, 104, 0.28);
  --border-gold: rgba(242, 208, 104, 0.4);

  /* Lead accent: star halo (replaces old brass) */
  --gold: #f2d068;
  --gold-hi: #fdf5c9;
  --gold-soft: rgba(242, 208, 104, 0.14);
  --gold-glow: 0 0 0 1px rgba(242, 208, 104, 0.26), 0 16px 60px -10px rgba(242, 208, 104, 0.38);

  /* Live-state: moon glow (replaces old phosphor green) */
  --signal: #f7e28e;
  --signal-soft: rgba(247, 226, 142, 0.2);

  --paper: #f4ead2;
  --paper-ink: #1a1408;

  --copper: #b87333;
  --plasma: #ff5a6a;
  --violet: #8b6bd9;

  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --step-0: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
  --step-1: clamp(1.1rem, 1.0rem + 0.5vw, 1.25rem);
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.75rem);
  --step-3: clamp(2rem, 1.5rem + 1.8vw, 2.8rem);
  --step-4: clamp(3rem, 2rem + 3vw, 4.8rem);
  --step-5: clamp(4rem, 2.5rem + 5vw, 8rem);
  --step-mega: clamp(3rem, 2rem + 4vw, 6.5rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.5rem; --space-6: 2.25rem;
  --space-7: 3.5rem; --space-8: 5.5rem; --space-9: 8rem;

  --container: min(1280px, 92vw);
  --container-narrow: min(780px, 92vw);
  --container-wide: min(1440px, 96vw);
  --radius: 16px;
  --radius-sm: 6px;
  --radius-lg: 28px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 220ms;
  --t-med: 420ms;
  --t-slow: 880ms;

  --nav-h: 72px;

  --wght-body: 400; --wght-semi: 600; --wght-bold: 700;
  --opsz-display: 144; --opsz-head: 72; --opsz-body: 14;
}

/* ---------- Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv06", "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  background-color: #05081a;
  background-image: url("/images/starry-sky.svg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

/* Painterly stroke texture overlay — SVG turbulence, multiply blend */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 900'><filter id='p' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='turbulence' baseFrequency='0.015 0.026' numOctaves='3' seed='17'/><feColorMatrix values='0 0 0 0 0.07  0 0 0 0 0.16  0 0 0 0 0.38  0 0 0 1.3 0'/></filter><rect width='100%25' height='100%25' filter='url(%23p)'/></svg>");
  background-size: 1400px 900px;
}

/* Slow-rotating swirl layer — conic gradient behind content */
body::after {
  content: '';
  position: fixed; top: -50%; left: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  mix-blend-mode: screen;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    rgba(122, 160, 232, 0.3) 60deg,
    rgba(253, 245, 201, 0.12) 110deg,
    transparent 180deg,
    rgba(57, 87, 168, 0.32) 240deg,
    rgba(242, 208, 104, 0.1) 300deg,
    transparent 360deg
  );
  animation: starrySwirl 180s linear infinite;
  filter: blur(70px);
}
@keyframes starrySwirl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Star twinkle — tiny highlight dots via SVG overlay, animated */
main, .nav, .footer, .scarcity-bar { position: relative; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

h1 {
  font-size: var(--step-5);
  font-variation-settings: "opsz" var(--opsz-display), "wght" 520, "SOFT" 30;
  letter-spacing: -0.035em;
  line-height: 0.95;
  font-weight: 520;
}

h2 {
  font-size: var(--step-3);
  font-variation-settings: "opsz" 90, "wght" 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 3rem 0 1rem;
  font-weight: 500;
}

h3 {
  font-size: var(--step-2);
  font-variation-settings: "opsz" 48, "wght" 500;
  line-height: 1.2;
  margin: 1.5rem 0 0.5rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

h4 {
  font-size: var(--step-1);
  font-variation-settings: "opsz" 24, "wght" 600;
  line-height: 1.3;
  margin: 1.25rem 0 0.5rem;
}

/* Editorial accent — italic Fraunces for selected H1s and emphasis */
h1 em, h2 em, .editorial-em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 380;
  color: var(--gold);
  font-weight: 400;
}

p { margin: 0 0 1rem; max-width: 66ch; font-variation-settings: "opsz" 14; }
p.lead {
  font-size: var(--step-1);
  color: var(--ink-warm);
  max-width: 56ch;
  line-height: 1.5;
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 36, "wght" 380;
  font-weight: 400;
}

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin: 0.35rem 0; max-width: 68ch; }

a {
  color: var(--gold);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 100%;
  transition: color var(--t-fast) var(--ease), background-size var(--t-med) var(--ease);
}
a:hover { color: var(--gold-hi); background-size: 100% 2px; }

strong, b {
  color: var(--ink);
  font-weight: 600;
  font-variation-settings: "wght" 600;
}
em, i {
  font-style: italic;
  font-variation-settings: "opsz" 24, "wght" 420;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
  letter-spacing: -0.01em;
}
code {
  background: var(--bg-elev);
  padding: 0.125rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--gold);
}

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 20%, var(--border-strong) 80%, transparent);
  margin: var(--space-7) 0;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--gold); color: var(--bg); }

/* Skip link */
.skip-link {
  position: absolute; top: -48px; left: 0;
  background: var(--gold); color: var(--bg);
  padding: 0.75rem 1rem;
  z-index: 9999;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; color: var(--bg); background-size: 0 0; }

/* ---------- Layout primitives ---------- */
.container { width: var(--container); margin-inline: auto; position: relative; z-index: 2; }
.container-narrow { width: var(--container-narrow); margin-inline: auto; position: relative; z-index: 2; }
.container-wide { width: var(--container-wide); margin-inline: auto; position: relative; z-index: 2; }

.section { padding: var(--space-8) 0; position: relative; }
.section-sm { padding: var(--space-6) 0; }
.section-lg { padding: var(--space-9) 0; }

/* Section folio — huge ghost numerals in margin */
.section-folio {
  position: absolute;
  top: var(--space-5);
  right: max(4vw, 2rem);
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "wght" 320;
  font-size: clamp(5rem, 14vw, 14rem);
  line-height: 0.85;
  color: var(--ink);
  opacity: 0.04;
  pointer-events: none;
  font-style: italic;
  z-index: 0;
}

/* Section rule — subtle horizontal line with node markers */
.section-rule {
  display: flex; align-items: center; gap: 1rem;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-5);
}
.section-rule::before,
.section-rule::after {
  content: '';
  flex: 0 0 6px; width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--gold);
}
.section-rule::before { margin-right: 0; }
.section-rule::after { content: ''; flex: 1; background: linear-gradient(90deg, var(--gold), transparent); height: 1px; border-radius: 0; box-shadow: none; margin-left: 0.5rem; }

/* Editorial 12-col grid */
.grid-ed {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
}
.col-1 { grid-column: span 1; } .col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; } .col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; } .col-11 { grid-column: span 11; } .col-12 { grid-column: span 12; }
.col-offset-1 { grid-column-start: 2; } .col-offset-2 { grid-column-start: 3; } .col-offset-3 { grid-column-start: 4; }
@media (max-width: 860px) {
  .grid-ed > [class*="col-"] { grid-column: 1 / -1; }
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 13, 34, 0.75);
  backdrop-filter: saturate(1.4) blur(20px);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  border-bottom: 1px solid var(--border);
  min-height: var(--nav-h);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 0; position: relative;
  max-width: var(--container-wide); margin-inline: auto;
  padding-inline: max(4vw, 1rem);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.625rem;
  color: var(--ink); text-decoration: none;
  background: none;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 24, "wght" 540;
  font-weight: 500;
}
.brand:hover { color: var(--gold); background-size: 0 0; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: var(--bg);
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 700; font-size: 0.7rem;
  letter-spacing: -0.05em;
  position: relative;
  overflow: hidden;
}
.brand-mark::before {
  content: '';
  position: absolute; inset: 3px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.4;
}
.brand:hover .brand-mark {
  box-shadow: var(--gold-glow);
}
.brand-name { font-size: 1rem; letter-spacing: -0.02em; font-style: italic; font-variation-settings: "opsz" 24, "wght" 460; }
.nav-links {
  display: flex; gap: 0.125rem; list-style: none; margin: 0; padding: 0; align-items: center;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.75rem 0.875rem;
  border-radius: 0;
  transition: color var(--t-fast) var(--ease);
  min-height: 48px;
  display: inline-flex; align-items: center;
  background: none;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0.875rem; right: 0.875rem;
  bottom: 0.875rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-med) var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-links li:last-child a { margin-left: 1rem; }
.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span { width: 18px; height: 1.5px; background: currentColor; transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg-elev);
    padding: 1rem var(--space-5);
    border-bottom: 1px solid var(--border);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { margin: 0; }
  .nav-links a { padding: 0.875rem 0.5rem; width: 100%; }
  .nav-links li:last-child a { margin-left: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.625rem;
  min-height: 52px; padding: 0.875rem 1.5rem;
  font-family: var(--font-mono);
  font-weight: 500; font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  border: 1px solid transparent;
  line-height: 1;
  white-space: nowrap;
  background: transparent;
  background-size: 0 0;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid currentColor;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
  pointer-events: none;
}
.btn:hover::after { opacity: 1; transform: scale(1); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-hi);
  color: var(--bg);
  box-shadow: var(--gold-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.btn-arrow::before {
  content: '\2192';
  transition: transform var(--t-fast) var(--ease);
  font-family: var(--font-display);
}
.btn-arrow:hover::before { transform: translateX(3px); }
.btn-lg { min-height: 60px; padding: 1rem 2rem; font-size: 0.85rem; }
.btn-block { display: flex; width: 100%; }
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Node / Edge motif (signature) ---------- */
.node {
  display: inline-flex; align-items: center; justify-content: center;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold), inset 0 0 0 2px var(--bg);
  flex-shrink: 0;
  position: relative;
}
.node-live { background: var(--signal); box-shadow: 0 0 16px var(--signal), inset 0 0 0 2px var(--bg); }
.node-live::after {
  content: '';
  position: absolute; inset: -6px;
  border: 1px solid var(--signal);
  border-radius: 50%;
  animation: ping 2.2s var(--ease-out-expo) infinite;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.9; }
  70% { transform: scale(1.8); opacity: 0; }
  100% { transform: scale(1.8); opacity: 0; }
}

.node-lg { width: 18px; height: 18px; }
.node-sm { width: 8px; height: 8px; }

.node-cluster {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ---------- Eyebrow / metadata row ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}
.eyebrow .node { width: 6px; height: 6px; box-shadow: 0 0 8px var(--gold); }

/* ---------- Answer capsule ---------- */
.answer-capsule {
  border-left: 1px solid var(--gold);
  background: linear-gradient(90deg, var(--gold-soft), transparent 80%);
  padding: 1.25rem 1.5rem 1.25rem 1.75rem;
  margin: 1rem 0 2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 30, "wght" 380;
  font-size: 1.08rem;
  color: var(--ink-warm);
  max-width: 62ch;
  position: relative;
}
.answer-capsule::before {
  content: '';
  position: absolute;
  left: -6px; top: 1.3rem;
  width: 11px; height: 11px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--gold), inset 0 0 0 3px var(--bg);
}
.answer-capsule p { margin: 0; max-width: none; font-family: inherit; font-variation-settings: inherit; }

/* ---------- KPI / stats ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.kpi {
  padding: 1.5rem 1.25rem;
  text-align: left;
  border-right: 1px solid var(--border);
  position: relative;
}
.kpi:last-child { border-right: 0; }
@media (max-width: 640px) {
  .kpi { border-right: 0; border-bottom: 1px solid var(--border); }
  .kpi:last-child { border-bottom: 0; }
}
.kpi-value {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 72, "wght" 520;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--ink);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.kpi-value em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 420;
  color: var(--gold);
}
.kpi-label {
  display: block;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* ---------- Badge / tag ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 5px; height: 5px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}
.badge-signal { color: var(--signal); border-color: var(--signal); }
.badge-violet { color: var(--violet); border-color: var(--violet); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--space-9) 0 var(--space-8);
  overflow: hidden;
  isolation: isolate;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: center;
}
.hero .container { z-index: 2; }
#hero-canvas {
  position: absolute !important; inset: 0;
  width: 100% !important; height: 100% !important;
  z-index: 1;
  opacity: 0.85;
  pointer-events: auto;
}
.hero::after {
  /* Soft vignette so edges fade */
  content: '';
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, transparent 40%, rgba(7,9,13,0.8) 100%),
    linear-gradient(180deg, transparent 70%, var(--bg) 100%);
}

.hero-inner { position: relative; z-index: 3; }
.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.4rem, 1.6rem + 3vw, 4.8rem);
  font-variation-settings: "opsz" 80, "wght" 500, "SOFT" 30;
  line-height: 1;
  letter-spacing: -0.025em;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
  margin: 0 0 1.5rem;
  animation: heroH1Rise 1s var(--ease-out-expo) both;
}

@keyframes heroH1Rise {
  0% {
    opacity: 0;
    transform: translateY(18px);
    font-variation-settings: "opsz" 60, "wght" 400;
  }
  100% {
    opacity: 1;
    transform: none;
    font-variation-settings: "opsz" 80, "wght" 500;
  }
}
.hero h1 .glyph {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.3em);
  font-variation-settings: "opsz" 144, "wght" 480;
  }

.hero h1 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 380;
  color: var(--gold);
}
.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  color: var(--ink-warm);
  margin: 2rem 0 2.5rem;
  max-width: 52ch;
  line-height: 1.45;
  font-variation-settings: "opsz" 36, "wght" 360;
  font-weight: 400;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.trust-row {
  display: flex; gap: 0; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.trust-row > span {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding-right: 1.5rem; margin-right: 1.5rem;
  border-right: 1px solid var(--border);
}
.trust-row > span:last-child { border-right: 0; }
.trust-row .dot {
  width: 6px; height: 6px; background: var(--signal); border-radius: 50%;
  box-shadow: 0 0 8px var(--signal);
  animation: pulseDot 2.4s var(--ease) infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Phi readout — live-state terminal overlay */
.phi-readout {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-soft);
  background: rgba(7, 9, 13, 0.84);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  line-height: 1.5;
  z-index: 50;
  pointer-events: none;
  user-select: none;
  min-width: 180px;
}
.phi-readout .phi-row { display: flex; justify-content: space-between; gap: 1rem; }
.phi-readout .phi-label { color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.64rem; }
.phi-readout .phi-val { color: var(--gold); }
.phi-readout .phi-val.live { color: var(--signal); }
.phi-readout::before {
  content: '';
  position: absolute;
  top: 0.5rem; left: 0.75rem;
  width: 5px; height: 5px;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--signal);
  animation: pulseDot 2s ease-in-out infinite;
}
.phi-readout .phi-head {
  margin-bottom: 0.375rem; padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--border);
  padding-left: 0.75rem;
  color: var(--ink-warm);
  letter-spacing: 0.18em;
  font-size: 0.62rem;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .phi-readout { display: none; }
}

/* ---------- Industry marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin: 0;
  background: var(--bg-deep);
}
.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee 48s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.marquee-track span {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  font-variation-settings: "opsz" 24, "wght" 360;
}
.marquee-track .sep {
  color: var(--gold);
  font-style: normal;
  font-family: var(--font-mono);
  font-weight: 700;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: var(--space-5);
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease), background var(--t-med) var(--ease);
  display: flex; flex-direction: column; gap: 0.75rem;
  position: relative;
  border-radius: 0;
}
.card::before {
  content: '';
  position: absolute; top: -1px; left: -1px;
  width: 14px; height: 14px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-med) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: rgba(26, 58, 122, 0.7);
}
.card:hover::before { background: var(--gold); }
.card h3 { margin: 0 0 0.25rem; font-variation-settings: "opsz" 36, "wght" 500; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; line-height: 1.55; }
.card-link {
  color: var(--gold);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: auto;
  padding-top: 0.75rem;
  background: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.card-link::after {
  content: '\2192';
  transition: transform var(--t-fast) var(--ease);
  font-family: var(--font-display);
  font-size: 1rem;
}
.card-link:hover::after { transform: translateX(4px); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  margin: 2rem 0;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.card-grid .card {
  border-left: 0;
  border-top: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.card-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card-grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card-emoji {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.card-emoji .node { width: 9px; height: 9px; }

/* Numbered card — editorial */
.card-numbered { counter-increment: card; }
.card-numbered::after {
  content: counter(card, decimal-leading-zero);
  position: absolute;
  top: 1rem; right: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
}

/* ---------- Pull quote (the one paper panel inversion) ---------- */
.paper-panel {
  background: var(--paper);
  color: var(--paper-ink);
  padding: clamp(2rem, 6vw, 5rem);
  margin: var(--space-8) 0;
  position: relative;
}
.paper-panel::before,
.paper-panel::after {
  content: ''; position: absolute;
  width: 18px; height: 18px;
  background: var(--gold);
  border-radius: 50%;
}
.paper-panel::before { top: -9px; left: -9px; }
.paper-panel::after { bottom: -9px; right: -9px; }
.paper-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 360;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  max-width: 22ch;
  color: var(--paper-ink);
}
.paper-quote::before {
  content: '\201C';
  font-size: 1.6em;
  line-height: 0;
  margin-left: -0.1em;
  vertical-align: -0.35em;
  color: var(--copper);
}
.paper-attribution {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--copper);
  display: flex; align-items: center; gap: 0.75rem;
}
.paper-attribution::before {
  content: ''; width: 32px; height: 1px; background: var(--copper);
}

/* ---------- Pricing cards ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  margin: 2rem 0;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.pricing-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-6);
  display: flex; flex-direction: column;
  transition: transform var(--t-med) var(--ease), background var(--t-med) var(--ease);
  position: relative;
  border-radius: 0;
}
.pricing-card:hover { background: rgba(26, 58, 122, 0.7); }
.pricing-card.most-popular {
  background: var(--bg-deep);
  border: 1px solid var(--gold);
  box-shadow: var(--gold-glow);
  z-index: 2;
}
.pricing-card.most-popular::before {
  content: 'most chosen';
  position: absolute; top: -1px; right: 1rem;
  background: var(--gold); color: var(--bg);
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono); font-size: 0.65rem;
  font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: translateY(-100%);
}
.pricing-card h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 42, "wght" 480;
  font-size: 1.3rem;
}
.pricing-card .price {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "wght" 500;
  font-size: clamp(2.5rem, 4vw, 3.4rem);
  color: var(--ink);
  margin: 0.75rem 0 1rem;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-feature-settings: "tnum" 1;
}
.pricing-card .price small {
  font-size: 0.35em;
  color: var(--ink-soft);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "opsz" 36, "wght" 360;
  display: inline-block;
  margin-left: 0.25rem;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
.pricing-card ul { list-style: none; padding: 0; margin: 1rem 0; flex: 1; }
.pricing-card ul li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--ink-warm);
  max-width: none;
  border-bottom: 1px solid var(--border);
}
.pricing-card ul li:last-child { border-bottom: 0; }
.pricing-card ul li::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  position: absolute; left: 0; top: 0.85rem;
  box-shadow: 0 0 8px var(--gold);
}
.pricing-card.most-popular ul li::before { background: var(--signal); box-shadow: 0 0 8px var(--signal); }
.pricing-card .btn { margin-top: 1rem; }
.pricing-card .price-suffix {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 0.5rem;
}

/* ---------- Tier badge ---------- */
.tier-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px;
  background: var(--bg-elev);
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 500; font-size: 0.88rem;
  color: var(--gold);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  position: relative;
}
.tier-badge::before {
  content: '';
  position: absolute; inset: 3px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.3;
}
.tier-badge-lg { width: 68px; height: 68px; font-size: 1.15rem; }

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: var(--space-6) var(--space-5);
  display: flex; flex-direction: column;
  gap: 1.25rem;
  position: relative;
}
.testimonial-stars {
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  font-family: var(--font-mono);
}
.testimonial-quote {
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.4;
  font-variation-settings: "opsz" 42, "wght" 400;
  margin: 0;
}
.testimonial-quote::before {
  content: '\201C';
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 2.2em;
  line-height: 0;
  vertical-align: -0.45em;
  margin-right: 0.1em;
  font-variation-settings: "opsz" 144, "wght" 320;
}
.testimonial-who {
  display: flex; align-items: center; gap: 0.875rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 500; font-size: 0.78rem;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--gold);
  letter-spacing: -0.02em;
}
.testimonial-name {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  display: block;
  font-variation-settings: "wght" 600;
  font-family: var(--font-body);
  letter-spacing: -0.005em;
}
.testimonial-company {
  color: var(--ink-soft);
  font-size: 0.72rem;
  display: block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 0.125rem;
}

/* ---------- FAQ ---------- */
.faq-list { margin: 2rem 0; border-top: 1px solid var(--border); }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 0;
  position: relative;
}
.faq-item h3 {
  font-size: 1.2rem;
  margin: 0 0 0.625rem;
  color: var(--ink);
  font-variation-settings: "opsz" 36, "wght" 500;
  font-family: var(--font-display);
  letter-spacing: -0.012em;
  padding-left: 2.25rem;
  position: relative;
}
.faq-item h3::before {
  content: '';
  position: absolute;
  left: 0; top: 0.65rem;
  width: 10px; height: 10px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--gold);
}
.faq-item p { margin: 0; color: var(--ink-soft); max-width: 72ch; padding-left: 2.25rem; font-size: 0.96rem; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; vertical-align: top; }
th {
  background: var(--bg-deep);
  color: var(--gold);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
tr:hover td { background: rgba(212, 160, 60, 0.03); }
td .tier-badge { width: 40px; height: 40px; font-size: 0.78rem; }

/* ---------- Forms ---------- */
form { max-width: 640px; }
label {
  display: block;
  margin: 1.25rem 0 0.375rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
input, textarea, select {
  width: 100%;
  padding: 0.875rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-variation-settings: "opsz" 18, "wght" 400;
  border-radius: 0;
  min-height: 48px;
  transition: border-color var(--t-fast) var(--ease);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-bottom-color: var(--gold);
  outline: none;
}
input::placeholder, textarea::placeholder {
  color: var(--ink-faint);
  font-style: italic;
  font-variation-settings: "opsz" 24, "wght" 340;
}
.form-note {
  color: var(--ink-faint);
  font-size: 0.75rem;
  margin-top: 0.625rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.honeypot { position: absolute; left: -10000px; top: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: 0; font-size: 0.88rem; border-left: 3px solid; font-family: var(--font-display); font-style: italic; font-variation-settings: "opsz" 24, "wght" 400; }
.form-status[data-state="success"] { background: rgba(127, 255, 159, 0.06); color: var(--signal); border-left-color: var(--signal); }
.form-status[data-state="error"] { background: rgba(255, 90, 106, 0.06); color: var(--plasma); border-left-color: var(--plasma); }
.form-status[hidden] { display: none; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--bg-deep);
  border: 1px solid var(--gold);
  padding: var(--space-7) var(--space-5);
  text-align: center;
  margin: var(--space-7) 0;
  position: relative;
}
.cta-banner::before,
.cta-banner::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--gold), inset 0 0 0 3px var(--bg-deep);
}
.cta-banner::before { top: -7px; left: -7px; }
.cta-banner::after { bottom: -7px; right: -7px; }
.cta-banner h2 { margin: 0 0 0.875rem; font-family: var(--font-display); font-variation-settings: "opsz" 72, "wght" 460; }
.cta-banner h2 em { font-style: italic; color: var(--gold); }
.cta-banner p { margin: 0 auto 1.75rem; max-width: 56ch; color: var(--ink-warm); font-family: var(--font-display); font-style: italic; font-variation-settings: "opsz" 30, "wght" 360; }

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(180deg, rgba(7, 13, 34, 0.92), rgba(5, 9, 24, 0.98));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0 var(--space-5);
  margin-top: var(--space-8);
  color: var(--ink-soft);
  font-size: 0.92rem;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute; top: -7px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 14px;
  background: var(--bg); border: 1px solid var(--gold); border-radius: 50%;
}
.footer::after {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%) translateY(7px);
  width: 6px; height: 6px;
  background: var(--gold); border-radius: 50%;
  box-shadow: 0 0 12px var(--gold);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: var(--space-6);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 1rem;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0.5rem 0; max-width: none; }
.footer-col a {
  color: var(--ink-warm);
  text-decoration: none;
  font-size: 0.9rem;
  background: none;
}
.footer-col a:hover { color: var(--gold); }
.footer-col p { margin: 0 0 0.625rem; font-size: 0.9rem; }
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  font-weight: 500;
  margin: 0 0 0.625rem;
  font-variation-settings: "opsz" 42, "wght" 500;
  font-style: italic;
}
.footer-legal {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  color: var(--ink-faint);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.footer-legal p { margin: 0.375rem 0; }
.footer-legal a { color: var(--gold); background: none; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  padding: 1.25rem 1.5rem;
  max-width: 620px; margin-inline: auto;
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  z-index: 200;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p {
  margin: 0;
  font-size: 0.85rem;
  flex: 1 1 260px;
  max-width: none;
  color: var(--ink-warm);
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 24, "wght" 380;
}
.cookie-actions { display: flex; gap: 0.5rem; }

/* ---------- Sections: split, etc ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- Utilities ---------- */
.text-gold { color: var(--gold); }
.text-soft { color: var(--ink-soft); }
.text-center { text-align: center; }
.text-mono { font-family: var(--font-mono); }
.text-italic { font-style: italic; font-variation-settings: "opsz" 36, "wght" 400; font-family: var(--font-display); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.no-max { max-width: none; }
.tabular { font-feature-settings: "tnum" 1; }

/* Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-slow) var(--ease-out-expo), transform var(--t-slow) var(--ease-out-expo);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Letter-reveal hook */

/* ---------- Custom cursor ---------- */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  .cursor-dot,
  .cursor-ring {
    position: fixed; top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    mix-blend-mode: difference;
  }
  .cursor-dot {
    width: 6px; height: 6px;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 60ms linear;
  }
  .cursor-ring {
    width: 32px; height: 32px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 260ms var(--ease-out-expo), width 260ms var(--ease-out-expo), height 260ms var(--ease-out-expo), opacity 260ms;
    opacity: 0.5;
  }
  .cursor-ring.hover-link {
    width: 56px; height: 56px;
    opacity: 0.9;
    background: rgba(212, 160, 60, 0.06);
  }
  a, button, [role="button"], input, textarea, select, .nav-toggle {
    cursor: none;
  }
}

/* ---------- Print ---------- */
@media print {
  .nav, .footer, .cookie-banner, .scarcity-bar, #hero-canvas, .phi-readout, .cursor-dot, .cursor-ring { display: none !important; }
  body { color: #000; background: #fff; }
  body::before { display: none; }
  a { color: #000; text-decoration: underline; background: none; }
}

/* ---------- Inline scarcity bar ---------- */
.scarcity-bar {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--gold);
  color: var(--gold-hi);
  padding: 0.625rem 0;
  text-align: center;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  position: relative;
  overflow: hidden;
}
.scarcity-bar::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--gold-soft) 50%, transparent);
  animation: sweep 9s linear infinite;
  pointer-events: none;
}
@keyframes sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
.scarcity-bar .container { display: inline-flex; align-items: center; gap: 1.25rem; }
.scarcity-bar a { color: var(--ink); text-decoration: underline; background-size: 0 0; }

/* ---------- Badge row / trust row ---------- */
.badge-row { display: flex; gap: 0.625rem; flex-wrap: wrap; }

/* ---------- Section accent ---------- */
.section-accent { background: linear-gradient(180deg, rgba(5, 9, 24, 0.85), rgba(10, 22, 53, 0.78)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

/* Intro sections: grid-ed with an answer-capsule must stack h2 + capsule, never split */
.grid-ed:has(> * > .answer-capsule) > [class*="col-"] {
  grid-column: 1 / -1;
  margin-left: 0;
}
.grid-ed:has(> * > .answer-capsule) .answer-capsule {
  max-width: 72ch;
  margin-top: 0.5rem;
}
.grid-ed:has(> * > .answer-capsule) h1,
.grid-ed:has(> * > .answer-capsule) h2 {
  max-width: 26ch;
}

/* Answer capsule baseline: comfortable width regardless of container */
.answer-capsule {
  min-width: 0;
}
.answer-capsule p {
  max-width: 72ch;
}

/* Hero container: allow natural wrapping without column overflow */
.hero .grid-ed > .col-7.col-offset-1 {
  max-width: 60ch;
}
@media (max-width: 1280px) {
  .hero .grid-ed > .col-7.col-offset-1 {
    grid-column: 1 / -1;
    max-width: 52ch;
  }
}

/* letter-reveal word wrapper: each word is a nowrap inline-block so letters
   can't break mid-word when CSS tries to wrap the line. */


.req { color: var(--gold, #d4a03c); margin-left: 0.25rem; font-weight: 600; }
