/* ============================================================================
   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, and the ISE&S credit
   sits at the hero's foot. Below it the page is ledger rows (the shared
   pattern in public/css/site.css, with larger headings here): the score
   card, the equity table and the sponsor log, each with a line or two and a
   link to the detail on How it works. The pilot form is the one call to
   action, at the end.
   ========================================================================== */

: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-500); outline-offset: 3px; }
/* On the night grounds (the hero, the bar over it, the pilot copy) the ring stays light. */
.landing .hero :focus-visible, .landing .pilot-copy :focus-visible { outline-color: var(--primary-300); }

/* ---- 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, 900px); min-height: min(100svh, 900px);
  display: flex; flex-direction: column;
}
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; flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 128px 32px 64px;
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: center; gap: 24px;
}
.hero-copy { position: relative; z-index: 1; max-width: 680px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(42px, 4.4vw, 62px); line-height: 1.06; 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: 460px; height: auto; justify-self: end; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
/* The credits: a strip at the foot of the hero, under a hairline, lined up with the copy. */
.hero-foot { position: relative; z-index: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 32px 40px; }
.hero-foot .credits { padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.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: the shared rows (site.css), larger here ---------------- */
.landing .ledger { grid-template-columns: 180px minmax(0, 1fr); gap: 20px 56px; padding: 88px 0; }
.landing .ledger#score { border-top: none; }
.landing .ledger#questions { border-top: 1px solid var(--border-color); }
.pilot .lab {
  font-size: 14px; font-weight: 600; color: var(--primary-500); padding-top: 9px;
}
.landing .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);
}
.prose p { font-size: 16px; line-height: 1.75; color: var(--text-secondary); max-width: var(--measure); margin: 0 0 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose .more-link { margin-top: 4px; }
.demo-tag { font-size: 12px; font-weight: 600; 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; }
/* The short text sits level with the middle of the card beside it. */
.match-grid, .sponsor-grid { align-items: center; }
.match-grid { grid-template-columns: minmax(0, 1fr) 400px; }
/* The table needs its width, so the text sits above it rather than squeezed beside it. */
.equity-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
.equity-grid .eq-card { max-width: 720px; }
.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: 10px; color: var(--text-muted); }
.mc-part { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); 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: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; 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 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: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.6); 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, .ledger .body .faq details p { margin: 0 0 20px; font-size: 15px; line-height: 1.75; color: var(--text-secondary); max-width: 62ch; }
.faq details p a { color: var(--primary-700); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--primary-300); }
.faq details p a:hover { color: var(--primary-500); text-decoration-color: currentColor; }

/* ---- 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: 120px 28px 56px; gap: 16px; }
  .hero-fig { max-width: 380px; justify-self: center; opacity: .9; }
  .hero-foot { padding: 0 28px 36px; }
  .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; }
  .hero { min-height: 0; }
  .hero-inner { display: block; padding: 104px 20px 36px; }
  .hero p { font-size: 16px; margin-bottom: 28px; }
  /* On a phone the constellation is a quiet backdrop behind the headline, so the hero fits one screen. */
  .hero-fig { position: absolute; z-index: 0; top: 52px; right: -36px; width: 250px; max-width: none; opacity: .38; pointer-events: none; }
  .hero-foot { padding: 0 20px 28px; }
  .hero-foot .credits { padding-top: 22px; }
  .figures-row { grid-template-columns: 1fr; gap: 24px; }
  .figure b { font-size: 40px; }
  .landing .ledger { grid-template-columns: 1fr; gap: 10px; padding: 56px 0; }
  .pilot { padding: 64px 0; margin-top: 24px; }
  .pilot-facts { grid-template-columns: 1fr 1fr; gap: 18px 20px; }
  .pilot-form { padding: 22px 20px; }
}
