/* GraphNative — manifesto site styles. Layers on top of bento.css tokens. */

:root {
  --cyan: #22D3EE;
  --violet: #8B7CF6;
  --violet-soft: #A78BFA;
  --max: 1120px;
}

html { scroll-behavior: smooth; }

::selection { background: rgba(139, 124, 246, 0.4); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 28px;
  background: rgba(11, 11, 14, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 16px;
}

.nav-links { display: flex; gap: 22px; margin-left: auto; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 550;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--violet);
  color: #0B0B0E;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 24px rgba(139, 124, 246, 0.45); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-gradient, .hero-field, .hero-graph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-field { z-index: 1; }
.hero-graph { z-index: 2; }

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px 24px 80px;
  width: 100%;
}

.hero-kicker {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero-title {
  margin: 0 0 24px;
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.hero-title .line { display: block; }

/* chars are assembled by JS (expo.out, scattered intro) — no CSS intro here */
.hero-title .ch {
  display: inline-block;
  will-change: transform, opacity;
}
.hero-title .word { display: inline-block; white-space: nowrap; }

[data-skew] { will-change: transform; transform-origin: left center; }

.hero-title .accent {
  background: linear-gradient(92deg, var(--violet-soft) 0%, var(--cyan) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* split chars need their own clipped fill or the accent line disappears */
.hero-title .accent .ch {
  background: linear-gradient(92deg, var(--violet-soft) 0%, var(--cyan) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- scroll progress ---------- */

.scroll-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
}
.scroll-progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--violet-soft), var(--cyan));
  box-shadow: 0 0 10px rgba(139, 124, 246, 0.6);
}

/* ---------- nav active link ---------- */

.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--violet-soft), var(--cyan));
}

/* ---------- scroll hint ---------- */

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.scroll-hint:hover { color: var(--ink); }
.scroll-hint svg { animation: hint-bob 2.2s ease-in-out infinite; }
@keyframes hint-bob {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(5px); opacity: 0.4; }
}

/* ---------- marquee dividers ---------- */

.marquee {
  overflow: hidden;
  padding: 26px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  margin-top: 70px;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  font-size: clamp(15px, 2vw, 21px);
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 244, 245, 0.55);
}
.marquee-track i {
  font-style: normal;
  color: var(--violet);
  font-size: 0.6em;
}
.marquee.alt .marquee-track {
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 244, 245, 0.4);
}
.marquee.alt .marquee-track i {
  color: var(--cyan);
  -webkit-text-stroke: 0;
}

/* JS swaps the DOM track for a canvas painter (no horizontal overflow) */
.marquee-canvas {
  display: block;
  width: 100%;
  height: 48px;
}
.marquee.swap .marquee-track { display: none; }

/* ---------- cursor glow ---------- */

.tile::after, .player::after, .era::after, .pain::after, .path::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(139, 124, 246, 0.09), transparent 45%);
}
.tile:hover::after, .player:hover::after, .era:hover::after, .pain:hover::after, .path:hover::after { opacity: 1; }
.player.featured::after {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(34, 211, 238, 0.10), transparent 45%);
}

/* ---------- magnetic ---------- */

[data-magnetic] { will-change: transform; }

/* ---------- stagger reveals ---------- */

[data-stagger] > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--d, 0s);
}
[data-stagger].in > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- stack rail ---------- */

.stack { position: relative; padding-left: 26px; }

.stack-rail {
  position: absolute;
  left: 4px; top: 14px; bottom: 14px;
  width: 2px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 2px;
}
.stack-rail i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--violet-soft), var(--cyan));
  transform-origin: top;
  transform: scaleY(0);
  box-shadow: 0 0 12px rgba(139, 124, 246, 0.55);
}

/* ---------- focus ---------- */

a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.hero-sub {
  margin: 0 0 34px;
  max-width: 56ch;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: var(--muted);
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.25s, background 0.2s;
}
.btn.primary {
  background: var(--violet);
  color: #0B0B0E;
  box-shadow: 0 0 0 rgba(139, 124, 246, 0);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 34px rgba(139, 124, 246, 0.5); }
.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.09); }

/* ---------- manifesto quote ---------- */

