/* =========================================================================
   Personal Trainer — marketing site
   Tokens mirror the app's src/theme/tokens.ts:
     dark  = "Midnight Track"   (ink navy · track orange · floodlight cyan)
     light = "Citrus Recovery"  (warm off-white · forest green · citrus orange)
   ========================================================================= */

@font-face { font-family: "Baloo 2"; src: url("../assets/fonts/Baloo2-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url("../assets/fonts/Baloo2-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url("../assets/fonts/Baloo2-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url("../assets/fonts/Baloo2-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url("../assets/fonts/Baloo2-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1626;
  --bg-elev: #131E33;
  --surface: #17233A;
  --surface-2: #20304C;
  --border: #2C3E5E;
  --border-strong: #3C5278;

  --text: #EAF0FA;
  --text-2: #B9C6DC;
  --muted: #8B9CB8;
  --faint: #5C6C88;

  --primary: #FF7A45;
  --primary-pressed: #E5642F;
  --primary-soft: rgba(255, 122, 69, 0.16);
  --primary-glow: rgba(255, 122, 69, 0.42);
  --on-primary: #0E1626;

  --accent: #4FD1E8;
  --accent-soft: rgba(79, 209, 232, 0.16);
  --gold: #FFD166;
  --gold-soft: rgba(255, 209, 102, 0.16);
  --danger: #E14C4C;
  --success: #4CC38A;

  --goal-cut: #E14C4C;
  --goal-maintain: #4FD1E8;
  --goal-bulk: #FF7A45;

  --logo-accent: #FF7A45;
  --phone-bezel: #05080F;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.7);
  --shadow-float: 0 24px 60px -20px rgba(0, 0, 0, 0.65);
  --header-bg: rgba(14, 22, 38, 0.72);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FAF6EE;
  --bg-elev: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F3EEE1;
  --border: #E2D9C4;
  --border-strong: #CBBFA0;

  --text: #1C2A22;
  --text-2: #3E4F44;
  --muted: #6B7D71;
  --faint: #9AA79C;

  --primary: #1F6F4A;
  --primary-pressed: #17573A;
  --primary-soft: rgba(31, 111, 74, 0.12);
  --primary-glow: rgba(31, 111, 74, 0.30);
  --on-primary: #FFFFFF;

  --accent: #E56F24;
  --accent-soft: rgba(255, 138, 61, 0.16);
  --gold: #FF8A3D;
  --gold-soft: rgba(255, 138, 61, 0.14);
  --danger: #D64545;
  --success: #2F8F61;

  --goal-cut: #D64545;
  --goal-maintain: #5C7A8A;
  --goal-bulk: #E56F24;

  --logo-accent: #FF8A3D;
  --phone-bezel: #1C2A22;
  --shadow-card: 0 1px 2px rgba(28, 42, 34, 0.05), 0 18px 40px -28px rgba(28, 42, 34, 0.35);
  --shadow-float: 0 24px 60px -24px rgba(28, 42, 34, 0.35);
  --header-bg: rgba(250, 246, 238, 0.78);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Baloo 2", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-inline { display: inline-block; vertical-align: -0.2em; width: 1.1em; height: 1.1em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 12px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; border: 0; cursor: pointer;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s, background-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: 8px 18px; font-size: 15px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 24px -8px var(--primary-glow); }
.btn-primary:hover { background: var(--primary-pressed); box-shadow: 0 10px 30px -6px var(--primary-glow); }

.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }

.store-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store-row-center { justify-content: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 16px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  font-weight: 700; font-size: 18px; line-height: 1.1;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), border-color .2s, background-color .2s;
}
.store-btn .icon { width: 26px; height: 26px; }
.store-btn small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.store-btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.store-btn-solid { background: var(--text); color: var(--bg); border-color: transparent; }
.store-btn-solid small { color: var(--bg); opacity: .7; }
.store-btn-solid:hover { border-color: transparent; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .35s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-tile {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: #0E1430; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 6px 18px -8px var(--primary-glow);
  --logo-accent: #B6FF3B;
}
.brand-mark { width: 30px; height: 30px; }
.brand-word { font-size: 19px; letter-spacing: -0.01em; }
.brand-word span { color: var(--primary); margin-left: 4px; }

.nav-links { display: flex; align-items: center; gap: 32px; font-weight: 600; color: var(--text-2); }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: var(--primary); transform: scaleX(0); transition: transform .25s;
}
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-cta-mobile { display: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

#theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] #theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] #theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-float);
    opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-links a:not(.btn) { padding: 12px 8px; font-size: 18px; border-radius: 12px; }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links a:not(.btn):hover { background: var(--surface); }
  .nav-cta-mobile { display: inline-flex; margin-top: 8px; padding: 12px; font-size: 17px; }
  .nav-open .nav-links { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
}

/* ---------- Shared type ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 14px; font-weight: 600;
}
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 25%, transparent); }
.display { font-size: clamp(48px, 7.4vw, 88px); line-height: 0.98; letter-spacing: -0.03em; margin-top: 22px; }
.display-sm { font-size: clamp(36px, 5vw, 56px); line-height: 1.02; letter-spacing: -0.02em; }
.grad {
  background: linear-gradient(100deg, var(--primary) 0%, var(--gold) 55%, var(--accent) 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); margin-top: 20px; max-width: 34em; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.eb-gold { color: var(--gold); }
.eb-accent { color: var(--accent); }
.title { font-size: clamp(32px, 4.2vw, 50px); letter-spacing: -0.02em; margin-top: 10px; }
.sub { color: var(--text-2); font-size: 18px; margin-top: 16px; max-width: 38em; }
.section-head { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: 56px; }
.section-head-row { flex-direction: row; justify-content: space-between; align-items: flex-end; text-align: left; margin-bottom: 36px; gap: 24px; }
@media (max-width: 720px) { .br-desk { display: none; } }

/* ---------- Sections ---------- */
.section { padding: 112px 0; position: relative; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--bg-elev); border-block: 1px solid var(--border); }
:root[data-theme="light"] .section-alt { background: var(--surface-2); }
@media (max-width: 720px) { .section { padding: 76px 0; } .section-tight { padding: 40px 0; } .section-head { margin-bottom: 40px; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow-card);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, background-color .35s;
}

/* ---------- Glows ---------- */
.glow { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; opacity: .55; }
.glow-a { width: 520px; height: 520px; background: var(--primary-glow); top: -140px; right: -80px; }
.glow-b { width: 420px; height: 420px; background: var(--accent-soft); bottom: -120px; left: -140px; opacity: .9; }
:root[data-theme="light"] .glow { opacity: .35; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-2); font-size: 15px; font-weight: 600; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .icon { color: var(--success); width: 18px; height: 18px; stroke-width: 2.6; }
.hero-visual { position: relative; display: flex; justify-content: center; padding: 20px 0; }

@media (max-width: 960px) {
  .hero { padding: 40px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .store-row, .hero-points { justify-content: center; }
}

/* ---------- Phone frame & screenshot placeholder ---------- */
.phone {
  position: relative; width: 290px; max-width: 100%; aspect-ratio: 9 / 19.5;
  border-radius: 46px; padding: 10px; background: var(--phone-bezel);
  box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-float);
}
.phone::before { /* dynamic island */
  content: ""; position: absolute; z-index: 3; top: 20px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 24px; border-radius: 20px; background: var(--phone-bezel);
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: var(--bg); }
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }

/* Themed screenshots: each phone holds a dark + light capture of the same screen and
   shows the one matching the page theme. If the light file is missing (its <img> removes
   itself on error), the dark capture stays visible instead of falling back to the placeholder. */
.phone-screen img.shot-dark, .phone-screen img.shot-light { transition: opacity .5s ease; }
.phone-screen img.shot-light { z-index: 3; }
:root[data-theme="dark"] .phone-screen img.shot-light { opacity: 0; }
:root[data-theme="light"] .phone-screen:has(img.shot-light) img.shot-dark { opacity: 0; }
.shot-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--primary-soft), transparent 60%),
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--border) 45%, transparent) 14px 15px),
    var(--surface);
  color: var(--text-2);
}
.shot-ph .ph-logo { width: 64px; height: 64px; color: var(--text); opacity: .9; }
.shot-ph strong { font-size: 18px; color: var(--text); }
.shot-ph code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--muted);
  padding: 4px 8px; border-radius: 8px; border: 1px dashed var(--border-strong); max-width: 100%; overflow-wrap: anywhere;
}
.phone-hero { width: 310px; animation: bob 7s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Floating cards ---------- */
.float-card {
  position: absolute; z-index: 4; background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-float);
  font-size: 14px;
}
.float-card small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.float-card strong { display: block; line-height: 1.2; }
.fc-fuel { width: 220px; left: 0; top: 16%; animation: bob 8s ease-in-out infinite -2s; }
.fc-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.pill { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); font-size: 11px; font-weight: 700; }
.fc-big { font-size: 28px; font-weight: 800; line-height: 1.1; margin: 6px 0 10px; color: var(--gold); }
:root[data-theme="light"] .fc-big { color: var(--primary); }
.fc-big small { display: inline; font-size: 13px; color: var(--muted); font-weight: 600; }
.macro { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.bar { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c); transform-origin: left; animation: grow 1.4s cubic-bezier(.2,.8,.2,1) both .4s; }
@keyframes grow { from { transform: scaleX(0); } }
.fc-streak, .fc-set { display: flex; align-items: center; gap: 12px; }
.fc-streak { right: 0; top: 8%; animation: bob 6.5s ease-in-out infinite -1s; }
.fc-set { right: 4%; bottom: 12%; animation: bob 7.5s ease-in-out infinite -3s; }
.fc-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.fc-icon-accent { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 1080px) { .fc-fuel { left: -10px; } }
@media (max-width: 960px) { .fc-fuel { left: calc(50% - 300px); } .fc-streak { right: calc(50% - 290px); } .fc-set { right: calc(50% - 270px); } }
@media (max-width: 640px) {
  .phone-hero { width: 260px; }
  .fc-fuel { width: 180px; left: 0; top: auto; bottom: 4%; padding: 12px; }
  .fc-big { font-size: 22px; }
  .fc-streak { right: 0; top: 4%; }
  .fc-set { display: none; }
}

