:root {
  /* color */
  --ink: #0D1321;
  --ink-deep: #080B14;
  --channel: #131B2E;
  --channel-border: #232E48;
  --paper: #F1EFE7;
  --mist: #8891A6;
  --mist-dim: #5B6478;
  --current: #3FA7A0;
  --current-bright: #58C9C1;
  --ember: #E8734A;

  /* type */
  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--channel-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--channel-border) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  background-attachment: fixed;
  background-color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--ink);
  opacity: 0.94;
  z-index: -2;
}

/* Ambient background artifacts (parallax with the cursor) */
.bg-motion {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  transform: translate(0, 0);
  will-change: transform;
}

.bg-shape svg { display: block; }

.bg-shape--mist { color: var(--mist-dim); opacity: 0.4; }
.bg-shape--current { color: var(--current); opacity: 0.28; }
.bg-shape--ember { color: var(--ember); opacity: 0.22; }

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.02;
  text-transform: uppercase;
}

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

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 19, 33, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--channel-border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper);
}

.wordmark svg { color: var(--current-bright); flex-shrink: 0; }

.nav-links { display: flex; gap: 30px; }

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mist);
  transition: color 0.2s ease;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-solid {
  background: var(--current);
  color: var(--ink-deep);
}

.btn-solid:hover { background: var(--current-bright); transform: translateY(-1px); }

.btn-outline {
  border-color: var(--channel-border);
  color: var(--paper);
}

.btn-outline:hover { border-color: var(--current); color: var(--current-bright); }

.btn-line {
  border-color: var(--channel-border);
  color: var(--paper);
  padding: 9px 18px;
}

.btn-line:hover { border-color: var(--current); }

/* Hero */
.hero {
  padding: 96px 0 0;
  position: relative;
}

.hero-grid {
  max-width: 720px;
  text-align: center;
  padding-bottom: 72px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--current-bright);
  margin-bottom: 20px;
}

.eyebrow::before { content: "◆ "; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: 24px;
}

.lead {
  font-size: 1.15rem;
  color: var(--mist);
  max-width: 520px;
  margin: 0 auto 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Route track (signature element) */
.route-track {
  border-top: 1px solid var(--channel-border);
  border-bottom: 1px solid var(--channel-border);
  background: var(--ink-deep);
  padding: 40px 0 48px;
}

.track-wrap { position: relative; }

.track-line {
  position: absolute;
  top: 5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--channel-border);
}

.track-dot {
  position: absolute;
  top: -2px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 4px rgba(232, 115, 74, 0.18);
  opacity: 0;
  transform: translateX(-50%);
  transition: left 0.65s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease;
}

.stations {
  list-style: none;
  display: flex;
  justify-content: space-between;
  position: relative;
}

.station {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 90px;
}

.station-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--channel);
  border: 1px solid var(--mist-dim);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.station-dot.is-active {
  background: var(--ember);
  border-color: var(--ember);
  box-shadow: 0 0 0 4px rgba(232, 115, 74, 0.2);
}

.station:last-child .station-dot.is-active {
  background: var(--current);
  border-color: var(--current);
  box-shadow: 0 0 0 4px rgba(63, 167, 160, 0.25);
}

.station-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mist);
  text-align: center;
}

/* Travel positions and station highlighting are computed and driven by
   script-v2.js from the stations' real layout, so the dot always lines
   up with each station regardless of viewport width. */

/* Logos */
.logos { padding: 44px 0; border-bottom: 1px solid var(--channel-border); }

.logos-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mist-dim);
  text-align: center;
  margin-bottom: 22px;
}

.logos-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 44px;
  color: var(--mist);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Section head */
.section-head { max-width: 620px; margin: 0 auto 52px; text-align: center; }

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-top: 14px;
}

.section-sub {
  color: var(--mist);
  margin: 16px auto 0;
  font-size: 1rem;
  max-width: 480px;
}

/* Stations detail (features) */
.stations-detail { padding: 108px 0; }

.stop-list { list-style: none; position: relative; max-width: 680px; margin: 0 auto; }

.rail-sticky { padding: 0 24px; max-width: var(--wrap); margin: 0 auto; }

.rail-progress { display: none; }

.stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding-bottom: 44px;
  position: relative;
}

.stop:last-child { padding-bottom: 0; }

.stop-marker {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--channel);
  border: 1px solid var(--channel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--current-bright);
  z-index: 1;
}

