/* =========================================================================
   Hoe wordt een auto gemaakt? — stijl
   Donker en filmisch, in dezelfde sfeer als de 3D-fabriek bovenaan.
   ========================================================================= */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0b0f13;
  --bg-2: #10161b;
  --panel: #141b21;
  --line: #222c34;
  --text: #d9e1e7;
  --muted: #8d9aa5;
  --white: #ffffff;
  --accent: #f2b705;
  --accent-soft: rgba(242, 183, 5, 0.14);
  --blue: #5fb4f0;
  --green: #3ecf7a;
  --font-head: "Barlow Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 56px;

  /* gebruikt door de 2D-reserveanimatie */
  --border: #d0d6db;
  --accent-light: #ffd24d;
  --accent-dark: #1f3f5c;
  --steel: #b9c2c9;
  --steel-dark: #7c8790;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

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

img {
  max-width: 100%;
}

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
  line-height: 1.05;
}

/* --- Menu --- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  background: rgba(9, 12, 15, 0.97);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav ul {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  gap: 0.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav ul::-webkit-scrollbar {
  display: none;
}

.site-nav li {
  flex: none;
}

.site-nav a:not(.brand) {
  display: block;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  color: #aeb9c2;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a b {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  margin-right: 0.2rem;
}

.site-nav a:not(.brand):hover {
  color: var(--white);
  background: #182028;
}

.site-nav a.active {
  color: #111 !important;
  background: var(--accent) !important;
}

.site-nav a.active b {
  color: #111;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 0 38%, #111 38% 46%, transparent 46% 54%, #111 54% 62%, transparent 62%),
    var(--accent);
}

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #ffd24d);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0.8;
}

.tour-timer {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  width: 0%;
  background: var(--accent);
  opacity: 0;
}

.tour-timer.show {
  opacity: 1;
  z-index: 2;
  height: 3px;
}

/* --- 3D-fabriek bovenaan --- */

.factory-hero {
  background: #0e1216;
  scroll-margin-top: var(--nav-h);
}

.factory-hero[hidden],
.factory-stage[hidden] {
  display: none;
}

.factory-stage {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-h));
  max-height: 56.25vw;
  min-height: 320px;
  overflow: hidden;
  background: #0e1216;
}

.factory-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.factory-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 30%);
}

.factory-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.factory-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  opacity: 1;
  pointer-events: none;
}

.factory-hud {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(14px, 2.2vw, 32px) var(--gutter);
  color: var(--white);
}

.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hud-live,
.hud-step {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(8, 11, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
}

.hud-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hud-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4a3d;
  box-shadow: 0 0 8px #ff4a3d;
  animation: pulseDot 1.4s ease-in-out infinite;
}

.hero-headline {
  margin-top: auto;
  margin-bottom: clamp(18px, 3vw, 40px);
}

.hero-kicker {
  margin: 0 0 0.6rem 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.6rem, 6vw, 6.6rem);
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 6px 34px rgba(0, 0, 0, 0.7);
}

.hero-cta {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: clamp(16px, 2.4vw, 30px);
  padding: 0.85rem 1.3rem 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(242, 183, 5, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(242, 183, 5, 0.35);
}

.hero-cta.light {
  margin-top: 2rem;
}

.cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111;
  color: var(--accent);
  font-size: 0.95rem;
}

.hud-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

.hud-caption {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.hud-caption h3 {
  margin: 0;
  flex: none;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  text-transform: uppercase;
  color: var(--accent);
}

.hud-caption p {
  margin: 0;
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  color: rgba(255, 255, 255, 0.92);
}

.hud-caption.swap {
  animation: hudSwap 0.5s ease;
}

@keyframes hudSwap {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hud-progress {
  display: flex;
  gap: 6px;
}

.hud-progress span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  transition: background 0.4s ease;
}

.hud-progress span.on {
  background: var(--accent);
}

.hud-progress.done span {
  background: var(--green);
}

.factory-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-head);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #0e1216;
  transition: opacity 0.6s ease;
}

.factory-loading.gone {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Inleiding met de vijf deelvragen --- */

.intro {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 110px) var(--gutter) clamp(40px, 6vw, 80px);
}

.chapter-kicker {
  margin: 0 0 0.6rem 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  margin: 0;
  max-width: 42ch;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.45rem, 2.5vw, 2.3rem);
  line-height: 1.22;
  color: var(--white);
}

.lead .ref {
  font-family: var(--font-body);
  font-size: 0.45em;
}

.chapter-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: clamp(32px, 5vw, 56px);
}

