:root {
  --nacht: #0e1016;
  --alu: #e6e8eb;
  --tinte: #141a33;
  --blau: #1522b8;
  --rot: #d9342f;
  --rot-dunkel: #b92a26;
  --led: #f1f5ff;
  --linie: rgba(20, 26, 51, 0.16);
  --linie-hell: rgba(241, 245, 255, 0.22);
  --leise: rgba(20, 26, 51, 0.7);
  --leise-hell: rgba(241, 245, 255, 0.76);
  --expo: cubic-bezier(0.19, 1, 0.22, 1);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --rand: 20px;
  --luft: 80px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
html.lenis { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--alu);
  color: var(--tinte);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--rot); outline-offset: 3px; }

.innen { max-width: 1280px; margin: 0 auto; padding: 0 var(--rand); }

h1, h2, h3 {
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
h2 { font-size: clamp(48px, 13vw, 72px); }

/* Knöpfe */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 4px;
  background: var(--rot);
  color: #fff8f6;
  font: 500 17px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out, transform 150ms ease-out;
}
.knopf:hover { background: var(--rot-dunkel); }
.knopf:active { transform: scale(0.98); }
.knopf--klein { min-height: 40px; padding: 0 16px; font-size: 15px; }
.knopf--tinte { background: var(--tinte); color: var(--led); }
.knopf--tinte:hover { background: #232b52; }
.knopf--hell { background: var(--led); color: var(--tinte); }
.knopf--hell:hover { background: #fff; }

/* Kopfzeile */
.kopf {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: var(--led);
  border-bottom: 1px solid transparent;
  transition: background-color 250ms ease-out, color 250ms ease-out, border-color 250ms ease-out;
}
.kopf.ist-fest {
  background: rgba(230, 232, 235, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--tinte);
  border-bottom-color: var(--linie);
}
.kopf__innen {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--rand);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.marke {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-right: auto;
  font-weight: 600;
  font-stretch: 108%;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.marke img { width: 40px; height: 32px; }
.kopf__nav { display: none; gap: 24px; font-size: 15px; }
.kopf__nav a { text-decoration: none; opacity: 0.82; transition: opacity 150ms ease-out; }
.kopf__nav a:hover { opacity: 1; }

/* Einstieg */
.einstieg {
  position: relative;
  min-height: 100svh;
  background: var(--nacht);
  color: var(--led);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.einstieg__bild { position: absolute; inset: 0 0 26% 0; overflow: hidden; }
.einstieg__bild img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: 46% 60%;
  will-change: transform;
}
.einstieg__bild::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(14, 16, 22, 0.78) 0, rgba(14, 16, 22, 0.35) 34%, rgba(14, 16, 22, 0) 52%, rgba(14, 16, 22, 0) 68%, var(--nacht) 100%);
  pointer-events: none;
}
/* Das Tor, das beim Laden zur Seite fährt */
.tor {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(var(--led), var(--led)) top / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, #1b1e28 0 26px, #0a0b10 26px 32px);
  box-shadow: inset 0 14px 28px -14px rgba(241, 245, 255, 0.55);
  animation: tor-auf 1900ms var(--expo) 400ms both;
}
@keyframes tor-auf { to { transform: translateX(101%); } }

h1 {
  position: absolute;
  z-index: 3;
  top: 88px;
  left: var(--rand);
  right: var(--rand);
  will-change: transform;
}
.zeile { display: block; overflow: hidden; padding-bottom: 0.1em; }
.zeile > span { display: block; animation: zeile-hoch 1200ms var(--expo) 250ms both; }
.zeile--gross { font-size: 13.9vw; text-shadow: 0 0 40px rgba(14, 16, 22, 0.5); }
.zeile--klein { font-size: 6.4vw; font-weight: 400; letter-spacing: -0.02em; margin-top: 0.1em; color: var(--leise-hell); }
.zeile--klein > span { animation-delay: 360ms; }
@keyframes zeile-hoch { from { transform: translateY(110%); } }

.einstieg__text {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 0 var(--rand) 40px;
}
.einstieg__text p { max-width: 34em; color: var(--leise-hell); }
.fakten {
  display: flex;
  width: 100%;
  border-top: 1px solid var(--linie-hell);
  font: 400 13px/1 var(--mono);
  color: rgba(241, 245, 255, 0.7);
}
.fakten li { flex: 1; padding: 16px 0 0 12px; border-left: 1px solid var(--linie-hell); }
.fakten li:first-child { padding-left: 0; border-left: 0; }

/* Anlagen: ohne JS untereinander, mit JS fährt die Bahn quer */
.quer { padding: var(--luft) 0; }
.quer__kopf { padding: 0 var(--rand); display: grid; gap: 16px; margin-bottom: 40px; }
.quer__kopf p { max-width: 30em; color: var(--leise); }
.quer__bahn { display: grid; gap: 64px; }
.tafel { position: relative; padding: 0 var(--rand); }
.tafel__bild { overflow: hidden; border-radius: 4px; }
.tafel__bild img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.tafel h3 {
  position: relative;
  z-index: 1;
  margin-top: -0.3em;
  font-size: 14.2vw;
  color: var(--tinte);
  text-shadow: 0 0 1px var(--alu);
}
.tafel__text { display: grid; gap: 8px; margin-top: 16px; }
.tafel__text p { max-width: 32em; color: var(--leise); }
.mass { font: 500 13px/1.4 var(--mono); color: var(--rot); }
.quer__schiene { display: none; }

.quer--an { padding: 0; height: calc(100svh + 3 * max(64vw, 420px)); }
.quer--an .quer__fest {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 72px;
}
.quer--an .quer__kopf { margin-bottom: 24px; }
.quer--an .quer__kopf p { display: none; }
.quer--an .quer__bahn { display: flex; gap: 0; will-change: transform; }
.quer--an .tafel { flex: 0 0 100vw; }
.quer--an .tafel__bild img { max-height: 38svh; width: 100%; }
.quer--an .quer__schiene {
  display: block;
  position: absolute;
  left: var(--rand);
  right: var(--rand);
  bottom: 24px;
  height: 20px;
  border-bottom: 2px solid var(--tinte);
}
.quer__tor {
  width: 25%;
  height: 100%;
  border-top: 2px solid var(--tinte);
  border-right: 8px solid var(--rot);
  background: repeating-linear-gradient(90deg, var(--tinte) 0 3px, transparent 3px 10px);
  will-change: transform;
}

/* Abschnitte */
.abschnitt { padding: var(--luft) 0; position: relative; }
.abschnitt--blau { background: var(--blau); color: var(--led); }
.abschnitt--nacht { background: var(--nacht); color: var(--led); }
.abschnitt--rot { background: var(--rot); color: #fff8f6; }
.titelreihe { display: grid; gap: 16px; margin-bottom: 40px; }
.titelreihe p, .lauf { max-width: 34em; color: var(--leise); }
.abschnitt--blau .titelreihe p { color: var(--leise-hell); }

/* Bilder öffnen sich von unten */
.js .auf { clip-path: inset(100% 0 0 0); transition: clip-path 1000ms var(--expo); }
.js .auf img { transform: scale(1.15); transition: transform 1400ms var(--expo); }
.js .auf.ist-da { clip-path: inset(0 0 0 0); }
.js .auf.ist-da img { transform: scale(1); }

/* Foto mit rotem Rand in der Datei: leicht vergrössert, damit der Rand wegfällt */
.rand img { scale: 1.04; }

/* Eigene Antriebe */
.wahl { display: grid; gap: 40px; }
.wahl__foto { overflow: hidden; }
.wahl__foto img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.wahl__foto figcaption { margin-top: 8px; font-size: 14px; color: var(--leise-hell); max-width: 38em; }
.wahl__regler { display: grid; gap: 24px; align-content: start; }

.regler__kopf { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.regler__kopf label { font-size: 17px; font-weight: 500; }
.regler__kopf output { font: 500 40px/1 var(--mono); letter-spacing: -0.04em; }
.schiene {
  position: relative;
  height: 88px;
  border-bottom: 3px solid var(--led);
  background: repeating-linear-gradient(90deg, transparent 0 39px, var(--linie-hell) 39px 40px);
}
.schiene__tor {
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 25%;
  min-width: 28px;
  border-top: 3px solid var(--led);
  border-right: 16px solid var(--rot);
  background: repeating-linear-gradient(90deg, var(--led) 0 4px, transparent 4px 14px);
  box-shadow: 0 -10px 24px -8px rgba(241, 245, 255, 0.5);
  pointer-events: none;
}
.schiene input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.schiene:has(input:focus-visible) { outline: 2px solid var(--led); outline-offset: 4px; }
.schiene__skala {
  display: grid;
  grid-template-columns: 40fr 30fr 30fr 0fr;
  margin-top: 8px;
  font: 400 12px/1 var(--mono);
  color: var(--leise-hell);
  white-space: nowrap;
}
.schiene__skala span:nth-child(2), .schiene__skala span:nth-child(3) { transform: translateX(-50%); justify-self: start; }
.schiene__skala span:last-child { justify-self: end; }

.ergebnis { border-top: 1px solid var(--linie-hell); padding-top: 24px; }
.ergebnis__name { font-size: clamp(36px, 10vw, 64px); font-weight: 500; font-stretch: 112%; letter-spacing: -0.035em; line-height: 1; }
.ergebnis__satz { margin-top: 8px; color: var(--leise-hell); }
.daten { margin-top: 16px; font: 400 14px/1.4 var(--mono); }
.daten div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--linie-hell); }
.daten dt { color: var(--leise-hell); }
.daten dd { text-align: right; }
.ergebnis__zusatz { margin-top: 16px; font-size: 15px; color: var(--leise-hell); }
.ergebnis__zusatz:empty { display: none; }
.wahl__regler .knopf { justify-self: start; }
.klein { font-size: 14px; color: var(--leise-hell); }

/* Referenzen */
.referenzen { padding-bottom: var(--luft); }
.banner { position: relative; height: 72svh; min-height: 420px; overflow: hidden; display: flex; align-items: flex-end; margin-bottom: 40px; }
.banner img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; object-position: 50% 70%; will-change: transform; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(14, 16, 22, 0) 30%, rgba(14, 16, 22, 0.55) 70%, var(--nacht) 100%); }
.banner figcaption { position: relative; z-index: 1; width: 100%; padding-bottom: 24px; display: grid; gap: 16px; }
.banner h2 { font-size: 15.4vw; }
.banner p { color: var(--leise-hell); }
.galerie {
  display: flex;
  gap: 16px;
  margin: 0 calc(var(--rand) * -1);
  padding: 0 var(--rand);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--rand);
  scrollbar-width: none;
}
.galerie::-webkit-scrollbar { display: none; }
.galerie li { flex: 0 0 82%; scroll-snap-align: start; }
.galerie img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.galerie span { display: block; margin-top: 8px; font: 400 13px/1.4 var(--mono); color: rgba(241, 245, 255, 0.7); }

