/* ============================================================================
   xEllerator landing page.

   Two grounds: night plum at both ends (hero, pilot) and warm paper between.
   The constellation in the hero is the one bold thing; everything below it
   is a ledger: a quiet label rail on the left, the substance on the right,
   and the product's own artifacts shown instead of described.
   ========================================================================== */

:root {
  --night: #1b0e15;
  --night-2: #2c1523;
  --blush: var(--primary-200);
  --paper: var(--bg-primary);
  --measure: 62ch;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.landing {
  background: var(--paper);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.landing .wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.landing :focus-visible { outline: 2px solid var(--primary-300); outline-offset: 3px; }

/* ---- Top bar: transparent over the hero, paper once you scroll -------------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  color: #fff;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.top-brand { display: flex; align-items: center; text-decoration: none; color: inherit; }
/* Reverse logo over the hero, standard logo once the bar turns to paper. */
.top .brand-logo { height: 32px; }
.top .top-logo-standard { display: none; }
.top.solid .top-logo-reverse { display: none; }
.top.solid .top-logo-standard { display: block; }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-nav a {
  padding: 8px 12px; font-size: 13.5px; font-weight: 500; color: inherit; opacity: .82;
  text-decoration: none; border-radius: var(--radius);
}
.top-nav a:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.top-nav .top-signin { margin-left: 8px; padding: 9px 16px; border: 1px solid rgba(255, 255, 255, 0.35); opacity: 1; }
.top-nav .top-signin:hover { background: #fff; color: var(--night); }
.top.solid { background: rgba(250, 247, 248, 0.9); backdrop-filter: blur(10px); color: var(--text-primary); box-shadow: 0 1px 0 var(--border-color); }
.top.solid .top-nav a:hover { background: var(--primary-50); color: var(--primary-700); }
.top.solid .top-nav .top-signin { border-color: var(--primary-500); color: var(--primary-700); }
.top.solid .top-nav .top-signin:hover { background: var(--primary-500); color: #fff; }
.top-menu { display: none; background: none; border: 0; color: inherit; width: 40px; height: 40px; border-radius: var(--radius); cursor: pointer; }
.top-menu svg { width: 22px; height: 22px; }

/* ---- Hero ------------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(900px 620px at 78% 62%, rgba(148, 72, 114, 0.45), transparent 62%),
              linear-gradient(165deg, var(--night-2) 0%, var(--night) 60%, #150a10 100%);
  min-height: min(100vh, 880px); min-height: min(100svh, 880px);
  display: flex; align-items: center;
}
body.landing { overflow-x: hidden; }
.landing .wrap, .hero-inner { min-width: 0; }
.eq-card .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hero-inner {
  position: relative; width: 100%; max-width: 1120px; margin: 0 auto; padding: 120px 32px 96px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 40px;
}
.hero-copy { position: relative; z-index: 1; max-width: 560px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(44px, 6.4vw, 82px); line-height: 1.04; letter-spacing: -0.02em;
  margin: 0 0 28px; text-wrap: balance;
}
.hero h1 .accent { color: var(--blush); }
.hero p { font-size: 18px; line-height: 1.65; color: rgba(255, 255, 255, 0.78); max-width: 50ch; margin: 0 0 36px; }
.hero-more {
  display: inline-flex; align-items: center; gap: 10px;
  color: rgba(255, 255, 255, 0.88); text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.hero-more .arw { transition: transform .18s ease; }
.hero-more:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.7); }
.hero-more:hover .arw { transform: translateY(3px); }
.hero-fig { width: 100%; max-width: 560px; height: auto; justify-self: end; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hero-fig circle, .hero-fig path { transition: none; }

/* The ascent draws itself on load: shallow at liftoff, steepening as it climbs. */
.hero-fig .fig-arc, .hero-fig .fig-arc-glow {
  stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: landDraw 1.9s cubic-bezier(.35, .05, .2, 1) .5s forwards;
}
.hero-fig .fig-arc-glow { animation-delay: .65s; }
.hero-fig .fig-star { opacity: 0; animation: landFade .7s ease 2.1s forwards; }
.hero-fig .fig-pulse { transform-origin: 300px 100px; animation: landPulse 3.2s ease-out 2.4s infinite; }
.hero-fig .fig-p2 { animation-delay: 4s; }
.hero-fig .fig-twinkle { animation: landTwinkle 3.6s ease-in-out infinite alternate; }
.hero-fig .fig-t2 { animation-delay: 1.2s; }
.hero-fig .fig-t3 { animation-delay: 2.4s; }
@keyframes landDraw { to { stroke-dashoffset: 0; } }
@keyframes landFade { to { opacity: 1; } }
@keyframes landPulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes landTwinkle { from { fill-opacity: .16; } to { fill-opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .hero-fig .fig-arc, .hero-fig .fig-arc-glow { animation: none; stroke-dashoffset: 0; }
  .hero-fig .fig-star { animation: none; opacity: 1; }
  .hero-fig .fig-pulse, .hero-fig .fig-twinkle { animation: none; }
}
/* ?static=1 shows the finished state at once (screenshots, previews). */
.hero-fig.static .fig-arc, .hero-fig.static .fig-arc-glow { animation: none; stroke-dashoffset: 0; }
.hero-fig.static .fig-star { animation: none; opacity: 1; }
.hero-fig.static .fig-pulse { animation: none; opacity: .35; }
.hero-fig.static .fig-twinkle { animation: none; }

/* ---- The numbers strip ------------------------------------------------------ */
/* ---- The film: its own section on the paper, between the hero and the numbers ------------ */
.film { background: var(--paper); padding: 72px 0 32px; }
.film-frame {
  position: relative; aspect-ratio: 16 / 9; background: #0e0609; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 30px 70px rgba(66, 31, 51, 0.18), 0 10px 24px rgba(66, 31, 51, 0.10);
}
.film-frame video { display: block; width: 100%; height: 100%; object-fit: cover; background: #0e0609; }
.film-frame video:focus-visible { outline: 2px solid var(--blush); outline-offset: -2px; }

.figures { padding: 56px 0 8px; }
.figures-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  padding: 34px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
}
.figure b { display: block; font-family: var(--font-display); font-size: 48px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--primary-700); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.figure span { display: block; font-size: 14px; line-height: 1.6; color: var(--text-secondary); max-width: 30ch; }
.figures-src { font-size: 12px; color: var(--text-muted); margin: 12px 0 0; }

/* ---- Ledger sections ------------------------------------------------------- */
.ledger {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px 56px;
  padding: 88px 0; border-top: 1px solid var(--border-color);
}
.figures + .wrap .ledger:first-child, .ledger#score { border-top: none; }
.ledger .lab, .pilot .lab {
  font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--primary-500); padding-top: 9px;
}
.ledger h2, .pilot h2 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.018em; line-height: 1.12;
  font-size: clamp(28px, 3.2vw, 40px); margin: 0 0 28px; max-width: 24ch; text-wrap: balance;
}
/* The brand overline (same proportions as the bar in the logo) introduces each section and each figure. */
.ledger h2::before, .pilot h2::before, .figure b::before {
  content: ""; display: block; width: 1.13em; height: 0.226em; margin-bottom: 0.34em; background: var(--primary-500);
}
.ledger h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 14px; }
.prose p { font-size: 15.5px; line-height: 1.78; color: var(--text-secondary); max-width: var(--measure); margin: 0 0 18px; }
.prose p:last-child { margin-bottom: 0; }
.demo-tag { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }

/* the match card, the product's own artifact */
.match-grid, .equity-grid, .sponsor-grid { display: grid; gap: 48px; align-items: start; }
.match-grid { grid-template-columns: minmax(0, 1fr) 400px; }
.equity-grid { grid-template-columns: minmax(0, 1fr) 560px; }
.sponsor-grid { grid-template-columns: minmax(0, 1fr) 380px; }
.match-card, .eq-card, .act-card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  padding: 22px 22px 18px; box-shadow: 0 18px 44px rgba(66, 31, 51, 0.09);
}
.match-card .pair { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.match-card .who { font-size: 13.5px; line-height: 1.45; }
.match-card .who b { display: block; font-size: 14px; }
.match-card .who span { color: var(--text-muted); font-size: 12.5px; }
.match-card .who .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.mc-ring { position: relative; width: 74px; height: 74px; flex-shrink: 0; }
.mc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mc-ring .num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mc-ring .num b { font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1; }
.mc-ring .num span { font-size: 9px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.mc-part { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin: 16px 0 9px; }
.match-card .factor { grid-template-columns: 140px 1fr 30px; gap: 10px; }
.mc-uplift { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-secondary); border-top: 1px dashed var(--border-color); margin-top: 16px; padding-top: 12px; }
.mc-uplift b { color: var(--primary-500); font-weight: 700; }
.mc-why { font-size: 13px; line-height: 1.65; color: var(--text-secondary); background: var(--gray-50); border-radius: var(--radius); padding: 12px 14px; margin-top: 14px; }
.mc-why b { color: var(--text-primary); }

/* the equity table */
.match-card, .eq-card, .act-card, .equity-grid > *, .match-grid > *, .sponsor-grid > *, .pilot-grid > * { min-width: 0; }
.eq-card .table-wrap { border: 0; border-radius: 0; }
/* app.css gives table.data a 640px floor for the console; the card is narrower */
.eq-card table.data { font-size: 12.5px; min-width: 0; width: 100%; }
.eq-card table.data th { font-size: 10.5px; padding: 10px 8px; white-space: normal; line-height: 1.3; }
.eq-card table.data td { font-variant-numeric: tabular-nums; white-space: nowrap; padding: 11px 8px; }
.eq-card table.data td.muted { white-space: normal; font-size: 12px; text-align: left; }
.eq-flag .pill, .eq-table .pill { text-transform: none; }
.eq-table td:first-child, .eq-table th:first-child { padding-left: 0; }
.eq-table td:last-child, .eq-table th:last-child { padding-right: 0; text-align: right; }
.eq-table tr.everyone td { font-weight: 600; }
.eq-table td.muted { white-space: normal; }
.eq-flag { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-secondary); margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-color); }
.eq-flag .pill { flex-shrink: 0; }

