/* Kadenz landing page. Colours, type and spacing mirror web/src/styles/tokens.css: dark first, light (white) by
   system setting or the header toggle (data-theme on <html>). */
:root {
  color-scheme: dark;
  --bg-base: #0b0c0e;
  --bg-surface: #15171a;
  --bg-elevated: #1e2125;
  --bg-control: #2a2e33;
  --text-primary: #f1f2f4;
  --text-secondary: #8a9099;
  --text-tertiary: #6a7079;
  --text-on-accent: #0b0c0e;
  --volt: #d4ff3a;
  --volt-subtle: #2a3a00;
  --border: #2a2e33;
  --text-accent: #d4ff3a;          /* lime as text: readable on dark only */
  --accent-subtle: #2a3a00;
  --hairline: rgb(255 255 255 / 0.05);
  --nav-bg: rgb(11 12 14 / 0.82);
  --float-bg: rgb(30 33 37 / 0.92);
  --notif-bg: rgb(42 46 51 / 0.86);
  --shadow-lg: 0 0 0 1px rgb(255 255 255 / 0.06), 0 30px 80px -20px rgb(0 0 0 / 0.8);
  --shadow-md: 0 18px 40px -12px rgb(0 0 0 / 0.7);
  --glow: rgb(212 255 58 / 0.13);
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%23d4ff3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --sport-run: #ff6b35;
  --sport-ride: #4c7dff;
  --sport-swim: #22c3e6;
  --sport-climb: #e8b04b;
  --mode-push: #ff4d2e;
  --mode-resilient: #d4ff3a;
  --mode-nice: #3ddc84;
  --mode-easy: #6ec6ff;
  --mode-rest: #9c8cff;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-metric: "Barlow Condensed", "Inter", sans-serif;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --wrap: 1120px;
  --gutter: 20px;
}
/* white theme: the app's light tokens */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg-base: #ffffff; --bg-surface: #f6f7f8; --bg-elevated: #ffffff; --bg-control: #eceef0;
    --text-primary: #111316; --text-secondary: #5b6169; --text-tertiary: #8a9099;
    --text-accent: #5b7a00; --accent-subtle: #e3ff7a; --border: #dadde1;
    --hairline: rgb(17 19 22 / 0.08); --nav-bg: rgb(255 255 255 / 0.85); --float-bg: rgb(255 255 255 / 0.94); --notif-bg: rgb(246 247 248 / 0.9);
    --shadow-lg: 0 0 0 1px rgb(17 19 22 / 0.06), 0 30px 70px -24px rgb(17 19 22 / 0.35);
    --shadow-md: 0 18px 40px -14px rgb(17 19 22 / 0.28);
    --glow: rgb(212 255 58 / 0.35);
    --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%235b7a00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg-base: #ffffff; --bg-surface: #f6f7f8; --bg-elevated: #ffffff; --bg-control: #eceef0;
  --text-primary: #111316; --text-secondary: #5b6169; --text-tertiary: #8a9099;
  --text-accent: #5b7a00; --accent-subtle: #e3ff7a; --border: #dadde1;
  --hairline: rgb(17 19 22 / 0.08); --nav-bg: rgb(255 255 255 / 0.85); --float-bg: rgb(255 255 255 / 0.94); --notif-bg: rgb(246 247 248 / 0.9);
  --shadow-lg: 0 0 0 1px rgb(17 19 22 / 0.06), 0 30px 70px -24px rgb(17 19 22 / 0.35);
  --shadow-md: 0 18px 40px -14px rgb(17 19 22 / 0.28);
  --glow: rgb(212 255 58 / 0.35);
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%235b7a00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* fonts are served from this site (SIL Open Font License, see fonts/LICENSE.txt) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/inter-latin-var.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
.eyebrow {
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-accent); margin-bottom: 14px;
}
h1 { font-size: clamp(38px, 6.4vw, 64px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 600; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-secondary); margin-top: 20px; max-width: 34em; }
.fine { font-size: 13px; color: var(--text-tertiary); margin-top: 18px; }
.section-title { text-align: center; }
.section-lead { text-align: center; color: var(--text-secondary); max-width: 36em; margin: 14px auto 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  border-radius: var(--radius-full); background: var(--volt); color: var(--text-on-accent);
  font-weight: 600; font-size: 17px; text-decoration: none; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: #e2ff70; }
.btn--ghost:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 3px; }
.btn--ghost { background: transparent; color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--bg-control); }
.btn--ghost:hover { background: var(--bg-surface); }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-row--center { justify-content: center; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav__row { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo {
  font-family: var(--font-metric); font-weight: 700; font-size: 26px; letter-spacing: 0.06em; text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 3px;
}
.logo__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--volt); display: inline-block; }
.logo--small { font-size: 20px; }
.nav__links { display: flex; gap: 24px; margin-left: auto; }
.nav__row .theme-toggle { margin-left: 4px; }
.nav__links a { color: var(--text-secondary); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav__links a:hover { color: var(--text-primary); }
@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__row .theme-toggle { margin-left: auto; }
}

