/* ─────────────────── DESIGN TOKENS ─────────────────── */
:root {
  --bg:           #06080A;
  --bg-2:         #0A1014;
  --surface:      #0D1216;
  --surface-2:    #141A20;
  --border:       #2A343D;
  --text-hi:      #F3F6F8;
  --text-mid:     #A8B3BB;
  --text-low:     #6B7681;
  --accent:       #7FE3C8;
  --accent-deep:  #1E6B5A;
  --hr:           #FF8EA0;
  --z1: #7AB8FF; --z2: #2196F3; --z3: #4CAF50;
  --z4: #FF9800; --z5: #F44336; --z6: #BA68C8; --z7: #9C27B0;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; padding: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-hi);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
.accent { color: var(--accent); }
.muted  { color: var(--text-mid); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 .9rem;
}

/* ─────────────────── NAV ─────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem clamp(1rem, 4vw, 3rem);
  background: rgba(6,8,10,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex; align-items: center; gap: .65rem;
  text-decoration: none; color: var(--text-hi);
}
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
.brand.small .brand-mark { width: 30px; height: 30px; }
.brand-word {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 1.4rem; letter-spacing: -.02em;
}
.nav-links {
  display: flex; gap: 1.6rem;
}
.nav-links a {
  color: var(--text-mid); text-decoration: none; font-size: .9rem; font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--accent); }
@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* ─────────────────── HERO ─────────────────── */
.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 6rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 6vw, 6rem);
  overflow: hidden;
}
.hero-glow {
  position: absolute; inset: -40% -20% auto -20%;
  height: 80%;
  background: radial-gradient(60% 60% at 30% 20%, rgba(127,227,200,.22), transparent 70%),
              radial-gradient(50% 50% at 80% 60%, rgba(33,150,243,.10), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--gap);
  align-items: center;
  max-width: 1200px; margin: 0 auto;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.display {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
}
.lede {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--text-mid); line-height: 1.55;
  max-width: 55ch; margin: 0 0 2rem;
}
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .9rem 1.4rem;
  border-radius: 12px;
  font-weight: 600; font-size: .98rem;
  text-decoration: none;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn.primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}
.btn.primary:hover { background: #94e9d2; transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--text-hi);
  border: 1px solid var(--border);
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-meta {
  display: grid; gap: .35rem;
  font-size: .85rem; color: var(--text-low);
}
.hero-meta strong { color: var(--accent); font-weight: 600; margin-right: .35rem; }

/* hero mock (workout chart card) */
.mock-chrome {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 16px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6),
              0 8px 24px rgba(0,0,0,.4);
  transform: perspective(1200px) rotateX(2deg) rotateY(-6deg);
  transition: transform .25s ease;
}
.mock-chrome:hover { transform: perspective(1200px) rotateX(0deg) rotateY(0deg); }
.mock-titlebar {
  display: flex; align-items: center; gap: .55rem;
  font-family: 'JetBrains Mono', monospace; font-size: .74rem;
  color: var(--text-low); font-weight: 700; letter-spacing: .04em;
  margin-bottom: .6rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.z2 { background: var(--z2); }
.dot.z5 { background: var(--z5); }
.dot.z7 { background: var(--z7); }
.title-text { color: var(--text-hi); margin-left: .5rem; }
.title-right { margin-left: auto; color: var(--text-mid); }
.mock-chart {
  width: 100%; height: 240px;
  background: var(--bg-2);
  border-radius: 8px;
  display: block;
}
.mock-chart text { fill: var(--text-low); font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; }
.mock-chart .y-labels-right text { text-anchor: end; fill: var(--hr); }
.mock-chart .x-labels text { text-anchor: middle; }
.mock-chart .playhead { animation: pulse-line 2.4s ease-in-out infinite; }
@keyframes pulse-line {
  0%, 100% { opacity: .65; }
  50%      { opacity: 1; }
}
.mock-metrics {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 14px; margin-top: 14px;
}
.metric {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.metric .lab {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .68rem; font-weight: 900;
  color: var(--text-low); letter-spacing: .06em; margin-bottom: 4px;
}
.metric .num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 2.1rem; line-height: 1; letter-spacing: -.02em;
  display: inline-flex; align-items: baseline; gap: 4px;
}
.metric .unit { font-family: 'Inter', sans-serif; font-size: .85rem; color: var(--text-low); font-weight: 600; }
.c-z1 { color: var(--z1); }
.c-z2 { color: var(--z2); }
.c-z3 { color: var(--z3); }
.c-z4 { color: var(--z4); }
.c-z5 { color: var(--z5); }
.c-z6 { color: var(--z6); }
.c-z7 { color: var(--z7); }

/* ─────────────────── SECTIONS ─────────────────── */
.section {
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}
.section-head { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head.centered { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.section-head h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08; letter-spacing: -.015em;
  margin: 0 0 1rem;
}
.section-head .muted { font-size: 1rem; margin: 0; }

/* ─────────────────── FEATURE GRID ─────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 22px;
  transition: transform .15s ease, border-color .15s ease, background .2s ease;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(127,227,200,.06), transparent 40%) var(--surface);
}
.feature-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent);
  color: var(--c, var(--accent));
  margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.08rem; font-weight: 700;
  margin: 0 0 .5rem;
}
.feature p {
  color: var(--text-mid); line-height: 1.55; font-size: .95rem; margin: 0;
}

/* ─────────────────── ZONES ─────────────────── */
.zones { padding-top: 0; }
.zone-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.zone {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--c) 22%, transparent),
    color-mix(in srgb, var(--c) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-radius: 12px;
  padding: 18px 16px 16px;
  display: grid; gap: 4px;
  transition: transform .15s ease;
}
.zone:hover { transform: translateY(-3px); }
.zone .z {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--c);
  letter-spacing: -.02em;
  line-height: 1;
}
.zone .label { font-weight: 600; color: var(--text-hi); font-size: .95rem; }
.zone .pct { color: var(--text-mid); font-family: 'JetBrains Mono', monospace; font-size: .82rem; }

