/* =========================================================
   edgi landing — Observatory palette
   ========================================================= */

:root {
  --bg: #0A0E1A;
  --surface: #111827;
  --surface-raised: #1E293B;
  --surface-hover: #243049;
  --content: #E8E4D9;
  --content-secondary: #9C9589;
  --content-dim: rgba(232, 228, 217, 0.5);
  --accent: #D4A04A;
  --accent-bright: #E8B84A;
  --accent-deep: #B8862E;
  --interactive: #00C8D6;
  --correct: #5CC97E;
  --incorrect: #D85555;
  --mastery: #7EAE7B;

  --border: rgba(232, 228, 217, 0.08);
  --border-strong: rgba(232, 228, 217, 0.16);

  --f-display: 'Playfair Display', 'Source Serif 4', Georgia, serif;
  --f-body: 'Source Serif 4', Georgia, serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --f-ui: 'DM Sans', system-ui, -apple-system, sans-serif;

  --max: 1180px;
  --pad-x: clamp(20px, 5vw, 48px);

  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--content);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Background constellation canvas */
#constellation {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* =========================================================
   Typography utilities
   ========================================================= */

.display {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

.display-2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(32px, 4.5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}

.hero-accent {
  color: var(--accent);
  font-style: italic;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow, .label {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.label { color: var(--content-secondary); margin-bottom: 16px; }

.lede {
  font-family: var(--f-body);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.5;
  color: var(--content);
  max-width: 620px;
  margin: 20px 0 32px;
}

.subtle {
  font-family: var(--f-body);
  font-size: 17px;
  color: var(--content-secondary);
  max-width: 560px;
  margin: 8px auto 0;
}

.body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--content);
  margin: 0 0 18px;
  max-width: 540px;
}

.body em, .lede em {
  font-style: italic;
  color: var(--accent-bright);
}

.center-text { text-align: center; margin-left: auto; margin-right: auto; }

/* =========================================================
   Scroll-reveal
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Hero elements are above the fold — animate in immediately, no IO needed */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .reveal {
  animation: heroFadeUp 700ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .node-breathe, .node-halo { animation: none !important; }
}

/* =========================================================
   Nav
   ========================================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--pad-x);
  background: linear-gradient(180deg, rgba(10,14,26,0.85), rgba(10,14,26,0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.logo {
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--content);
}
.logo-tld { color: var(--interactive); }

.login-btn {
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 14px;
  color: var(--content);
  padding: 8px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: all 200ms var(--ease-out);
}
.login-btn:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: rgba(212, 160, 74, 0.06);
}

/* =========================================================
   CTAs
   ========================================================= */

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 15px;
  color: #0A0E1A;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  box-shadow:
    0 0 0 0 rgba(232, 184, 74, 0.4),
    0 8px 24px -8px rgba(212, 160, 74, 0.5);
  transition: transform 200ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.cta-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 8px rgba(232, 184, 74, 0.08),
    0 14px 32px -8px rgba(212, 160, 74, 0.6);
}
.cta-primary:active { transform: translateY(0); }
.cta-primary svg { transition: transform 200ms var(--ease-out); }
.cta-primary:hover svg { transform: translateX(3px); }

.cta-large {
  font-size: 17px;
  padding: 18px 32px;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 15px;
  color: var(--content);
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  transition: all 200ms var(--ease-out);
}
.cta-secondary:hover {
  border-color: var(--content);
  background: rgba(232, 228, 217, 0.04);
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  padding: clamp(60px, 10vh, 140px) var(--pad-x) clamp(80px, 12vh, 160px);
  z-index: 1;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-meta {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--content-dim);
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.06em;
}
.meta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mastery);
  box-shadow: 0 0 8px var(--mastery);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Rabbit-hole terms */
.term {
  color: var(--interactive);
  border-bottom: 1px dashed rgba(0, 200, 214, 0.5);
  cursor: pointer;
  transition: all 150ms var(--ease-out);
  padding-bottom: 1px;
}
.term:hover {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
  background: rgba(232, 184, 74, 0.05);
}
.term-hint {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  font-family: var(--f-mono);
  color: var(--content-dim);
  letter-spacing: 0.06em;
}

