/* ============================================================
   GESCHICHTE-SEITE — Multi-Step Formular
   ============================================================ */

.geschichte-body {
  overflow: hidden;
  height: 100svh;
  background: var(--ink);
}

/* ── Diashow ──────────────────────────────────────────────── */
.slideshow {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  /* Opacity per Transition — getrennt vom Zoom */
  transition: opacity 1.4s ease;
  will-change: transform, opacity;
}

.slide.active {
  opacity: 1;
  z-index: 1;
  /* Nur Transform animieren, nie Opacity */
  animation: kenBurnsZoom 9.3s linear forwards;
}

.slide.leaving {
  opacity: 0;
  z-index: 0;
}

@keyframes kenBurnsZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* Kein Zoom bei prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .slide.active { animation: none; }
}

/* Dunkler Overlay */
.slideshow-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(15,14,12,0.72) 0%, rgba(15,14,12,0.55) 50%, rgba(15,14,12,0.80) 100%);
}

/* ── Zurück-Link ──────────────────────────────────────────── */
.g-back-home {
  position: fixed;
  top: 2rem;
  left: var(--gutter);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-lg);
  letter-spacing: 0.06em;
  color: var(--light);
  opacity: 0.75;
  transition: opacity 0.2s, color 0.2s;
}
.g-back-home:hover { opacity: 1; color: var(--tungsten); }
.g-back-home svg { width: 18px; height: 18px; }

/* ── Fortschritts-Dots ────────────────────────────────────── */
.progress-dots {
  position: fixed;
  top: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 0.6rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.progress-dots.visible { opacity: 1; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(201,161,90,0.3);
  transition: background 0.35s ease, transform 0.35s ease;
}
.dot.active {
  background: var(--tungsten);
  transform: scale(1.35);
}

/* ── Stage (zentriert alles) ──────────────────────────────── */
.g-stage {
  position: relative;
  z-index: 10;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Screens ──────────────────────────────────────────────── */
.g-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}
.g-screen.active {
  opacity: 1;
  pointer-events: all;
}

/* ── Card / Inhalt-Box ────────────────────────────────────── */
.g-card {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.g-card--center { align-items: center; text-align: center; }

/* ── Start-Button ─────────────────────────────────────────── */
.g-start-btn {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  line-height: 1.25;
  color: var(--light);
  letter-spacing: 0.02em;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.25s ease;
  max-width: 18ch;
}
.g-start-btn:hover { color: var(--tungsten); }
.g-start-btn:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 6px; }

/* Subtiler Unterstrich-Akzent */
.g-start-btn::after {
  content: '';
  display: block;
  margin: 1.5rem auto 0;
  width: 2rem;
  height: 1px;
  background: var(--tungsten);
  opacity: 0.6;
  transition: width 0.35s ease, opacity 0.35s ease;
}
.g-start-btn:hover::after { width: 4rem; opacity: 1; }

/* ── Frage-Label ──────────────────────────────────────────── */
.g-question {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
  line-height: 1.25;
  color: var(--light);
  letter-spacing: 0.01em;
}

/* ── Textarea ─────────────────────────────────────────────── */
.g-textarea {
  width: 100%;
  background: rgba(15,14,12,0.55);
  border: 1px solid rgba(243,239,230,0.15);
  border-radius: 0;
  color: var(--light);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.7;
  padding: 1rem 1.25rem;
  resize: vertical;
  min-height: 130px;
  transition: border-color 0.2s ease, background 0.2s ease;
  outline: none;
}
.g-textarea::placeholder { color: var(--muted); opacity: 0.7; }
.g-textarea:focus {
  border-color: rgba(201,161,90,0.5);
  background: rgba(15,14,12,0.55);
}

/* ── Input-Felder (Kontakt) ───────────────────────────────── */
.g-fields { display: flex; flex-direction: column; gap: 1.25rem; }

.g-field { display: flex; flex-direction: column; gap: 0.4rem; }

.g-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(243,239,230,0.15);
  border-radius: 0;
  color: var(--light);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  padding: 0.85rem 1.25rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  outline: none;
}
.g-input::placeholder { color: var(--muted); opacity: 0.7; }
.g-input:focus {
  border-color: rgba(201,161,90,0.5);
  background: rgba(255,255,255,0.06);
}

/* ── Navigation (Zurück / Weiter) ─────────────────────────── */
.g-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.g-btn-next {
  display: inline-block;
  padding: 0.8rem 2.25rem;
  border: 1px solid rgba(201,161,90,0.5);
  color: var(--tungsten);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: none;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
  margin-left: auto;
}
.g-btn-next:hover, .g-btn-next:focus-visible {
  background: rgba(201,161,90,0.1);
  border-color: var(--tungsten);
  color: var(--light);
}
.g-btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.g-btn-next:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 3px; }

.g-btn-ghost {
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.g-btn-ghost:hover { color: var(--light); }
.g-btn-ghost:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 3px; }

/* ── Fehlermeldung ────────────────────────────────────────── */
.g-error {
  color: var(--tungsten);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  min-height: 1.4em;
  opacity: 0;
  transition: opacity 0.3s;
}
.g-error.visible { opacity: 1; }

/* ── Erfolgs-Screen ───────────────────────────────────────── */
.g-success-text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(var(--text-xl), 3.5vw, var(--text-3xl));
  line-height: 1.35;
  color: var(--light);
  max-width: 28ch;
}
.g-success-sub {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.7;
  max-width: 44ch;
}

/* ── Light-Bleed oben (wie auf restlichen Seiten) ─────────── */
.geschichte-body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: radial-gradient(ellipse at center, var(--tungsten) 0%, transparent 70%);
  opacity: 0.35;
  z-index: 20;
  pointer-events: none;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 540px) {
  .g-card { gap: 1.25rem; }
  .g-start-btn { font-size: var(--text-2xl); }
  .g-question { font-size: var(--text-xl); }
  .progress-dots { top: 1.5rem; }
  .g-back-home { top: 1.5rem; }

  /* Buttons groß genug für Touch */
  .g-btn-next {
    min-height: 44px;
    padding: 0.75rem 1.75rem;
  }
  .g-btn-ghost { min-height: 44px; }

  /* Textarea etwas niedriger auf kleinen Screens */
  .g-textarea { min-height: 100px; }

  /* Safe Area für Geräte mit Home-Indikator */
  .g-screen {
    padding-bottom: max(var(--gutter), calc(var(--gutter) + env(safe-area-inset-bottom)));
  }
  .g-back-home {
    padding-top: env(safe-area-inset-top, 0px);
  }
}
