/* ============================================================
   Kintsugi, cinematic product site
   Static, no build step. Neutral Modern token names preserved,
   rebound to the gold seam signature.
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #eeeee9;
  --ink: #080a0e;
  --ink-2: #0d1118;
  --ink-3: #131922;

  /* Foreground */
  --fg: #0b0d12;
  --fg-soft: #3d424c;
  --muted: #6d727c;
  --meta: #8b9099;

  /* Lines */
  --border: #e2e2dc;
  --border-soft: #ecece7;
  --dark-line: #232c38;

  /* Gold seam */
  --gold: #d4af37;
  --gold-bright: #f0d489;
  --gold-deep: #a9761b;
  --accent: #a9761b;
  --accent-on: #161005;
  --accent-hover: #8f6214;
  --gold-line: rgba(169, 118, 27, 0.34);
  --gold-wash: rgba(212, 175, 55, 0.09);

  /* Dark foreground */
  --dark-fg: #eef2f7;
  --dark-muted: #9aa7b8;
  --dark-gold: #f0d489;
  --dark-green: #6ee7a8;
  --dark-red: #ff8a80;

  /* Type */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --tracking-tight: -0.055em;
  --tracking-snug: -0.03em;
  --leading-tight: 1.02;
  --leading-body: 1.6;

  /* Space */
  --gutter: 28px;
  --container-max: 1200px;
  --section-y: 120px;

  /* Motion, Apple-like controlled easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 160ms;
  --t-base: 320ms;
  --t-slow: 760ms;

  --shadow-1: 0 1px 2px rgba(8, 10, 14, 0.05), 0 8px 24px -16px rgba(8, 10, 14, 0.18);
  --shadow-2: 0 24px 70px -30px rgba(8, 10, 14, 0.35), 0 4px 16px -8px rgba(8, 10, 14, 0.14);
  --shadow-glow: 0 0 0 1px rgba(212, 175, 55, 0.28), 0 30px 90px -32px rgba(212, 175, 55, 0.28);
  --focus-ring: 0 0 0 3px rgba(169, 118, 27, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
::selection { background: rgba(212, 175, 55, 0.32); color: inherit; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: var(--leading-tight); }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }

.skip { position: fixed; left: 16px; top: -80px; z-index: 300; background: var(--fg); color: #fff; padding: 12px 18px; border-radius: 8px; transition: top var(--t-fast); }
.skip:focus { top: 16px; }
.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; }

.container { width: min(var(--container-max), calc(100% - (var(--gutter) * 2))); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.section-tight { padding-block: calc(var(--section-y) * 0.7); }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.8; }
.eyebrow.on-dark { color: var(--dark-gold); }
.eyebrow.centered { justify-content: center; }

h1, .h1 { font-size: clamp(44px, 7vw, 88px); font-weight: 650; letter-spacing: var(--tracking-tight); line-height: 0.99; text-wrap: balance; }
h2, .h2 { font-size: clamp(32px, 4.6vw, 60px); font-weight: 650; letter-spacing: var(--tracking-snug); line-height: 1.04; text-wrap: balance; }
h3, .h3 { font-size: 21px; font-weight: 620; letter-spacing: -0.02em; line-height: 1.2; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--muted); max-width: 58ch; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 246, 243, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), background var(--t-base);
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(246, 246, 243, 0.88); }
.header-in { display: flex; align-items: center; gap: 30px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; font-size: 17px; letter-spacing: -0.03em; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 27px; height: 27px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--fg-soft); font-size: 13.5px; font-weight: 520; transition: color var(--t-fast); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); text-decoration: none; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 620; line-height: 1; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-standard), background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-base);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--gold); color: #171005; box-shadow: 0 8px 24px -12px rgba(212, 175, 55, 0.8); }
.btn-gold:hover { background: var(--gold-bright); box-shadow: 0 12px 32px -12px rgba(212, 175, 55, 0.9); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1a202b; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn-sm { padding: 9px 15px; font-size: 12.5px; }
.btn-lg { padding: 15px 26px; font-size: 15px; }
.btn .arrow { transition: transform var(--t-base) var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.icon { width: 16px; height: 16px; flex: none; }

/* ---------- Install command ---------- */
.cmd {
  display: flex; align-items: stretch; width: 100%; max-width: 580px;
  background: #0b1118; border: 1px solid #26303d; border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow-2);
}
.cmd code {
  flex: 1; min-width: 0; padding: 15px 17px;
  color: #d6e6dc; font-family: var(--font-mono); font-size: 12.5px;
  line-height: 1.5; white-space: nowrap; overflow-x: auto; scrollbar-width: none;
}
.cmd code::-webkit-scrollbar { display: none; }
.cmd code .prompt { color: var(--gold); user-select: none; }
.cmd button {
  flex: none; border: 0; border-left: 1px solid #26303d;
  background: #141d27; color: #dbe4ee; font-size: 12.5px; font-weight: 650;
  padding: 0 17px; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.cmd button:hover { background: #1d2937; color: var(--gold); }
.cmd button[data-copied="true"] { color: var(--dark-green); }
.cmd-caption { margin-top: 11px; font-size: 12px; color: var(--meta); }
.cmd-caption .mono { color: var(--fg-soft); }
/* Alternative install channels: same command bar, quieter, stacked under the
   primary one-liner. Kept as real copy buttons so a reader never retypes a
   package name. */
.cmd-alt-label {
  margin: 22px 0 10px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--meta);
}
.cmd-alt { display: grid; gap: 8px; width: 100%; }
.cmd-alt .cmd { box-shadow: none; border-color: #1d2733; max-width: 100%; }
.cmd-alt .cmd code { padding: 11px 15px; font-size: 12px; }
.cmd-alt .cmd button { padding: 0 15px; font-size: 12px; }

/* ---------- Terminal ---------- */
.term {
  background: #0b1118; border: 1px solid #26303d; border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-2);
}
.term-bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; background: #0e151e; border-bottom: 1px solid #202a36; }
.term-dot { width: 10px; height: 10px; border-radius: 50%; background: #35404e; }
.term-dot:first-child { background: #5a4630; }
.term-title { margin-left: 10px; font-family: var(--font-mono); font-size: 11px; color: #8c9aad; }
.term-body { padding: 20px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.95; overflow-x: auto; color: #d7e0e9; }
.term-body .c-dim { color: #72849a; }
.term-body .c-gold { color: var(--dark-gold); }
.term-body .c-green { color: var(--dark-green); }
.term-body .c-red { color: var(--dark-red); }
.term-body .c-fg { color: #eef2f7; }
.term-body .em { background: rgba(212, 175, 55, 0.13); border-radius: 4px; padding: 1px 5px; color: var(--dark-gold); }

.clip, .clip-poster { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; border: 1px solid #26303d; background: #0b1118; }
.clip { box-shadow: var(--shadow-2); }
.clip-poster { display: none; }
.clip-note { margin-top: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--meta); }

/* ============================================================
   HERO, cinematic
   ============================================================ */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink); color: var(--dark-fg);
  padding-block: clamp(90px, 11vw, 150px) clamp(80px, 9vw, 130px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(58% 62% at 72% 12%, rgba(212, 175, 55, 0.16), transparent 68%),
    radial-gradient(44% 48% at 12% 82%, rgba(70, 110, 170, 0.12), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.55;
  background-image:
    linear-gradient(rgba(255,255,255,0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.032) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(80% 70% at 50% 30%, #000 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 20%, transparent 100%);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 13px 7px 10px;
  border: 1px solid rgba(240, 212, 137, 0.26); border-radius: 999px;
  background: rgba(240, 212, 137, 0.06); color: var(--dark-gold);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
}
.hero-kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--dark-gold); box-shadow: 0 0 12px var(--dark-gold); }
.hero h1 { margin-top: 26px; color: #fff; font-size: clamp(44px, 5.6vw, 74px); }
.hero h1 .gold { color: var(--gold); }
.hero .lead { margin-top: 26px; color: #a9b6c8; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-actions .btn-ghost { color: #e7edf5; border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.04); }
.hero-actions .btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; font-size: 12px; color: #8695a8; font-family: var(--font-mono); }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

/* Hero stage, layered floating panels */
.stage { position: relative; perspective: 1400px; min-height: 420px; display: grid; place-items: center; }
.stage-glow {
  position: absolute; width: 118%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.16), transparent 62%);
  filter: blur(30px); transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform 500ms var(--ease-out); pointer-events: none;
}
.stage-main { position: relative; z-index: 2; width: 100%; transform: rotateY(-7deg) rotateX(3deg) translateZ(20px); transition: transform 600ms var(--ease-out); }
.stage:hover .stage-main { transform: rotateY(-3deg) rotateX(1deg) translateZ(28px); }
.stage-main .term, .stage-main .clip, .stage-main .clip-poster { box-shadow: 0 40px 90px -34px rgba(0,0,0,0.8), 0 0 0 1px rgba(212,175,55,0.16); }
.stage-echo {
  position: absolute; z-index: 1; width: 86%; left: 10%; top: 12%;
  height: 76%; border-radius: 14px; border: 1px solid rgba(212,175,55,0.2);
  background: linear-gradient(140deg, rgba(212,175,55,0.06), rgba(255,255,255,0.015));
  transform: rotateY(8deg) rotateX(-3deg) translateZ(-40px) translate(22px, 16px);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.7);
}
.stage-badge {
  position: absolute; z-index: 3; right: -14px; bottom: -18px;
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px;
  background: rgba(14, 20, 28, 0.9); border: 1px solid rgba(212,175,55,0.3); border-radius: 12px;
  backdrop-filter: blur(12px); font-family: var(--font-mono); font-size: 11px; color: #dfe8f2;
  box-shadow: var(--shadow-2);
}
.stage-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--dark-green); box-shadow: 0 0 10px var(--dark-green); }

.scroll-cue { display: flex; align-items: center; gap: 12px; margin-top: 64px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #7d8b9e; }
.scroll-cue .line { position: relative; width: 54px; height: 1px; background: rgba(255,255,255,0.2); overflow: hidden; }
.scroll-cue .line::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: translateX(-100%); animation: cue 2.4s var(--ease-in-out) infinite; }
@keyframes cue { 0% { transform: translateX(-100%); } 60%,100% { transform: translateX(100%); } }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee { border-block: 1px solid var(--border); background: var(--surface); overflow: hidden; padding-block: 20px; }
.marquee-track { display: flex; width: max-content; animation: slide 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: 42px; padding-right: 42px; }
.marquee span { display: inline-flex; align-items: center; gap: 42px; font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.marquee span::after { content: ""; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ============================================================
   SECTION HEAD
   ============================================================ */
.section-head { max-width: 720px; }
.section-head h2 { margin-top: 18px; }
.section-head .lead { margin-top: 20px; }
.section-head.split { display: flex; justify-content: space-between; align-items: end; gap: 40px; max-width: none; }
.section-head.split .lead { margin-top: 0; }

/* ============================================================
   PRODUCT CHAPTERS (home)
   ============================================================ */
.chapter { position: relative; border-top: 1px solid var(--border); overflow: hidden; }
.chapter:nth-child(even) { background: var(--surface); }
.chapter-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: center; padding-block: clamp(80px, 9vw, 130px); }
.chapter.reverse .chapter-copy { order: 2; }
.chapter-num {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  font-size: clamp(120px, 20vw, 260px); font-weight: 750; letter-spacing: -0.08em;
  color: transparent; -webkit-text-stroke: 1px rgba(169,118,27,0.11); pointer-events: none; line-height: 1;
}
.chapter-copy { position: relative; z-index: 1; }
.chapter-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); }
.chapter-copy h2 { margin-top: 16px; font-size: clamp(32px, 4vw, 52px); }
.chapter-copy .lead { margin-top: 20px; }
.chapter-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 13px; }
.chapter-points li { position: relative; padding-left: 20px; font-size: 14.5px; color: var(--fg-soft); }
.chapter-points li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 1px; background: var(--gold-deep); }
.chapter-cta { display: inline-flex; align-items: center; gap: 9px; margin-top: 32px; font-weight: 620; font-size: 14px; color: var(--fg); }
.chapter-cta:hover { color: var(--gold-deep); text-decoration: none; }
.chapter-visual { position: relative; z-index: 1; }
.chapter-visual .clip, .chapter-visual .clip-poster, .chapter-visual .term { box-shadow: 0 30px 80px -34px rgba(8,10,14,0.42); }
.chapter-visual::before {
  content: ""; position: absolute; inset: -22px; border: 1px solid var(--gold-line); border-radius: 24px; opacity: 0.55;
  transform: translateY(10px) scale(0.98); transition: transform var(--t-slow) var(--ease-out), opacity var(--t-slow);
}
.chapter-visual.in-view::before { transform: translateY(0) scale(1); opacity: 1; }
.chapter-cmd { margin-top: 18px; }
.chapter-cmd .cmd { max-width: 100%; }
.chapter-cmd .cmd code { font-size: 11.5px; }

/* ---------- Bento grid ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 56px; }
.bento-card {
  position: relative; overflow: hidden; padding: 28px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base), border-color var(--t-base);
}
.bento-card:hover { transform: translateY(-4px); border-color: var(--gold-line); box-shadow: var(--shadow-1); }
.bento-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(400px circle at var(--bx, 50%) var(--by, 0%), rgba(212,175,55,0.09), transparent 60%);
  opacity: 0; transition: opacity var(--t-base);
}
.bento-card:hover::after { opacity: 1; }
.bento-card.wide { grid-column: span 4; }
.bento-card.narrow { grid-column: span 2; }
.bento-card.half { grid-column: span 3; }
.bento-card.dark { background: var(--ink); border-color: #222b36; color: var(--dark-fg); }
.bento-card.dark h3, .bento-card.dark .h3 { color: var(--dark-fg); }
.bento-card.dark .bento-desc { color: var(--dark-muted); }
.bento-ico { width: 34px; height: 34px; color: var(--gold-deep); margin-bottom: 20px; }
.bento-card.dark .bento-ico { color: var(--gold); }
.bento-card h3 { margin-top: 8px; }
.bento-desc { margin-top: 10px; font-size: 13.5px; color: var(--muted); max-width: 48ch; }
.bento-giant { font-family: var(--font-mono); font-size: clamp(44px, 5vw, 68px); font-weight: 600; letter-spacing: -0.05em; color: var(--gold); line-height: 1; margin-top: 14px; }

/* ---------- Dark evidence ---------- */
.dark-section { background: var(--ink); color: var(--dark-fg); }
.dark-section h2, .dark-section h3 { color: var(--dark-fg); }
.dark-section .lead { color: var(--dark-muted); }
.dark-section .section-head.split { color: var(--dark-fg); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #26303d; border: 1px solid #26303d; border-radius: 16px; overflow: hidden; margin-top: 56px; }
.metric { background: var(--ink-2); padding: 28px 24px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; }
.metric-n { font-family: var(--font-mono); font-size: clamp(30px, 3.1vw, 44px); font-weight: 600; letter-spacing: -0.05em; color: var(--gold); line-height: 1; }
.metric-l { margin-top: 12px; font-size: 12.5px; color: var(--dark-muted); max-width: 24ch; }
.feature-rows { margin-top: 64px; }
.feature-row { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding-block: 30px; border-top: 1px solid var(--dark-line); }
.feature-row:last-child { border-bottom: 1px solid var(--dark-line); }
.feature-row h3 { font-size: 18px; color: var(--gold); }
.feature-row p { font-size: 14.5px; color: var(--dark-muted); max-width: 66ch; }
.feature-row .mono { color: #c9d4e2; }

/* ============================================================
   GOLD THREAD, signature scroll moment (no crack metaphor)
   ============================================================ */
.thread { position: relative; height: 190vh; background: var(--ink); }
.thread-sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden; }
.thread-inner { width: min(1080px, calc(100% - 48px)); }
.thread-label { text-align: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #8c9aad; }
.thread-label b { color: var(--gold); font-weight: 600; }
.thread-svg { width: 100%; height: auto; margin-top: 48px; overflow: visible; }
.thread-base { fill: none; stroke: #2a3441; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.thread-gold {
  fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--thread-len, 1400);
  stroke-dashoffset: calc(var(--thread-len, 1400) - (var(--thread, 0) * var(--thread-len, 1400)));
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.5));
}
.thread-node { fill: #2a3441; transition: fill var(--t-base); }
.thread-node.lit { fill: var(--gold); filter: drop-shadow(0 0 10px rgba(212,175,55,0.8)); }
.thread-caption { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; font-family: var(--font-mono); font-size: 11px; color: #8c9aad; text-transform: uppercase; letter-spacing: 0.1em; }
.thread-caption span:nth-child(3) { color: var(--gold); }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta .eyebrow { justify-content: center; }
.cta h2 { margin-top: 18px; }
.cta .lead { margin: 18px auto 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.cta-dark { background: var(--ink); color: var(--dark-fg); }
.cta-dark .lead { color: var(--dark-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #dfe6ee; border-top: 1px solid #222b36; padding-block: 64px 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; }
.footer-brand p { margin-top: 14px; font-size: 13px; color: #8d9bad; max-width: 34ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #78879a; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13.5px; color: #cfd8e3; padding-block: 5px; }
.footer-col a:hover { color: var(--gold); text-decoration: none; }
.footer-bottom { margin-top: 56px; padding-top: 22px; border-top: 1px solid #222b36; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: #78879a; }

/* ============================================================
   PRODUCT PAGE HERO (taller, centered statement)
   ============================================================ */
.phero { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: var(--dark-fg); padding-block: clamp(90px, 10vw, 140px) clamp(70px, 8vw, 110px); }
.phero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(60% 70% at 50% 0%, rgba(212,175,55,0.15), transparent 68%);
}
.phero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent);
}
.phero-in { text-align: center; max-width: 1000px; margin-inline: auto; }
.phero h1 { color: #fff; font-size: clamp(44px, 7vw, 86px); }
.phero h1 .gold { color: var(--gold); }
.phero .lead { color: #aab7c9; margin: 26px auto 0; max-width: 62ch; font-size: clamp(17px, 1.7vw, 21px); }
.phero-cmd { display: flex; justify-content: center; margin-top: 36px; }
.phero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 26px; font-family: var(--font-mono); font-size: 11px; color: #8594a8; }
.phero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.phero-trust span::before { content: ""; width: 5px; height: 5px; background: var(--gold); border-radius: 50%; }
.phero-stage { position: relative; margin: clamp(56px, 7vw, 90px) auto 0; max-width: 980px; }
.phero-stage .term, .phero-stage .clip, .phero-stage .clip-poster { box-shadow: 0 50px 110px -40px rgba(0,0,0,0.85), 0 0 0 1px rgba(212,175,55,0.14); }
.phero-stage::before { content: ""; position: absolute; inset: -24px; border: 1px solid rgba(212,175,55,0.16); border-radius: 26px; pointer-events: none; }

/* Product feature grid on light */
.pfeatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.pfeature { padding: 26px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.pfeature.span2 { grid-column: span 2; }
.pfeature .num { font-family: var(--font-mono); font-size: 11px; color: var(--gold-deep); letter-spacing: 0.1em; }
.pfeature h3 { margin-top: 16px; }
.pfeature p { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

/* Install band */
.install-band { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 90px); align-items: center; }
.install-band .cmd { max-width: 100%; }
.install-note { margin-top: 18px; font-size: 12.5px; color: var(--muted); }

/* Small product nav on page */
.product-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; font-family: var(--font-mono); font-size: 11px; color: #c3cedb; background: rgba(255,255,255,0.03); transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out), background 200ms var(--ease-out), transform 200ms var(--ease-out); }
.chip b { color: var(--gold); font-weight: 600; }
.chip:hover { text-decoration: none; border-color: var(--gold); color: #fff; background: rgba(212,175,55,0.09); transform: translateY(-2px); }
.product-nav + .hero-trust { margin-top: 20px; }

/* ============================================================
   REVEAL MOTION
   ============================================================ */
.js .reveal { opacity: 0; will-change: transform, opacity; }
.js .reveal-up { transform: translateY(34px); }
.js .reveal-scale { transform: scale(0.96); }
.js .reveal-left { transform: translateX(-36px); }
.js .reveal-right { transform: translateX(36px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--t-slow) var(--ease-out) var(--d, 0ms), transform var(--t-slow) var(--ease-out) var(--d, 0ms);
}
.parallax { transform: translate3d(0, var(--py, 0px), 0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --gutter: 22px; --section-y: 96px; }
  .hero-in, .chapter-in, .install-band { grid-template-columns: 1fr; }
  .chapter.reverse .chapter-copy { order: 0; }
  .hero .stage { min-height: auto; }
  .stage-main { transform: none; }
  .stage-echo { display: none; }
  .bento-card.wide, .bento-card.narrow, .bento-card.half { grid-column: span 3; }
  .pfeatures { grid-template-columns: repeat(2, 1fr); }
  .pfeature.span2 { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 200px 1fr; gap: 24px; }
}

@media (max-width: 720px) {
  :root { --gutter: 18px; --section-y: 76px; }
  html { scroll-padding-top: 72px; }
  .nav-links { display: none; }
  .header-in { height: 58px; gap: 14px; }
  .header-right .btn-dark { display: none; }
  h1, .h1 { font-size: clamp(38px, 11vw, 58px); line-height: 1.02; }
  h2, .h2 { font-size: clamp(30px, 8.4vw, 44px); }
  .hero h1, .phero h1 { font-size: clamp(38px, 10.6vw, 58px); }
  .hero { padding-block: 72px 70px; }
  .hero-actions .btn, .cta-actions .btn { flex: 1 1 auto; }
  .stage-badge { right: 0; bottom: -12px; }
  .scroll-cue { margin-top: 44px; }
  .marquee-group { gap: 28px; padding-right: 28px; }
  .marquee span { gap: 28px; font-size: 11px; }
  .section-head.split { flex-direction: column; align-items: start; }
  .chapter-num { display: none; }
  .chapter-in { padding-block: 64px; }
  .bento { grid-template-columns: 1fr; }
  .bento-card.wide, .bento-card.narrow, .bento-card.half { grid-column: span 1; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 128px; padding: 20px; }
  .feature-row { grid-template-columns: 1fr; gap: 10px; padding-block: 24px; }
  .thread { height: 150vh; }
  .thread-caption { font-size: 10px; letter-spacing: 0.06em; }
  .pfeatures { grid-template-columns: 1fr; }
  .pfeature.span2 { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .cmd code { font-size: 11px; padding: 13px 12px; }
  .cmd button { padding: 0 12px; }
}

@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .metrics { grid-template-columns: 1fr; }
}

/* ============================================================
   REDUCED MOTION, complete, static experience
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .parallax { transform: none !important; }
  .marquee-track { animation: none; }
  .scroll-cue .line::after { animation: none; transform: none; }
  .thread-gold { stroke-dashoffset: 0 !important; }
  .thread-node { fill: var(--gold) !important; }
  .clip { display: none !important; }
  .clip-poster { display: block !important; }
  .stage-main, .stage:hover .stage-main { transform: none; }
}

/* ============================================================
   DARK THEME
   ============================================================ */
html[data-theme="dark"] {
  --bg: #0b0e13;
  --surface: #111720;
  --surface-2: #161d27;
  --fg: #eef2f7;
  --fg-soft: #c5cfdb;
  --muted: #9aa7b8;
  --meta: #7f8da0;
  --border: #232c38;
  --border-soft: #1a222d;
  --accent: #f0d489;
  --gold-deep: #d4af37;
  --gold-line: rgba(240,212,137,0.3);
  --shadow-1: 0 12px 34px -20px rgba(0,0,0,0.7);
  --shadow-2: 0 24px 70px -30px rgba(0,0,0,0.85);
}
html[data-theme="dark"] .site-header { background: rgba(11,14,19,0.72); }
html[data-theme="dark"] .site-header.scrolled { background: rgba(11,14,19,0.9); }
html[data-theme="dark"] .marquee { background: #0e131a; }
html[data-theme="dark"] .btn-ghost { color: var(--fg); }
html[data-theme="dark"] .chapter:nth-child(even) { background: #0e131a; }
