/* ============================================
   ErgUp — Warm Ink (web)
   Tokens mirror /Users/radesh/Documents/code/ergup/DESIGN.md
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Surfaces */
  --background: #0D0A08;
  --surface: #1C1A17;
  --divider: #38332E;

  /* Text */
  --tx-primary: #FFFFFF;
  --tx-secondary: #B0A89E;

  /* Accent — Retriever Gold */
  --accent: #F2D68C;
  --accent-on: #0D0A08;
  --accent-glow: rgba(242, 214, 140, 0.14);
  --accent-soft: rgba(242, 214, 140, 0.08);

  /* State */
  --state-on: #61C787;
  --state-drift: #E6A34F;
  --state-off: #D46B6B;
  --state-rest: #6BA3D6;

  /* HR zones */
  --hr-z1: #B0A89E;
  --hr-z2: #6BA3D6;
  --hr-z3: #4DB07D;
  --hr-z4: #E6A34F;
  --hr-z5: #D46B6B;

  /* Layout */
  --container: 1100px;
  --readable: 720px;

  /* Radius — continuous superellipse isn't in CSS; close enough with large radius */
  --r-xs: 2px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-full: 999px;

  /* Typography — shared with Studio BIGS + SwaraFM */
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', 'Menlo', 'Consolas', monospace;
}

/* ============================================
   Reset
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--tx-primary);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* numbers: tabular digits */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ============================================
   Reveals
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.4s; }

/* ============================================
   Container
   ============================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

.readable {
  max-width: var(--readable);
  margin-inline: auto;
}

/* ============================================
   Nav
   ============================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  background: rgba(13, 10, 8, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--divider); }

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--tx-secondary);
  transition: color 0.2s ease;
}
.nav-back:hover { color: var(--tx-primary); }
.nav-back svg { opacity: 0.7; }

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-radius: var(--r-lg);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.15s ease,
              opacity 0.15s ease;
  white-space: nowrap;
}

.btn-gold {
  background: var(--accent);
  color: var(--accent-on);
}
.btn-gold:hover { transform: translateY(-1px); opacity: 0.96; }
.btn-gold:active { transform: translateY(0); opacity: 0.92; }

.btn-ghost {
  background: transparent;
  color: var(--tx-primary);
  border: 1px solid var(--divider);
}
.btn-ghost:hover { border-color: var(--tx-secondary); }

.btn-sm {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--r-full);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  padding: 5rem 0 6rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 1000px;
  height: 600px;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
  animation: glow-breathe 10s ease-in-out infinite;
  z-index: 0;
}

@keyframes glow-breathe {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.06); }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tx-secondary);
  margin-bottom: 1.5rem;
}
.kicker::before {
  content: '';
  width: 18px;
  height: 8px;
  background: var(--accent);
  border-radius: var(--r-full);
  display: inline-block;
}

.hero h1 {
  font-family: var(--font-body);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 1.25rem;
}
.hero h1 em {
  font-style: normal;
  font-weight: 500;
  color: var(--tx-secondary);
  letter-spacing: -0.02em;
}

.sub {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  color: var(--tx-secondary);
  font-weight: 400;
  max-width: 560px;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-meta {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--tx-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.hero-meta span + span::before {
  content: '·';
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* ============================================
   Dashboard mock — demonstrates Warm Ink
   ============================================ */

.mock-phone {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  padding: 16px;
  background: linear-gradient(180deg, #2A2623, #18161300);
  border: 1px solid var(--divider);
  border-radius: 40px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5),
              0 8px 24px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.mock-screen {
  background: var(--background);
  border-radius: 26px;
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mock-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--tx-secondary);
  letter-spacing: 0.08em;
}
.mock-status .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--state-on);
  margin-right: 0.4rem;
  box-shadow: 0 0 8px var(--state-on);
}

.hero-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tx-secondary);
}

.hero-card-value {
  font-family: var(--font-body);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--tx-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hero-card-value small {
  font-size: 1rem;
  color: var(--tx-secondary);
  font-weight: 500;
  margin-left: 0.35rem;
  letter-spacing: 0;
}

.hero-card-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tx-secondary);
  margin-bottom: 0.3rem;
}

.hero-card-cta {
  background: var(--accent);
  color: var(--accent-on);
  padding: 0.875rem 1rem;
  border-radius: var(--r-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: center;
  letter-spacing: -0.005em;
}

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}

.tile {
  background: var(--background);
  border-radius: var(--r-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  overflow: hidden;
}

.tile-label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tx-secondary);
}

