/* StauseeNights Studio – Nacht am Stausee: Nachtblau/Schwarz, Cyan-Akzent, weißer Text. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #060a14;
  --surface: #0c1528;
  --surface-2: #122039;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f7fb;
  --muted: #b3c0d6;
  --accent: #3fe0f0;
  --accent-ink: #03161b;
  --error: #ff9d9d;

  --radius: 14px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: clamp(4rem, 10vw, 7rem);
  --container: 72rem;
  --header-h: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: var(--header-h); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.2em; }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 var(--space-2); }
h2 { font-size: clamp(2rem, 4vw + 0.5rem, 3rem); font-weight: 650; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 var(--space-2); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -3rem;
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: 8px;
}
.skip-link:focus { top: var(--space-1); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.narrow { max-width: 46rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:hover { box-shadow: 0 0 0 6px rgba(63, 224, 240, 0.18), 0 0 28px rgba(63, 224, 240, 0.35); }
.btn-small { min-height: 2.5rem; padding: 0.4rem 1.1rem; font-size: 0.95rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 10, 20, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; }
.main-nav a:not(.btn):hover { color: var(--accent); }

.nav-toggle { display: none; }

@media (max-width: 47.99rem) {
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem; height: 2.75rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }
  .nav-toggle-bar,
  .nav-toggle-bar::before,
  .nav-toggle-bar::after {
    display: block;
    width: 1.25rem; height: 2px;
    background: currentColor;
    border-radius: 2px;
  }
  .nav-toggle-bar { position: relative; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }

  .header-inner { flex-wrap: wrap; }
  .main-nav { width: 100%; }
  .main-nav ul { flex-wrap: wrap; gap: var(--space-2); padding-bottom: var(--space-2); }

  .js .main-nav { display: none; }
  .js .main-nav.is-open { display: block; }
  .js .main-nav ul { flex-direction: column; align-items: stretch; }
  .js .main-nav a { display: block; padding: 0.5rem 0; }
  .js .main-nav .btn { display: flex; }
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding-block: var(--space-5);
  overflow: hidden;
  /* Standbild als Hintergrund (funktioniert auch ohne JavaScript); der Verlauf greift, solange es lädt */
  background:
    url("../assets/hero-poster.jpg") center / cover no-repeat,
    linear-gradient(180deg, #0b1a3a 0%, #081229 55%, #050b19 66%, #03060d 100%);
}
@media (prefers-reduced-motion: no-preference) {
  /* Wenige funkelnde Sterne im oberen Himmel */
  .hero::before {
    content: "";
    position: absolute;
    inset: 0 0 55%;
    z-index: -1;
    background:
      radial-gradient(circle at 12% 18%, #fff 0 1.5px, transparent 2.5px),
      radial-gradient(circle at 27% 42%, #cfefff 0 1px, transparent 2px),
      radial-gradient(circle at 38% 12%, #fff 0 1.5px, transparent 2.5px),
      radial-gradient(circle at 53% 30%, #cfefff 0 1px, transparent 2px),
      radial-gradient(circle at 64% 8%, #fff 0 1.5px, transparent 2.5px),
      radial-gradient(circle at 88% 36%, #cfefff 0 1px, transparent 2px),
      radial-gradient(circle at 93% 14%, #fff 0 1.5px, transparent 2.5px);
    animation: funkeln 6s ease-in-out infinite alternate;
  }
  @keyframes funkeln {
    from { opacity: 0.25; }
    to { opacity: 0.95; }
  }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(3, 6, 13, 0.82) 0%, rgba(3, 6, 13, 0.55) 55%, rgba(3, 6, 13, 0.25) 100%);
}
.hero-inner {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
.hero-logo {
  width: min(70vw, 17rem);
  height: auto;
  justify-self: start;
  filter: drop-shadow(0 0 40px rgba(63, 224, 240, 0.25));
}
@media (min-width: 56rem) {
  .hero-inner { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .hero-logo { width: min(100%, 28rem); justify-self: end; }
}
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.2vw + 1rem, 5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-shadow: 0 0 40px rgba(63, 224, 240, 0.25);
}
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--accent); }
.hero-lead {
  max-width: 36rem;
  font-size: clamp(1.1rem, 1vw + 0.9rem, 1.3rem);
  color: var(--text);
  margin-bottom: var(--space-3);
}

/* Problem → Lösung: was die Seite für Besucher löst, auf einen Blick */
.hero-probleme {
  display: grid;
  gap: 0.9rem;
  max-width: 34rem;
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}
.hero-probleme li { display: grid; gap: 0.15rem; }
.hero-probleme .problem,
.hero-probleme .loesung { position: relative; padding-left: 1.6rem; }
.hero-probleme .problem { color: var(--muted); }
.hero-probleme .loesung { color: var(--text); font-weight: 600; }
.hero-probleme .problem::before,
.hero-probleme .loesung::before {
  position: absolute;
  left: 0;
  width: 1.1rem;
  text-align: center;
}
.hero-probleme .problem::before { content: "✕" / ""; color: var(--error); }
.hero-probleme .loesung::before { content: "→" / ""; color: var(--accent); }

.hero-aktionen { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Partikel-Szene (js/scene.js): erst sichtbar, wenn sie wirklich läuft; sonst gilt das statische Hero-Bild */
.szene {
  display: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.has-scene .szene { display: block; animation: szene-ein 1.4s ease both; }
@keyframes szene-ein { from { opacity: 0; } to { opacity: 1; } }

.has-scene .hero { background: none; }
.has-scene .hero::before { display: none; }
.has-scene .hero::after {
  background: linear-gradient(90deg, rgba(3, 6, 13, 0.55) 0%, rgba(3, 6, 13, 0.2) 50%, transparent 100%);
}
.has-scene .hero-inner { grid-template-columns: 1fr; gap: var(--space-3); }
/* Mit Szene trägt der Header das Logo; der Hero bleibt für Botschaft und Buttons frei */
.has-scene .hero-logo { display: none; }
.has-scene .section-alt { background: rgba(12, 21, 40, 0.72); }

/* Mit Szene: jede Leistung bekommt eine Bildschirmhöhe, damit die Form zu ihr passt */
.has-scene .cards { display: block; }
.has-scene .card {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 26rem;
  padding: 0;
  background: none;
  border: 0;
  border-top: 0;
}
.has-scene .card h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.has-scene .card p { color: var(--text); font-size: 1.15rem; }
/* Scroll-Hinweis im Hero: feine Linie, die nach unten läuft (nur ohne reduzierte Bewegung animiert) */
.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: calc(max(0px, (100% - var(--container)) / 2) + clamp(1rem, 4vw, 2rem));
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.scroll-hint:hover { color: var(--accent); }
.scroll-hint i {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(var(--accent), transparent);
}
@keyframes scroll-linie {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-hint i { animation: scroll-linie 2s ease-in-out infinite; }
}

/* Phasenanzeige (nur mit Szene, nur Desktop): zeigt die aktuelle Leistung, js/scene.js schaltet .sichtbar und .aktiv */
.phasen { display: none; }
@media (min-width: 56rem) {
  .has-scene .phasen {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    position: fixed;
    right: clamp(1rem, 3vw, 2.5rem);
    bottom: clamp(1.5rem, 6vh, 3.5rem);
    z-index: 5;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0;
    transition: opacity 0.5s ease;
  }
  .has-scene .phasen.sichtbar { opacity: 1; }
  .phasen li {
    display: flex;
    align-items: center;
    gap: 0.6em;
    opacity: 0.45;
    transition: opacity 0.3s ease, color 0.3s ease;
  }
  .phasen li::after {
    content: "";
    width: 1.2rem;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
  }
  .phasen li.aktiv { opacity: 1; color: var(--accent); }
  .phasen li.aktiv::after { width: 2.4rem; }
}

@media (min-width: 56rem) {
  /* Desktop: Anfrage links ausrichten wie die anderen Abschnitte, rechts bleibt Platz für den Papierflieger */
  .has-scene #anfrage .narrow { max-width: var(--container); }
  .has-scene #anfrage .narrow > * { max-width: 38rem; }
}
@media (max-width: 55.99rem) {
  /* Kleiner Bildschirm: Text oben, Szene darunter, damit nichts hinter dem Fließtext liegt */
  .has-scene .hero { align-items: flex-start; padding-top: var(--space-4); }
  /* Hero ist auf dem Handy schon randvoll; der Hinweis würde die Problem-Liste berühren */
  .scroll-hint { display: none; }
  /* Luft über der Anfrage: Hier steht der Papierflieger, bevor das Formular beginnt (Wert muss zu ANFRAGE_LUFT in scene.js passen) */
  .has-scene #anfrage { padding-top: 45vh; }
  .has-scene .card { justify-content: flex-start; padding-top: 12vh; min-height: 75vh; }
}

/* Sections */
.section { padding-block: var(--space-5); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-lead { color: var(--muted); max-width: 40rem; margin-bottom: var(--space-4); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 3px solid var(--accent);
}
.card p { color: var(--muted); margin: 0; }

.about {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 50rem) {
  .about { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
.about-photo { margin: 0; }
.photo-placeholder {
  aspect-ratio: 4 / 5;
  max-width: 24rem;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background:
    radial-gradient(circle at 50% 38%, rgba(63, 224, 240, 0.22), transparent 55%),
    var(--surface-2);
}

/* Funnel */
.funnel {
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.funnel-progress { color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.funnel-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.funnel-step legend {
  font-size: 1.4rem;
  font-weight: 650;
  margin-bottom: var(--space-2);
  padding: 0;
}
.funnel label:not(.choice) { display: block; margin: var(--space-2) 0 0.35rem; font-weight: 500; }
.hint { color: var(--muted); font-weight: 400; }

.funnel input:not([type="radio"]),
.funnel textarea,
.funnel select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  font: inherit;
}
.funnel textarea { resize: vertical; min-height: 8rem; }
.funnel [aria-invalid="true"] { border-color: var(--error); }

.choices { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  cursor: pointer;
}
.choice input { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: rgba(63, 224, 240, 0.1); }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.choice input:focus-visible { outline: none; }

.summary { display: grid; gap: 0.35rem 1rem; margin: 0 0 var(--space-3); }
@media (min-width: 36rem) {
  .summary { grid-template-columns: max-content 1fr; }
}
.summary dt { color: var(--muted); }
.summary dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.privacy-note { color: var(--muted); font-size: 0.95rem; }

.funnel-error { color: var(--error); font-weight: 500; min-height: 1.6em; margin: var(--space-2) 0 0; }
.funnel-error:empty { min-height: 0; }

.funnel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: var(--space-3);
}
.funnel-actions #funnel-back { margin-right: auto; }

.funnel-result {
  padding: var(--space-3);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(63, 224, 240, 0.08);
}

.notice {
  padding: var(--space-2);
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 10px 10px 0;
}

/* Rechtstexte */
.legal { overflow-wrap: anywhere; }
.legal h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); margin-bottom: var(--space-4); }
.legal h2 { font-size: 1.35rem; margin-top: var(--space-4); }
.table-wrap { overflow-x: auto; margin-bottom: var(--space-3); }
table { width: 100%; border-collapse: collapse; min-width: 32rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }

/* Footer */
.site-footer {
  padding-block: var(--space-4);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.footer-inner p { margin: 0; }
.footer-inner ul { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.footer-note { width: 100%; font-size: 0.85rem; }