/* ---------- phone frame ---------- */
.phone {
  width: 100%; max-width: 300px; border-radius: 40px; padding: 9px;
  background: linear-gradient(160deg, #2c3036, #15171a 40%);
  box-shadow: var(--shadow-lg);
}
.phone img { border-radius: 32px; width: 100%; aspect-ratio: 461 / 1000; object-fit: cover; object-position: top; }
.phone-pair { display: flex; gap: 16px; justify-content: center; width: 100%; max-width: 500px; }
.phone-pair .phone { flex: 1 1 0; min-width: 0; max-width: 240px; }
.phone-pair .phone:last-child { margin-top: 48px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 96px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 auto; height: 640px; pointer-events: none;
  background: radial-gradient(600px 360px at 72% 40%, var(--glow), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; position: relative; }
.hero__art { position: relative; display: flex; justify-content: center; }
.phone--hero { max-width: 320px; }
/* iOS-style notification over the top of the hero phone: covers only the date + title */
.phone--hero { position: relative; }
.notif {
  position: absolute; top: 16px; left: 16px; right: 16px;
  display: grid; grid-template-columns: auto 1fr auto; column-gap: 10px; align-items: center;
  padding: 11px 14px; border-radius: 18px; font-size: 13px; line-height: 1.35;
  background: var(--notif-bg); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-md);
}
.notif__icon {
  grid-row: span 3; align-self: start; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--volt); color: var(--text-on-accent); font-family: var(--font-metric); font-weight: 700; font-size: 20px;
}
.notif__app { font-size: 11px; letter-spacing: 0.06em; color: var(--text-secondary); font-weight: 600; }
.notif__time { font-size: 11px; color: var(--text-tertiary); }
.notif b { grid-column: 2 / 4; font-weight: 600; }
.notif__body { grid-column: 2 / 4; color: var(--text-secondary); }

/* "Sent to your watch": level with the workout card, over its empty top-right corner */
.sent {
  position: absolute; top: 30%; right: -34%;
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
  padding: 12px 16px; border-radius: 16px; font-size: 13px; white-space: nowrap;
  background: var(--float-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-md);
}
.sent b { font-weight: 600; font-size: 14px; }
.sent span:not(.watch) { grid-column: 2; color: var(--text-secondary); }
.watch { grid-row: span 2; width: 26px; height: 32px; border-radius: 8px; border: 2px solid var(--text-secondary); position: relative; }
.watch::after { content: ""; position: absolute; inset: 6px 5px; border-radius: 3px; background: var(--volt); }
@media (max-width: 900px) { .sent { right: -12%; } }
@media (max-width: 560px) { .sent { display: none; } }

/* a cropped piece of the app, shown as a floating card */
.shot-card {
  width: 100%; max-width: 380px; border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ---------- coaches: pick a goal, meet its coach ---------- */
.coaches { padding: 96px 0; background: var(--bg-surface); border-block: 1px solid var(--hairline); }
.goal-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 36px auto 0; max-width: 760px; }
.goal-chips button {
  font: inherit; font-size: 15px; font-weight: 500; color: var(--text-primary); cursor: pointer;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius-full); border: 0;
  background: var(--bg-elevated); box-shadow: inset 0 0 0 1px var(--hairline);
  display: inline-flex; align-items: center; gap: 8px; transition: background .15s ease, box-shadow .15s ease;
}
.goal-chips button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.goal-chips button:hover { box-shadow: inset 0 0 0 1px var(--c); }
.goal-chips button[aria-selected="true"] { background: var(--text-primary); color: var(--bg-base); box-shadow: none; }
.goal-chips button:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 2px; }
.coach-card {
  max-width: 760px; margin: 24px auto 0; padding: 32px; border-radius: 24px;
  background: var(--bg-elevated); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-md);
  border-top: 4px solid var(--c, var(--volt)); transition: border-color .2s ease;
}
.coach-card__head { display: flex; align-items: center; gap: 16px; }
.coach-badge {
  flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--c, var(--volt)); color: #0b0c0e; font-family: var(--font-metric); font-weight: 700; font-size: 24px; letter-spacing: 0.02em;
}
.coach-card__head .eyebrow { margin-bottom: 4px; color: var(--text-tertiary); }
.coach-card__head h3 { font-size: 26px; letter-spacing: -0.01em; }
.coach-card__focus { margin-top: 20px; font-size: 18px; color: var(--text-primary); }
.coach-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 0; }
.coach-facts div { background: var(--bg-surface); border-radius: var(--radius-md); padding: 14px 16px; }
.coach-facts dt { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.coach-facts dd { margin: 6px 0 0; font-size: 15px; color: var(--text-primary); }
.coaches .fine { text-align: center; }
.sw { width: 10px; height: 28px; border-radius: 4px; background: var(--c); }
@media (max-width: 560px) {
  .goal-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .goal-chips::-webkit-scrollbar { display: none; }
  .goal-chips button { flex: none; }
  .coach-card { padding: 24px 20px; }
  .coach-facts { grid-template-columns: 1fr; }
}

/* theme toggle + theme-specific images */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: transparent; color: var(--text-secondary); box-shadow: inset 0 0 0 1px var(--hairline);
}
.theme-toggle:hover { color: var(--text-primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: none; }
}
.only-light { display: none !important; }
:root[data-theme="light"] .only-dark { display: none !important; }
:root[data-theme="light"] .only-light { display: block !important; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .only-dark { display: none !important; }
  :root:not([data-theme="dark"]) .only-light { display: block !important; }
}