.term-popover {
  position: absolute;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 18px 20px;
  max-width: 320px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  z-index: 10;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
}
.term-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.term-popover .term-title {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.term-popover .term-body { color: var(--content); }

/* =========================================================
   SOCIAL PROOF
   ========================================================= */

.proof {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x) 60px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.proof-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--content-dim);
  margin-bottom: 28px;
}
.proof-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 56px);
  opacity: 0.7;
}
.wordmark {
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--content);
  opacity: 0.75;
  transition: opacity 200ms var(--ease-out);
}
.wordmark:hover { opacity: 1; }
/* Visual distinctions so the row feels like real wordmarks */
.wm-google { font-family: 'DM Sans'; letter-spacing: -0.04em; }
.wm-apple { font-weight: 500; letter-spacing: -0.03em; }
.wm-spacex { font-family: var(--f-mono); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; font-size: 16px; }
.wm-jpm { font-family: var(--f-display); font-weight: 600; letter-spacing: 0; }
.wm-mit { font-family: var(--f-display); font-weight: 700; letter-spacing: 0.02em; }
.wm-stanford { font-family: var(--f-display); font-style: italic; font-weight: 600; }

/* =========================================================
   SECTION HEAD
   ========================================================= */

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* =========================================================
   PAINS
   ========================================================= */

.pains {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
@media (max-width: 820px) {
  .pain-grid { grid-template-columns: 1fr; }
}

.pain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  transition: border-color 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.pain-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.pain-stat {
  font-family: var(--f-display);
  font-size: clamp(48px, 5vw, 64px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.pain-text {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--content);
}
.pain-text em {
  color: var(--accent-bright);
  font-style: italic;
}

/* Footnote citations on pain stats */
.pain-stat {
  position: relative;
}
.cite {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: super;
  line-height: 1;
  margin-left: 4px;
  padding: 2px 5px;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(212, 160, 74, 0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms var(--ease-out), color 150ms var(--ease-out),
              border-color 150ms var(--ease-out);
}
.cite:hover,
.cite:focus-visible,
.cite.active {
  background: rgba(232, 184, 74, 0.12);
  color: var(--accent-bright);
  border-color: var(--accent-bright);
  outline: none;
}

.cite-popover {
  position: absolute;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px 16px;
  max-width: 300px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  z-index: 20;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
  font-family: var(--f-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--content);
}
.cite-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cite-popover .cite-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.cite-popover .cite-body {
  color: var(--content);
  margin: 0 0 8px;
}
.cite-popover .cite-link {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--interactive);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 200, 214, 0.4);
  display: inline-block;
  padding-bottom: 1px;
  word-break: break-word;
}
.cite-popover .cite-link:hover {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}

.pain-kicker {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  color: var(--content);
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

/* =========================================================
   SPARK
   ========================================================= */

.spark {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .spark { grid-template-columns: 1fr; }
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  font-family: var(--f-body);
}
.feature-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  font-size: 16px;
  color: var(--content);
  border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.bullet {
  color: var(--accent);
  flex-shrink: 0;
  font-size: 14px;
}

/* =========================================================
   SPARK PHONE MOCK
   ========================================================= */

.phone-mock {
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 9 / 19;
  background: #0a0a0a;
  border-radius: 48px;
  padding: 10px;
  box-shadow:
    0 0 0 2px rgba(232, 228, 217, 0.08),
    0 40px 80px -20px rgba(0,0,0,0.6),
    0 0 90px -20px rgba(212, 160, 74, 0.3);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.spark-tap-hint {
  position: absolute;
  inset: 0;
  border-radius: 38px;
  pointer-events: none;
  transition: opacity 500ms var(--ease-out);
  z-index: 10;
}
.tap-target {
  position: absolute;
  left: 66.5%;
  top: 77.5%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.spark-tap-hint.gone { opacity: 0; }
.tap-ring {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,184,74,0.18) 0%, transparent 70%);
  border: 1.5px solid rgba(232,184,74,0.55);
  animation: tapPulse 2s ease-in-out infinite;
}
.tap-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
}
@keyframes tapPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(232,184,74,0.35); }
  50% { transform: scale(1.2); box-shadow: 0 0 0 14px rgba(232,184,74,0); }
}

