/* ==========================================================================
   TT Rail Tech – Stylesheet
   Layout-Konzept: Die Seite ist ein Gleisplan. Eine Fahrt über das Gleis im
   Hero (Canvas), eine Weiche, die in die zwei Leistungsbereiche führt, eine
   Fallblattanzeige für Referenzen, ein Streckenplan als Navigation.
   Ruhige Stahlgrau-Flächen, Beschilderungsschrift, ein Signalton (Orange).
   ========================================================================== */

:root {
  --bg: #eef0f2;
  --surface: #ffffff;
  --surface-2: #e4e8eb;
  --ink: #0f1419;
  --ink-2: #4a5560;
  --ink-3: #7b8792;
  --line: #cfd6dc;
  --line-2: #aeb8c1;

  --accent: #ff5a00;
  --accent-deep: #c24500;
  --accent-soft: rgba(255, 90, 0, 0.12);
  --on-accent: #0c1115;
  --focus: #ff8a3d;

  --night: #0c1115;
  --night-2: #131a20;
  --night-3: #1b242c;
  --night-ink: #f2f4f6;
  --night-ink-2: #aeb8c2;
  --night-ink-3: #7f8b96;
  --night-line: #26323c;
  --steel: #8e9aa6;

  --shadow: 0 1px 2px rgba(15, 20, 25, 0.06), 0 12px 32px -16px rgba(15, 20, 25, 0.25);

  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;

  --radius: 4px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1115;
    --surface: #141b21;
    --surface-2: #1a232b;
    --ink: #f2f4f6;
    --ink-2: #aeb8c2;
    --ink-3: #7f8b96;
    --line: #26323c;
    --line-2: #334250;
    --accent: #ff6a1a;
    --accent-deep: #ff8a47;
    --accent-soft: rgba(255, 106, 26, 0.16);
    --on-accent: #0c1115;
    --night: #070a0c;
    --night-2: #0d1317;
    --night-3: #141b21;
    --night-ink: #f2f4f6;
    --night-ink-2: #aeb8c2;
    --night-ink-3: #7f8b96;
    --night-line: #1f2a33;
    --steel: #6f7c88;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0c1115;
  --surface: #141b21;
  --surface-2: #1a232b;
  --ink: #f2f4f6;
  --ink-2: #aeb8c2;
  --ink-3: #7f8b96;
  --line: #26323c;
  --line-2: #334250;
  --accent: #ff6a1a;
  --accent-deep: #ff8a47;
  --accent-soft: rgba(255, 106, 26, 0.16);
  --on-accent: #0c1115;
  --night: #070a0c;
  --night-2: #0d1317;
  --night-3: #141b21;
  --night-ink: #f2f4f6;
  --night-ink-2: #aeb8c2;
  --night-ink-3: #7f8b96;
  --night-line: #1f2a33;
  --steel: #6f7c88;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Basis
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-hyphens: auto;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.05;
  text-wrap: balance;
  -webkit-hyphens: manual;
  hyphens: manual;
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 120px); }

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  -webkit-hyphens: manual;
  hyphens: manual;
}
.eyebrow::before { content: ""; flex: none; width: 28px; height: 2px; background: var(--accent); }
.js [data-reveal] .eyebrow::before, .js .eyebrow[data-reveal]::before { transform: scaleX(0); transform-origin: left center; transition: transform 0.9s var(--ease) 0.25s; }
.js [data-reveal].in .eyebrow::before, .js .eyebrow[data-reveal].in::before { transform: scaleX(1); }

.h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.75rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.005em;
}

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-2);
  max-width: 62ch;
}

.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .h2 { margin-top: 6px; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: end; gap: 40px; }
  .section-head .lead { padding-bottom: 6px; }
}

