/* Maple Track landing page. Tokens mirror src/theme/tokens.ts so the page and the app read as one brand. */

@font-face { font-family: 'Fraunces'; src: url('/landing/fonts/Fraunces_600SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/landing/fonts/Fraunces_600SemiBold_Italic.woff2') format('woff2'); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/landing/fonts/Inter_400Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/landing/fonts/Inter_500Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/landing/fonts/Inter_600SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #efebe4;
  --line: #e3ddd3;
  --text: #14161b;
  --text-2: #5b5f68;
  --text-3: #767a83;
  --accent: #c8102e;
  --accent-2: #e8613c;
  --accent-deep: #9a0b22;
  --accent-soft: #f6d9dd;
  --on-accent: #ffffff;
  --frame: #101318;
  --shadow: 20 22 27;

  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-card: 28px;
  --radius-phone: 52px;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(96px, 12vw, 168px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #161a21;
    --surface-2: #1d222b;
    --line: #272d37;
    --text: #f2f0ec;
    --text-2: #a9aeb8;
    --text-3: #8a909b;
    --accent: #e5384f;
    --accent-2: #f07a57;
    --accent-deep: #c8102e;
    --accent-soft: #3a1a20;
    --frame: #05070a;
    --shadow: 0 0 0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Type ----------------------------------------------------------------- */

.display { font-family: var(--display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.04; text-wrap: balance; }
.display em { font-style: italic; color: var(--accent); }
.h1 { font-size: clamp(3rem, 1.2rem + 4.9vw, 5.4rem); line-height: 1; }
.h2 { font-size: clamp(2.1rem, 1.3rem + 2.7vw, 3.75rem); }
.h3 { font-family: var(--sans); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.lead { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); color: var(--text-2); max-width: 46ch; text-wrap: pretty; }
.body-2 { color: var(--text-2); max-width: 42ch; text-wrap: pretty; }
.eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

/* Buttons: pills everywhere, cards at 28px. */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em; white-space: nowrap;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 1rem/1 var(--sans); letter-spacing: -0.005em;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px -12px rgb(200 16 46 / 0.55), inset 0 1px 0 rgb(255 255 255 / 0.18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -14px rgb(200 16 46 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.18); }
.btn-primary .icon { transition: transform 0.25s var(--ease); }
.btn-primary:hover .icon { transform: translateX(3px); }
.btn-ghost { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 0.9375rem; }

/* Nav ------------------------------------------------------------------ */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 30;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent);
}
@media (prefers-reduced-transparency: reduce) { .nav.scrolled { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.nav .wrap { height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand svg { width: 26px; height: 27px; color: var(--accent); }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 0.9375rem; color: var(--text-2); }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 760px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* Phone frame around real app screenshots -------------------------------- */

.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 844;
  border-radius: var(--radius-phone);
  padding: 11px;
  background: var(--frame);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.06) inset,
    0 2px 0 1px rgb(255 255 255 / 0.04) inset,
    0 50px 100px -30px rgb(var(--shadow) / 0.45),
    0 30px 60px -40px rgb(var(--shadow) / 0.5);
}
.phone::after { /* camera island */
  content: ''; position: absolute; top: 22px; left: 50%; width: 30%; height: 26px; translate: -50% 0;
  border-radius: 999px; background: var(--frame); z-index: 2;
}
.phone picture, .phone img { width: 100%; height: 100%; border-radius: calc(var(--radius-phone) - 11px); object-fit: cover; object-position: top; }

/* Hero ----------------------------------------------------------------- */

.hero { position: relative; min-height: 100dvh; display: flex; align-items: center; padding-block: 96px 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero-copy { display: grid; gap: 28px; justify-items: start; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-stage { position: relative; display: grid; place-items: center; perspective: 1400px; }
.hero-phone { width: min(330px, 74vw); transform: rotateY(-16deg) rotateX(7deg) rotateZ(1.5deg); transform-style: preserve-3d; will-change: transform; }
.hero-ring { position: absolute; width: min(560px, 120%); aspect-ratio: 1; color: var(--accent); opacity: 0.9; pointer-events: none; }
.hero-ring circle { fill: none; stroke-linecap: round; }
.hero-ring .track { stroke: var(--line); stroke-width: 1.5; }
.hero-ring .arc { stroke: url(#ring-grad); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; }

@media (max-width: 900px) {
  .hero { padding-top: 112px; min-height: auto; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-stage { margin-top: 24px; }
  .hero-phone { width: min(300px, 72vw); transform: rotateY(-10deg) rotateX(5deg); }
}

/* Entrance: only when motion is on, so nothing hides if the script never runs. */
.motion .rise { opacity: 0; transform: translateY(26px); animation: rise 1s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
.motion .hero-ring .arc { animation: draw 2.2s var(--ease) 0.4s forwards; }
.motion .hero-stage .hero-phone { animation: float-in 1.4s var(--ease) 0.25s both; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0.28; } }
@keyframes float-in { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
.static .hero-ring .arc { stroke-dashoffset: 0.28; }

/* Stages (pinned scrollytelling) ---------------------------------------- */

.stages { position: relative; padding-block: var(--section) 0; }
.stages-head { display: grid; gap: 18px; max-width: 760px; }
.stages-body { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: center; min-height: 100dvh; padding-block: 104px 48px; }
.stages-phone { width: min(320px, 100%); justify-self: center; }
.stage-meter { display: grid; gap: 28px; }
.stage-now { display: grid; gap: 6px; min-height: 8rem; }
.stage-num { font-family: var(--display); font-weight: 600; font-size: clamp(3.5rem, 1.8rem + 4.6vw, 6rem); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums lining-nums; }
.stage-num-label { color: var(--text-2); }
.rail { position: relative; padding-left: 40px; }
.stage-list, .marquee-track { list-style: none; margin: 0; padding: 0; }
.stage-list { display: grid; }
.rail-track, .rail-fill { position: absolute; left: 11px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; }
.rail-track { background: var(--line); }
.rail-fill { background: linear-gradient(var(--accent), var(--accent-2)); transform-origin: top; transform: scaleY(0); }
.stage { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 24px; padding: 12px 0; }
.pinned .stage { transition: opacity 0.4s var(--ease); }
.stage-dot {
  position: absolute; left: -40px; top: 15px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-3);
  background: var(--bg); border: 2px solid var(--line);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s, transform 0.4s var(--ease);
}
.stage-dot .icon { width: 12px; height: 12px; }
.stage-name { font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.stage-gap { font-family: var(--display); font-weight: 600; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--text-2); }
.stage-note { grid-column: 1 / -1; color: var(--text-3); font-size: 0.9375rem; }
.stage.on .stage-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: scale(1.08); }
.stage.on .stage-gap { color: var(--accent); }
.pinned .stage:not(.on) { opacity: 0.38; }
.stages-foot { color: var(--text-3); font-size: 0.9375rem; max-width: 52ch; }

@media (max-width: 900px) {
  .stages-body { grid-template-columns: 1fr; min-height: auto; padding-block: 56px 0; }
  .stages-phone { width: min(280px, 70vw); }
  .stage-now { display: none; }
  .rail-fill { transform: scaleY(1); }
  .stage .stage-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .stage .stage-gap { color: var(--accent); }
}

/* Statement + numbers -------------------------------------------------- */

.statement { padding-block: var(--section); }
.statement-text { font-family: var(--display); font-weight: 600; font-size: clamp(1.75rem, 1rem + 2.6vw, 3.3rem); line-height: 1.2; letter-spacing: -0.02em; max-width: 24ch; text-wrap: pretty; }
.statement-text .w { opacity: 1; }
.motion .statement-text .w { opacity: 0.16; }
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: clamp(64px, 9vw, 120px); padding-top: 32px; border-top: 1px solid var(--line); }
.number b { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(2.5rem, 1.6rem + 2.4vw, 4rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums lining-nums; }
.number span { display: block; margin-top: 10px; color: var(--text-2); font-size: 0.9375rem; max-width: 18ch; }
@media (max-width: 760px) { .numbers { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; } }

/* Tools bento ---------------------------------------------------------- */

.tools { padding-block: 0 clamp(72px, 8vw, 112px); }
.tools-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 5vw, 64px); }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--line);
  display: grid; grid-template-rows: auto auto 1fr; gap: 10px; padding: 36px 36px 0;
  isolation: isolate;
}
.tile .h3 { font-size: 1.375rem; }
.tile-crs { color: #fff; border: 0; background: radial-gradient(120% 100% at 0% 0%, #e5384f 0%, #c8102e 48%, #7a0619 100%); }
.tile-crs .body-2 { color: rgb(255 255 255 / 0.84); }
.tile-explore { background: var(--surface-2); }
.shot { align-self: end; margin-top: 28px; justify-self: center; width: min(76%, 340px); border-radius: 38px 38px 0 0; overflow: hidden; box-shadow: 0 30px 60px -30px rgb(var(--shadow) / 0.55); border: 9px solid var(--frame); border-bottom: 0; }
.shot img { width: 100%; aspect-ratio: 390 / 520; object-fit: cover; object-position: top; will-change: transform; }
.span-7 .shot { width: min(62%, 360px); }
@media (max-width: 900px) {
  .span-7, .span-5 { grid-column: 1 / -1; }
  .tile { padding: 28px 28px 0; }
  .shot, .span-7 .shot { width: min(82%, 320px); }
}

/* Programs marquee (the one marquee on the page) ------------------------ */

.programs { padding-block: 8px clamp(80px, 10vw, 140px); }
.programs-label { text-align: center; color: var(--text-3); font-size: 0.9375rem; margin-bottom: 28px; }
.marquee { --gap: 18px; display: flex; overflow: hidden; gap: var(--gap); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; flex: none; gap: var(--gap); min-width: 100%; justify-content: space-around; }
.motion .marquee-track { animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.pill { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
.pill svg { width: 14px; height: 15px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }

/* Privacy -------------------------------------------------------------- */

.privacy { padding-block: var(--section) clamp(72px, 8vw, 120px); border-top: 1px solid var(--line); }
.privacy .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.privacy-head { display: grid; gap: 18px; position: sticky; top: 120px; }
.promises { display: grid; gap: 48px; }
.promise { display: grid; grid-template-columns: 52px 1fr; gap: 6px 22px; }
.promise-icon { grid-row: span 2; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.promise-icon .icon { width: 24px; height: 24px; }
@media (max-width: 900px) { .privacy .wrap { grid-template-columns: 1fr; } .privacy-head { position: static; } }

/* Closing ------------------------------------------------------------- */

.closing { position: relative; padding-block: clamp(56px, 7vw, 96px) var(--section); text-align: center; overflow: hidden; }
.closing .wrap { display: grid; justify-items: center; gap: 24px; }
.closing-leaf { width: clamp(120px, 16vw, 180px); height: auto; margin-bottom: 12px; }
.closing-leaf path { fill: var(--accent); stroke: var(--accent); stroke-width: 70; stroke-linejoin: round; }
.motion .closing-leaf path { fill-opacity: 0; }
.closing .lead { margin-inline: auto; }

/* Footer -------------------------------------------------------------- */

.footer { border-top: 1px solid var(--line); padding-block: 40px 56px; color: var(--text-3); font-size: 0.9375rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.footer .brand { color: var(--text); font-size: 1.05rem; }
.footer nav { display: flex; gap: 24px; margin-left: auto; }
.footer nav a:hover { color: var(--text); }
.footer p { flex-basis: 100%; }

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