/* Layout: a running track. The hero and the closing band are the track itself (track red, white lane
   lines); the sleep section is the infield at night (deep green). Everything between is quiet paper
   with left-aligned copy beside real screens in device frames.
   Type: stadium-signage display face for headlines, a plain grotesque for everything else. */
:root {
  --track: #c63d22;
  --track-deep: #a33018;
  --infield: #17432c;
  --chalk: #ffffff;
  --paper: #f1f3f0;
  --surface: #ffffff;
  --ink: #142019;
  --muted: #56625a;
  --rule: #d8ddd7;
  --on-track: #ffffff;
  --on-track-muted: rgba(255, 255, 255, 0.84);
  --btn-on-track-fg: #a33018;
  --go: #1f7a4a; --ease: #b7791f; --rest: #2f5fc4;

  /* device metal */
  --metal-hi: #e6e7e9;
  --metal-mid: #c5c7cb;
  --metal-lo: #8f9297;
  --metal-ring: #a7aaaf;
  --app-bg: #ffffff;
  --app-fg: #171717;
  --show-dark: none;
  --show-light: block;

  --display: "Big Shoulders Display", "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --track: #b8391f; --track-deep: #932b15; --infield: #123623;
    --paper: #101814; --surface: #16201b; --ink: #e8ede9; --muted: #a2aea6; --rule: #26332c;
    --btn-on-track-fg: #932b15;
    --go: #4cc283; --ease: #e0a84a; --rest: #7aa2f0;
    --metal-hi: #5b5e63; --metal-mid: #3d4044; --metal-lo: #25272a; --metal-ring: #6c6f74;
    --app-bg: #0a0a0a; --app-fg: #f5f5f5;
    --show-dark: block; --show-light: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --track: #b8391f; --track-deep: #932b15; --infield: #123623;
  --paper: #101814; --surface: #16201b; --ink: #e8ede9; --muted: #a2aea6; --rule: #26332c;
  --btn-on-track-fg: #932b15;
  --go: #4cc283; --ease: #e0a84a; --rest: #7aa2f0;
  --metal-hi: #5b5e63; --metal-mid: #3d4044; --metal-lo: #25272a; --metal-ring: #6c6f74;
  --app-bg: #0a0a0a; --app-fg: #f5f5f5;
  --show-dark: block; --show-light: none;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--track); outline-offset: 3px; border-radius: 4px; }
.track :focus-visible, .finish :focus-visible { outline-color: var(--chalk); }
.t-dark { display: var(--show-dark); }
.t-light { display: var(--show-light); }

.wrap {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 900; letter-spacing: -0.005em; line-height: 0.9; }
h1 { font-size: clamp(58px, 8vw, 112px); }
h2 { font-size: clamp(48px, 6vw, 88px); }
h3 { font: 700 21px/1.25 var(--body); letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; max-width: 38ch; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  font: 700 17px/1 var(--body); padding: 17px 26px; border-radius: 6px; white-space: nowrap;
  border: 2px solid transparent; transition: background-color .15s ease, color .15s ease;
}
.btn-chalk { background: var(--chalk); color: var(--btn-on-track-fg); }
.btn-chalk:hover { background: #ffe9e1; }
.btn-line { border-color: rgba(255,255,255,.7); color: var(--on-track); }
.btn-line:hover { background: rgba(255,255,255,.12); }
.btn-ink { background: var(--track); color: #fff; padding: 11px 18px; font-size: 15px; }
.btn-ink:hover { background: var(--track-deep); }

/* ---------- nav ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30;
  background: var(--paper);
}
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 15px; font-weight: 500; color: var(--muted); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.theme-btn {
  background: none; border: 1px solid var(--rule); color: var(--muted); border-radius: 6px;
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; flex: none;
}
.theme-btn:hover { color: var(--ink); }
.theme-btn svg { width: 18px; height: 18px; }
@media (max-width: 800px) { .nav-links { display: none; } .theme-btn { margin-left: auto; } .nav .wrap { gap: 10px; } }
@media (max-width: 420px) { .brand { font-size: 15px; } .btn-ink { padding: 9px 13px; font-size: 14px; } .theme-btn { width: 34px; height: 34px; } }

/* ---------- the track (hero) ---------- */
.track {
  position: relative; isolation: isolate; color: var(--on-track);
  background: var(--track);
  padding-block: 88px 0;
  overflow: hidden;
}
.track-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 56px; row-gap: 40px; align-items: end; }
.track-grid h1 { max-width: 14ch; }
.track-head { grid-column: 1 / -1; display: grid; gap: 28px; justify-items: start; }
@media (min-width: 981px) { .track-grid h1 { max-width: none; } }
.track-copy { display: grid; gap: 28px; padding-bottom: 88px; align-content: start; align-self: start; }
.track-copy .lede { color: var(--on-track-muted); max-width: 34ch; }
.track-copy .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { font-size: 15px; color: var(--on-track-muted); max-width: 40ch; }
.device-badge {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); border-radius: 99px;
  padding: 6px 14px 6px 8px; font-size: 15px; font-weight: 600;
}
.device-badge svg { width: 22px; height: 22px; }