.rails { position: relative; height: 8px; border-top: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); clip-path: inset(0); }
/* Durchfahrt: ein Lichtstreifen läuft einmal über die Schienen, wenn der Trenner ins Bild kommt */
.rails::after {
  content: "";
  position: absolute; left: 0; top: -2px;
  width: 220px; height: calc(100% + 4px);
  background: linear-gradient(90deg, rgba(255, 90, 0, 0), var(--accent) 55%, rgba(255, 90, 0, 0));
  -webkit-mask: linear-gradient(to bottom, #000 0 2px, transparent 2px calc(100% - 2px), #000 calc(100% - 2px));
  mask: linear-gradient(to bottom, #000 0 2px, transparent 2px calc(100% - 2px), #000 calc(100% - 2px));
  opacity: 0;
  transform: translateX(-240px);
}
.rails.in::after { animation: durchfahrt 1.5s cubic-bezier(0.3, 0, 0.3, 1) 1 both; }
@keyframes durchfahrt {
  0% { transform: translateX(-240px); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(140vw); opacity: 0; }
}

.night { background: var(--night); color: var(--night-ink); }
.night .eyebrow { color: var(--night-ink-2); }
.night .lead { color: var(--night-ink-2); }
.night .rails { border-color: var(--night-line); }

/* Sichtbar-werden beim Scrollen (nur mit Skript, sonst alles sofort da) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  -webkit-hyphens: manual;
  hyphens: manual;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn .arrow { width: 16px; height: 16px; flex: none; transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 12px 30px -10px color-mix(in srgb, var(--accent) 75%, transparent);
}

.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { color: var(--accent-deep); }
.night .btn-ghost:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Kopfzeile
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  color: var(--night-ink);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.header.is-solid {
  background: rgba(12, 17, 21, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--night-line);
}
:root[data-theme="dark"] .header.is-solid { background: rgba(7, 10, 12, 0.94); }

.header > .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.brand .mark { width: 36px; height: 36px; flex: none; }
.brand b { color: var(--accent); font-weight: 700; }

.nav { display: none; align-items: center; gap: 28px; }
.nav a { font-size: 15px; font-weight: 500; color: var(--night-ink-2); text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--night-ink); }

.header .btn-primary { display: none; }

.menu-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  cursor: pointer;
}
.menu-btn span { display: block; height: 2px; background: var(--night-ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { display: none; background: var(--night); border-top: 1px solid var(--night-line); }
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--night-line);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--night-ink);
}
.mobile-nav a.is-accent { color: var(--accent); }

@media (min-width: 960px) {
  .nav { display: flex; }
  .header .btn-primary { display: inline-flex; padding: 11px 18px; }
  .menu-btn { display: none; }
  .mobile-nav { display: none !important; }
}

/* --------------------------------------------------------------------------
   Streckenplan-Navigation (Desktop) und Fortschrittsgleis (Mobil)
   -------------------------------------------------------------------------- */

.strecke {
  display: none;
  position: fixed;
  left: 22px;
  top: 50%;
  width: 16px;
  height: min(58vh, 520px);
  transform: translateY(-50%);
  z-index: 40;
}
@media (min-width: 1280px) { .strecke { display: block; } }
.strecke::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, var(--line-2) 0 2px, transparent 2px 14px);
  opacity: 0.6;
}
.strecke::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 4px; right: 4px;
  border-left: 2px solid var(--line-2);
  border-right: 2px solid var(--line-2);
}
.strecke ol { position: absolute; inset: 0; z-index: 1; }
.strecke li { position: absolute; left: 0; width: 16px; height: 0; }
.strecke a {
  position: absolute;
  left: 50%;
  top: 0;
  display: block;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--line-2);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.strecke a:hover { border-color: var(--ink-3); }
.strecke a.is-active { border-color: var(--accent); background: var(--accent); }
.strecke .lbl {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.strecke a:hover .lbl, .strecke a:focus-visible .lbl { opacity: 1; }
.strecke a.is-active .lbl { opacity: 1; color: var(--accent-deep); }
.strecke-marker {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  width: 12px;
  height: 30px;
  margin: -15px 0 0 -6px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: top 0.12s linear;
  pointer-events: none;
}
.strecke-marker::before, .strecke-marker::after {
  content: "";
  position: absolute;
  left: 3px; right: 3px;
  height: 2px;
  background: var(--on-accent);
  opacity: 0.55;
}
.strecke-marker::before { top: 6px; }
.strecke-marker::after { bottom: 6px; }

.strecke-bar {
  position: fixed;
  left: 0;
  top: env(safe-area-inset-top, 0px);
  z-index: 60;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
}
@media (min-width: 1280px) { .strecke-bar { display: none; } }

/* --------------------------------------------------------------------------
   Hero: Fahrt über das Gleis
   -------------------------------------------------------------------------- */

.hero {
  margin-top: calc(-1 * var(--header-h));
  background: var(--night);
  color: var(--night-ink);
}

.hero-top { position: relative; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; }
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, var(--night) 0%, color-mix(in srgb, var(--night) 72%, transparent) 46%, transparent 76%);
}
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero-top > .wrap {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 112px));
  padding-bottom: clamp(40px, 6vw, 96px);
}
.hero-space { height: 210px; }