.manifesto {
  max-width: 880px;
  margin: 0 auto;
  padding: 110px 24px 30px;
  text-align: center;
}

.manifesto blockquote { margin: 0; }

.manifesto p {
  margin: 0 0 18px;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--ink);
}

.manifesto strong {
  background: linear-gradient(92deg, var(--violet-soft), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.manifesto cite {
  font-style: normal;
  font-size: 14px;
  color: var(--faint);
  letter-spacing: 0.04em;
}

/* ---------- generic sections ---------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 90px 24px 20px;
}

.section-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-sub {
  margin: 0 0 34px;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.section-sub.wide { max-width: 84ch; }

.demo-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--cyan);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

/* ---------- eras ---------- */

.eras {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.era {
  position: relative;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--tile);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 210px;
  transition: border-color 0.25s, transform 0.25s;
}
.era:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.18); }

.era-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.era h3 { margin: 0; font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }

.era p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); flex: 1; }

.era code {
  font-size: 11px;
  color: var(--faint);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.era.now {
  border-color: rgba(139, 124, 246, 0.55);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(139, 124, 246, 0.16), transparent 60%),
    var(--tile);
  box-shadow: 0 0 44px rgba(139, 124, 246, 0.12);
}
.era.now .era-num { color: var(--violet-soft); }

/* ---------- decrypt ---------- */

.decrypt {
  margin: 0 0 22px;
  font-size: clamp(30px, 5.2vw, 58px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(92deg, #F87171 0%, var(--violet-soft) 55%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  min-height: 1.1em;
}

.compare {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 30px;
}

.compare-row {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.7fr;
  gap: 12px;
  padding: 13px 20px;
  font-size: 13.5px;
  border-top: 1px solid var(--line);
  background: var(--tile);
  align-items: center;
}
.compare-row:first-child { border-top: none; }
.compare-row.head {
  background: var(--tile-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.compare-row .yes { color: var(--success); font-weight: 700; text-align: center; }
.compare-row .no { color: #F87171; text-align: center; }
.compare-row span:first-child { color: var(--muted); }
.compare-row.head span:first-child { color: var(--faint); }

.pull-line {
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 72ch;
}
.pull-line strong { color: var(--ink); }

/* ---------- players ---------- */

.players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.player {
  position: relative;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--tile);
  transition: transform 0.25s, border-color 0.25s;
}
.player:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.18); }

.player-layer {
  margin: 0 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.player h3 { margin: 0 0 8px; font-size: 18px; font-weight: 680; letter-spacing: -0.01em; }

.player p:last-child { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

.player.featured {
  border-color: rgba(34, 211, 238, 0.5);
  background:
    radial-gradient(130% 150% at 50% 0%, rgba(34, 211, 238, 0.12), transparent 60%),
    var(--tile);
  box-shadow: 0 0 44px rgba(34, 211, 238, 0.10);
}
.player.featured .player-layer { color: var(--cyan); }

/* ---------- stack ---------- */

.stack {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.stack-layer {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--tile);
}
.stack-layer span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-soft);
}
.stack-layer p { margin: 0; font-size: 13.5px; color: var(--muted); }

.stack-arrow {
  text-align: center;
  color: var(--faint);
  font-size: 15px;
  padding: 4px 0;
}

/* ---------- endcard ---------- */

.endcard {
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px 24px 90px;
  text-align: center;
}

.endcard h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 750;
  letter-spacing: -0.03em;
  background: linear-gradient(92deg, var(--violet-soft), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.endcard p {
  margin: 0 auto 30px;
  max-width: 54ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
}

.endcard .hero-ctas { justify-content: center; }

.footer-note {
  margin-top: 56px !important;
  font-size: 12px !important;
  color: var(--faint) !important;
  letter-spacing: 0.05em;
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- conversion flow additions ---------- */

.hero-trust {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.pain {
  position: relative;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--tile);
}
.pain h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 680; letter-spacing: -0.01em; }
.pain p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

.hidden-cause {
  max-width: 78ch;
  margin: 0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
  color: var(--muted);
}
.hidden-cause strong { color: var(--ink); }

.paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.path {
  position: relative;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--tile);
  transition: transform 0.25s, border-color 0.25s;
}
.path:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.18); }
.path-role {
  margin: 0 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.path h3 { margin: 0 0 8px; font-size: 20px; font-weight: 720; letter-spacing: -0.02em; }
.path p { margin: 0 0 16px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.path a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 211, 238, 0.5);
}
.path a:hover { color: var(--cyan); }

