/* ==========================================================================
   HybridSport — Website
   Design tokens 1:1 overgenomen uit HybridSport/Views/Theme.swift,
   ThemeManager.swift (dark-thema) en DesignSystem.swift.
   ========================================================================== */

:root {
  /* Kleuren — dark-thema (default in de app) */
  --bg: #0A0A0F;
  --surface: #13131E;
  --surface-2: #1C1C2E;
  --surface-interactive: #242438;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);

  --text: #FFFFFF;
  --text-secondary: #9B9BB0;
  --text-muted: #5A5A7A;

  --accent: #FF6B35;
  --accent-end: #FF3D00;
  --accent-gradient: linear-gradient(135deg, var(--accent), var(--accent-end));

  --success: #00C896;
  --info: #4A9EFF;
  --caution: #FFB340;
  --danger: #FF3B30;

  /* Spacing-schaal — DesignSystem.swift DS.Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;

  /* Radius — DesignSystem.swift DS.Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-hero: 24px;

  /* Typografie */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;

  --container-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

h1, h2, h3, h4, p, ul, figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
}

/* Focus states — accessible, oranje ring conform accentkleur */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-md);
  background: var(--accent);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-md);
}

/* ---------- Typografie-hiërarchie ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

h1 {
  font-size: clamp(2.25rem, 5vw + 1rem, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.75rem, 2.4vw + 1rem, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.lede {
  font-size: clamp(1.05rem, 1vw + 0.9rem, 1.25rem);
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 56ch;
}

.section-intro {
  max-width: 640px;
  margin-bottom: var(--space-xxl);
}

.section-intro.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- Buttons — 1:1 DSPrimaryButton/DSSecondaryButton ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(255, 107, 53, 0.45);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px -6px rgba(255, 107, 53, 0.55);
}

.btn-secondary {
  background: rgba(255, 107, 53, 0.08);
  color: var(--accent);
  border: 1px solid rgba(255, 107, 53, 0.25);
}

.btn-secondary:hover {
  background: rgba(255, 107, 53, 0.14);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  min-width: 0;
  flex-shrink: 1;
  white-space: nowrap;
}

.logo img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text);
  flex-shrink: 0;
}

/* Badge is overbodig op smalle schermen (staat al in hero + slot-CTA) en
   veroorzaakte overlap met het wordmark op 375-390px — verbergen i.p.v.
   verkleinen houdt de header rustig. */
@media (max-width: 480px) {
  .nav-right .status-pill {
    display: none;
  }
}

.mobile-menu {
  display: none;
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .mobile-menu {
    border-top: 1px solid var(--border);
    padding: var(--space-md) 0 var(--space-lg);
  }
  .mobile-menu[hidden] {
    display: none;
  }
  .mobile-menu.open {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }
  .mobile-menu a {
    font-weight: 600;
    color: var(--text-secondary);
  }
}

/* ---------- Layout sections ---------- */
section {
  padding: var(--space-xxl) 0;
}

section.hero {
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(48px, 6vw, 88px);
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -160px;
  right: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.22), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--space-xxl);
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
  }
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

/* Alternating two-column band */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-xxl);
  align-items: center;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Grid-blowout fix: zonder min-width:0 negeert een grid-item de
   1fr-track en blijft hij zijn eigen max-content-breedte claimen —
   op smalle viewports (375-430px) veroorzaakte dit horizontale
   overflow in hero/coach/herstel/analyse. Geldt voor alle grid-secties. */
.hero-grid > *,
.split > *,
.flow > *,
.grid-3 > *,
.audience-list > * {
  min-width: 0;
}

/* Tekst blijft eerst in de DOM (toegankelijkheid/leesvolgorde), maar de
   visual verschuift visueel naar links via order — betrouwbaarder dan
   de direction:rtl-truc voor CSS Grid auto-placement, en werkt zowel
   in de 2-koloms desktop-layout als de 1-koloms mobiele stack. */
.split.reverse .split-visual {
  order: -1;
}

.surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.card-glass {
  background: rgba(19, 19, 30, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---------- Flow diagram: Train -> Belast -> Herstel -> Analyseer -> Pas aan ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-md);
}

@media (max-width: 900px) {
  .flow {
    grid-template-columns: minmax(0, 1fr);
  }
  .flow-arrow {
    transform: rotate(90deg);
  }
}

.flow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
}

.flow-step .num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-step h3 {
  font-size: 1rem;
}

.flow-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.flow-arrow {
  display: none;
}

