/* Splits landing page. Tokens mirror the app's Shared/Ink.swift: system grouped surfaces, the brand teal
   (teal 700 in light, 300 in dark), and 12/18 pt radii. System type, as in the app. Follows the system appearance. */

:root {
  --bg: #F2F2F7;           /* systemGroupedBackground */
  --surface: #FFFFFF;      /* secondarySystemGroupedBackground */
  --line: #C6C6C8;         /* opaqueSeparator */
  --text: #000000;         /* label */
  --dim: #6C6C70;          /* secondaryLabel on white, 5.0:1 */
  --accent: #0F766E;       /* Ink.accent light, 5.5:1 on white */
  --on-accent: #FFFFFF;
  --run: #0F766E;
  --lift: #0F766E;
  --hero: #0F766E;
  --hero-deep: #0A5A53;
  --hero-text: #FFFFFF;
  --hero-dim: rgba(255, 255, 255, 0.82);
  --radius: 12px;
  --radius-lg: 18px;
  --max: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1C1C1E;
    --line: #38383A;
    --text: #FFFFFF;
    --dim: #AEAEB2;
    --accent: #5EEAD4;     /* Ink.accent dark */
    --on-accent: #0B0E12;
    --hero: #0B4A45;
    --hero-deep: #062F2C;
    --hero-dim: rgba(255, 255, 255, 0.78);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible + span, summary:focus-visible, .rail:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
img { display: block; max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  padding: 10px 14px; background: var(--surface); color: var(--text); border-radius: var(--radius);
}
.skip:focus { top: 12px; }

/* Top bar: sits on the hero's teal, like a navigation bar over a tinted header. */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--hero-text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.bar-cta {
  color: var(--hero-text); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 999px; background: rgba(255, 255, 255, 0.14);
}
.bar-cta:hover { background: rgba(255, 255, 255, 0.22); }

/* Hero */
.hero {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 6vw, 80px); align-items: center;
  padding: 112px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 0;
  background: linear-gradient(160deg, var(--hero) 0%, var(--hero-deep) 100%);
  color: var(--hero-text);
  overflow: hidden;
}
.hero-copy { padding-bottom: 72px; }
.eyebrow { margin: 0 0 14px; color: var(--hero-dim); font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
h1 {
  margin: 0; font-size: clamp(40px, 6.2vw, 68px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  text-wrap: balance;
}
.lede { margin: 18px 0 0; max-width: 34ch; font-size: clamp(18px, 2vw, 21px); color: var(--hero-dim); }

/* The signature: the app's week strip. Lifts are filled discs, runs are rings, the long run is the bold ring. */
.week {
  list-style: none; margin: 32px 0 0; padding: 14px 16px;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 360px;
  background: rgba(255, 255, 255, 0.1); border-radius: var(--radius-lg);
}
.week li { display: grid; justify-items: center; gap: 8px; }
.week span { font-size: 12px; font-weight: 600; color: var(--hero-dim); }
.week i {
  display: block; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  background-position: center; background-repeat: no-repeat; background-size: 18px;
  transform: scale(0.6); opacity: 0;
  animation: day 420ms cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
}
.week li:nth-child(1) i { animation-delay: 150ms; }
.week li:nth-child(2) i { animation-delay: 220ms; }
.week li:nth-child(3) i { animation-delay: 290ms; }
.week li:nth-child(4) i { animation-delay: 360ms; }
.week li:nth-child(5) i { animation-delay: 430ms; }
.week li:nth-child(6) i { animation-delay: 500ms; }
.week li:nth-child(7) i { animation-delay: 570ms; }
.week [data-kind="lift"] i {
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230F766E'%3E%3Crect x='2' y='8' width='3' height='8' rx='1'/%3E%3Crect x='5.5' y='6' width='3' height='12' rx='1'/%3E%3Crect x='15.5' y='6' width='3' height='12' rx='1'/%3E%3Crect x='19' y='8' width='3' height='8' rx='1'/%3E%3Crect x='8' y='11' width='8' height='2'/%3E%3C/svg%3E");
}
.week [data-kind~="run"] i {
  background-color: transparent; box-shadow: inset 0 0 0 2px #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='14.5' cy='4.5' r='1.8' fill='%23FFFFFF' stroke='none'/%3E%3Cpath d='M9 21l3-6 3 2v4M6 12l3-4 4 1 3 3 3 1M12 15l1-6'/%3E%3C/svg%3E");
}
.week [data-kind~="long"] i { box-shadow: inset 0 0 0 3px #FFFFFF, 0 0 0 4px rgba(255, 255, 255, 0.18); }
.week [data-kind="rest"] i { background-color: rgba(255, 255, 255, 0.12); }
@keyframes day { to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .week i { animation: none; transform: none; opacity: 1; }
}

/* Sign-up */
.signup { margin-top: 28px; max-width: 480px; }
.platform {
  display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.18); border-radius: 10px;
}
.platform label { position: relative; }
.platform input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.platform span {
  display: block; padding: 7px 18px; min-width: 96px; text-align: center; border-radius: 8px;
  font-size: 15px; font-weight: 600; color: var(--hero-dim); transition: background 160ms, color 160ms;
}
.platform input:checked + span { background: #FFFFFF; color: #0A5A53; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.row { display: flex; gap: 10px; }
.row input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 16px;
  font: inherit; color: #000; background: #FFFFFF; border: 0; border-radius: var(--radius);
}
.row input::placeholder { color: #8A8A8E; }
.row input:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.7); outline-offset: 2px; }
.row button, .button {
  min-height: 52px; padding: 0 22px; border: 0; border-radius: var(--radius); cursor: pointer;
  font: inherit; font-weight: 700; white-space: nowrap;
  background: #0B0E12; color: #FFFFFF;
  transition: transform 120ms ease, opacity 160ms;
}
.row button:hover { background: #1C2128; }
.row button:active { transform: scale(0.98); }
.row button[disabled] { opacity: 0.6; cursor: progress; }
.turnstile { margin-top: 0; }
.turnstile iframe { margin-top: 12px; }
.note { margin: 12px 0 0; font-size: 14px; color: var(--hero-dim); }
.note a, .status a { color: var(--hero-text); font-weight: 600; }
.status { margin: 10px 0 0; font-size: 16px; font-weight: 600; }
.status:empty { display: none; }
.status[data-kind="error"] { color: #FFE4E1; }
.signup.done .row, .signup.done .platform, .signup.done .turnstile, .signup.done .note { display: none; }
.signup.done .status {
  padding: 16px 18px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.14); font-weight: 500;
}
.signup.done .status strong { display: block; font-size: 19px; margin-bottom: 4px; }

/* Phones: the raw store captures in a CSS bezel. */
.phone {
  position: relative; border-radius: 13.5% / 6.2%; overflow: hidden;
  background: #000; padding: 2.6%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 30px 60px -20px rgba(0, 0, 0, 0.45);
}
.phone img { border-radius: 11.5% / 5.3%; }
.hero-phone { margin: 0; align-self: end; justify-self: center; width: min(360px, 100%); }
.hero-phone .phone { border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 0; margin-bottom: -18%; }
.hero-phone .phone img { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* Sections */
section:not(.hero) { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 112px) var(--gutter) 0; }
h2 { margin: 0 0 16px; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 800; text-wrap: balance;
     font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif; }

.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.story-copy p { margin: 0; color: var(--dim); font-size: 19px; max-width: 40ch; }
.story-phone { margin: 0; justify-self: center; width: min(320px, 100%); }
.ticks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; max-width: 46ch; }
.ticks li { position: relative; padding-left: 32px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5'/%3E%3C/svg%3E") center / 20px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .ticks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230B0E12' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5'/%3E%3C/svg%3E"); }
}

.tour h2 { margin-bottom: 28px; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 28px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 28px; margin: 0 -4px;
  scrollbar-width: thin;
}
.rail figure { margin: 0; scroll-snap-align: start; }
.rail .phone { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 18px 36px -18px rgba(0, 0, 0, 0.35); }
.rail figcaption { margin-top: 14px; font-weight: 600; font-size: 16px; }

/* Grouped lists, as in the app's Settings and History. */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.group { background: var(--surface); border-radius: var(--radius-lg); padding: 22px 24px; }
.group h3 { margin: 0 0 10px; font-size: 20px; letter-spacing: -0.01em; }
.group ul { margin: 0; padding: 0; list-style: none; }
.group li { padding: 11px 0; color: var(--dim); border-top: 0.5px solid var(--line); }
.group li:first-child { border-top: 0; padding-top: 2px; }

.faq { max-width: 760px; }
.faq .group { padding: 4px 24px; }
details { border-top: 0.5px solid var(--line); }
details:first-child { border-top: 0; }
summary {
  list-style: none; cursor: pointer; padding: 16px 28px 16px 0; min-height: 44px; position: relative;
  font-weight: 600;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim); transform: rotate(45deg);
  transition: transform 180ms ease;
}
details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
details p { margin: 0 0 18px; color: var(--dim); }
.again { margin: 32px 0 0; text-align: center; }
.button { display: inline-flex; align-items: center; text-decoration: none; background: var(--accent); color: var(--on-accent); }

.foot {
  max-width: var(--max); margin: 0 auto; padding: 72px var(--gutter) calc(48px + env(safe-area-inset-bottom));
  color: var(--dim); font-size: 14px; text-align: center;
}
.foot p { margin: 4px 0; }
.foot a { color: var(--dim); }

/* Phone widths */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 0; padding-top: 96px; text-align: left; }
  .hero-copy { padding-bottom: 48px; }
  .hero-phone { width: min(300px, 78%); }
  .story { grid-template-columns: 1fr; }
  .story-phone { width: min(280px, 80%); }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .row { flex-direction: column; }
  .row button { width: 100%; }
  .bar-cta { padding: 8px 14px; }
  .week { padding: 12px; gap: 2px; }
  .week i { width: 30px; height: 30px; }
}

@media print {
  .hero { background: none; color: #000; }
  .signup, .bar-cta, .rail { display: none; }
}