/* ---------- Stats ---------- */
.stats { border-block: 1px solid var(--border); background: var(--bg-elev); }
:root[data-theme="light"] .stats { background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 32px 16px; text-align: center; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: clamp(36px, 4vw, 52px); font-weight: 800; line-height: 1; color: var(--text); }
.stat b::after { content: "+"; color: var(--primary); }
.stat:nth-child(3) b::after, .stat:nth-child(4) b::after { content: ""; }
.stat span { display: block; color: var(--muted); font-weight: 600; margin-top: 8px; font-size: 15px; }
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .stat { padding: 24px 12px; }
}

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: row dense; gap: 20px; }
.feat { padding: 28px; position: relative; overflow: hidden; }
.feat:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.feat h3 { font-size: 21px; margin-top: 18px; }
.feat p { color: var(--text-2); margin-top: 8px; font-size: 16px; }
.feat-lg { grid-column: span 2; }
.feat-lg h3 { font-size: 26px; }
.feat-icon {
  width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; flex: none;
  background: var(--primary-soft); color: var(--primary);
}
.feat-icon .icon { width: 24px; height: 24px; }
.fi-accent { background: var(--accent-soft); color: var(--accent); }
.fi-gold { background: var(--gold-soft); color: var(--gold); }

.mini-sets { margin-top: 22px; display: grid; gap: 8px; max-width: 420px; }
.ms-row {
  display: grid; grid-template-columns: 28px 1fr 1fr 56px; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 700; font-size: 15px;
}
.ms-row > span:first-child { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--bg); color: var(--muted); font-size: 12px; }
.ms-row .icon { justify-self: end; color: var(--success); stroke-width: 3; }
.ms-live { outline: 2px solid var(--primary); outline-offset: -2px; background: var(--primary-soft); }
.ms-live em { justify-self: end; font-style: normal; font-size: 13px; color: var(--primary); font-variant-numeric: tabular-nums; }