/* ---------- features ---------- */
.feature { padding: 96px 0; }
.feature + .feature { border-top: 1px solid var(--hairline); }
.feature__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature__grid > figure, .feature__grid > .phone-pair { justify-self: center; }
.feature--flip .feature__text { order: 2; }
.feature__text p:not(.eyebrow) { color: var(--text-secondary); margin-top: 18px; max-width: 32em; }
.feature__text em { color: var(--text-primary); font-style: normal; font-weight: 600; }
.ticks { margin-top: 24px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--text-primary); font-size: 16px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-subtle) var(--tick) center / 18px no-repeat;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chips span { background: var(--bg-control); border-radius: var(--radius-full); padding: 10px 16px; font-size: 15px; }
.modes { margin-top: 24px; display: grid; gap: 8px; }
.modes li {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center;
  background: var(--bg-surface); border-radius: var(--radius-md); padding: 12px 16px;
}
.modes b { font-weight: 600; font-size: 16px; }
.modes span:not(.sw) { grid-column: 2; color: var(--text-secondary); font-size: 14px; }
.modes .sw { grid-row: span 2; }

/* ---------- safety ---------- */
.safety { padding: 96px 0; background: var(--bg-surface); border-block: 1px solid var(--hairline); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.card { background: var(--bg-elevated); border-radius: var(--radius-lg); padding: 28px; box-shadow: 0 0 0 1px var(--hairline); }
.card p { color: var(--text-secondary); margin-top: 10px; font-size: 16px; }

/* ---------- how ---------- */
.how { padding: 96px 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; counter-reset: s; }
.steps li { position: relative; }
.steps .num {
  font-family: var(--font-metric); font-weight: 700; font-size: 56px; line-height: 1; color: var(--text-accent); display: block; margin-bottom: 12px;
}
.steps p { color: var(--text-secondary); margin-top: 8px; font-size: 16px; }

/* ---------- faq ---------- */
.faq { padding: 96px 0; border-top: 1px solid var(--hairline); }
.faq-list { max-width: 760px; margin: 40px auto 0; display: grid; gap: 10px; }
.faq details { background: var(--bg-surface); border-radius: var(--radius-md); box-shadow: 0 0 0 1px var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary); transform: rotate(45deg); transition: transform .15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 2px; border-radius: var(--radius-md); }
.faq details p { padding: 0 20px 18px; color: var(--text-secondary); font-size: 16px; }
@media (max-width: 900px) { .faq { padding: 72px 0; } }

/* ---------- final ---------- */
.final { padding: 24px 0 96px; }
.final__box {
  text-align: center; padding-top: 64px; padding-bottom: 64px; border-radius: 28px;
  background: radial-gradient(500px 240px at 50% 0%, var(--glow), transparent 70%), var(--bg-surface);
  border: 1px solid var(--hairline);
}
.final__box p { color: var(--text-secondary); margin-top: 14px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer__row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.footer p { color: var(--text-tertiary); font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 40px 0 72px; }
  .hero__grid, .feature__grid { grid-template-columns: 1fr; gap: 48px; }
  .feature--flip .feature__text { order: 0; }
  .cards, .steps { grid-template-columns: 1fr; }
  .feature, .safety, .how, .coaches { padding: 72px 0; }
}
@media (max-width: 480px) {
  .phone-pair .phone:last-child { margin-top: 32px; }
  .cta-row .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