.hero-grid { display: grid; gap: 40px; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .hero-space { display: none; }
  .hero-shade {
    background:
      linear-gradient(90deg, var(--night) 0%, color-mix(in srgb, var(--night) 86%, transparent) 34%, transparent 62%),
      linear-gradient(180deg, color-mix(in srgb, var(--night) 55%, transparent) 0%, transparent 28%);
  }
}

.hero .eyebrow { color: var(--night-ink-2); }
.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.6rem, 7.4vw, 6.4rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero h1 .accent { color: var(--accent); }
.hero .sub { margin-top: 26px; max-width: 58ch; font-size: clamp(1.05rem, 1.35vw, 1.25rem); color: var(--night-ink-2); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Einfahrt: Textzeilen fahren nacheinander ein, das Gleis blendet auf */
.js .hero-copy > * { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 100ms); }
.js .hero-canvas { animation: fadein 1.8s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* Kennzahlenleiste */
.stats { position: relative; z-index: 2; border-top: 1px solid var(--night-line); background: var(--night-2); }
.stats > .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { padding: 22px 16px 22px 0; min-width: 0; }
.stat:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--night-line); }
.stat:nth-child(n + 3) { border-top: 1px solid var(--night-line); }
.stat .v {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--night-ink);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  -webkit-hyphens: manual;
  hyphens: manual;
}
.stat .k { margin-top: 8px; font-size: 14px; color: var(--night-ink-2); }
@media (min-width: 900px) {
  .stats > .wrap { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat { padding: 26px 24px 26px 0; }
  .stat:nth-child(n + 3) { border-top: 0; }
  .stat:nth-child(even) { padding-left: 24px; }
  .stat:nth-child(3) { padding-left: 24px; border-left: 1px solid var(--night-line); }
}

/* --------------------------------------------------------------------------
   Fallblattanzeige
   -------------------------------------------------------------------------- */

.tiles { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: baseline; }
.tiles.nowrap { flex-wrap: nowrap; }
.word { display: inline-flex; gap: 3px; white-space: nowrap; }
.tile {
  position: relative;
  display: inline-block;
  min-width: 0.76em;
  padding: 0.08em 0.06em;
  line-height: 1.1;
  text-align: center;
  border-radius: 2px;
  background: var(--night);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: var(--night-ink);
  font-variant-numeric: tabular-nums;
}
.tile::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.6); }
.tile-space { background: transparent; }
.tile-space::after { display: none; }
.tile.is-flipping { animation: flip 0.1s linear infinite; }
@keyframes flip { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.5); } }

.tiles-plain .tile { min-width: 0; padding: 0; background: transparent; color: inherit; }
.tiles-plain .tile::after { display: none; }
.tiles-plain { gap: 0; }
.tiles-plain .word { gap: 0; }
.tiles-plain .tile-space { min-width: 0.3em; }

.eyebrow .tiles { gap: 2px; }
.eyebrow .tile { min-width: 0.9em; padding: 0.22em 0.1em; background: var(--night-3); color: var(--accent); }

/* --------------------------------------------------------------------------
   Leistungen mit Weiche
   -------------------------------------------------------------------------- */

.weiche-wrap { display: none; }
@media (min-width: 900px) {
  .weiche-wrap { display: block; margin: -24px 0 4px; }
  .weiche { display: block; width: 100%; height: 150px; overflow: visible; }
}
.weiche .w-sleepers line { stroke: var(--line-2); stroke-width: 4; stroke-linecap: round; opacity: 0.55; }
.weiche .rail { fill: none; stroke: var(--line-2); stroke-width: 2.5; transition: stroke 0.35s ease; }
.weiche .rail.stem { stroke: var(--accent-deep); }
.weiche.is-l .rail.l, .weiche.is-r .rail.r { stroke: var(--accent-deep); stroke-dasharray: 9 7; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.weiche .w-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; fill: var(--ink-3); }