.chapter-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
  padding: 1rem;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--white);
  border: 1px solid var(--line);
  background: #0f151a;
}

.chapter-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.3s ease, transform 0.6s ease;
}

.chapter-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 11, 14, 0.95) 10%, rgba(8, 11, 14, 0.1) 70%);
}

.chapter-card:hover img {
  opacity: 0.8;
  transform: scale(1.04);
}

.card-num,
.card-title {
  position: relative;
  z-index: 1;
}

.card-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
}

.card-title {
  margin-top: 0.3rem;
  padding-right: 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.card-go {
  position: absolute;
  z-index: 1;
  right: 1rem;
  bottom: 1rem;
  color: var(--accent);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.chapter-card:hover .card-go {
  transform: translateX(4px);
}

/* --- Cijferstrook --- */

.highlights {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 300px at 15% 0%, rgba(242, 183, 5, 0.08), transparent 70%),
    var(--bg-2);
}

.highlights-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--gutter);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.highlight {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--accent);
}

.hl-value {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 0.95;
  color: var(--white);
  white-space: nowrap;
}

.hl-unit {
  margin-left: 0.15em;
  font-size: 0.5em;
  color: var(--accent);
}

.hl-label {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted);
}

/* --- Hoofdstukken --- */

.chapter {
  position: relative;
  scroll-margin-top: var(--nav-h);
}

.chapter-banner {
  position: relative;
  min-height: clamp(340px, 62vh, 760px);
  overflow: hidden;
  background: #0e1216;
  display: flex;
  align-items: flex-end;
}

.banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  animation: slowZoom 24s ease-in-out infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.09); }
}

.chapter-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 15, 19, 0.75) 22%, rgba(11, 15, 19, 0) 55%),
    linear-gradient(90deg, rgba(11, 15, 19, 0.85) 0%, rgba(11, 15, 19, 0.35) 45%, rgba(11, 15, 19, 0) 70%);
}

.banner-text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 5rem var(--gutter) clamp(18px, 3vw, 36px);
}

.chapter-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(5rem, 13vw, 11rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px rgba(242, 183, 5, 0.85);
  margin-bottom: 0.6rem;
}

.banner-text h2 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.3rem, 5.2vw, 4.6rem);
  text-transform: uppercase;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.chapter-body {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) var(--gutter) clamp(64px, 9vw, 120px);
}