.feat-chart { padding-bottom: 0; display: flex; flex-direction: column; }
.spark { width: 100%; height: 110px; margin-top: auto; padding-top: 20px; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.spark-goal { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; }

@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; gap: 14px; } .feat-lg { grid-column: auto; } .feat { padding: 22px; } .feat-lg h3 { font-size: 22px; } }

/* ---------- Split (deep dives) ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 64px; padding: 48px 0; }
.split + .split { border-top: 1px solid var(--border); }
.split-rev .split-copy { order: 2; }
.split-visual { display: flex; justify-content: center; position: relative; }
.split-visual::before {
  content: ""; position: absolute; width: 340px; height: 340px; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(circle, var(--primary-soft), transparent 70%);
}
.split-rev .split-visual::before { background: radial-gradient(circle, var(--accent-soft), transparent 70%); }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-weight: 500; }
.ticks .icon { width: 22px; height: 22px; padding: 4px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); stroke-width: 3; margin-top: 2px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 40px; padding: 40px 0; }
  .split-rev .split-copy { order: 0; }
  .split .phone { width: 260px; }
}

/* ---------- Goals ---------- */
.goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.goal { padding: 30px; border-top: 4px solid var(--g); }
.goal:hover { transform: translateY(-4px); }
.goal-tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .1em;
  color: var(--g); background: color-mix(in srgb, var(--g) 16%, transparent);
}
.goal h3 { font-size: 24px; margin-top: 16px; }
.goal p { color: var(--text-2); margin-top: 8px; }
@media (max-width: 860px) { .goals { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { padding: 30px; position: relative; }
.step-num {
  font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 20%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { font-size: 22px; margin-top: 14px; }
.step p { color: var(--text-2); margin-top: 8px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery-nav { display: flex; gap: 10px; }
.gallery {
  display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  --gutter: max(24px, calc((100vw - 1200px) / 2 + 24px));
  padding: 12px var(--gutter) 32px; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.shot { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 0; }
.shot .phone { width: 240px; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.shot:hover .phone { transform: translateY(-6px); }
.shot figcaption { text-align: center; }
.shot figcaption strong { display: block; font-size: 17px; }
.shot figcaption span { display: block; color: var(--muted); font-size: 14px; }
@media (max-width: 600px) { .gallery { gap: 18px; --gutter: 16px; } .shot .phone { width: 210px; } .section-head-row { align-items: center; } }

/* ---------- Themes ---------- */
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.themes-visual { display: flex; justify-content: center; align-items: center; padding: 24px 0; }
.themes-visual .phone { width: 240px; }
.phone-tilt-l { transform: rotate(-6deg) translateX(18px); z-index: 1; }
.phone-tilt-r { transform: rotate(6deg) translateX(-18px) translateY(28px); z-index: 2; }
.phone-light { --bg: #FAF6EE; --surface: #FFFFFF; --primary-soft: rgba(31,111,74,.14); --border: #E2D9C4; --border-strong: #CBBFA0; --text: #1C2A22; --text-2: #3E4F44; --muted: #6B7D71; --phone-bezel: #E9E2D2; }
.phone-light .shot-ph { --logo-accent: #FF8A3D; }
.theme-switch { display: inline-flex; margin-top: 28px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); flex-wrap: wrap; }
.theme-switch button {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: var(--text-2); font-weight: 700; transition: background-color .25s, color .25s;
}
.theme-switch button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
@media (max-width: 860px) {
  .themes { grid-template-columns: 1fr; }
  .themes-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .themes-visual .phone { width: 200px; }
}
@media (max-width: 420px) { .themes-visual .phone { width: 168px; } .phone-tilt-l { transform: rotate(-6deg) translateX(14px); } .phone-tilt-r { transform: rotate(6deg) translateX(-14px) translateY(24px); } }

/* ---------- Trust ---------- */
.trust { display: flex; gap: 22px; align-items: flex-start; padding: 32px; }
.trust h2 { font-size: 24px; }
.trust p { color: var(--text-2); margin-top: 6px; }
@media (max-width: 600px) { .trust { flex-direction: column; padding: 24px; } }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; transition: border-color .25s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 22px; font-weight: 700; font-size: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--primary); transition: transform .3s; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 22px 22px; color: var(--text-2); }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center; padding: 72px 24px;
  border-radius: 32px; border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-elev) 100%);
  display: flex; flex-direction: column; align-items: center;
}
.cta > *:not(.glow) { position: relative; }
.glow-cta { width: 560px; height: 360px; background: var(--primary-glow); top: -220px; left: 50%; transform: translateX(-50%); opacity: .6; }
.cta-logo { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; background: #0E1430; color: #fff; margin-bottom: 24px; box-shadow: 0 14px 40px -12px var(--primary-glow); --logo-accent: #B6FF3B; }
.cta-logo svg { width: 66px; height: 66px; }
.cta .lead { margin-inline: auto; }
@media (max-width: 600px) { .cta { padding: 52px 18px; border-radius: 24px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 28px; background: var(--bg-elev); }
:root[data-theme="light"] .site-footer { background: var(--surface-2); }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand p { color: var(--muted); margin-top: 10px; }
.footer-links { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-links div { display: grid; gap: 8px; align-content: start; }
.footer-links h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.footer-links a { color: var(--text-2); transition: color .2s; }
.footer-links a:hover { color: var(--primary); }
.footer-base { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--faint); font-size: 13px; }
@media (max-width: 600px) { .footer-links { gap: 32px; } }

/* =========================================================================
   Motion
   Everything that starts hidden is scoped to `.js`, which the inline head
   script only sets when JS runs AND the visitor hasn't asked for reduced
   motion — so no-JS and reduced-motion visitors get a fully static page.
   ========================================================================= */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .bento .reveal { transform: translateY(36px) scale(.96); }
.js .bento .reveal.in { transform: none; }
/* Once revealed, hand hover transitions back to the element with no stagger delay. */
.js .reveal.settled { transition: transform .35s var(--ease-out), border-color .3s, background-color .35s, box-shadow .35s; transition-delay: 0ms; }

/* ---------- Header: progress bar, auto-hide, active link ---------- */
.site-header { transition: transform .4s var(--ease-out), border-color .3s, background-color .35s; }
.site-header.hide { transform: translateY(-100%); }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; pointer-events: none; }
.scroll-progress i {
  display: block; height: 100%; transform-origin: left; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--primary), var(--gold), var(--accent));
  border-radius: 0 3px 3px 0;
}
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }

/* ---------- Back to top (with scroll-progress ring) ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  box-shadow: var(--shadow-float);
  opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none;
  transition: opacity .3s, transform .45s var(--ease-spring), border-color .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top.show:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.to-top .icon { transform: rotate(-90deg); width: 20px; height: 20px; }
.to-top .ring { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); transform: rotate(-90deg); }
.to-top .ring circle { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); }
@media (max-width: 600px) { .to-top { right: 16px; bottom: 16px; width: 46px; height: 46px; } }

/* ---------- Ambient ---------- */
.js .glow-a { animation: drift 16s ease-in-out infinite alternate; }
.js .glow-b { animation: drift 20s ease-in-out infinite alternate-reverse; }
.js .glow-cta { animation: breathe 5s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-70px, 50px) scale(1.18); } }
@keyframes breathe { from { opacity: .35; } to { opacity: .75; } }
.js .kicker .dot { animation: ping 2.2s ease-out infinite; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}

/* ---------- Hero intro ---------- */
.hero .word { display: inline-block; }
.js .hero .intro { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease-out) forwards; animation-delay: calc(var(--i) * 90ms + 120ms); }
.js .hero .word { opacity: 0; transform: translateY(55%) rotate(5deg); filter: blur(8px); animation: wordIn 1s var(--ease-out) forwards; animation-delay: calc(var(--i) * 110ms + 80ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes wordIn { to { opacity: 1; transform: none; filter: blur(0); } }

.grad { background-image: linear-gradient(100deg, var(--primary) 0%, var(--gold) 30%, var(--accent) 50%, var(--gold) 70%, var(--primary) 100%); background-size: 200% auto; }
.js .hero .word.grad { animation: wordIn 1s var(--ease-out) forwards calc(var(--i) * 110ms + 80ms), shimmer 7s ease-in-out 1.6s infinite alternate; }
@keyframes shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Hero phone: 3D tilt stage + parallax depth for the floating cards */
.hero-visual { perspective: 1200px; }
.hero-stage {
  position: relative; width: 100%; display: flex; justify-content: center; transform-style: preserve-3d;
  transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform .6s var(--ease-out);
}
.hero-stage .phone-hero { translate: calc(var(--px, 0) * -8px) calc(var(--py, 0) * -8px); transition: translate .6s var(--ease-out); }
.hero-stage .float-card { translate: calc(var(--px, 0) * var(--depth)) calc(var(--py, 0) * var(--depth)); transition: translate .6s var(--ease-out); }
.fc-fuel { --depth: 26px; }
.fc-streak { --depth: 40px; }
.fc-set { --depth: 34px; }

.js .phone-hero { opacity: 0; animation: phoneIn 1.2s var(--ease-out) .3s forwards, bob 7s ease-in-out 1.5s infinite; }
@keyframes phoneIn { from { opacity: 0; transform: translateY(70px) scale(.92); } to { opacity: 1; transform: none; } }
.js .float-card { opacity: 0; }
.js .fc-streak { animation: cardIn .8s var(--ease-spring) .95s forwards, bob 6.5s ease-in-out -1s infinite; }
.js .fc-fuel { animation: cardIn .8s var(--ease-spring) 1.1s forwards, bob 8s ease-in-out -2s infinite; }
.js .fc-set { animation: cardIn .8s var(--ease-spring) 1.25s forwards, bob 7.5s ease-in-out -3s infinite; }
@keyframes cardIn { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
.js .fc-fuel .bar i { animation-delay: 1.5s; }
.js .fc-streak .fc-icon { animation: flicker 1.8s ease-in-out 2s infinite; }
@keyframes flicker { 0%, 100% { scale: 1; } 30% { scale: 1.12; } 60% { scale: .96; } }

/* ---------- Buttons ---------- */
.btn-primary, .store-btn { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after, .store-btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease-out);
}
.store-btn::after { z-index: 0; }
.store-btn > * { position: relative; z-index: 1; }
.btn-primary:hover::after, .store-btn:hover::after { transform: translateX(120%); }
.store-btn .icon { transition: transform .45s var(--ease-spring); }
.store-btn:hover .icon { transform: scale(1.15) rotate(-6deg); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn:disabled:hover { background: var(--surface); border-color: var(--border); }

/* Theme toggle icon spins in on swap */
#theme-toggle .icon { animation: spinIn .6s var(--ease-spring); }
@keyframes spinIn { from { transform: rotate(-120deg) scale(.4); opacity: 0; } }

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden; border-bottom: 1px solid var(--border); padding: 20px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; align-items: center; width: max-content; font-weight: 800; font-size: 22px; color: var(--muted); white-space: nowrap; }
.ticker-track > * { margin-right: 28px; flex: none; }
.ticker-track span { transition: color .3s; }
.ticker-track span:hover { color: var(--text); }
.ticker-track i { width: 9px; height: 9px; border-radius: 2px; background: var(--primary); transform: rotate(45deg); }
.ticker-track i:nth-of-type(3n+2) { background: var(--accent); }
.ticker-track i:nth-of-type(3n) { background: var(--gold); }
.js .ticker-track { animation: marquee 45s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 600px) { .ticker { padding: 14px 0; } .ticker-track { font-size: 18px; } }

/* ---------- Cards: cursor spotlight + icon pop ---------- */
.card { position: relative; }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--spot, var(--primary)) 14%, transparent), transparent 65%);
}
.card:hover::after { opacity: 1; }
.feat-icon { transition: transform .5s var(--ease-spring); }
.feat:hover .feat-icon { transform: rotate(-10deg) scale(1.1); }
.goal { --spot: var(--g); }
.goal:hover { box-shadow: var(--shadow-card), 0 24px 50px -28px var(--g); }
.goal-tag { transition: transform .4s var(--ease-spring); }
.goal:hover .goal-tag { transform: scale(1.08); }

