/* Twin Runway landing page. Tokens follow the web app (web/src/styles/tokens.css): tangerine fills on cream, navy ink. */
:root {
  color-scheme: light;
  --accent: #f47920;      /* fills, gradients, display only: 2.76:1 on white, so never text */
  --accent-strong: #d95f0e;
  --accent-ink: #a6470a;  /* orange text: 5.95:1 white, 5.53:1 cream */
  --accent-soft: #fff4ea;
  --accent-line: #f9b98a;
  --on-accent: #13233f;   /* text on a tangerine fill, 5.67:1 */
  --peach: #ffe3cc;
  --ink: #13233f;
  --ink-2: #2b3a55;
  --muted: #5b6474;       /* 5.97:1 white, 5.55:1 cream */
  --line: #efe4d6;
  --line-strong: #e2d2bd;
  --surface: #ffffff;
  --sunken: #f6eee3;
  --page: #fbf6ee;
  --s-judges: #2a78d6;
  --s-reality: #eb6834;
  --s-base: #64748b;
  --s-plan: #12946a;      /* 3.84:1 on white */
  --warn-line: #f59e0b;
  --warn-bg: #fffbeb;
  --focus: #13233f;
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(19, 35, 63, 0.05), 0 6px 18px -6px rgba(180, 80, 10, 0.12);
  --shadow-hover: 0 2px 4px rgba(19, 35, 63, 0.06), 0 14px 30px -12px rgba(180, 80, 10, 0.28);
  --glow-accent: 0 8px 20px -10px rgba(244, 121, 32, 0.6);
  --grad-peach: linear-gradient(135deg, #fff6ec 0%, #ffe3cc 100%);
  --grad-logo: radial-gradient(circle at 32% 30%, #ffd2a8 0 14%, #ff9a3c 15% 55%, #f47920 56% 100%);
  --grad-page:
    radial-gradient(1200px 380px at 85% -120px, rgba(255, 178, 122, 0.35), transparent 70%),
    radial-gradient(900px 300px at -10% -80px, rgba(255, 227, 204, 0.7), transparent 70%);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--grad-page), var(--page);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); }
strong { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1172px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 246, 238, 0.88);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
}

.brand-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad-logo);
  box-shadow: var(--glow-accent);
  flex: none;
}

.site-nav {
  display: none;
  gap: 4px;
  margin-right: auto;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--ink); }

.header-row .btn-small { margin-left: auto; }

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .header-row .btn-small { margin-left: 0; }
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent-strong); box-shadow: var(--glow-accent); }
.btn-primary:hover { background: #ff8a33; }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow); }
.btn-ghost:hover { border-color: var(--ink-2); box-shadow: var(--shadow-hover); }

.btn-small { min-height: 38px; padding: 6px 14px; font-size: 0.9rem; }

/* ------------------------------------------------------------ sections */
section { padding: 64px 0; }
section.band { background: rgba(255, 255, 255, 0.7); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 800; max-width: 26ch; }
h3 { font-size: 1.2rem; font-weight: 750; }

.kicker {
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.lead {
  margin-top: 16px;
  max-width: 68ch;
  color: var(--ink-2);
  font-size: 1.08rem;
}

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------ hero */
.hero { padding: 48px 0 56px; }

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.hero h1 {
  margin-top: 10px;
  font-size: clamp(2.6rem, 1.6rem + 4.5vw, 4.6rem);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.pitch {
  margin-top: 16px;
  max-width: 60ch;
  font-size: clamp(1.08rem, 1rem + 0.4vw, 1.3rem);
  color: var(--ink-2);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--s-judges);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  padding: 24px 26px;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.stat-big {
  font-size: clamp(3.2rem, 2.6rem + 3vw, 4.8rem);
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.stat-text { margin-top: 6px; font-size: 1.05rem; }
.stat-foot { margin-top: 14px; font-size: 0.85rem; color: var(--muted); }

@media (min-width: 900px) {
  .hero { padding: 72px 0 64px; }
  .hero-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; }
}

/* ------------------------------------------------------------ screenshots */
.shot {
  margin: 32px 0 0;
}

.shot-link { display: block; cursor: zoom-in; }

.shot img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(19, 35, 63, 0.05), 0 18px 40px -16px rgba(180, 80, 10, 0.3);
  background: var(--page);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.shot-link:hover img { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(19, 35, 63, 0.06), 0 24px 48px -16px rgba(180, 80, 10, 0.38); }

.shot figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.shot-hero { margin: 40px auto 0; max-width: 1040px; }

/* ------------------------------------------------------------ demo */
.video {
  margin-top: 24px;
  border-radius: var(--radius-lg);
  background: var(--sunken);
  border: 1px dashed var(--line-strong);
  padding: 28px 24px;
}

.video-coming { color: var(--ink-2); font-size: 1.05rem; }

.video.has-video {
  padding: 0;
  border: 0;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(19, 35, 63, 0.08), 0 24px 48px -20px rgba(180, 80, 10, 0.35);
}

.video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ------------------------------------------------------------ finding */
.duo {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

@media (min-width: 760px) {
  .duo { grid-template-columns: 1fr 1fr; }
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.metric-label { font-weight: 700; color: var(--ink-2); font-size: 0.95rem; }

.metric-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
  font-size: clamp(2.2rem, 1.8rem + 1.6vw, 3rem);
  font-weight: 850;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.metric-value .arrow { color: var(--muted); font-weight: 400; font-size: 0.7em; }
.metric-value .hot { color: var(--accent-ink); }
.metric-text { margin-top: 4px; color: var(--muted); font-size: 0.92rem; }

.case {
  display: grid;
  gap: 24px;
  margin-top: 40px;
  background: var(--grad-peach);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 24px;
  align-items: center;
}

.case img {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hover);
}

.case h3 { font-size: 1.5rem; margin-bottom: 10px; }
.case-copy p + p { margin-top: 12px; }
.case-copy > p:not(.kicker):not(.muted) { font-size: 1.08rem; }

@media (min-width: 760px) {
  .case { grid-template-columns: 300px minmax(0, 1fr); padding: 32px; gap: 36px; }
  .case img { max-width: none; }
}

/* ------------------------------------------------------------ how it works */
.steps {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 40px;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 56px;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -4px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--on-accent);
  background: var(--grad-logo);
  border: 2px solid var(--surface);
  box-shadow: var(--glow-accent);
}

.steps > li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 18px;
  top: 40px;
  bottom: -36px;
  width: 2px;
  background: var(--accent-line);
}

.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--ink-2); max-width: 72ch; }