.check {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: stretch;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--tile);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.check-item:hover { border-color: rgba(139, 124, 246, 0.45); }
.check-item input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--violet);
  flex: 0 0 auto;
}
.check-item span { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.check-item input:checked + span { color: var(--ink); }
.check-item:has(input:checked) { border-color: rgba(139, 124, 246, 0.6); background: var(--tile-2); }

.check-result {
  padding: 24px 22px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 18px;
  background:
    radial-gradient(130% 150% at 50% 0%, rgba(34, 211, 238, 0.10), transparent 62%),
    var(--tile);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-score {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--cyan);
}
.check-result h3 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }
.check-result p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.check-result .btn { align-self: flex-start; margin-top: 8px; }

.trust-strip {
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 14px;
  background: var(--tile);
  padding: 18px 22px;
}
.trust-strip p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--muted); }
.trust-strip strong { color: var(--ink); }

.faq { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--tile);
  padding: 16px 18px;
}
.faq summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -0.01em;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--cyan);
  font-weight: 700;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--muted); }

.sticky-cta {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 60;
  display: none;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--violet);
  color: #0B0B0E;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(139, 124, 246, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}
.sticky-cta.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---------- enforcement demo ---------- */

.enforce {
  margin-top: 42px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(248, 113, 113, 0.08), transparent 55%),
    radial-gradient(120% 150% at 100% 0%, rgba(74, 222, 128, 0.08), transparent 55%),
    var(--tile);
}
.enforce-copy h3 { margin: 0 0 10px; font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.03em; }
.enforce-copy p:not(.kicker) { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.enforce-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.danger {
  border: 1px solid rgba(248, 113, 113, 0.55);
  color: #FCA5A5;
  background: rgba(248, 113, 113, 0.08);
}
.btn.danger:hover { background: rgba(248, 113, 113, 0.16); }
.enforce-stage {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  padding: 12px;
}
#enforce-canvas { display: block; width: 100%; height: 260px; }
.enforce-status { margin: 10px 4px 2px; font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- unified skill upgrades ---------- */

@font-face {
  font-family: "Roboto Flex";
  src: url("assets/robotoflex-var.woff2") format("woff2");
  font-weight: 100 1000;
  font-stretch: 62.5% 151%;
  font-style: normal;
  font-display: swap;
}

.tp-title {
  font-family: "Roboto Flex", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  font-variation-settings: "wght" 560, "wdth" 92;
}

/* ---------- decision corridor ---------- */

.corridor {
  position: relative;
  margin-top: 90px;
}

.sc-track { height: 320vh; }

.sc-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #0B0B10;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sc-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.sc-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11,11,14,0.92) 0%, rgba(11,11,14,0.58) 38%, rgba(11,11,14,0.12) 68%),
    radial-gradient(80% 70% at 70% 50%, rgba(34,211,238,0.08), transparent 60%);
}

.sc-panel {
  position: absolute;
  left: clamp(24px, 7vw, 96px);
  top: 50%;
  transform: translateY(-50%);
  width: min(470px, calc(100vw - 48px));
  padding: 24px 24px 22px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 20px;
  background: rgba(19,19,24,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.32);
  opacity: 0;
  visibility: hidden;
}

.sc-panel h2, .sc-panel h3 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.sc-panel h3 { font-size: clamp(26px, 3.4vw, 42px); }

.sc-panel p:not(.kicker) {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* reduced motion: stacked document, static canvas frame */
.sc-reduced .sc-track { height: auto; }
.sc-reduced .sc-stage {
  position: relative;
  height: auto;
  min-height: 100vh;
  padding: 100px 24px;
  display: grid;
  gap: 16px;
  align-content: center;
}
.sc-reduced .sc-canvas { height: 100%; min-height: 100vh; }
.sc-reduced .sc-panel {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  opacity: 1;
  visibility: visible;
}

/* ---------- page instrument ---------- */

.instrument-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(100% 130% at 100% 0%, rgba(139,124,246,0.11), transparent 58%),
    var(--tile);
}

.instrument-copy .section-title { font-size: clamp(28px, 3.8vw, 44px); }
.instrument-copy .btn { margin-top: 4px; cursor: pointer; }

.instrument-stage {
  min-height: 340px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 22px;
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(34,211,238,0.08), transparent 65%),
    rgba(0,0,0,0.18);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.instrument-stage svg { max-width: min(320px, 88%); height: auto; }

/* ---------- living material surface links ---------- */

.surface-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 28px;
  min-height: 520px;
  background: #0B0B10;
}