/* Workout-logging card: rows log themselves in, live row pulses */
.js .mini-sets .ms-row { opacity: 0; transform: translateX(-18px); transition: opacity .5s, transform .7s var(--ease-out); }
.js .in .mini-sets .ms-row { opacity: 1; transform: none; }
.js .in .mini-sets .ms-row:nth-child(1) { transition-delay: .35s; }
.js .in .mini-sets .ms-row:nth-child(2) { transition-delay: .55s; }
.js .in .mini-sets .ms-row:nth-child(3) { transition-delay: .75s; }
.js .ms-row .icon { scale: 0; transition: scale .5s var(--ease-spring); }
.js .in .ms-row:nth-child(1) .icon { scale: 1; transition-delay: .8s; }
.js .in .ms-row:nth-child(2) .icon { scale: 1; transition-delay: 1s; }
.js .ms-live { animation: liveGlow 2.2s ease-in-out infinite; }
@keyframes liveGlow { 50% { box-shadow: 0 0 0 6px var(--primary-soft); } }

/* Insights card: sparkline draws itself */
.js .spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2s var(--ease-out) .4s; }
.js .in .spark-line { stroke-dashoffset: 0; }
.js .spark-fill { opacity: 0; transition: opacity 1.2s .9s; }
.js .in .spark-fill { opacity: 1; }
.spark-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.js .spark-dot { opacity: 0; transition: opacity .4s 2.1s; }
.js .in .spark-dot { opacity: 1; }