/* Betrieb */
.betrieb { display: grid; gap: 40px; }
.betrieb h2 { margin-bottom: 16px; }
.leute { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.leute img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: 4px; }
.leute figcaption { margin-top: 8px; font-size: 14px; color: rgba(20, 26, 51, 0.6); }
.leute strong { display: block; font-size: 17px; font-weight: 500; color: var(--tinte); }
.jahre { border-top: 1px solid var(--linie); }
.jahre li { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--linie); }
.jahre time { font: 500 24px/1.2 var(--mono); letter-spacing: -0.04em; }
.jahre p { font-size: 16px; color: rgba(20, 26, 51, 0.8); }

/* Anfrage */
.anfrage__raster { display: grid; gap: 40px; }
.anfrage h2 { font-size: 21vw; margin-bottom: 24px; margin-left: -0.04em; }
.anfrage .lauf { color: rgba(255, 248, 246, 0.86); }
.kontakt { margin-top: 40px; border-top: 1px solid rgba(255, 248, 246, 0.4); }
.kontakt div { display: grid; grid-template-columns: 136px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255, 248, 246, 0.4); }
.kontakt dt { font: 400 13px/1.9 var(--mono); color: rgba(255, 248, 246, 0.8); }
.kontakt a { display: inline-block; padding: 8px 0; margin: -8px 0; text-underline-offset: 3px; }
.platzhalter { color: rgba(255, 248, 246, 0.8); }
.formular { display: grid; gap: 16px; align-content: start; }
.feld { display: grid; gap: 8px; }
.feld label { font-size: 15px; font-weight: 500; }
.feld input, .feld select, .feld textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #fff8f6;
  color: var(--tinte);
  font: 400 17px/1.4 var(--sans);
}
.feld textarea { resize: vertical; }
.feld input:focus, .feld select:focus, .feld textarea:focus { outline: 3px solid var(--tinte); outline-offset: 0; }
.formular .knopf { justify-self: start; margin-top: 8px; }