.hero-stage { position: relative; padding-right: 10%; margin-right: -4%; align-self: end; }
.hero-stage .phone { position: absolute; right: 0; bottom: 6%; width: 26%; }
@media (max-width: 980px) {
  .track { padding-top: 48px; }
  .track-grid { grid-template-columns: 1fr; gap: 8px; }
  .track-copy { padding-bottom: 32px; }
  .hero-stage { margin-right: 0; padding-right: 12%; }
}

/* ---------- devices ---------- */
.laptop { position: relative; }
.laptop .lid {
  position: relative; background: #0c0c0d; padding: 1.7% 1.7% 2.4%;
  border-radius: 2.4% 2.4% 0 0 / 3.8% 3.8% 0 0;
  box-shadow: 0 0 0 1.5px var(--metal-ring), inset 0 0 0 1px rgba(255,255,255,.07);
}
.laptop .lid::before { /* camera housing */
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 9%; height: 1.7%; min-height: 6px; background: #0c0c0d; border-radius: 0 0 6px 6px; z-index: 2;
}
.laptop .lid::after { /* lens */
  content: ""; position: absolute; top: 0.45%; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #23262b; box-shadow: inset 0 0 0 1px #34383e; z-index: 3;
}
.laptop .screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 0.6% / 1%; background: var(--app-bg); }
.laptop .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.laptop .base {
  position: relative; z-index: 1; width: 116%; margin-left: -8%; aspect-ratio: 100 / 2.6;
  background: linear-gradient(180deg, var(--metal-hi) 0%, var(--metal-mid) 38%, var(--metal-lo) 100%);
  border-radius: 0.4% 0.4% 7% 7% / 10% 10% 100% 100%;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset;
}
.laptop .base::before { /* lip cutout */
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 15%; height: 42%;
  background: linear-gradient(180deg, var(--metal-lo), var(--metal-mid)); border-radius: 0 0 14px 14px / 0 0 10px 10px;
  opacity: .7;
}
.laptop .base::after { /* contact shadow */
  content: ""; position: absolute; left: 4%; right: 4%; top: 100%; height: 380%;
  background: radial-gradient(50% 50% at 50% 0%, rgba(0,0,0,.35), transparent 70%); z-index: -1;
}
.glare {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(118deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 38%);
}