.prose p {
  margin: 0 0 1.15em 0;
  max-width: 68ch;
  font-size: 1.08rem;
  line-height: 1.75;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a,
.mb-legend a,
.hl-label a,
.lead a,
.conclusie-inner a.ref {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85em;
  vertical-align: 0.15em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.aside {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.stats-aside .stat-row {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.split + *,
.type-grid,
.stat-row,
.material-bar {
  margin-top: clamp(36px, 5vw, 64px);
}

.two-col {
  columns: 2;
  column-gap: clamp(28px, 4vw, 56px);
}

.two-col p {
  break-inside: avoid;
  max-width: none;
}

.figure {
  margin: 0;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

.figure figcaption {
  margin-top: 0.6rem;
  padding-left: 0.8rem;
  border-left: 2px solid var(--accent);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

/* kerncijfers */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-card {
  background: var(--bg);
  padding: 1.4rem 1rem;
  text-align: left;
}

.stat-value {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1;
  color: var(--accent);
}

.stat-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* carrosserievormen en motortypes */

.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.type-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.type-card {
  background: linear-gradient(180deg, #151d23, #11171c);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem 1.2rem 1.1rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.type-card:hover {
  border-color: rgba(242, 183, 5, 0.5);
  transform: translateY(-3px);
}

.body-type svg,
.engine-type svg {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
}

.body-type strong,
.engine-type strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.body-type span,
.engine-type span {
  display: block;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--muted);
}

.body-type .b { fill: #c8231b; }
.body-type .w { fill: #15191c; stroke: #55606a; stroke-width: 1.5; }
.body-type .h { fill: #9aa1a7; }
.body-type .g { stroke: #3a4650; stroke-width: 1; }
.engine-type .cyl { fill: #2a353e; stroke: #7c8b96; stroke-width: 1.2; }
.engine-type .pis { fill: #b9bec3; }
.engine-type .rod { stroke: #b9bec3; stroke-width: 3; stroke-linecap: round; }
.engine-type .crank { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.engine-type .crank-c { fill: var(--accent); }

/* opengewerkte auto */

.callout-wrap {
  position: relative;
}

.callout {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 5px rgba(242, 183, 5, 0.28), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.callout-legend {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0 0;
  border-top: 1px solid var(--line);
}

.callout-legend li {
  display: grid;
  grid-template-columns: 24px 7rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
}

.callout-legend strong {
  color: var(--white);
}

.callout-n {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-1px);
}

/* materiaalbalk */

.material-bar {
  display: flex;
  height: 54px;
  border-radius: 4px;
  overflow: hidden;
}

.mb-seg {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 1rem;
}

.mb-seg span {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mb-metal { background: linear-gradient(180deg, #b3bbc2, #818c95); color: #0b0f13; }
.mb-rubber { background: #4d565e; }
.mb-rest { background: #2f5d8a; color: #fff; }

.mb-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.2rem;
  margin: 0.8rem 0 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.mb-legend .sw {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  margin-right: -0.7rem;
  vertical-align: -1px;
}

/* processtappen */

.process-line {
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(40px, 5vw, 64px) 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  counter-reset: step;
}

.process-line li {
  position: relative;
  padding: 1.1rem 1rem 1.1rem 0;
  border-top: 3px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.process-line li::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 42%;
  height: 3px;
  background: var(--accent);
}

.tl-n {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
}

.process-line strong {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  text-transform: uppercase;
  color: var(--white);
}

.process-line li > span:last-child {
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--muted);
}

/* conclusie op een grote foto */

.chapter-conclusie {
  min-height: clamp(460px, 80vh, 900px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0e1216;
}

.chapter-conclusie::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 11, 14, 0.94) 0%, rgba(8, 11, 14, 0.8) 42%, rgba(8, 11, 14, 0.15) 75%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 15, 19, 0) 20%),
    linear-gradient(180deg, var(--bg) 0%, rgba(11, 15, 19, 0) 18%);
}

.conclusie-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
}

.conclusie-inner h2 {
  margin: 0 0 1.2rem 0;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  text-transform: uppercase;
}

.conclusie-inner > p:not(.chapter-kicker) {
  margin: 0;
  max-width: 58ch;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.75;
  color: #dbe3e9;
}

.conclusie-inner > p:not(.chapter-kicker)::before {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-bottom: 1.2rem;
  background: var(--green);
}

/* bronnen */

.bronnen-section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter) clamp(40px, 6vw, 80px);
  scroll-margin-top: var(--nav-h);
}

.bronnen-section h2 {
  margin: 0 0 2rem 0;
  font-size: clamp(2.4rem, 5vw, 4rem);
  text-transform: uppercase;
}

.bronlijst {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(24px, 4vw, 56px);
  counter-reset: bron;
}

.bronlijst li {
  counter-increment: bron;
  position: relative;
  padding: 0.9rem 0 0.9rem 2.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.bronlijst li::before {
  content: counter(bron, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.8rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
}

.bronlijst .tag {
  display: inline-block;
  margin-bottom: 0.15rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.bronlijst em {
  font-style: normal;
  font-weight: 600;
  color: var(--white);
}

.bronlijst a {
  color: var(--accent);
  word-break: break-word;
}

.bronlijst li:target {
  background: var(--accent-soft);
}

/* footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: #080b0e;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 64px) var(--gutter) 3rem;
}

.footer-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
}

.site-footer p {
  margin: 0 0 0.6rem 0;
}

.site-footer a {
  color: var(--accent);
}

/* knop naar boven, rondleiding */

.to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 30;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

body.touring .to-top {
  display: none;
}

.autoscroll-indicator {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transform: translate(-50%, 12px);
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  background: rgba(9, 12, 15, 0.95);
  border: 1px solid var(--line);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.autoscroll-indicator.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* aftelteller van de rondleiding */

.tour-panel {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem 0.6rem 0.6rem;
  border-radius: 8px;
  background: rgba(9, 12, 15, 0.94);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color: var(--white);
}

.tour-panel[hidden] {
  display: none;
}

.tour-ring {
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
}

.tour-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.tour-ring circle {
  fill: none;
  stroke-width: 4;
}

.tour-ring .track {
  stroke: #26313a;
}

.tour-ring .bar {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 138.2;
  stroke-dashoffset: 0;
}

.tour-ring span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
}

.tour-info strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tour-info span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- 2D-reserveanimatie (alleen als 3D niet kan) --- */

.fallback-anim {
  max-width: var(--wrap);
  margin: 2rem auto 0;
  padding: 1.5rem var(--gutter);
  text-align: center;
}

.fallback-anim[hidden] {
  display: none;
}

.fallback-anim h2 {
  font-size: 2.2rem;
  text-transform: uppercase;
}

.fallback-anim .section-head .icon {
  display: none;
}


/* --- Rustig inschuiven bij scrollen --- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.type-grid .reveal:nth-child(2),
.highlight-grid .reveal:nth-child(2),
.chapter-cards .reveal:nth-child(2) { transition-delay: 0.08s; }
.type-grid .reveal:nth-child(3),
.highlight-grid .reveal:nth-child(3),
.chapter-cards .reveal:nth-child(3) { transition-delay: 0.16s; }
.type-grid .reveal:nth-child(4),
.highlight-grid .reveal:nth-child(4),
.chapter-cards .reveal:nth-child(4) { transition-delay: 0.24s; }
.chapter-cards .reveal:nth-child(5) { transition-delay: 0.32s; }

.reveal.instant {
  transition: none !important;
}
/* --- Animation section --- */

.animation-section {
  text-align: center;
}

.animation-section p {
  text-align: left;
}

.car-stage {
  max-width: 600px;
  margin: 1.2rem auto 0.5rem auto;
  background: linear-gradient(180deg, #eef2f5 0%, #e4e9ed 100%);
  border-radius: 10px;
  padding: 0.75rem 0.75rem 1rem 0.75rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

#carSvg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

#carSvg .lane {
  stroke: #c7cdd2;
  stroke-width: 2;
  stroke-dasharray: 10 8;
  animation: laneMove 1.1s linear infinite;
}

@keyframes laneMove {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -18; }
}

#carSvg .shadow {
  fill: #000;
  opacity: 0.1;
}

/* glow ring behind the finished car */
.glow-ring {
  fill: var(--accent-light);
  filter: blur(11px);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.glow-ring.show {
  opacity: 0.32;
  animation: glowPulse 2.6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.24; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.06); }
}

/* robotarm */
.robot-arm {
  transform: translateY(-190px);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(.3, 1.1, .4, 1), opacity 0.3s ease;
}

.robot-arm .arm-pole,
.robot-arm .arm-bar {
  stroke: #55606a;
  stroke-width: 5;
  stroke-linecap: round;
}

.robot-arm .claw-left,
.robot-arm .claw-right {
  stroke: #3a4249;
  stroke-width: 4;
  stroke-linecap: round;
  transition: transform 0.25s ease;
  transform-box: fill-box;
}

.robot-arm .claw-left {
  transform-origin: 100% 0%;
}

.robot-arm .claw-right {
  transform-origin: 0% 0%;
}

.robot-arm.arm-in {
  transform: translateY(0);
  opacity: 1;
}

.robot-arm.arm-lower {
  transform: translateY(16px);
  opacity: 1;
}

.robot-arm.arm-grab .claw-left {
  transform: rotate(20deg);
}

.robot-arm.arm-grab .claw-right {
  transform: rotate(-20deg);
}

/* spark burst when the body is placed */
.spark line {
  stroke: #e8b93c;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  opacity: 0;
}

.spark.show line {
  animation: sparkFlash 0.55s ease-out forwards;
}

@keyframes sparkFlash {
  0% { opacity: 0; stroke-dashoffset: 20; }
  30% { opacity: 1; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}

.spark .impact-ring {
  fill: none;
  stroke: #e8b93c;
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.spark.show .impact-ring {
  animation: ringPulse 0.5s ease-out forwards;
}

@keyframes ringPulse {
  0% { opacity: 0.85; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(3.2); }
}

/* periodic shine sweep across the finished car, like a showroom highlight */
.shine-sweep {
  opacity: 0;
  transform: translateX(0);
  mix-blend-mode: screen;
}

#carSvg.done .shine-sweep {
  animation: shineMove 6s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes shineMove {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 0.9; }
  28% { transform: translateX(560px); opacity: 0; }
  100% { transform: translateX(560px); opacity: 0; }
}

/* finished badge */
.done-badge {
  transform: translateY(-12px) scale(0.6);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(.34, 1.4, .64, 1), opacity 0.4s ease;
}

.done-badge circle {
  fill: #2f8a5d;
}

.done-badge path {
  stroke: #fff;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.done-badge.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#part-chassis rect {
  fill: var(--steel-dark);
}

#part-engine rect {
  fill: #3a3a3a;
}
#part-engine line {
  stroke: #6b6b6b;
  stroke-width: 2;
}

#part-wheel-left circle,
#part-wheel-right circle {
  fill: #262626;
}
#part-wheel-left .hub,
#part-wheel-right .hub {
  fill: var(--steel);
}
.wheel .spokes line {
  stroke: #4a4a4a;
  stroke-width: 1.4;
}

#part-windows path {
  fill: #dbe7f0;
}

#part-body .door-seam {
  stroke: #1f3f5c;
  stroke-width: 1.2;
  opacity: 0.5;
}

#part-body .mirror {
  fill: #1f3f5c;
}

#part-body .headlight {
  fill: #f2d982;
}

#part-body .taillight {
  fill: #b4544f;
}

#part-body .bumper {
  fill: #6b7580;
}

/* start state: pieces hidden / offset, JS adds .in class to animate in */
#part-chassis,
#part-engine,
#part-wheel-left,
#part-wheel-right,
#part-body,
#part-windows {
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(.34, 1.45, .64, 1);
}

#part-chassis {
  transform: translateY(24px);
}
#part-engine {
  transform: translateY(-20px);
}
#part-wheel-left {
  transform: translate(-60px, -14px) rotate(-120deg);
  transform-origin: 192px 160px;
}
#part-wheel-right {
  transform: translate(60px, -14px) rotate(120deg);
  transform-origin: 308px 160px;
}
#part-body {
  transform: translateY(-18px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.3, 1.2, .4, 1);
}
#part-windows {
  transform: translateY(-8px);
}

