/* Workout Planner - garminworkoutplanner.yfranko.com
   Tokens mirror the app's theme (garmin_workout_planner_mobile/lib/theme.dart).
   Single stylesheet, no build step. Bump ?v= in index.html when this changes. */

:root {
  --ink: #171522;          /* app background, top of gradient */
  --ink-deep: #272033;     /* bottom of gradient */
  --surface: #201C2D;      /* cards */
  --surface-hi: #2E2740;   /* sheets, hover */
  --line: #3A3350;         /* hairlines */
  --volt: #CDFA48;         /* the single action color */
  --volt-dim: #9CC22E;
  --on-volt: #171522;
  --text: #F3EDE4;         /* cream, never pure white */
  --muted: #A9A1B8;
  --faint: #6F6684;        /* decorative only - fails AA on ink */

  /* intensity colors, same as the app's workout bars */
  --c-warmup: #FFB74A;
  --c-cooldown: #5AB0FF;
  --c-interval: #FF6B4A;
  --c-recovery: #4ADE80;
  --c-rest: #8D86A0;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  --maxw: 1120px;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
}

/* ---------- reset / base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  background-image: linear-gradient(180deg, var(--ink) 0%, var(--ink-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--volt); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; }

:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--volt);
  color: var(--on-volt);
  padding: 10px 16px;
  border-radius: var(--r-s);
  font-weight: 700;
}
.skip:focus { left: 8px; }

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- type ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.02;
  text-wrap: balance;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--volt);
}

.sec { padding: 92px 0; }

.sec-head { max-width: 720px; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(34px, 5vw, 52px); }
.sec-head p { margin: 14px 0 0; color: var(--muted); font-size: 18px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23, 21, 34, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .btn { margin-left: 8px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 8px 10px;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { display: block; }

/* ---------- buttons & store badges ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--volt);
  color: var(--on-volt);
  font-weight: 700;
  font-size: 15px;
  padding: 11px 20px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--volt-dim); text-decoration: none; }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 18px;
  color: var(--text);
  line-height: 1.15;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.badge:hover {
  text-decoration: none;
  border-color: var(--volt);
  background: var(--surface-hi);
}
.badge svg { width: 26px; height: 26px; fill: var(--text); flex: none; }
.badge small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.badge strong { display: block; font-size: 17px; font-weight: 700; }

.fineprint {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- interval bars (signature motif) ---------- */

.bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
}
.bars span {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 4px 4px 2px 2px;
  min-width: 6px;
}
.bars .wu { background: var(--c-warmup); }
.bars .iv { background: var(--c-interval); }
.bars .rc { background: var(--c-recovery); }
.bars .rs { background: var(--c-rest); }
.bars .cd { background: var(--c-cooldown); }

/* staggered grow-in, only when JS has revealed the parent */
@media (prefers-reduced-motion: no-preference) {
  .js .bars span {
    transform-origin: bottom;
    transform: scaleY(0);
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 45ms);
  }
  .js .bars.grown span,
  .js .revealed .bars span { transform: scaleY(1); }
}

/* ---------- hero ---------- */

.hero { padding: 72px 0 0; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { font-size: clamp(44px, 6.5vw, 76px); }

.hero .lede {
  margin: 22px 0 30px;
  max-width: 54ch;
  font-size: 19px;
  color: var(--muted);
}
.hero .lede strong { color: var(--text); font-weight: 600; }

.hero-shot { position: relative; justify-self: center; }
.hero-shot img {
  width: min(320px, 78vw);
  border-radius: 36px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.hero-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-hi);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.hero-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--volt);
  flex: none;
}
.chip-sent { top: 3.5%; right: -34px; }
.chip-reps { bottom: 13%; left: -44px; }
.chip-reps .dot { background: var(--c-interval); }