.pair { display: grid; gap: 0 24px; }

@media (min-width: 900px) {
  .pair { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .steps > li { padding-left: 0; padding-top: 48px; }
  .steps > li::before { top: 0; }
  .steps > li:not(:last-child)::after { display: none; }
}

.light {
  margin-top: 48px;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.light h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

.light-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--warn-line);
  box-shadow: 0 0 0 4px var(--warn-bg);
  flex: none;
}

.light p { color: var(--ink-2); max-width: 72ch; }

.rules {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.rules li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn-line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 600;
}

@media (min-width: 760px) {
  .rules { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------ evidence */
.lift {
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 26px;
}

.lift-title { font-weight: 700; margin-bottom: 14px; }

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3ch;
  grid-template-areas: 'name name' 'track num';
  align-items: center;
  gap: 4px 12px;
  padding: 8px 0;
}

.bar-name { grid-area: name; font-size: 0.95rem; color: var(--ink-2); }
.bar-track { grid-area: track; height: 18px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.bar-num { grid-area: num; text-align: right; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.bar {
  display: block;
  height: 100%;
  width: calc(var(--v) / var(--max) * 100%);
  border-radius: 999px;
}

.bar-light { background: linear-gradient(90deg, #ffb27a 0%, #f47920 100%); }
.bar-buffer { background: var(--s-plan); }
.bar-judges { background: var(--s-judges); }

@media (min-width: 760px) {
  .bar-row { grid-template-columns: 260px minmax(0, 1fr) 3ch; grid-template-areas: 'name track num'; }
}

.note {
  margin-top: 32px;
  border-left: 4px solid var(--s-base);
  background: var(--surface);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
}

.note h3 { margin-bottom: 8px; }
.note p { color: var(--ink-2); max-width: 76ch; }

/* ------------------------------------------------------------ built */
.parity {
  margin-top: 18px;
  display: inline-block;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
}

.parity::before { content: '✓ '; }

.cards {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

@media (min-width: 700px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); }

/* ------------------------------------------------------------ links */
.link-grid {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

@media (min-width: 700px) {
  .link-grid { grid-template-columns: 1fr 1fr; }
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.link-card strong { color: var(--accent-ink); font-size: 1.08rem; }
.link-card strong::after { content: ' →'; }
.link-card span { color: var(--muted); font-size: 0.95rem; }
.link-card:hover { border-color: var(--accent-strong); transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* ------------------------------------------------------------ footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
