:root {
  --bg: #0b0b0c;
  --surface: #161618;
  --ink: #f4f2ee;
  --muted: #a9a49b;
  --line: #26262a;
  --blue: #3b88d9;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

main, footer { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

h1, h2 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif; letter-spacing: -0.025em; line-height: 1.05; margin: 0; }
p { margin: 0; }
a { color: inherit; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; padding: 24px 0; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.top { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid #2c2c31; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none;
}
.pill:hover { border-color: var(--muted); }

/* Opening: headline, sign-up */
.hero { max-width: 880px; margin: 0 auto; padding: 72px 0 48px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero h1 { font-size: clamp(44px, 7.5vw, 88px); font-weight: 760; letter-spacing: -0.035em; line-height: 1.02; }
.lede { max-width: 560px; font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--muted); }

.signup { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; max-width: 460px; margin-top: 8px; scroll-margin-top: 120px; }
.signup input {
  flex: 1 1 220px; min-width: 0; min-height: 52px; padding: 0 20px; font: inherit; border-radius: 999px;
  border: 1px solid #2c2c31; background: var(--surface); color: var(--ink);
}
.signup input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.signup button {
  flex: 0 0 auto; min-height: 52px; padding: 0 26px; font: inherit; font-weight: 650; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg); cursor: pointer; white-space: nowrap;
}
.signup button:hover { opacity: 0.88; }
.fine { font-size: 14px; color: #8f8a82; }

/* The App Store header video */
.reel { display: block; width: 100%; aspect-ratio: 3840 / 1646; object-fit: cover; border-radius: 28px; background: var(--surface); }

/* Food, workouts, custom tiles: the App Store search image, its headline cropped off */
.assistant { padding: 140px 0 40px; }
.assistant img { display: block; width: 100%; height: auto; aspect-ratio: 2000 / 1014; border-radius: 28px; }

/* The App Store screenshots; their headlines are in the images */
.shots { padding: 120px 0 40px; }
.shots h2, .data h2 { text-align: center; }
.shots h2 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 720; margin-bottom: 56px; }
.shot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.shot-grid img { display: block; width: 100%; height: auto; aspect-ratio: 1320 / 2868; border-radius: 28px; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }

/* Everything you track adds up: tiles join the lift, then the coach answers.
   One 9s loop; every part runs on the same clock. */
.adds-up { padding: 140px 0 40px; }
.section-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 740; letter-spacing: -0.03em; }
.section-head p { max-width: 560px; font-size: 18px; line-height: 1.5; color: var(--muted); }
.scene-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 48px; }
.scene { position: relative; flex: 1 1 520px; max-width: 620px; aspect-ratio: 6 / 5; }
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.scene line { stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 9s ease-in-out infinite; }
.scene .tile, .scene .center {
  position: absolute; transform: translate(-50%, -50%); box-sizing: border-box;
  display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line);
}
.scene .tile { width: 27%; min-width: 118px; padding: 14px 16px; border-radius: 20px; animation: pop 9s ease-out infinite; }
.scene .tile .name { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.scene .tile .name::before { content: ""; width: 10px; height: 10px; border-radius: 4px; background: var(--c); }
.scene b { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.scene small { font-size: 12px; color: #8f8a82; }
.scene .center {
  left: 50%; top: 50%; width: 34%; min-width: 150px; padding: 18px 20px; border-radius: 24px;
  background: #1c1512; border-color: #e07142; animation: glow 9s ease-in-out infinite;
}
.scene .center .name { font-size: 13px; font-weight: 600; color: #f0a07e; }
.scene .center b { font-size: 28px; font-weight: 760; letter-spacing: -0.02em; }
.scene .center small { font-size: 13px; color: #c9b9ae; }
.chat { flex: 1 1 340px; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.chat p { font-size: 17px; line-height: 1.5; }
.ask { align-self: flex-end; max-width: 80%; padding: 12px 16px; border-radius: 20px 20px 6px 20px; background: #2b4f78; opacity: 0; animation: ask 9s ease-out infinite; }
.answer { padding: 16px 18px; border-radius: 20px 20px 20px 6px; background: var(--surface); border: 1px solid var(--line); color: #e7e3dc; opacity: 0; animation: answer 9s ease-out infinite; }
.chat .note { padding: 0; margin-top: 4px; border: 0; background: none; font-size: 13px; color: #8f8a82; }

@keyframes draw { 0%, 6% { stroke-dashoffset: 1; } 28%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.9); } 8%, 94% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%); } }
@keyframes glow { 0%, 30% { box-shadow: 0 0 0 0 rgba(224,113,66,0); } 38%, 92% { box-shadow: 0 0 0 6px rgba(224,113,66,.18), 0 0 60px rgba(224,113,66,.35); } 100% { box-shadow: 0 0 0 0 rgba(224,113,66,0); } }
@keyframes ask { 0%, 40% { opacity: 0; transform: translateY(10px); } 46%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes answer { 0%, 54% { opacity: 0; transform: translateY(10px); } 62%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .scene line, .scene .tile, .scene .center, .ask, .answer { animation: none; opacity: 1; stroke-dashoffset: 0; }
}

.data { max-width: 640px; margin: 0 auto; padding: 100px 0 40px; text-align: center; }
.data h2 { font-size: 22px; font-weight: 680; letter-spacing: -0.01em; margin-bottom: 12px; }
.data p { font-size: 16px; line-height: 1.6; color: var(--muted); }

footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 60px; padding-top: 40px; padding-bottom: 48px; border-top: 1px solid #1e1e22; color: #8f8a82; font-size: 14px; }
footer nav { display: flex; gap: 24px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Plain text pages (privacy, support) */
.doc { max-width: 680px; padding-bottom: 72px; }
.doc h1 { font-size: 40px; margin: 16px 0 8px; }
.doc h2 { font-size: 22px; margin: 36px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 12px; }
.doc strong { color: var(--ink); }

@media (max-width: 900px) {
  .shot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hero { padding-top: 40px; }
  .reel { border-radius: 18px; }
  .shots, .adds-up, .assistant { padding-top: 80px; }
  .assistant img { border-radius: 18px; }
  .scene { flex-basis: 100%; aspect-ratio: 1 / 1; }
  .scene .tile { min-width: 0; width: 31%; padding: 10px; border-radius: 14px; }
  .scene .tile .name { font-size: 11px; gap: 5px; }
  .scene b { font-size: 16px; }
  .scene small { font-size: 10px; }
  .scene .center { min-width: 0; width: 40%; padding: 12px; border-radius: 18px; }
  .scene .center b { font-size: 22px; }
  .scene .center small { font-size: 11px; }
  .shot-grid { gap: 14px; }
  .shot-grid img { border-radius: 18px; }
}