.services { display: grid; gap: 24px; }
@media (min-width: 900px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.service {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: clamp(24px, 3vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.service:hover { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft); }
.service .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.service .icon { width: 48px; height: 48px; flex: none; color: var(--accent-deep); }
.tag {
  display: inline-block;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  white-space: nowrap;
}
.service h3 { font-size: clamp(1.7rem, 2.4vw, 2.3rem); font-weight: 700; text-transform: uppercase; }
.service > p { color: var(--ink-2); }

.checks { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.checks li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: start; font-weight: 500; }
.checks li::before { content: ""; width: 12px; height: 12px; margin-top: 8px; background: var(--accent); transition: transform 0.2s ease; }
.service:hover .checks li::before { transform: scaleX(1.35); }

.service .note { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   Partner
   -------------------------------------------------------------------------- */

.fields {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 700px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 28px 24px;
  background: var(--surface);
  transition: background-color 0.25s ease, opacity 0.85s var(--ease), transform 0.85s var(--ease);
  overflow: hidden;
}
.field::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease);
}
.field:hover { background: var(--surface-2); }
.field:hover::after { transform: scaleX(1); }
.field .mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-deep); }
.field h3 { font-size: 1.5rem; font-weight: 600; text-transform: uppercase; }
.field p { font-size: 15.5px; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Referenzen: Anzeigetafel
   -------------------------------------------------------------------------- */

.board { border: 1px solid var(--night-line); border-radius: var(--radius); background: var(--night-2); overflow: hidden; }
.board-head, .board-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 24px;
  padding: 16px 20px;
  border-top: 1px solid var(--night-line);
  min-width: 0;
}
.board-head {
  display: none;
  border-top: 0;
  padding-block: 12px;
  background: var(--night-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--night-ink-3);
}
.board-row { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; transition: background-color 0.2s ease; }
.board-row:hover { background: color-mix(in srgb, var(--night-3) 60%, transparent); }
.board-row .cell { min-width: 0; }
.board-row .ort { font-size: 15px; font-weight: 500; }
.board-row .region, .board-row .leistung { color: var(--night-ink-2); }
.board-row .region .tile, .board-row .leistung .tile { color: var(--night-ink-2); }
.board-row.is-base .ort .tile { background: var(--accent); color: var(--on-accent); }
.board-row.is-base .ort .tile::after { background: rgba(0, 0, 0, 0.25); }
@media (min-width: 900px) {
  .board-head { display: grid; }
  .board-head, .board-row { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.5fr) minmax(0, 1.9fr); align-items: center; }
}

.ref-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: clamp(32px, 4vw, 48px); padding-top: 24px; border-top: 1px solid var(--night-line); color: var(--night-ink-2); }

/* --------------------------------------------------------------------------
   Über
   -------------------------------------------------------------------------- */

.about { display: grid; gap: 40px; }
@media (min-width: 960px) { .about { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; } }

.portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 420px;
  padding: 32px 32px 44px;
  overflow: hidden;
  background: var(--night);
  color: var(--night-ink);
  border-radius: var(--radius);
}
.portrait img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12, 17, 21, 0.2) 0%, rgba(12, 17, 21, 0) 35%, rgba(12, 17, 21, 0.82) 78%, rgba(12, 17, 21, 0.96) 100%);
  opacity: 0;
}
.portrait.has-photo { min-height: 560px; }
.portrait.has-photo::before { opacity: 1; }
.portrait.has-photo .initials { display: none; }
.portrait .mono, .portrait .caption, .portrait .initials { position: relative; z-index: 2; }
.portrait .mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--night-ink-2); }
.portrait.has-photo .mono { align-self: flex-start; padding: 5px 9px; border-radius: 2px; background: rgba(12, 17, 21, 0.78); color: var(--night-ink); }
.portrait .initials { font-family: var(--font-display); font-size: clamp(5rem, 10vw, 9rem); font-weight: 700; line-height: 0.9; color: var(--accent); }
.portrait .name { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; text-transform: uppercase; }
.portrait .role { margin-top: 6px; color: var(--night-ink-2); }
.portrait .track {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  height: 10px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 18px, transparent 18px 30px);
}