/* the annotated workout profile under the hero */
.hero-profile {
  margin-top: 72px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.hero-profile .bars { height: 88px; }
.profile-legend {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.profile-legend .wu { color: var(--c-warmup); }
.profile-legend .iv { color: var(--c-interval); }
.profile-legend .cd { color: var(--c-cooldown); }

/* ---------- problem band ---------- */

.band { padding: 84px 0; }
.band .wrap { max-width: 860px; }
.band h2 { font-size: clamp(32px, 4.6vw, 46px); }
.band p { margin: 18px 0 0; font-size: 19px; color: var(--muted); }

/* ---------- feature cards ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 26px;
}
.card h3 { font-size: 20px; margin: 14px 0 8px; }
.card p { margin: 0; font-size: 15.5px; color: var(--muted); }
.card .glyph {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--surface-hi);
  border-radius: 12px;
}
.card .glyph svg { width: 22px; height: 22px; stroke: var(--volt); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.dot-row { display: flex; gap: 6px; align-items: center; height: 40px; }
.dot-row i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 26px;
}
.step .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  color: var(--volt);
}
.step h3 { font-size: 20px; margin: 12px 0 8px; }
.step p { margin: 0; font-size: 15.5px; color: var(--muted); }
.step p b { color: var(--text); font-weight: 600; }

/* ---------- sports ---------- */

.sports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.sport {
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 26px;
}
.sport .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.sport h3 { font-size: 20px; margin: 16px 0 8px; }
.sport p { margin: 0; font-size: 15.5px; color: var(--muted); }
.sport-run .tag { color: var(--c-interval); border-color: color-mix(in srgb, var(--c-interval) 45%, transparent); }
.sport-ride .tag { color: var(--c-warmup); border-color: color-mix(in srgb, var(--c-warmup) 45%, transparent); }
.sport-swim .tag { color: var(--c-cooldown); border-color: color-mix(in srgb, var(--c-cooldown) 45%, transparent); }

/* ---------- share band ---------- */

.share {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.share .wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.share p { color: var(--muted); font-size: 18px; margin: 16px 0 0; }
.share p b { color: var(--text); font-weight: 600; }

.share-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.share-file {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-hi);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
}
.share-file .ext {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--on-volt);
  background: var(--volt);
  border-radius: 8px;
  padding: 4px 8px;
}
.share-file small { display: block; font-weight: 500; color: var(--muted); }
.share-arrow {
  align-self: center;
  color: var(--faint);
}

/* ---------- compatibility ---------- */

.compat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.compat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 26px;
}
.compat h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.compat ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.compat li {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-hi);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}
.compat-note {
  margin-top: 26px;
  padding: 20px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--r-m);
  color: var(--muted);
  font-size: 15.5px;
}
.compat-note b { color: var(--text); font-weight: 600; }
.compat-note code {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 13.5px;
  color: var(--volt);
}

/* ---------- FAQ ---------- */

.faq-list { max-width: 780px; }
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 600;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--volt);
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 64ch;
}

/* ---------- final CTA ---------- */

.cta { text-align: center; }
.cta .bars { height: 44px; max-width: 520px; margin: 0 auto 48px; }
.cta h2 { font-size: clamp(36px, 5.5vw, 60px); }
.cta p { color: var(--muted); font-size: 18px; margin: 16px auto 30px; max-width: 52ch; }
.cta .store-badges { justify-content: center; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  font-size: 15px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer-brand p { color: var(--muted); margin: 12px 0 0; max-width: 36ch; }
.site-footer h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer li a { color: var(--text); font-weight: 500; }
.site-footer li a:hover { color: var(--volt); }
.footer-legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}
.footer-legal p { margin: 0 0 8px; }

/* ---------- reveal on scroll (JS enhances; visible without JS) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .js .reveal.revealed { opacity: 1; transform: none; }
}

/* ---------- breakpoints ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-shot { order: -1; }
  .features-grid, .steps, .sports-grid, .compat-grid { grid-template-columns: 1fr 1fr; }
  .share .wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .sec { padding: 64px 0; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; font-size: 17px; }
  .nav-toggle { display: block; }
  .features-grid, .steps, .sports-grid, .compat-grid, .footer-grid { grid-template-columns: 1fr; }
  .chip-sent { right: -8px; }
  .chip-reps { left: -8px; }
  .hero-profile .bars { height: 64px; gap: 3px; }
  .profile-legend { font-size: 14px; }
}