/* ---------- Deep-dive splits: copy and phone enter from opposite sides ---------- */
.js .split.reveal { opacity: 1; transform: none; }
.js .split .split-copy > * { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js .split.in .split-copy > * { opacity: 1; transform: none; }
.js .split.in .split-copy > :nth-child(2) { transition-delay: .08s; }
.js .split.in .split-copy > :nth-child(3) { transition-delay: .16s; }
.js .split.in .split-copy > :nth-child(4) { transition-delay: .24s; }
.js .split .ticks li { opacity: 0; transform: translateX(-14px); transition: opacity .5s, transform .6s var(--ease-out); }
.js .split.in .ticks li { opacity: 1; transform: none; }
.js .split.in .ticks li:nth-child(1) { transition-delay: .4s; }
.js .split.in .ticks li:nth-child(2) { transition-delay: .5s; }
.js .split.in .ticks li:nth-child(3) { transition-delay: .6s; }
.js .split.in .ticks li:nth-child(4) { transition-delay: .7s; }
.js .split .split-visual { opacity: 0; transform: translateX(70px) rotate(5deg) scale(.94); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); }
.js .split-rev .split-visual { transform: translateX(-70px) rotate(-5deg) scale(.94); }
.js .split.in .split-visual { opacity: 1; transform: none; transition-delay: .12s; }
.split-visual::before { transition: transform 1.4s var(--ease-out); }
.js .split:not(.in) .split-visual::before { transform: translate(-50%, -50%) scale(.3); }
.split-visual .phone { transition: translate .2s linear; }
@media (max-width: 860px) {
  .js .split .split-visual, .js .split-rev .split-visual { transform: translateY(50px) scale(.94); }
  .js .split.in .split-visual { transform: none; }
}