/* Fuss */
.fuss { background: var(--nacht); color: rgba(241, 245, 255, 0.7); padding: 64px 0 40px; font-size: 15px; overflow: hidden; }
.fuss__name {
  padding: 0 var(--rand);
  font-size: 10.9vw;
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
  color: var(--led);
  margin-bottom: 40px;
}
.fuss__innen { display: grid; gap: 8px; }
.entwurf { font: 400 13px/1.4 var(--mono); }

/* Computer */
@media (min-width: 900px) {
  :root { --rand: 40px; --luft: 136px; }
  h2 { font-size: clamp(72px, 7vw, 104px); }
  .kopf__nav { display: flex; }
  .kopf__innen { height: 72px; }

  .einstieg { min-height: max(100svh, 680px); }
  .einstieg__bild { inset: 0; }
  .einstieg__bild img { object-position: 50% 50%; }
  .einstieg__bild::after {
    background: linear-gradient(to bottom, rgba(14, 16, 22, 0.82) 0, rgba(14, 16, 22, 0.3) 34%, rgba(14, 16, 22, 0) 46%, rgba(14, 16, 22, 0) 58%, rgba(14, 16, 22, 0.9) 84%, var(--nacht) 100%);
  }
  h1 { top: 88px; left: 0; right: 0; max-width: 1280px; margin: 0 auto; padding: 0 var(--rand); display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; }
  .zeile--gross { font-size: min(13.6vw, 196px); }
  .zeile--klein { font-size: 28px; }
  .einstieg__text {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    padding-bottom: 40px;
  }
  .einstieg__text p { flex: 1 1 0; max-width: 30em; }
  .fakten { width: auto; flex: 0 0 400px; border-top: 0; }
  .fakten li { padding: 8px 0 8px 16px; }
  .fakten li:first-child { padding-left: 16px; border-left: 1px solid var(--linie-hell); }

  .quer__kopf { max-width: 1280px; width: 100%; margin-left: auto; margin-right: auto; }
  .tafel { display: grid; grid-template-columns: 58fr 42fr; column-gap: 64px; align-items: end; padding: 0 max(var(--rand), calc((100vw - 1200px) / 2)); }
  .tafel__bild { grid-row: 1 / span 2; }
  .tafel h3 { margin: 0 0 24px -0.9em; font-size: min(8.6vw, 128px); align-self: end; white-space: nowrap; }
  .tafel__text { margin: 0; align-self: start; padding-bottom: 8px; }
  .quer--an .tafel__bild img { max-height: 58svh; }
  .quer--an .quer__schiene { left: max(var(--rand), calc((100vw - 1200px) / 2)); right: max(var(--rand), calc((100vw - 1200px) / 2)); bottom: 40px; }

  .titelreihe { grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; margin-bottom: 64px; }
  .wahl { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
  .schiene { height: 104px; }
  .regler__kopf output { font-size: 56px; }

  .banner { height: 88svh; margin-bottom: 64px; }
  .banner h2 { font-size: min(14vw, 208px); }
  .banner figcaption { grid-template-columns: 1fr auto; align-items: end; padding-bottom: 40px; }
  .galerie { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0; padding: 0; overflow: visible; }
  .galerie li { flex: none; }
  .galerie li:nth-child(4n + 2), .galerie li:nth-child(4n + 4) { margin-top: 64px; }

  .betrieb { grid-template-columns: 1fr 1fr; gap: 104px; align-items: start; }
  .jahre li { grid-template-columns: 120px 1fr; padding: 24px 0; }
  .jahre time { font-size: 32px; }
  .jahre p { font-size: 17px; }

  .anfrage__raster { grid-template-columns: 1fr 1fr; gap: 104px; align-items: end; }
  .anfrage h2 { font-size: min(13vw, 190px); }

  .fuss__name { font-size: min(10.6vw, 152px); max-width: 1280px; margin-left: auto; margin-right: auto; }
  .fuss__innen { grid-template-columns: 1fr auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tor { display: none; }
  .zeile > span { animation: none; }
  .kopf, .knopf { transition: none; }
}