@media (min-width: 901px) {
  .flow-connectors {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ---------- Feature grid (Training) ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

@media (max-width: 860px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--accent);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  margin-bottom: var(--space-xs);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ---------- Quote / copy example ---------- */
.copy-example {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.95rem;
  color: var(--text);
  font-style: italic;
}

.disclaimer {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: var(--space-md);
  line-height: 1.6;
}

/* ---------- Recovery pills ---------- */
.recovery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.recovery-row:last-child {
  border-bottom: none;
}

.recovery-row .muscle {
  font-weight: 600;
  font-size: 0.92rem;
}

.recovery-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.recovery-badge.available {
  background: rgba(0, 200, 150, 0.14);
  color: var(--success);
}

.recovery-badge.recovering {
  background: rgba(255, 179, 64, 0.14);
  color: var(--caution);
}

.recovery-badge.loaded {
  background: rgba(255, 107, 53, 0.14);
  color: var(--accent);
}

/* ---------- Voor wie ---------- */
.audience-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
}

@media (max-width: 960px) {
  .audience-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .audience-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.audience-card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.audience-card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.audience-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---------- App preview gallery ---------- */
.preview-gallery {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  padding: var(--space-md) 4px var(--space-lg);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-interactive) transparent;
}

.preview-gallery::-webkit-scrollbar {
  height: 6px;
}

.preview-gallery::-webkit-scrollbar-thumb {
  background: var(--surface-interactive);
  border-radius: 6px;
}

.preview-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  text-align: center;
}

.preview-item .caption {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ---------- Comparison table ---------- */
.compare-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

table.compare th,
table.compare td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
}

table.compare th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: 700;
  background: var(--surface);
}

table.compare td:first-child {
  color: var(--text-secondary);
}

table.compare td:last-child {
  color: var(--text);
  font-weight: 600;
}

table.compare tr:last-child td {
  border-bottom: none;
}

table.compare tbody tr td:last-child::before {
  content: "✓ ";
  color: var(--success);
  font-weight: 800;
}

/* ---------- Slot CTA ---------- */
.cta-band {
  background: linear-gradient(180deg, var(--surface), var(--bg));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.cta-band .container {
  max-width: 680px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--space-xxl) 0 var(--space-lg);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 640px) {
  .footer-top {
    flex-direction: column;
  }
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ---------- Phone mockup (herbruikbaar component) ---------- */
.phone {
  width: 300px;
  max-width: 82vw;
  border-radius: 42px;
  background: linear-gradient(160deg, #1a1a26, #0d0d14);
  padding: 12px;
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
}

.phone-screen {
  background: var(--bg);
  border-radius: 32px;
  overflow: hidden;
  min-height: 560px;
  padding: 22px 16px 20px;
  position: relative;
}

.phone-screen.photo {
  padding: 0;
  /* Exacte verhouding van een echte iPhone-schermafbeelding (1206×2622,
     simctl-screenshot) — voorkomt dat object-fit:cover de statusbalk
     links/rechts moet wegsnijden om een mismatchende frame-hoogte te vullen. */
  aspect-ratio: 1206 / 2622;
  height: auto;
}

.phone-screen.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #0d0d14;
  border-radius: 14px;
  z-index: 5;
}

.screen-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.screen-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.mini-card.accent {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.16), rgba(255, 61, 0, 0.08));
  border-color: rgba(255, 107, 53, 0.3);
}

.mini-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 4px;
}

.mini-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.mini-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  padding: 6px 0;
}

.mini-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.mini-chip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.mini-chip.active {
  background: rgba(255, 107, 53, 0.16);
  color: var(--accent);
  border-color: rgba(255, 107, 53, 0.3);
}

.mockup-note {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: var(--space-sm);
  max-width: 260px;
  min-width: 0;
}

.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
  margin: 6px 0;
}

.spark span {
  flex: 1;
  background: var(--accent);
  opacity: 0.55;
  border-radius: 2px;
}

.spark span:last-child {
  opacity: 1;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Legal pages ---------- */
.legal-page h1 {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  margin-bottom: var(--space-sm);
}

.legal-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--space-xxl);
}

.legal-section {
  margin-bottom: var(--space-xl);
}

.legal-section h2 {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
}

.legal-section p,
.legal-section li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-section li {
  margin-bottom: 6px;
}

.legal-section ul {
  list-style: disc;
  padding-left: 1.2em;
  margin-top: var(--space-sm);
}

.legal-section a {
  color: var(--accent);
  font-weight: 600;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: var(--space-xl);
}

.back-link:hover {
  color: var(--text);
}