/* ---------- Steps: progress bar fills across the three cards ---------- */
.js .steps.reveal { opacity: 1; transform: none; }
.step { overflow: hidden; }
.step::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); transform-origin: left; transition: transform .9s var(--ease-out);
}
.js .steps:not(.in) .step::before { transform: scaleX(0); }
.js .steps.in .step:nth-child(1)::before { transition-delay: .3s; }
.js .steps.in .step:nth-child(2)::before { transition-delay: 1s; }
.js .steps.in .step:nth-child(3)::before { transition-delay: 1.7s; }
.step-num { display: inline-block; transition: transform .5s var(--ease-spring); }
.step:hover .step-num { transform: translateY(-4px) scale(1.06); }

/* ---------- Gallery: staggered entrance + drag to scroll ---------- */
.js .gallery.reveal { opacity: 1; transform: none; }
.js .gallery .shot { opacity: 0; transform: translateY(50px) scale(.95); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(min(var(--i), 6) * 80ms); }
.js .gallery.in .shot { opacity: 1; transform: none; }
@media (pointer: fine) { .gallery { cursor: grab; } }
.gallery.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.gallery.dragging .shot { pointer-events: none; }
.shot .phone { transition: transform .45s var(--ease-out); }
.shot img { -webkit-user-drag: none; }

/* ---------- Themes: phones fan out on reveal ---------- */
.themes-visual .phone { transition: transform 1.1s var(--ease-spring); }
.js .themes-visual:not(.in) .phone-tilt-l { transform: translateX(45%) rotate(0deg); }
.js .themes-visual:not(.in) .phone-tilt-r { transform: translateX(-45%) rotate(0deg); }
.themes-visual.in .phone { transition-delay: .25s; }
.themes-visual.settled .phone { transition: transform .6s var(--ease-out); transition-delay: 0s; }
.themes-visual:hover .phone-tilt-l { transform: rotate(-9deg) translateX(4px) translateY(-6px); }
.themes-visual:hover .phone-tilt-r { transform: rotate(9deg) translateX(-4px) translateY(22px); }

/* ---------- FAQ ---------- */
.faq details p { overflow: hidden; }
.faq details.closing summary .icon { transform: none; }
.faq summary { transition: color .2s; }
.faq summary:hover { color: var(--primary); }

/* ---------- CTA logo float ---------- */
.js .cta.in .cta-logo { animation: logoIn .9s var(--ease-spring) .2s both, bob 6s ease-in-out 1.2s infinite; }
@keyframes logoIn { from { transform: scale(.4) rotate(-30deg); opacity: 0; } }

/* ---------- Theme change (fallback when View Transitions are unavailable) ---------- */
.theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .45s, color .45s, border-color .45s, fill .45s, stroke .45s, box-shadow .45s !important;
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

@media (max-width: 480px) {
  .theme-switch { flex-wrap: nowrap; }
  .theme-switch button { padding: 8px 12px; font-size: 14px; gap: 6px; }
}