.phone-screen {
  width: 100%; height: 100%;
  border-radius: 38px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 160, 74, 0.22), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(212, 160, 74, 0.12), transparent 55%),
    linear-gradient(180deg, #1a1208, #0a0705);
  overflow: hidden;
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: background 900ms var(--ease-out);
}
.phone-screen.section-0 {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 160, 74, 0.28), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(212, 160, 74, 0.14), transparent 55%),
    linear-gradient(180deg, #1a1208, #0a0705);
}
.phone-screen.section-1 {
  background:
    radial-gradient(ellipse at 30% 10%, rgba(232, 184, 74, 0.22), transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(212, 160, 74, 0.14), transparent 55%),
    linear-gradient(180deg, #1d1608, #0a0706);
}
.phone-screen.section-2 {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 200, 214, 0.18), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(212, 160, 74, 0.12), transparent 55%),
    linear-gradient(180deg, #0e1a22, #06090c);
}
.phone-screen.section-complete {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(232, 184, 74, 0.36), transparent 60%),
    linear-gradient(180deg, #241a10, #0a0806);
}

/* ---- Concept identity header ---- */
.spark-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 16px 10px;
  flex-shrink: 0;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.concept-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #f0c870 0%, #c88a30 55%, #3a2608 100%);
  box-shadow: inset 0 0 6px rgba(0,0,0,0.4), 0 0 10px rgba(212, 160, 74, 0.25);
  flex-shrink: 0;
}
.concept-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.concept-title {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--content);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.concept-section {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 12px;
  color: var(--accent-bright);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
  height: 0;
}
.concept-section.visible {
  opacity: 1;
  transform: translateY(0);
  height: auto;
  margin-top: 2px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.level-chip {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-bright);
  padding: 3px 8px;
  border: 1px solid rgba(232, 184, 74, 0.45);
  border-radius: 6px;
  background: rgba(232, 184, 74, 0.08);
}
.icon-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(232, 228, 217, 0.06);
  border: 1px solid rgba(232, 228, 217, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--content-secondary);
}

