/* ============================================================
   Gleisbereich.com — Baustellen-Nacht
   Tokens: bg #1a1a1a · surface #2a2a2a · accent #f1ee0f · text #f5f5f0
   ============================================================ */

:root {
  --bg: #1a1a1a;
  --surface: #2a2a2a;
  --accent: #f1ee0f;
  --accent-ink: #1a1a1a;
  --text: #f5f5f0;
  --text-dim: rgba(245, 245, 240, 0.66);
  --border: rgba(245, 245, 240, 0.09);
  --border-input: rgba(245, 245, 240, 0.48); /* ≥3:1 auf surface (WCAG 1.4.11) */
  --radius: 16px;
  --radius-s: 10px;
  --shadow-accent: 0 0 24px rgba(241, 238, 15, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn .ico { width: 20px; height: 20px; flex: none; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { box-shadow: var(--shadow-accent); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(245, 245, 240, 0.25);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-small { min-height: 44px; padding: 10px 18px; font-size: 0.92rem; }

.btn-block { width: 100%; }

.btn-block,
.btn-wa { white-space: normal; } /* volle-Breite-Buttons dürfen umbrechen (320px) */

.btn-wa {
  background: var(--accent);
  color: var(--accent-ink);
  width: 100%;
}
.btn-wa:hover { box-shadow: var(--shadow-accent); }

.btn:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 26, 26, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.site-header.is-scrolled {
  background: rgba(26, 26, 26, 0.86);
  border-bottom-color: var(--border);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.wordmark-signet { width: 34px; height: 34px; color: var(--text); }
.wordmark-text {
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: 1.02rem;
}
.wordmark-text em { font-style: normal; color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-rails {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.rail {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.rail-dim {
  stroke: rgba(245, 245, 240, 0.10);
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: rail-draw 2.2s ease-out forwards;
}
.rail-dim:nth-of-type(2) { animation-delay: 0.15s; }
.rail-dim:nth-of-type(3) { animation-delay: 0.3s; }
.rail-dim:nth-of-type(4) { animation-delay: 0.45s; }
.rail-dim:nth-of-type(5) { animation-delay: 0.6s; }
.rail-accent {
  stroke: var(--accent);
  stroke-width: 2.5;
  opacity: 0.9;
  stroke-dasharray: 130 2470;
  stroke-dashoffset: 2600;
  filter: drop-shadow(0 0 6px rgba(241, 238, 15, 0.8));
  animation: rail-pulse 7s linear infinite;
}
@keyframes rail-draw { to { stroke-dashoffset: 0; } }
@keyframes rail-pulse {
  from { stroke-dashoffset: 2600; }
  to   { stroke-dashoffset: 0; }
}
.signal-dot {
  fill: var(--accent);
  opacity: 0.25;
  animation: signal-glow 3.4s ease-in-out infinite;
}
.signal-dot-2 { animation-delay: 1.7s; }
@keyframes signal-glow {
  0%, 100% { opacity: 0.18; }
  50% { opacity: 0.9; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 20px 72px;
  width: 100%;
}
h1 {
  font-size: clamp(2.05rem, 10.4vw, 4.8rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 14px 0 20px;
}
.hero-sub {
  font-size: clamp(1.02rem, 2.6vw, 1.2rem);
  color: var(--text-dim);
  max-width: 34em;
}
.hero-sub strong { color: var(--text); }
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-num {
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 4px;
  padding: 1px 7px;
  letter-spacing: 0.05em;
}
.signal-blink {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: signal-glow 2.6s ease-in-out infinite;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(245, 245, 240, 0.45);
  border-radius: 999px;
  z-index: 1;
}
.scroll-hint span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent);
  animation: hint-drop 1.8s ease-in-out infinite;
}
@keyframes hint-drop {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Warnstreifen-Divider ---------- */
.stripes {
  height: 10px;
  overflow: hidden;
  position: relative;
}
.stripes-run {
  position: absolute;
  inset: 0;
  width: calc(100% + 80px);
  background: repeating-linear-gradient(
    45deg,
    var(--accent) 0 14px,
    var(--bg) 14px 28px
  );
  animation: stripes-slide 16s linear infinite;
  opacity: 0.85;
}
@keyframes stripes-slide {
  to { transform: translateX(-39.6px); }
}

/* ---------- Sektionen ---------- */
.section { padding: 84px 0; }
.section-alt { background: linear-gradient(180deg, rgba(42, 42, 42, 0.0), rgba(42, 42, 42, 0.55) 18%, rgba(42, 42, 42, 0.55) 82%, rgba(42, 42, 42, 0.0)); }
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-narrow { max-width: 720px; }
h2 {
  font-size: clamp(1.7rem, 5.4vw, 2.6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.12;
  margin: 12px 0 12px;
}
.section-sub { color: var(--text-dim); max-width: 36em; margin-bottom: 8px; }

/* ---------- Trainer ---------- */
.trainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.trainer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.trainer-card:hover {
  border-color: rgba(241, 238, 15, 0.55);
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}
.avatar { width: 88px; height: 88px; margin-bottom: 18px; }
.avatar-ring {
  fill: var(--bg);
  stroke: var(--accent);
  stroke-width: 3;
}
.avatar-initials {
  font-family: var(--font);
  font-weight: 900;
  font-size: 30px;
  fill: var(--accent);
  letter-spacing: 0.04em;
}
.trainer-card h3 { font-size: 1.3rem; font-weight: 800; }
.trainer-role {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 4px 0 12px;
}
.trainer-bio { color: var(--text-dim); }
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.chips li {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid rgba(241, 238, 15, 0.4);
  border-radius: 999px;
  color: var(--text);
}

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 36px;
  position: relative;
}
.step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  position: relative;
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  position: absolute;
  top: 20px;
  right: 20px;
  font-weight: 900;
  font-size: 0.95rem;
  color: rgba(241, 238, 15, 0.62);
  letter-spacing: 0.06em;
}
.step-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(241, 238, 15, 0.1);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.step-icon svg { width: 28px; height: 28px; }
.step h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: 6px; }
.step p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Stimmen ---------- */
.stimmen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 36px;
}
.stimme {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stimme-stars { display: flex; gap: 3px; color: var(--accent); }
.stimme-stars svg { width: 17px; height: 17px; fill: currentColor; }
.stimme-stars svg.empty { fill: rgba(245, 245, 240, 0.45); }
.stimme-text { color: var(--text); font-size: 0.98rem; overflow-wrap: anywhere; }
.stimme-meta { color: var(--text-dim); font-size: 0.85rem; margin-top: auto; overflow-wrap: anywhere; }

/* ---------- Formular ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  margin-top: 30px;
}
.field { margin-bottom: 22px; border: none; }
.field > label,
.field legend {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 10px;
}
.opt { color: var(--text-dim); font-weight: 400; font-size: 0.88rem; }
.req { color: var(--accent); }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-s);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 13px 14px;
  min-height: 48px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea { resize: vertical; min-height: 110px; }
input[type="text"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(241, 238, 15, 0.25);
}
::placeholder { color: rgba(245, 245, 240, 0.52); }

.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
select { appearance: none; -webkit-appearance: none; padding-right: 40px; }

/* Sterne — DOM-Reihenfolge 1→5 (Pfeiltasten laufen richtig herum);
   Füll-Zustände via data-rating/data-hover, gesetzt von main.js */
.stars {
  display: flex;
  gap: 6px;
}
.stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.stars label {
  cursor: pointer;
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
}
.stars label svg {
  width: 44px;
  height: 44px;
  fill: rgba(245, 245, 240, 0.45);
  transition: fill 0.15s ease, transform 0.15s ease;
}
.stars label.is-on svg {
  fill: var(--accent);
}
.stars label.is-peak svg {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(241, 238, 15, 0.55));
}
.stars input:focus-visible + label svg {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Trainer-Pills */
.pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pills input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pills label {
  cursor: pointer;
  padding: 11px 20px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-weight: 600;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.pills input:checked + label {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.pills input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Checkbox */
.field-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.field-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  flex: none;
  margin-top: 2px;
  border: 2px solid var(--border-input);
  border-radius: 7px;
  background: var(--bg);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.field-check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.field-check input:checked::after {
  content: "";
  width: 6px;
  height: 11px;
  border-right: 2.5px solid var(--accent-ink);
  border-bottom: 2.5px solid var(--accent-ink);
  transform: rotate(45deg) translateY(-1px);
}
.field-check input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.field-check label {
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-dim);
  cursor: pointer;
  margin: 0;
}

/* Honeypot — für Menschen unsichtbar */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-error {
  color: #ffb4a8;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 10px 0;
}

.form-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 14px;
}

/* Submit-Spinner */
.btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(26, 26, 26, 0.25);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading .btn-label { display: none; }
.btn.is-loading .btn-spinner { display: block; }
.btn.is-loading { pointer-events: none; opacity: 0.85; }

/* Erfolgs-Panel */
.success { text-align: center; padding: 12px 4px; }
.success h3 { font-size: 1.5rem; font-weight: 900; margin: 18px 0 8px; }
.success p { color: var(--text-dim); }
.success-check {
  width: 84px;
  height: 84px;
  margin: 0 auto;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.success-check circle {
  stroke-dasharray: 185;
  stroke-dashoffset: 185;
  animation: draw 0.7s ease-out forwards;
}
.success-check path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.45s ease-out 0.55s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
#waBox { margin: 22px 0 10px; }
.wa-note {
  background: rgba(241, 238, 15, 0.08);
  border: 1px dashed rgba(241, 238, 15, 0.45);
  border-radius: var(--radius-s);
  padding: 14px 16px;
  color: var(--text) !important;
  font-size: 0.95rem;
}
.success-sub { font-size: 0.9rem; margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 20px 28px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand p {
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 28em;
  margin-top: 8px;
}
.footer-nav { display: flex; gap: 22px; }
.footer-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--accent); }
.footer-copy {
  max-width: 1100px;
  margin: 26px auto 0;
  color: rgba(245, 245, 240, 0.6);
  font-size: 0.82rem;
}

/* ---------- Scroll-Reveal ----------
   Nur aktiv, wenn das Inline-Head-Script die .js-Klasse gesetzt hat.
   Lädt main.js nicht (Funkloch, JS aus), bleibt ALLES sichtbar. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .rail-dim { stroke-dashoffset: 0; }
  .rail-accent { stroke-dasharray: none; stroke-dashoffset: 0; opacity: 0.35; }
  .stripes-run { animation: none; }
}

/* ---------- Mobile-Feinschliff ---------- */
@media (max-width: 640px) {
  .hero-inner { padding-top: 72px; }
  .signal-dot { display: none; }
  .hero-ctas .btn { width: 100%; }
  .section { padding: 64px 0; }
  .form-card { padding: 24px 18px; }
  .stars label svg { width: 48px; height: 48px; }
  .scroll-hint { display: none; }
}