.phone {
  position: relative; background: #060606; padding: 0;
  container-type: inline-size; /* bezel sized from the phone's own width, not its section */
  border-radius: 15.5% / 7.2%;
  box-shadow:
    0 0 0 1.5px #3a3c40,
    0 0 0 3.5px var(--metal-ring),
    0 0 0 4.5px #55585d,
    0 30px 60px -20px rgba(0,0,0,.55);
}
.phone::before, .phone::after { /* side buttons */
  content: ""; position: absolute; width: 3px; background: var(--metal-ring); border-radius: 2px;
}
.phone::before { left: -7px; top: 22%; height: 10%; }
.phone::after { right: -7px; top: 27%; height: 15%; }
.phone .screen {
  position: relative; margin: 2.6cqw; aspect-ratio: 390 / 844; overflow: hidden; border-radius: 13.4% / 6.2%; background: var(--app-bg);
  container-type: inline-size;
}
.phone .status {
  position: absolute; inset: 0 0 auto; height: 13cqw; z-index: 2; background: var(--app-bg); color: var(--app-fg);
  display: flex; align-items: center; justify-content: space-between; padding: 2cqw 8cqw 0 10cqw;
  font: 600 4.2cqw/1 var(--body);
}
.phone .status::after { /* dynamic island */
  content: ""; position: absolute; left: 50%; top: 2.6cqw; width: 30cqw; height: 8.6cqw; transform: translateX(-50%);
  background: #000; border-radius: 99px;
}
.phone .status i { display: inline-flex; gap: 1.5cqw; align-items: center; font-style: normal; }
.phone .status b { display: inline-block; width: 6.6cqw; height: 3.2cqw; border: 0.35cqw solid currentColor; border-radius: 1cqw; position: relative; opacity: .9; }
.phone .status b::after { content: ""; position: absolute; inset: 0.45cqw; right: 1.3cqw; background: currentColor; border-radius: .4cqw; }
.phone .status s { display: inline-block; width: 4.8cqw; height: 3.1cqw;
  background: linear-gradient(currentColor 0 0) 0 100%/0.9cqw 35% no-repeat,
              linear-gradient(currentColor 0 0) 33% 100%/0.9cqw 55% no-repeat,
              linear-gradient(currentColor 0 0) 66% 100%/0.9cqw 78% no-repeat,
              linear-gradient(currentColor 0 0) 100% 100%/0.9cqw 100% no-repeat; }
.phone .screen img { position: absolute; top: 13cqw; left: 0; width: 100%; height: auto; }
.phone .home { position: absolute; bottom: 2cqw; left: 50%; transform: translateX(-50%); width: 35cqw; height: 1.4cqw; border-radius: 9px; background: var(--app-fg); opacity: .45; z-index: 2; }

/* ---------- sections ---------- */
.band { padding-block: 120px; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip > .copy { order: 2; }
.copy { display: grid; gap: 24px; align-content: start; min-width: 0; }
@media (max-width: 980px) {
  .band { padding-block: 80px; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 48px; }
  .feature.flip > .copy { order: 0; }
}

.points { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--rule); }
.points li { padding-block: 14px; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 16.5px; line-height: 1.5; }
.points strong { color: var(--ink); font-weight: 600; }

.duo { position: relative; padding-right: 15%; }
.duo .phone { position: absolute; right: 0; bottom: -8%; width: 29%; }
.duo.left { padding-right: 0; padding-left: 15%; }
.duo.left .phone { right: auto; left: 0; }
@media (max-width: 640px) {
  .duo, .duo.left { padding: 0 18% 0 0; margin-bottom: 64px; }
  .duo .phone, .duo.left .phone { width: 36%; bottom: -20%; right: 0; left: auto; }
}