.surface-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.54;
}

.surface-content {
  position: relative;
  z-index: 1;
  padding: clamp(28px, 5vw, 56px);
  background: linear-gradient(90deg, rgba(11,11,14,0.82), rgba(11,11,14,0.38) 58%, rgba(11,11,14,0.12));
}

.surface-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.surface-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  background: rgba(19,19,24,0.74);
  color: var(--ink);
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1), border-color 0.22s, background 0.22s;
}
.surface-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,0.46);
  background: rgba(23,23,29,0.88);
}
.surface-card span {
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.surface-card strong {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.surface-card p { margin: auto 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---------- stack expansion ---------- */

.stack-layer {
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1), border-color 0.22s, background 0.22s;
}
.stack-layer:hover, .stack-layer:focus-visible {
  transform: translateX(4px);
  border-color: rgba(34,211,238,0.42);
  background: var(--tile-2);
  outline: none;
}
.stack-layer:focus-visible { box-shadow: 0 0 0 2px rgba(34,211,238,0.55); }
.stack-layer::after {
  content: "Open contract ↗";
  display: inline-block;
  margin-top: 10px;
  color: var(--cyan);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lt-detail {
  max-width: 720px;
  padding: clamp(28px, 5vw, 48px);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}
.lt-detail .kicker { margin-bottom: 12px; }
.lt-detail h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.lt-detail p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.lt-detail ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.lt-detail li {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.lt-detail strong { color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .eras { grid-template-columns: repeat(2, 1fr); }
  .era.now { grid-column: span 2; }
  .nav-links { display: none; }
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
  .paths { grid-template-columns: 1fr; }
  .check { grid-template-columns: 1fr; }
  .enforce { grid-template-columns: 1fr; }
  .instrument-card { grid-template-columns: 1fr; }
  .surface-grid { grid-template-columns: 1fr; }
  .surface-card { min-height: 0; }
  .sc-track { height: 300vh; }
  .sc-scrim { background: linear-gradient(90deg, rgba(11,11,14,0.94), rgba(11,11,14,0.66) 58%, rgba(11,11,14,0.24)); }
}

@media (max-width: 600px) {
  .eras { grid-template-columns: 1fr; }
  .era.now { grid-column: auto; }
  .pain-grid { grid-template-columns: 1fr; }
  .compare-row { grid-template-columns: 1.3fr 0.6fr 0.6fr; padding: 12px 14px; font-size: 12px; }
  .hero { min-height: 86vh; }
  .sticky-cta { display: block; }
  body { padding-bottom: 76px; }
  .endcard { padding-bottom: 40px; }
  .sc-track { height: auto; }
  .sc-stage {
    position: relative;
    height: auto;
    min-height: 100vh;
    padding: 96px 18px 40px;
    display: grid;
    gap: 14px;
    align-content: start;
  }
  .sc-canvas { position: absolute; height: 100%; }
  .sc-panel {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    opacity: 1;
    visibility: visible;
  }
  .instrument-stage { min-height: 260px; }
  .surface-shell { min-height: 0; }
  .surface-content { background: rgba(11,11,14,0.70); }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-title .line { opacity: 1; transform: none; animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  [data-stagger] > * { opacity: 1; transform: none; transition: none; }
  .scroll-hint svg { animation: none; }
  .marquee-track { transform: none !important; }
  .tile::after, .player::after, .era::after, .pain::after, .path::after { display: none; }
}