.about-text { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.about-text p { font-size: 1.1rem; color: var(--ink-2); max-width: 64ch; }
.about-text p strong { color: var(--ink); font-weight: 600; }
.quali { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.quali li {
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* Stationen: Werdegang als Streckenband */
.laufbahn-wrap { position: relative; margin-top: clamp(40px, 5vw, 64px); }
.laufbahn { position: relative; display: grid; gap: 26px; margin-top: 24px; padding-left: 36px; }
.laufbahn::before {
  content: "";
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 8px;
  border-left: 2px solid var(--line-2);
  border-right: 2px solid var(--line-2);
}
.halt { position: relative; min-width: 0; }
.halt .dot {
  position: absolute;
  z-index: 2;
  left: -34px; top: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--line-2);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.halt:hover .dot { border-color: var(--ink-3); }
.halt.is-now .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.halt .jahr { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-deep); }
.halt strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.1; text-transform: uppercase; }
.halt .wo { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
/* Zugfahrt: ein Zug fährt beim Scrollen von Halt zu Halt, hinter ihm werden die Schienen orange,
   erreichte Halte leuchten auf. Positionen setzt das Skript (Transformationen, kein Layout). */
.zugbahn { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.6s ease; }
.laufbahn-wrap.is-fahrt .zugbahn { opacity: 1; }
.zugbahn .spur { position: absolute; z-index: 1; left: 0; top: 0; width: 8px; height: 8px; border: 0 solid var(--accent); transform-origin: left top; will-change: transform; }
.zugbahn .spur.is-quer { border-top-width: 2px; border-bottom-width: 2px; }
.zugbahn .spur.is-hoch { border-left-width: 2px; border-right-width: 2px; }
.zugbahn .zug { position: absolute; z-index: 3; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.zugbahn .lok {
  position: absolute; left: -17px; top: -6px; width: 34px; height: 12px;
  border-radius: 3px 7px 7px 3px;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--bg);
}
.zugbahn .lok::before { content: ""; position: absolute; left: 6px; top: 3px; width: 14px; height: 6px; border-radius: 2px; background: var(--bg); opacity: 0.55; }
.zugbahn .lok::after { content: ""; position: absolute; right: 2px; top: 4px; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.85); }
.zugbahn .lichtkegel {
  position: absolute; left: 16px; top: -11px; width: 84px; height: 22px;
  background: linear-gradient(90deg, rgba(255, 170, 90, 0.5), rgba(255, 90, 0, 0));
  clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%);
  opacity: var(--speed, 0);
  transition: opacity 0.25s ease;
}
.zugbahn .schluss { position: absolute; left: -20px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 6px rgba(255, 59, 48, 0.9); }
.laufbahn-wrap.is-fahrt .halt .jahr, .laufbahn-wrap.is-fahrt .halt strong, .laufbahn-wrap.is-fahrt .halt .wo { transition: opacity 0.6s var(--ease); }
.laufbahn-wrap.is-fahrt .halt:not(.is-passed):not(.is-here) strong,
.laufbahn-wrap.is-fahrt .halt:not(.is-passed):not(.is-here) .wo { opacity: 0.45; }
.laufbahn-wrap.is-fahrt .halt:not(.is-passed):not(.is-here) .jahr { opacity: 0.6; }
.laufbahn-wrap.is-fahrt .halt .dot { transition: border-color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease; }
.laufbahn-wrap.is-fahrt .halt.is-passed .dot { background: var(--ink); border-color: var(--ink); }
.laufbahn-wrap.is-fahrt .halt.is-here .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 18px rgba(255, 90, 0, 0.45); }
.laufbahn-wrap.is-fahrt .halt.is-now.is-passed .dot { background: var(--accent); border-color: var(--accent); }
@media (min-width: 960px) {
  .laufbahn { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px; padding-left: 0; }
  .laufbahn::before {
    left: 0; right: 0; top: 9px; bottom: auto;
    width: auto; height: 8px;
    border: 0;
    border-top: 2px solid var(--line-2);
    border-bottom: 2px solid var(--line-2);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.8s var(--ease);
  }
  .laufbahn-wrap.in .laufbahn::before { transform: scaleX(1); }
  .halt { padding-top: 40px; }
  .halt .dot { left: 0; top: 4px; }
}