/* the actions log */
.act { padding: 12px 0; border-top: 1px solid var(--gray-100); font-size: 13.5px; line-height: 1.5; }
.act:first-of-type { border-top: none; padding-top: 0; }
.act b { display: block; }
.act span { display: block; color: var(--text-secondary); }
.act em { display: block; font-style: normal; font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* the programme thread, in the order it happens */
.thread { list-style: none; margin: 6px 0 0; padding: 0; position: relative; counter-reset: step; max-width: 680px; }
.thread::before { content: ""; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(180deg, var(--primary-200), var(--primary-500)); border-radius: 2px; }
.thread li { position: relative; padding: 0 0 28px 54px; counter-increment: step; }
.thread li:last-child { padding-bottom: 0; }
.thread li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-700); color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 4px var(--paper);
}
.thread b { display: block; font-size: 15.5px; margin-bottom: 3px; }
.thread span { display: block; font-size: 14px; line-height: 1.65; color: var(--text-secondary); max-width: 62ch; }

/* the two sides */
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.aud-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; max-width: 48ch; }
.aud-list li { position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.65; color: var(--text-secondary); }
.aud-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary-500); }

/* ---- The pilot ---------------------------------------------------------------- */
.pilot {
  color: #fff; margin-top: 40px; padding: 96px 0;
  background: radial-gradient(700px 500px at 18% 30%, rgba(148, 72, 114, 0.35), transparent 62%),
              linear-gradient(160deg, var(--night-2), var(--night));
}
.pilot .lab { color: var(--blush); margin-bottom: 18px; padding-top: 0; }
.pilot-grid { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 64px; align-items: start; }
.pilot h2 { color: #fff; max-width: 18ch; }
.pilot-copy > p { font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, 0.78); max-width: 52ch; margin: 0 0 34px; }
.pilot-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; margin: 0; max-width: 540px; }
.pilot-facts dt { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); margin-bottom: 4px; }
.pilot-facts dd { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.pilot-form {
  background: var(--bg-card); color: var(--text-primary); border-radius: var(--radius-lg);
  padding: 28px 28px 26px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.pilot-form h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.pilot-form > p { font-size: 13.5px; color: var(--text-secondary); margin: 0 0 20px; }
.pilot-form .field { margin-bottom: 16px; }
.pilot-form .btn { margin-top: 6px; }
.pilot-done { text-align: center; padding: 18px 0 8px; }
.pilot-done .tick { width: 56px; height: 56px; border-radius: 50%; background: #d1fae5; color: #059669; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.pilot-done .tick svg { width: 28px; height: 28px; }
.pilot-done h3 { margin-bottom: 8px; }
.pilot-done p { margin: 0; }

/* ---- Questions ---------------------------------------------------------------- */
.faq { max-width: 680px; }
.faq details { border-top: 1px solid var(--border-color); }
.faq details:last-child { border-bottom: 1px solid var(--border-color); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-size: 16px; font-weight: 600; color: var(--text-primary);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--primary-500); border-bottom: 2px solid var(--primary-500);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq summary:hover { color: var(--primary-700); }
.faq details p { margin: 0 0 20px; font-size: 14.5px; line-height: 1.75; color: var(--text-secondary); max-width: 60ch; }

/* ---- Sign in ------------------------------------------------------------------ */
.signin { padding: 88px 0 96px; border-top: 1px solid var(--border-color); }
.signin .auth-card { max-width: 480px; margin: 0 auto; box-shadow: 0 18px 44px rgba(66, 31, 51, 0.09); }
.signin .signed-in { display: grid; gap: 8px; justify-items: center; }
.signin .signed-in .btn-block { width: 100%; }
.signin .signed-in .btn-ghost { font-size: 13px; padding: 6px 10px; }

/* ---- Footer ------------------------------------------------------------------- */
.foot { border-top: 1px solid var(--border-color); padding: 30px 0 40px; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot .brand-logo { height: 26px; }
.foot-line { font-size: 12.5px; color: var(--text-muted); }
.foot-nav { display: flex; gap: 4px; }
.foot-nav a { padding: 6px 10px; font-size: 13px; color: var(--text-secondary); text-decoration: none; border-radius: var(--radius); }
.foot-nav a:hover { background: var(--primary-50); color: var(--primary-700); }

/* ---- Scroll reveal -------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Responsive ------------------------------------------------------------------ */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; padding: 110px 28px 72px; gap: 16px; }
  .hero-fig { max-width: 420px; justify-self: center; opacity: .9; }
  .film-frame { border-radius: 12px; }
  .match-grid, .equity-grid, .sponsor-grid, .pilot-grid { grid-template-columns: 1fr; gap: 28px; }
  .pilot-form { max-width: 560px; }
}
@media (max-width: 760px) {
  .landing .wrap { padding: 0 20px; }
  .top { padding: 14px 20px; }
  .top-nav { display: none; }
  .top-nav.open { display: flex; position: absolute; top: 60px; left: 12px; right: 12px; flex-direction: column; align-items: stretch;
    background: var(--bg-card); color: var(--text-primary); border-radius: var(--radius-lg); padding: 10px; box-shadow: var(--shadow-xl); }
  .top-nav.open a { padding: 12px 14px; opacity: 1; }
  .top-nav.open .top-signin { margin: 6px 0 0; border-color: var(--primary-500); color: var(--primary-700); text-align: center; }
  .top-menu { display: inline-flex; align-items: center; justify-content: center; }
  .hero { min-height: 0; }
  .hero-inner { padding: 96px 20px 56px; }
  .hero p { font-size: 16px; }
  .figures-row { grid-template-columns: 1fr; gap: 24px; }
  .figure b { font-size: 40px; }
  .ledger { grid-template-columns: 1fr; gap: 10px; padding: 56px 0; }
  .ledger .lab { padding-top: 0; }
  .sides { grid-template-columns: 1fr; gap: 32px; }
  .pilot { padding: 64px 0; margin-top: 24px; }
  .pilot-facts { grid-template-columns: 1fr 1fr; gap: 18px 20px; }
  .pilot-form { padding: 22px 20px; }
  .signin { padding: 56px 0 64px; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
}