.tile-value {
  font-size: 1.375rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.tile-value.on { color: var(--state-on); }
.tile-value.drift { color: var(--state-drift); }
.tile-value.z3 { color: var(--hr-z3); }

.tile-meta {
  font-size: 0.6875rem;
  color: var(--tx-secondary);
}

.tile.zone-tinted {
  background: linear-gradient(180deg, rgba(77, 176, 125, 0.12), rgba(77, 176, 125, 0.04));
  border: 1px solid rgba(77, 176, 125, 0.18);
}

/* ============================================
   Sections
   ============================================ */

.section {
  padding: 6rem 0;
  border-top: 1px solid var(--divider);
}
.section-alt { background: #120F0D; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tx-secondary);
  margin-bottom: 1rem;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 680px;
  margin-bottom: 1.25rem;
}

.section h2 em {
  font-style: normal;
  color: var(--tx-secondary);
  font-weight: 500;
}

.section-lede {
  font-size: 1.125rem;
  color: var(--tx-secondary);
  max-width: 620px;
  line-height: 1.55;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4rem;
  align-items: center;
  margin-top: 3rem;
}

.section-grid.reverse {
  grid-template-columns: 0.95fr 1.05fr;
}
.section-grid.reverse .section-visual { order: -1; }

.bullets {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
  max-width: 520px;
}

.bullet {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.bullet::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 8px;
  margin-top: 9px;
  background: var(--accent);
  border-radius: var(--r-full);
}

.bullet strong {
  display: block;
  font-weight: 600;
  font-size: 1.0625rem;
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
}

.bullet span {
  color: var(--tx-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ============================================
   Visual mockups per section
   ============================================ */

.mock-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mock-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tx-secondary);
}

.mock-coaching-cue {
  background: var(--background);
  border-radius: var(--r-sm);
  padding: 14px;
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.mock-coaching-cue::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 8px;
  margin-top: 7px;
  background: var(--accent);
  border-radius: var(--r-full);
}

.mock-coaching-cue-text strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.mock-coaching-cue-text span {
  font-size: 0.8125rem;
  color: var(--tx-secondary);
  line-height: 1.45;
}

.pace-zone {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pace-bar {
  position: relative;
  height: 10px;
  background: var(--background);
  border-radius: var(--r-full);
  overflow: hidden;
}
.pace-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30%;
  width: 40%;
  background: linear-gradient(90deg, rgba(97, 199, 135, 0.0), rgba(97, 199, 135, 0.5) 50%, rgba(97, 199, 135, 0.0));
  border-radius: var(--r-full);
}
.pace-marker {
  position: absolute;
  top: -2px;
  height: 14px;
  width: 14px;
  border-radius: var(--r-full);
  background: var(--state-on);
  box-shadow: 0 0 0 3px rgba(97, 199, 135, 0.18);
  transform: translateX(-50%);
  left: 54%;
}

.pace-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--tx-secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* Progression compare */

.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
}

.compare-cell {
  background: var(--background);
  border-radius: var(--r-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.compare-cell .when {
  font-size: 0.6875rem;
  color: var(--tx-secondary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.compare-cell .value {
  font-size: 2rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.compare-arrow {
  align-self: center;
  display: flex;
  align-items: center;
  color: var(--tx-secondary);
}

.compare-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  padding: 0.3rem 0.6rem;
  background: rgba(97, 199, 135, 0.12);
  color: var(--state-on);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  align-self: flex-start;
}

/* Segmented picker (for time section) */

.seg {
  display: inline-flex;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--r-full);
  gap: 6px;
}

.seg-option {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tx-primary);
  border-radius: var(--r-full);
  white-space: nowrap;
}
.seg-option.selected {
  background: var(--accent);
  color: var(--accent-on);
}

.budget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--divider);
  font-size: 0.9375rem;
}
.budget-row:last-child { border-bottom: 0; }
.budget-row .label {
  color: var(--tx-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.budget-row .value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Devices list */

.device-list {
  display: flex;
  flex-direction: column;
}

.device-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--divider);
  align-items: flex-start;
}
.device-row:last-child { border-bottom: 0; }

.device-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--background);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.device-text {
  flex: 1;
}
.device-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.device-text span {
  font-size: 0.875rem;
  color: var(--tx-secondary);
  line-height: 1.45;
}

.device-tag {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border-radius: var(--r-full);
  color: var(--tx-secondary);
  border: 1px solid var(--divider);
  white-space: nowrap;
}
.device-tag.required { color: var(--accent); border-color: var(--accent); }
.device-tag.optional { color: var(--tx-secondary); }

/* ============================================
   FAQ
   ============================================ */

.faq-list {
  margin-top: 2rem;
  border-top: 1px solid var(--divider);
}

.faq-item {
  border-bottom: 1px solid var(--divider);
}

.faq-item summary {
  list-style: none;
  padding: 1.5rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-right: 1.5px solid var(--tx-secondary);
  border-bottom: 1.5px solid var(--tx-secondary);
  transform: rotate(45deg);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 4px;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.faq-item summary:hover { color: var(--accent); }

.faq-answer {
  padding: 0 0 1.5rem;
  color: var(--tx-secondary);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 720px;
}

/* ============================================
   CTA band
   ============================================ */

.cta-band {
  padding: 7rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, var(--accent-glow) 0%, transparent 55%);
  pointer-events: none;
}

.cta-band > .container { position: relative; }

.cta-band h2 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.cta-band p {
  color: var(--tx-secondary);
  font-size: 1.125rem;
  max-width: 540px;
  margin: 0 auto 2rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--divider);
  color: var(--tx-secondary);
  font-size: 0.875rem;
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand .mark {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  color: var(--tx-primary);
  letter-spacing: -0.01em;
}
.footer-brand .mark em {
  font-style: normal;
  color: var(--accent);
}

.footer-brand .studio {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tx-secondary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--tx-primary); }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .hero { padding: 3.5rem 0 4.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .section-grid,
  .section-grid.reverse { grid-template-columns: 1fr; gap: 2.5rem; }
  .section-grid.reverse .section-visual { order: 0; }
  .section { padding: 4.5rem 0; }
}

@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }
  .hero { padding: 3rem 0 4rem; }
  .hero h1 { font-size: 2.75rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .mock-phone { max-width: 320px; padding: 12px; }
  .compare { grid-template-columns: 1fr; }
  .compare-arrow { transform: rotate(90deg); justify-self: center; }
  .cta-band { padding: 4.5rem 0; }
  .footer .container { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