.principles { display: grid; gap: 28px; margin-top: clamp(40px, 5vw, 64px); }
@media (min-width: 700px) { .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.principle { position: relative; padding-top: 16px; border-top: 2px solid var(--ink); min-width: 0; }
.js .principle { border-top-color: transparent; }
.js .principle::before { content: ""; position: absolute; left: 0; top: -2px; width: 100%; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left center; transition: transform 1s var(--ease) 0.15s; }
.js .principle.in::before { transform: scaleX(1); }
.principle h3 { font-size: 1.45rem; font-weight: 600; text-transform: uppercase; }
.principle p { margin-top: 10px; font-size: 15.5px; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Zusammenarbeit
   -------------------------------------------------------------------------- */

.models { display: grid; gap: 24px; }
@media (min-width: 900px) { .models { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.model { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 30px 28px; background: var(--surface-2); border-radius: var(--radius); }
.model h3 { font-size: 1.8rem; font-weight: 700; text-transform: uppercase; }
.model p { color: var(--ink-2); }
.models-note { margin-top: 20px; font-size: 15px; color: var(--ink-3); }

/* Ablauf: vier Schritte als Fahrplan. Oben ein Gleis mit vier Halten und einer Lampe, die mit dem Scrollen
   fährt; darunter die Schrittkarten als Wagenreihe. Breit: der Block bleibt stehen und die Karten fahren
   quer, während man scrollt. Schmal: die Karten lassen sich wischen, das Gleis oben folgt. */
.ablauf { position: relative; min-width: 0; margin-top: clamp(32px, 4vw, 48px); }
.ablauf-pin { display: grid; gap: 26px; min-width: 0; }
.ablauf-head { display: grid; gap: 18px; align-items: center; }
.ablauf-head .eyebrow { white-space: nowrap; }
.gleis { --p: 0; position: relative; height: 8px; border-top: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); }
.gleis-spur { position: absolute; left: 0; right: 0; top: -2px; height: 8px; border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: scaleX(var(--p)); transform-origin: left center; will-change: transform; }
.gleis-halt {
  position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2);
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.gleis-halt:nth-of-type(2) { left: 0; }
.gleis-halt:nth-of-type(3) { left: 33.333%; }
.gleis-halt:nth-of-type(4) { left: 66.666%; }
.gleis-halt:nth-of-type(5) { left: 100%; }
.gleis-halt::after {
  content: attr(data-name);
  position: absolute; top: 16px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); white-space: nowrap;
  transition: color 0.35s ease;
}
.gleis-halt:nth-of-type(2)::after { left: -6px; transform: none; }
.gleis-halt:nth-of-type(5)::after { left: auto; right: -6px; transform: none; }
.gleis-halt.is-passed { background: var(--ink); border-color: var(--ink); }
.gleis-halt.is-here { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.gleis-halt.is-here::after { color: var(--ink); }
.gleis-marker { position: absolute; left: 0; top: 50%; width: 100%; height: 0; transform: translateX(calc(var(--p) * 100%)); will-change: transform; }
.gleis-marker .lampe { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--accent), 0 0 14px 2px rgba(255, 90, 0, 0.55); }
.zaehler { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--ink-3); }
.zaehler .z-akt { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
@media (min-width: 700px) {
  .ablauf-head { grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; padding-bottom: 18px; }
}
@media (max-width: 699px) { .gleis-halt::after { display: none; } }

.ablauf-fenster { min-width: 0; margin-inline: calc(-1 * var(--gutter)); }
.steps {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 4px var(--gutter) 10px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.steps::-webkit-scrollbar { display: none; }
.step {
  position: relative;
  flex: 0 0 min(420px, 82vw);
  min-width: 0;
  padding: 30px 28px 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-snap-align: start;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.5s ease, box-shadow 0.5s ease;
}
.js .step { opacity: 0.55; transform: scale(0.97); }
.js .step.is-active { opacity: 1; transform: none; border-color: var(--line-2); box-shadow: var(--shadow); }
.step-icon { display: block; width: 72px; height: 72px; color: var(--ink-3); }
.step-icon path { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: stroke 0.5s ease; }
.js .step-icon path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .step.in .step-icon path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.9s var(--ease) 0.2s, stroke 0.5s ease; }
.js .step.in .step-icon .si--2 { transition-delay: 0.55s, 0s; }
.js .step.in .step-icon .si--3 { transition-delay: 0.9s, 0s; }
.step.is-active .step-icon { color: var(--ink-2); }
.step.is-active .step-icon .si--acc { stroke: var(--accent); }
.step .n {
  position: absolute; top: 24px; right: 24px;
  display: inline-block;
  padding: 4px 9px;
  background: var(--surface-2);
  color: var(--ink-2);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  transition: background-color 0.4s ease, color 0.4s ease;
}
.step.is-active .n { background: var(--accent); color: var(--on-accent); }
.step h3 { margin-top: 22px; font-size: 1.7rem; font-weight: 600; text-transform: uppercase; }
.step p { margin-top: 10px; font-size: 16px; color: var(--ink-2); max-width: 36ch; }
/* Mit Skript auf allen Breiten scrollgeführt (Block steht, Karten fahren); ohne Skript bleibt das Wischkarussell */
.js .ablauf { height: 220vh; }
.js .ablauf-pin { position: sticky; top: calc(var(--header-h) + 28px); }
.js .ablauf-fenster { overflow: hidden; padding-inline: var(--gutter); }
.js .steps { overflow: visible; padding-inline: 0; scroll-snap-type: none; will-change: transform; }
.js .step { scroll-snap-align: none; }
@media (min-width: 1000px) { .js .step { flex-basis: min(480px, 36vw); } }

/* Zusammenarbeit: Hairline-Vignetten (Plan-Ausschnitt, Bauzeitenplan), zeichnen sich beim Erscheinen */
.model { position: relative; overflow: hidden; }
.vignette { display: block; width: 100%; height: auto; margin-top: auto; padding-top: 8px; color: var(--ink-3); transition: color 0.5s ease; }
.model:hover .vignette { color: var(--ink-2); }
.vignette path { fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.vignette text { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; fill: currentColor; }
.vignette .vg--mass { color: var(--accent-deep); }
.js .vignette path:not(.dash) { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .vignette text, .js .vignette .dash { opacity: 0; }
.js .vignette .dash { stroke-dasharray: 0.03 0.02; }
.js .model.in .vignette path:not(.dash) { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease) calc(0.35s + var(--i) * 0.16s); }
.js .model.in .vignette text, .js .model.in .vignette .dash { opacity: 1; transition: opacity 0.6s ease calc(0.95s + var(--i) * 0.16s); }

/* --------------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------------- */

.contact { display: grid; gap: 40px; }
@media (min-width: 960px) { .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; } }

.contact-intro .h2 { margin-top: 6px; }
.contact-intro .lead { margin-top: 18px; }

.contact-card { display: grid; gap: 0; margin-top: 32px; }
.contact-card .row { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--night-line); min-width: 0; }
.contact-card .row:last-child { border-bottom: 1px solid var(--night-line); }
.contact-card .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--night-ink-3); }
.contact-card .v { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 1.15rem; font-weight: 500; overflow-wrap: anywhere; }
.contact-card a { color: var(--night-ink); text-decoration: none; border-bottom: 1px solid var(--night-line); }
.contact-card a:hover { border-color: var(--accent); }
.contact-card address { font-style: normal; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: transparent;
  border: 1px solid var(--night-line);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--night-ink-2);
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); color: var(--night-ink); }