.stop-body h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.stop-body p {
  color: var(--mist);
  font-size: 0.98rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Horizontal rail: pinned scroll turns the three stops into a train
   passing platforms. Applied only once script-v2.js confirms desktop
   width + no reduced-motion and adds .rail--pinned — without JS or on
   narrow/reduced-motion viewports .stop-list keeps its plain vertical
   timeline layout above, so the section always degrades safely. */
.rail--pinned {
  position: relative;
}

.rail--pinned .rail-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.rail--pinned .rail-progress {
  display: block;
  position: relative;
  height: 1px;
  background: var(--channel-border);
  width: min(460px, 60vw);
  margin: 0 auto 72px;
}

.rail--pinned .rail-progress-dot {
  position: absolute;
  top: -4px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 4px rgba(232, 115, 74, 0.18);
  transform: translateX(-50%);
}

.rail--pinned .stop-list {
  display: flex;
  flex-wrap: nowrap;
  max-width: none;
  gap: 6vw;
  /* 50vw on each side guarantees at least one full viewport width of
     horizontal travel by itself, so the effect keeps working even on
     wide desktop monitors where the fixed-width cards alone would no
     longer outgrow window.innerWidth. */
  padding: 0 50vw;
  will-change: transform;
}

.rail--pinned .stop {
  flex: 0 0 440px;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding-bottom: 0;
  opacity: 0.4;
  transition: opacity 0.4s ease;
}

.rail--pinned .stop.is-active { opacity: 1; }

.rail--pinned .stop-marker {
  width: 52px;
  height: 52px;
  font-size: 1.05rem;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.rail--pinned .stop.is-active .stop-marker {
  background: var(--current);
  border-color: var(--current);
  color: var(--ink-deep);
}

.rail--pinned .stop-body p { max-width: none; }

/* Trace / log */
.trace {
  padding: 108px 0;
  background: var(--ink-deep);
  border-top: 1px solid var(--channel-border);
  border-bottom: 1px solid var(--channel-border);
}

.log { list-style: none; max-width: 520px; margin: 0 auto; }

.log li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 20px 0;
  border-bottom: 1px solid var(--channel-border);
}

.log li:first-child { padding-top: 0; }

.log time {
  font-family: var(--font-mono);
  color: var(--mist-dim);
  font-size: 0.85rem;
}

.log-event {
  font-size: 1rem;
  color: var(--paper);
}

.log-event code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--channel);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--current-bright);
}

.log-result {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--current-bright);
}

.log-result::before { content: "→ "; }

/* Testimonial */
.testimonial { padding: 108px 0; }

.testimonial .wrap {
  max-width: 660px;
  text-align: center;
}

.testimonial blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  text-transform: none;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}

.testimonial blockquote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--current);
  line-height: 1;
  margin-bottom: 8px;
}

.testimonial-author {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--mist);
}

.testimonial-author span {
  display: block;
  color: var(--mist-dim);
  margin-top: 3px;
}

/* CTA */
.cta { padding: 108px 0 130px; }

.cta-inner { max-width: 560px; text-align: center; }

.cta h2 { font-size: clamp(2rem, 3.8vw, 2.8rem); margin-bottom: 14px; }

.cta > .wrap > p { color: var(--mist); margin-bottom: 32px; }

.cta-form { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.cta-form input {
  flex: 1;
  min-width: 220px;
  padding: 13px 16px;
  border-radius: 3px;
  border: 1px solid var(--channel-border);
  background: var(--channel);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.cta-form input::placeholder { color: var(--mist-dim); }

.cta-form input:focus { outline: none; border-color: var(--current); }

.cta-success {
  margin-top: 18px;
  color: var(--current-bright);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* Footer */
.site-footer { border-top: 1px solid var(--channel-border); padding: 30px 0; }

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
}

.footer-row p {
  color: var(--mist-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.footer-links a { color: var(--mist); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--current-bright); }

/* Legal pages (Impressum / Datenschutz) */
.legal-hero {
  padding: 88px 0 56px;
  border-bottom: 1px solid var(--channel-border);
}

.legal-hero .wrap { max-width: 760px; }

.legal-hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  margin-bottom: 18px;
}

.legal-note {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ember);
  margin-bottom: 22px;
}

.legal-back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--current-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-back:hover { color: var(--paper); }

.legal-body { padding: 64px 0 130px; }

.legal-body .wrap { max-width: 760px; }

.legal-section { padding-bottom: 48px; }

.legal-section:last-child { padding-bottom: 0; }

.legal-section h2 {
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.legal-section h2 .num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: none;
  color: var(--current-bright);
}

.legal-section h3 {
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0.01em;
  margin: 22px 0 8px;
  color: var(--paper);
}

.legal-section p {
  color: var(--mist);
  font-size: 0.98rem;
  margin-bottom: 14px;
  max-width: 640px;
}

.legal-section ul {
  color: var(--mist);
  font-size: 0.98rem;
  padding-left: 20px;
  margin-bottom: 14px;
}

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

.legal-section a {
  color: var(--current-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-section a:hover { color: var(--paper); }

.legal-address {
  font-style: normal;
  color: var(--paper);
  background: var(--channel);
  border: 1px solid var(--channel-border);
  border-radius: 4px;
  padding: 20px 22px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.8;
}

.ph { color: var(--ember); }

@media (max-width: 720px) {
  .legal-section h2 { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Responsive */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { padding-top: 72px; }
  .station { width: 64px; }
  .station-label { display: none; }
  .station::after {
    content: attr(data-code);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    color: var(--mist);
  }
  .stop { gap: 14px; }
}