/* ---- Progress spine ---- */
.spark-spine {
  position: relative;
  height: 3px;
  margin: 2px 16px 0;
  flex-shrink: 0;
}
.spine-track {
  position: absolute;
  inset: 0;
  background: rgba(232, 228, 217, 0.12);
  border-radius: 3px;
}
.spine-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: 3px;
  transition: width 400ms var(--ease-out);
}
.spine-markers {
  position: absolute;
  inset: 0;
}
.spine-marker {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(232, 228, 217, 0.18);
  transform: translate(-50%, -50%);
  transition: background 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.spine-marker.question {
  background: rgba(232, 184, 74, 0.45);
}
.spine-marker.completed {
  background: var(--content);
}
.spine-marker.question.completed {
  background: var(--accent-bright);
  box-shadow: 0 0 8px rgba(232, 184, 74, 0.6);
}

/* ---- Stage ---- */
.spark-stage {
  flex: 1;
  position: relative;
  display: flex;
  overflow: hidden;
}
.phase {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 12px;
}
.phase.leaving  { animation: phaseLeave 220ms var(--ease-out) forwards; }
.phase.entering { animation: phaseEnter 460ms var(--ease-out-back); }
@keyframes phaseEnter {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes phaseLeave {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

/* ---- Reveal phase ---- */
.phase-reveal {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 24px;
}
.phase-reveal .overline {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.42em;
  color: var(--accent);
  margin-bottom: 22px;
}
.phase-reveal .reveal-term {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--content);
  margin: 0 0 24px;
  text-shadow: 0 0 40px rgba(232, 184, 74, 0.35);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  animation: termPunchIn 620ms var(--ease-out-back) 600ms forwards;
}
@keyframes termPunchIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.phase-reveal .tagline {
  font-family: var(--f-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(232, 228, 217, 0.82);
  margin: 0;
  max-width: 300px;
}
.phase-reveal .kw {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  animation: kwIn 460ms cubic-bezier(0.33, 1, 0.68, 1) forwards;
}
@keyframes kwIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Sentence phase ---- */
.phase-sentence {
  gap: 12px;
  justify-content: flex-start;
}
.sentence-image {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  background: rgba(232, 228, 217, 0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.sentence-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: rgba(248, 245, 236, 0.96);
}
.sentence-image.has-photo img {
  object-fit: cover;
  padding: 0;
  background: transparent;
}
.sentence-caption {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(232, 228, 217, 0.45);
  margin: -4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sentence-text {
  font-family: var(--f-body);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--content);
  margin: 8px 0 0;
  letter-spacing: -0.005em;
}
.linked-concept {
  color: var(--interactive);
  border-bottom: 1px dashed rgba(0, 200, 214, 0.5);
  cursor: pointer;
  padding-bottom: 1px;
  transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out);
  font-weight: 600;
}
.linked-concept:hover,
.linked-concept.active {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}

/* ---- Question phase ---- */
.phase-question {
  gap: 14px;
  justify-content: flex-start;
  text-align: center;
  align-items: stretch;
  padding-top: 26px;
}
.phase-question .q-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.36em;
  color: var(--accent-bright);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 2px;
}
.phase-question .q-prompt {
  font-family: var(--f-display);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--content);
  margin: 0 auto 10px;
  letter-spacing: -0.01em;
  max-width: 320px;
}
.q-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.q-option {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: rgba(232, 228, 217, 0.05);
  border: 1px solid rgba(232, 228, 217, 0.14);
  border-radius: 14px;
  font-family: var(--f-body);
  font-size: 15.5px;
  line-height: 1.35;
  color: var(--content);
  cursor: pointer;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out),
              transform 180ms var(--ease-out);
  text-align: center;
}
.q-option:hover {
  background: rgba(232, 228, 217, 0.09);
  border-color: rgba(232, 228, 217, 0.28);
  transform: translateY(-1px);
}
.q-option[disabled] {
  cursor: default;
  opacity: 0.55;
}
.q-option.correct {
  background: rgba(92, 201, 126, 0.18);
  border-color: var(--correct);
  color: var(--content);
  opacity: 1;
}
.q-option.incorrect {
  background: rgba(216, 85, 85, 0.16);
  border-color: var(--incorrect);
  opacity: 1;
}
.q-explanation {
  margin: 8px 0 0;
  padding: 12px 14px;
  background: rgba(212, 160, 74, 0.1);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  font-family: var(--f-body);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--content);
  font-style: italic;
  text-align: left;
  opacity: 0;
  transform: translateY(4px);
  animation: phaseEnter 320ms var(--ease-out) forwards;
}