/* phone-free explainer */
.nophone { border-bottom: 1px solid var(--rule); }
.nophone .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; padding-block: 96px; align-items: start; }
.nophone h2 { font-size: clamp(44px, 5vw, 72px); }
.sources { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--surface); }
.sources div { padding: 28px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.sources div + div { border-left: 1px solid var(--rule); }
.sources p { color: var(--muted); font-size: 16.5px; }
.sources .what { font: 800 34px/1 var(--display); letter-spacing: .01em; color: var(--track); }
@media (max-width: 980px) { .nophone .wrap { grid-template-columns: 1fr; gap: 36px; padding-block: 72px; } }
@media (max-width: 560px) { .sources { grid-template-columns: 1fr; } .sources div + div { border-left: 0; border-top: 1px solid var(--rule); } }

/* infield (sleep) */
.infield { background: var(--infield); color: #eef4ef; }
.infield .lede { color: rgba(238, 244, 239, .8); }
.infield .points { border-color: rgba(255,255,255,.16); }
.infield .points li { border-color: rgba(255,255,255,.16); color: rgba(238, 244, 239, .76); }
.infield .points strong { color: #fff; }
.infield :focus-visible { outline-color: var(--chalk); }

/* coach */
.coach-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 72px; align-items: end; margin-bottom: 96px; }
.coach-head .lede { max-width: 42ch; }
.calls { display: grid; }
.calls div { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: baseline; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.calls div:first-child { border-top: 1px solid var(--rule); }
.calls b { font: 900 38px/1 var(--display); }
.calls span { color: var(--muted); font-size: 16px; }
.calls .go b { color: var(--go); } .calls .ease b { color: var(--ease); } .calls .rest b { color: var(--rest); }
@media (max-width: 980px) { .coach-head { grid-template-columns: 1fr; gap: 32px; margin-bottom: 64px; } }

.plan-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 72px; align-items: center; margin-bottom: 120px; }
.plan-row .copy { gap: 16px; }
.plan-row p { color: var(--muted); font-size: 17px; }
@media (max-width: 980px) { .plan-row { grid-template-columns: 1fr; gap: 40px; margin-bottom: 88px; } }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px; }
.trio figure { margin: 0; display: grid; gap: 32px; align-content: start; min-width: 0; }
.trio .phone { width: 80%; justify-self: center; }
.trio figcaption { display: grid; gap: 8px; }
.trio figcaption p { color: var(--muted); font-size: 16.5px; }
@media (max-width: 900px) {
  .trio { grid-template-columns: 1fr; gap: 72px; }
  .trio figure { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px; }
  .trio .phone { width: 100%; }
}
@media (max-width: 520px) { .trio figure { grid-template-columns: 1fr; } .trio .phone { width: 72%; } }

.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 120px; padding-top: 40px; border-top: 2px solid var(--ink); }
.checks div { display: grid; gap: 8px; align-content: start; }
.checks p { color: var(--muted); font-size: 16.5px; }
@media (max-width: 900px) { .checks { grid-template-columns: 1fr; gap: 28px; margin-top: 88px; } }

/* rest of features */
.more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; margin-top: 48px; }
.more div { padding-block: 24px; border-top: 1px solid var(--rule); display: grid; gap: 8px; align-content: start; min-width: 0; }
.more p { color: var(--muted); font-size: 16.5px; }
@media (max-width: 900px) { .more { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .more { grid-template-columns: 1fr; } }

/* finish line */
.finish { background: var(--track); color: var(--on-track); position: relative; overflow: hidden; isolation: isolate; }
.finish::before { /* the finish line, across every lane */
  content: ""; position: absolute; top: 0; bottom: 0; right: 22%; width: 14px; background: var(--chalk); z-index: -1;
}
.finish .wrap { display: grid; gap: 28px; padding-block: 112px; justify-items: start; }
.finish .lede { color: var(--on-track-muted); max-width: 40ch; }
.finish .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 700px) { .finish::before { right: 24px; width: 10px; } }

footer { padding-block: 32px; color: var(--muted); font-size: 14.5px; }
footer .wrap { display: flex; gap: 12px 32px; flex-wrap: wrap; justify-content: space-between; }

/* one moment of motion: the hero devices settle in */
.settle { animation: settle 1s cubic-bezier(.2,.8,.2,1) both; }
.settle.late { animation-delay: .2s; }
@keyframes settle { from { transform: translateY(40px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .settle { animation: none; } }
