/* ==========================================================================
   FIETSMAN.COM — Design tokens
   Concept: "telemetrie / boordcomputer" — de site oogt als het display van
   een fietscomputer: donker glas, precieze cijfers, één signaalkleur voor
   vermogen (amber) en één voor code/IT (cyaan). Structuur = data.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Kleur */
  --bg: #10131a;
  --bg-panel: #171b24;
  --bg-panel-2: #1e2430;
  --line: #2a3040;
  --line-soft: #20242f;
  --text: #e7e9ee;
  --text-dim: #8b92a5;
  --text-faint: #565d70;
  --accent: #4f9cff;       /* vermogen / FTP / cycling — signaalblauw */
  --accent-hover: #82bbff;
  --accent-on: #0a1626;    /* tekstkleur bovenop --accent (donkernavy, voor contrast) */
  --accent-dim: #1c3f66;
  --accent-2: #3ed6c6;     /* signaal / IT / code */
  --accent-2-dim: #1f6b64;

  /* Typografie */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --maxw: 1180px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

/* subtiele carbon-textuur op de achtergrond */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 70%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

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

/* ---------- Eyebrow / telemetrie-labels ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.tag.cyan { color: var(--accent-2); }
.tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 19, 26, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 25px;
  height: 25px;
  color: var(--accent);
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(79, 156, 255, 0.35));
}
.logo-mark .live-dot {
  animation: pulse 2.4s ease-in-out infinite;
  transform-origin: 28px 16px;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--text-dim);
}
.nav-links a { transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 64px;
  overflow: hidden;
}
.hero .route-line {
  position: absolute;
  right: -60px;
  top: 0;
  width: 620px;
  max-width: 60vw;
  opacity: 0.55;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.05;
  margin: 18px 0 20px;
}
.hero h1 .hl { color: var(--accent); }
.hero p.lead {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 46ch;
  margin-bottom: 32px;
}
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: border-color .15s, background .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary {
  background: var(--accent);
  color: var(--accent-on);
  border-color: var(--accent);
  font-weight: 700;
}
.btn.primary:hover { background: var(--accent-hover); }

/* dashboard readout kaart in de hero */
.readout {
  background: linear-gradient(160deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 24px;
  position: relative;
}
.readout::after {
  content: 'LIVE — STRAVA API';
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}
.readout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 18px;
  margin-top: 8px;
}
.metric .metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.metric .metric-value {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}
.metric .metric-value .unit {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 4px;
}
.metric.accent .metric-value { color: var(--accent); }
.metric.skeleton .metric-value {
  color: var(--text-faint);
}

/* ---------- Secties ---------- */
section { padding: 72px 0; border-top: 1px solid var(--line-soft); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 28px; }
.section-head .sub { color: var(--text-dim); font-size: 14px; max-width: 50ch; }
.section-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- Kaarten grid (blog/it) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.card .card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.card.it-card .card-tag { color: var(--accent-2); }
.card h3 { font-size: 18px; margin: 0; }
.card p { color: var(--text-dim); font-size: 14px; margin: 0; flex: 1; }
.card .card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

/* ---------- Doel / statisch blok ---------- */
.goal-panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}
.goal-panel .goal-icon {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  writing-mode: vertical-rl;
  letter-spacing: 0.14em;
}
.goal-panel h3 { font-size: 20px; margin-bottom: 6px; }
.goal-panel p { color: var(--text-dim); margin: 0; font-size: 14.5px; }
.goal-progress {
  margin-top: 14px;
  height: 6px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.goal-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
}

/* ---------- Stats tabel (training pagina) ---------- */
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.stat-table th, .stat-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.stat-table th {
  color: var(--text-faint);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
}
.stat-table td.num { text-align: right; color: var(--text); }
.stat-table tr:hover { background: var(--bg-panel); }

/* ---------- IT sectie specifiek: terminal card ---------- */
.terminal {
  background: #0c0e13;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
}
.terminal-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.terminal-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
  line-height: 1.8;
}
.terminal-body .dim { color: var(--text-faint); }
.terminal-body .text-white { color: var(--text); }

/* ---------- Compacte spec-lijst (uitrusting) ---------- */
.spec-list {
  max-width: 480px;
  border-top: 1px solid var(--line-soft);
  margin: 0;
}
.spec-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.spec-row dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.spec-row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  text-align: left;
}

/* ---------- Cols: wensenlijst pills ---------- */
.wishlist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.wishlist-item {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 16px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.wishlist-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--text-faint);
}

/* ---------- Kopje binnen een sectie ---------- */
.subhead {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 14px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--text-faint);
  font-size: 13px;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer a:hover { color: var(--text-dim); }

/* ---------- Pagina-hero (subpagina's) ---------- */
.page-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line-soft);
}
.page-hero h1 { font-size: 36px; }
.page-hero p { color: var(--text-dim); max-width: 60ch; }

/* ---------- Divider met route-lijn ---------- */
.route-divider { width: 100%; height: 46px; opacity: 0.5; margin: 8px 0 -8px; }

/* ---------- Nav-toggle (hamburger, alleen zichtbaar op mobiel) ---------- */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  width: 40px;
  height: 40px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .route-line { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .goal-panel { grid-template-columns: 1fr; }
  .goal-panel .goal-icon { writing-mode: horizontal-tb; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--line);
    padding: 8px 28px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-links a:last-child { border-bottom: none; }

  section { padding: 52px 0; }
  .hero { padding: 40px 0 44px; }

  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stat-table { min-width: 480px; }
}

@media (max-width: 640px) {
  .readout-grid { grid-template-columns: 1fr 1fr !important; gap: 16px 14px; }
  .metric .metric-value { font-size: 22px; }
  .spec-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
}

@media (max-width: 380px) {
  .readout-grid { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Focus states — toegankelijkheid */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