/* ---- Complete phase ---- */
.phase-complete {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 36px 28px;
}
.phase-complete .complete-badge {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.36em;
  color: var(--accent-bright);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.phase-complete .complete-title {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  color: var(--content);
  margin: 0;
  text-shadow: 0 0 40px rgba(232, 184, 74, 0.3);
}
.phase-complete .xp-burst {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 18px;
  padding: 12px 22px;
  background: rgba(232, 184, 74, 0.16);
  border: 1px solid rgba(232, 184, 74, 0.45);
  border-radius: 999px;
  box-shadow: 0 0 36px rgba(232, 184, 74, 0.35);
}
.phase-complete .xp-burst .plus {
  font-family: var(--f-display);
  font-size: 20px;
  color: var(--accent-bright);
  font-weight: 600;
}
.phase-complete .xp-burst .value {
  font-family: var(--f-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-bright);
  line-height: 1;
}
.phase-complete .xp-burst .suffix {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-left: 6px;
}

/* ---- Ask-about-this rail (decorative) ---- */

/* Interactive children inside the mock */
.phone-mock .q-option,
.phone-mock .linked-concept,
.phone-mock .concept-popover,
.phone-mock .icon-btn { cursor: pointer; }

/* Linked-concept popover (scoped inside phone mock) */
.concept-popover {
  position: absolute;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  max-width: 260px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  z-index: 5;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
  font-family: var(--f-body);
  font-size: 13px;
  line-height: 1.4;
  color: var(--content);
}
.concept-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.concept-popover .cp-title {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .phase.entering, .phase.leaving,
  .phase-reveal .reveal-term, .phase-reveal .kw,
  .q-explanation {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =========================================================
   CHAIN
   ========================================================= */

.chain {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}

.chain-stage {
  position: relative;
  height: 240px;
  background: radial-gradient(ellipse at center, rgba(212, 160, 74, 0.06), transparent 70%);
  border: 1px solid var(--border);
  border-radius: 24px;
  margin: 32px 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.chain-track {
  position: relative;
  width: 85%;
  height: 60px;
  display: flex;
  align-items: center;
}

.chain-status {
  position: absolute;
  top: 20px;
  right: 24px;
  text-align: right;
  font-family: var(--f-mono);
  pointer-events: none;
}
.chain-stage-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color 400ms var(--ease-out);
}
.chain-xp {
  font-size: 24px;
  font-weight: 600;
  color: var(--content);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.chain-node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  box-shadow: 0 0 0 0 rgba(212, 160, 74, 0.4);
  opacity: 0;
  transition:
    opacity 400ms var(--ease-out),
    background 400ms var(--ease-out),
    box-shadow 400ms var(--ease-out);
}
.chain-node.on {
  opacity: 1;
  box-shadow:
    0 0 0 6px rgba(212, 160, 74, 0.12),
    0 0 20px rgba(232, 184, 74, 0.6);
}
.chain-node.current {
  animation: breathe 1.4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 6px rgba(212, 160, 74, 0.12), 0 0 20px rgba(232, 184, 74, 0.6); }
  50% { transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 0 10px rgba(212, 160, 74, 0.18), 0 0 28px rgba(232, 184, 74, 0.9); }
}

.chain-line {
  position: absolute;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.chain-line.on {
  opacity: 1;
  box-shadow: 0 0 8px rgba(232, 184, 74, 0.4);
}

.chain-pulse {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
  border-radius: 2px;
  transform: translateY(-50%);
  animation: pulseTravel 2.4s linear infinite;
  opacity: 0;
}
.chain-pulse.on { opacity: 1; }
@keyframes pulseTravel {
  0% { left: 0%; }
  100% { left: 100%; }
}

/* Tier intensity levels — JS adds these classes */
.chain-stage.level-streak { border-color: rgba(212, 160, 74, 0.2); }
.chain-stage.level-flow { border-color: rgba(232, 184, 74, 0.3); background: radial-gradient(ellipse at center, rgba(212, 160, 74, 0.1), transparent 70%); }
.chain-stage.level-fire { border-color: rgba(232, 184, 74, 0.5); background: radial-gradient(ellipse at center, rgba(232, 184, 74, 0.14), transparent 70%); }
.chain-stage.level-blaze { border-color: var(--accent-bright); background: radial-gradient(ellipse at center, rgba(232, 184, 74, 0.2), transparent 70%); box-shadow: 0 0 60px -20px rgba(232, 184, 74, 0.5); }

.chain-tiers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 20px;
}
@media (max-width: 600px) {
  .chain-tiers { grid-template-columns: repeat(2, 1fr); }
}
.tier {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--content-secondary);
  text-align: center;
}
.tier span {
  display: block;
  margin-top: 4px;
  color: var(--content-dim);
  font-size: 10px;
}
.tier.active {
  background: rgba(212, 160, 74, 0.08);
  border-color: var(--accent);
  color: var(--accent-bright);
}
.tier-blaze.active {
  background: rgba(232, 184, 74, 0.14);
  box-shadow: 0 0 24px rgba(232, 184, 74, 0.3);
}

/* =========================================================
   MAP
   ========================================================= */

.map {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .map { grid-template-columns: 1fr; }
  .map-copy { order: 2; }
}

.map-mock {
  max-width: 440px;
  margin: 0 auto;
  aspect-ratio: 1;
  background: radial-gradient(ellipse at 50% 50%, #0f1628 0%, #06080f 100%);
  border-radius: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6);
}
.map-svg { width: 100%; height: 100%; }

/* .node-breathe opacity pulsing is handled in landing.js for cross-browser SVG support */
.node-halo {
  animation: haloPulse 4s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.15); }
}

/* =========================================================
   LADDER
   ========================================================= */