/* ─────────────────── WORKOUTS ─────────────────── */
.workout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.workout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .15s ease, border-color .15s ease;
}
.workout-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.workout-card header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: .5rem;
}
.workout-card h3 {
  margin: 0; font-size: 1.06rem; font-weight: 700;
}
.workout-card .dur {
  font-family: 'JetBrains Mono', monospace; font-size: .85rem;
  color: var(--text-low); font-weight: 700;
}
.workout-card p {
  color: var(--text-mid); font-size: .92rem; line-height: 1.5;
  margin: 0 0 14px;
}
.bars-svg {
  width: 100%; height: 56px;
  background: var(--bg-2);
  border-radius: 8px;
  display: block;
}

/* ─────────────────── PLANS ─────────────────── */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: flex; flex-direction: column;
  position: relative;
  transition: transform .15s ease, border-color .15s ease;
}
.plan:hover { transform: translateY(-3px); border-color: var(--accent); }
.plan-featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(127,227,200,.10), transparent 60%) var(--surface);
}
.plan h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -.01em;
  margin: 0 0 .25rem;
}
.plan-sub {
  color: var(--text-low); font-family: 'JetBrains Mono', monospace;
  font-size: .82rem; font-weight: 700;
  margin: 0 0 1.2rem;
}
.plan ul {
  margin: 0 0 1.2rem; padding: 0; list-style: none;
  display: grid; gap: .55rem;
  flex-grow: 1;
}
.plan ul li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--text-mid);
  font-size: .95rem;
}
.plan ul li::before {
  content: "";
  position: absolute; left: 0; top: .5em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .8;
}
.plan-pill {
  align-self: flex-start;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  color: var(--c);
  font-family: 'JetBrains Mono', monospace;
  font-size: .76rem; font-weight: 700; letter-spacing: .04em;
}

/* ─────────────────── LIVE CHART CARD ─────────────────── */
.live-chart .section-head { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.live-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 760px; margin: 0 auto;
}
.live-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.phase-chip {
  padding: 4px 10px; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-weight: 700; font-size: .76rem; letter-spacing: .06em;
}
.seg-name { color: var(--text-mid); font-size: .95rem; flex-grow: 1; }
.seg-time { font-family: 'JetBrains Mono', monospace; color: var(--text-hi); font-weight: 700; font-size: 1.1rem; }
.live-progress {
  height: 6px; border-radius: 3px; background: var(--surface-2);
  margin-bottom: 22px; overflow: hidden;
}
.live-progress i {
  display: block; height: 100%; width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transform-origin: left center;
  /* No CSS transition — JS steps the width per WHOLE second so the bar
     advances visibly in sync with the MM:SS counter. */
}
/* Phase-chip variants driven from JS as it cycles intervals/recoveries. */
.phase-chip.interval { background: color-mix(in srgb, var(--z4) 16%, transparent); color: var(--z4); }
.phase-chip.recovery { background: color-mix(in srgb, var(--z2) 16%, transparent); color: var(--z2); }
.live-metrics {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}
.live-metrics > div { padding: 4px 12px; }
.live-metrics > div:nth-child(2),
.live-metrics > div:nth-child(4) { display: none; }
.live-metrics .lab {
  display: block;
  font-size: .72rem; font-weight: 900; letter-spacing: .06em;
  color: var(--text-low); margin-bottom: 4px;
}
.live-metrics .num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 2.6rem; line-height: 1; letter-spacing: -.02em;
  display: inline-flex; align-items: baseline; gap: 4px;
}
.live-metrics .unit {
  font-family: 'Inter', sans-serif; font-size: .9rem;
  color: var(--text-low); font-weight: 600;
}
.live-up {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap;
}
.up-lab {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; font-weight: 700;
  color: var(--text-low); letter-spacing: .04em;
  margin-right: 4px;
}
.up-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  display: grid; gap: 2px; justify-items: center;
  flex: 1; min-width: 80px;
}
.up-chip .t { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1rem; }
.up-chip .w { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.05rem; }

/* ─────────────────── FOOTER ─────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem);
  background: var(--bg-2);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; gap: .8rem; align-items: flex-start;
}
.footer-copy {
  color: var(--text-mid); margin: 0;
  max-width: 60ch; font-size: .95rem;
}
.footer-mini {
  color: var(--text-low); font-size: .8rem; margin: 0;
}