#carSvg.play #part-chassis.in,
#carSvg.play #part-engine.in,
#carSvg.play #part-body.in,
#carSvg.play #part-windows.in {
  opacity: 1;
  transform: translate(0, 0);
}

#carSvg.play #part-wheel-left.in,
#carSvg.play #part-wheel-right.in {
  opacity: 1;
  transform: translate(0, 0) rotate(0deg);
}

#carSvg.done .wheel {
  animation: roll 1.8s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes roll {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* status text + progress dots below the stage */
.build-status {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-label {
  margin: 0;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-dark);
  min-height: 1.3em;
}

.progress-dots {
  display: flex;
  gap: 0.4rem;
}

.progress-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d5dbe0;
  transition: background 0.3s ease, transform 0.3s ease;
}

.progress-dots .dot.dot-active {
  background: var(--accent);
  transform: scale(1.15);
}

.replay-btn {
  margin-top: 0.7rem;
  padding: 0.6rem 1.3rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.15s ease, transform 0.1s ease;
}

.replay-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.replay-btn:hover {
  background: var(--accent-dark);
}

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


.step-label {
  color: var(--white);
}

/* --- Groot scherm / beamer --- */

@media (min-width: 1500px) {
  body {
    font-size: 19px;
  }
  :root {
    --wrap: 1320px;
  }
  .prose p {
    font-size: 1.12rem;
  }
}