.ladder {
  padding: clamp(100px, 14vh, 180px) var(--pad-x);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 160, 74, 0.08), transparent 60%),
    var(--bg);
  position: relative;
  z-index: 1;
}
.ladder-inner {
  max-width: 820px;
  margin: 0 auto;
}
.ladder-lede {
  max-width: 580px;
  margin: 20px auto 64px;
  text-align: center;
}

.ladder-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.step {
  background: var(--surface);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  align-items: start;
  transition: background 200ms var(--ease-out);
}
.step:hover {
  background: var(--surface-hover);
}
.step-num {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--content-dim);
  letter-spacing: 0.1em;
  padding-top: 2px;
}
.step-body h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.step-body p {
  font-family: var(--f-body);
  font-size: 16px;
  color: var(--content-secondary);
  margin: 0;
  line-height: 1.5;
}
.step-body p em { color: var(--accent-bright); font-style: italic; }

.step-final {
  background: linear-gradient(90deg, rgba(212, 160, 74, 0.12), rgba(212, 160, 74, 0.04));
}
.step-final .step-num { color: var(--accent); }
.step-final .step-body h3 { color: var(--accent-bright); }

/* =========================================================
   ARCHETYPES
   ========================================================= */

.archetypes {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}

.archetype-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 900px) {
  .archetype-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .archetype-grid { grid-template-columns: 1fr; }
}

.arc-card {
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 28px 24px;
  transition: transform 400ms var(--ease-out-back), border-color 300ms var(--ease-out), box-shadow 400ms var(--ease-out);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.arc-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(232, 184, 74, 0.08), transparent);
  transition: left 700ms var(--ease-out);
}
.arc-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 20px 40px -16px rgba(212, 160, 74, 0.3);
}
.arc-card:hover::before { left: 100%; }

.arc-eyebrow {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--content-dim);
  margin-bottom: 4px;
}
.arc-card h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.arc-tag {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 14px;
  color: var(--content);
  margin: 0 0 12px;
}
.arc-desc {
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--content-secondary);
  margin: 0 0 20px;
}
.arc-strengths {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.arc-strengths span {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: rgba(232, 228, 217, 0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--content-secondary);
}

/* =========================================================
   TESTIMONIALS
   ========================================================= */

.testimonials {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}
.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 820px) {
  .quote-grid { grid-template-columns: 1fr; }
}

.quote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  margin: 0;
  transition: border-color 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.quote:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.quote blockquote {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  color: var(--content);
  margin: 0 0 20px;
  letter-spacing: -0.005em;
}
.quote figcaption {
  font-family: var(--f-ui);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quote-name { color: var(--content); font-weight: 600; }
.quote-role { color: var(--content-dim); font-size: 13px; }

/* =========================================================
   FINAL CTA
   ========================================================= */

.final-cta {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(100px, 16vh, 180px) var(--pad-x);
  text-align: center;
  position: relative;
  z-index: 1;
}
.final-cta .display { margin-bottom: 48px; }

.store-badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 32px 0 0;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #000;
  border: 1px solid rgba(232, 228, 217, 0.22);
  border-radius: 12px;
  color: var(--content);
  transition: border-color 180ms var(--ease-out), transform 180ms var(--ease-out),
              background 180ms var(--ease-out);
  min-width: 168px;
}
.store-badge:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  background: #050505;
}
.store-glyph {
  flex-shrink: 0;
}
.store-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-align: left;
}
.store-eyebrow {
  font-family: var(--f-ui);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(232, 228, 217, 0.75);
  margin-bottom: 3px;
}
.store-title {
  font-family: var(--f-ui);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--content);
}

.final-meta {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--content-dim);
  margin-top: 24px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  padding: 48px var(--pad-x);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
  background: var(--bg);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.footer-logo { opacity: 0.8; }
.footer-nav {
  display: flex;
  gap: 28px;
  font-family: var(--f-ui);
  font-size: 14px;
}
.footer-nav a {
  color: var(--content-secondary);
  transition: color 200ms var(--ease-out);
}
.footer-nav a:hover { color: var(--accent-bright); }
.footer-copy {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--content-dim);
}