.todo { border-bottom: 2px dashed var(--accent); color: var(--night-ink-2); }

.form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 3vw, 36px);
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
}
.form h3 { font-size: 1.7rem; font-weight: 700; text-transform: uppercase; }
.form .grid2 { display: grid; gap: 18px; }
@media (min-width: 600px) { .form .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form label { position: relative; display: grid; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--night-ink-2); transition: color 0.3s ease; }
.form label::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform 0.4s var(--ease); pointer-events: none; }
.form label:focus-within { color: var(--night-ink); }
.form label:focus-within::after { transform: scaleX(1); }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--night);
  border: 1px solid var(--night-line);
  border-radius: 3px;
  color: var(--night-ink);
  font-size: 16px;
  font-weight: 400;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form textarea { min-height: 140px; resize: vertical; }
.form .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.form .hint { font-size: 13px; color: var(--night-ink-3); }

/* Formsignal: Hp 0 (Halt) bis alle Pflichtfelder stehen, dann Hp 1 (Fahrt) */
.signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--night-ink-3);
}
.signal .lamp { width: 11px; height: 11px; border-radius: 50%; background: var(--night-3); box-shadow: inset 0 0 0 1px var(--night-line); transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.signal .lamp-red { background: #a8301f; box-shadow: 0 0 10px rgba(220, 60, 40, 0.65); }
.signal.is-go .lamp-red { background: var(--night-3); box-shadow: inset 0 0 0 1px var(--night-line); }
.signal.is-go .lamp-green { background: #2fbf71; box-shadow: 0 0 10px rgba(47, 191, 113, 0.75); }
.signal.is-go { color: var(--night-ink-2); }

.form .result { display: none; gap: 12px; padding: 16px; border: 1px solid var(--accent); border-radius: 3px; font-size: 14px; color: var(--night-ink-2); }
.form .result.is-visible { display: grid; }
.form .result pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 12.5px; color: var(--night-ink); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer { padding-block: 44px 28px; background: var(--night); color: var(--night-ink-2); border-top: 1px solid var(--night-line); font-size: 14px; }
.footer > .wrap { display: grid; gap: 28px; }
@media (min-width: 900px) { .footer > .wrap { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; } }
.footer .brand { color: var(--night-ink); }
.footer .tagline { margin-top: 14px; max-width: 36ch; }
.footer h4 { margin-bottom: 12px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--night-ink-3); }
.footer a { color: var(--night-ink-2); text-decoration: none; }
.footer a:hover { color: var(--night-ink); }
.footer li + li { margin-top: 8px; }
.footer address { font-style: normal; line-height: 1.7; }
.footer .legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--night-line);
  font-size: 13px;
  color: var(--night-ink-3);
}
.footer .legal ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer .legal li + li { margin-top: 0; }