/* --- Tablet --- */

@media (max-width: 1000px) {
  .brand {
    display: none;
  }
  .chapter-banner .banner-img {
    object-position: 72% center;
  }
  .site-nav ul {
    margin-left: 0;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .aside {
    position: static;
  }
  .split .aside {
    order: -1;
  }
  .highlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-headline {
    max-width: none;
  }
  .chapter-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-line {
    grid-template-columns: 1fr;
  }
  .process-line li {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.8rem;
    padding: 0.9rem 0;
  }
  .process-line li > span:last-child {
    flex-basis: 100%;
  }
  .bronlijst {
    grid-template-columns: 1fr;
  }
}

/* --- Telefoon --- */

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  .factory-stage {
    height: 75vw;
    max-height: none;
  }
  .hud-caption h3 {
    font-size: 1.6rem;
  }
  .hud-caption p {
    font-size: 0.9rem;
  }
  .hud-live,
  .hud-step {
    font-size: 0.75rem;
  }
  .chapter-cards {
    grid-template-columns: 1fr;
  }
  .chapter-card {
    min-height: 130px;
  }
  .type-grid.three,
  .stat-row {
    grid-template-columns: 1fr;
  }
  .hud-caption {
    flex-direction: column;
    gap: 0.1rem;
  }
  .hero-cta {
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
  }
  .highlight-grid {
    grid-template-columns: 1fr;
  }
  .mb-seg span {
    display: none;
  }
  .callout {
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    font-size: 0.8rem;
  }
  .callout-legend strong {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .glow-ring.show,
  #carSvg.done .wheel,
  #carSvg .lane,
  #carSvg.done .shine-sweep,
  .spark.show .impact-ring,
  .pulse-dot,
  .hud-live-dot,
  .banner-img {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