/* --------------------------------------------------------------------------
   Rechtsseiten
   -------------------------------------------------------------------------- */

.header.header--solid { position: sticky; background: var(--night); border-bottom-color: var(--night-line); }
.legal-page { padding-block: clamp(48px, 7vw, 96px); }
.legal-page > .wrap { max-width: 800px; }
.legal-page h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; text-transform: uppercase; margin-top: 8px; }
.legal-page h2 { margin-top: 44px; font-size: 1.6rem; font-weight: 700; text-transform: uppercase; }
.legal-page h3 { margin-top: 28px; font-size: 1.2rem; font-weight: 600; }
.legal-page p, .legal-page li { margin-top: 12px; color: var(--ink-2); max-width: 70ch; }
.legal-page li { list-style: square; margin-left: 20px; margin-top: 6px; }
.legal-page ul { margin-top: 8px; }
.legal-page a { color: var(--ink); text-decoration-color: var(--line-2); }
.legal-page a:hover { text-decoration-color: var(--accent); }
.legal-page address { font-style: normal; margin-top: 12px; color: var(--ink-2); line-height: 1.7; }
.legal-page .todo { color: var(--ink-2); }
.legal-page .meta { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   Weniger Bewegung
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .js .hero-copy > *, .js .hero-canvas { animation: none; }
  .tile.is-flipping { animation: none; }
  .weiche.is-l .rail.l, .weiche.is-r .rail.r { animation: none; stroke-dasharray: none; }
  .strecke-marker { transition: none; }
  .btn, .btn .arrow, .service, .field, .field::after, .checks li::before { transition: none !important; }
  .js .ablauf { height: auto !important; }
  .js .ablauf-pin { position: static; }
  .js .ablauf-fenster { overflow: visible; padding-inline: 0; }
  .js .steps { transform: none !important; overflow-x: auto; padding-inline: var(--gutter); scroll-snap-type: x mandatory; }
  .js .step { scroll-snap-align: start; }
  .js .step { opacity: 1; transform: none; }
  .js .step-icon path, .js .vignette path { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
  .js .vignette text, .js .vignette .dash { opacity: 1; transition: none; }
  .js .vignette .dash { stroke-dasharray: 0.03 0.02; }
  .js .principle::before, .js [data-reveal] .eyebrow::before, .js .eyebrow[data-reveal]::before { transform: none; transition: none; }
  .rails.in::after { animation: none; }
  .zugbahn, .laufbahn-wrap.is-fahrt .zugbahn { display: none; }
  .laufbahn-wrap.is-fahrt .halt strong, .laufbahn-wrap.is-fahrt .halt .wo, .laufbahn-wrap.is-fahrt .halt .jahr { opacity: 1 !important; }
}

/* --------------------------------------------------------------------------
   Druck: Kurzprofil
   -------------------------------------------------------------------------- */

@media print {
  .header, .mobile-nav, .hero-canvas, .hero-shade, .hero-grain, .hero-space, .weiche-wrap, .strecke, .strecke-bar, .form, .skip, .btn, .copy-btn, .footer nav, .ref-foot .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero { margin-top: 0; }
  .night, .hero, .stats, .portrait, .footer, .board, .board-row, .board-head { background: #fff !important; color: #000 !important; }
  .tile { background: transparent !important; color: #000 !important; }
  .tile::after { display: none; }
  .night .lead, .stat .k, .contact-card .k, .footer, .board-row .region, .board-row .leistung { color: #333 !important; }
  .section { padding-block: 14pt; break-inside: avoid; }
  .service, .field, .step, .model { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .hero-top > .wrap { padding-top: 0; }
  .hero h1 { font-size: 28pt; }
  .h2 { font-size: 20pt; }
}
