/* ==================================================================
   BAHNHOF CALAU — Globale Schicht
   Tag/Nacht-Modus + Sprach-/Modus-Bedienelemente in der Navigation.
   Lädt NACH styles.css. Nachtmodus = höher spezifisch als Tweak-:root.
   ================================================================== */

/* ----- BEDIENELEMENTE IN DER NAV (DE/EN · Tag/Nacht) ------------- */
.sb-ctrl {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
}
.station-board-inner .sb-nav + .sb-ctrl { margin-left: 22px; }
.sb-seg {
  display: inline-flex; border: 1px solid rgba(255,255,255,0.35);
  border-radius: 3px; overflow: hidden;
}
.sb-seg button {
  background: transparent; border: none; cursor: pointer;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; padding: 5px 9px; line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}
.sb-seg button + button { border-left: 1px solid rgba(255,255,255,0.22); }
.sb-seg button:hover { color: #fff; }
.sb-seg button.is-active { background: var(--led-gelb); color: var(--db-blau); }
.sb-mode {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 26px; border: 1px solid rgba(255,255,255,0.35);
  border-radius: 3px; background: transparent; cursor: pointer;
  color: var(--led-gelb); font-size: 14px; line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}
.sb-mode:hover { background: var(--led-gelb); color: var(--db-blau); }
@media (max-width: 1023px) {
  .sb-ctrl { margin-left: auto; }
  .station-board-inner .sb-nav + .sb-ctrl { margin-left: auto; }
}
@media print { .sb-ctrl { display: none !important; } }

/* ==================================================================
   REFINEMENT v6 — Kopf/Navigation, Hero, Akteure, Phasen, Mobil-Menü
   ================================================================== */

/* ----- KOPF · ruhige editoriale Wortmarke (kein roter Punkt) ----- */
.station-board-inner { gap: 18px; }
.sb-logo { gap: 12px; font-family: var(--font-head); font-size: 23px; letter-spacing: 0.06em; }
.sb-logo .sb-mark { line-height: 1; white-space: nowrap; }
.sb-track {
  margin-left: 0; padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.30); border-radius: 3px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.72); background: transparent; opacity: 1;
  align-self: center;
}
.sb-nav { gap: 20px; }
.sb-nav a { font-size: 12px; letter-spacing: 0.13em; }

/* Burger (mobil) – wird von site.js eingefügt */
.sb-burger { display: none; }
.sb-burger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.station-board.nav-open .sb-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.station-board.nav-open .sb-burger span:nth-child(2) { opacity: 0; }
.station-board.nav-open .sb-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1023px) {
  .sb-burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 38px; height: 32px; padding: 0 8px; margin-left: 12px;
    background: transparent; border: 1px solid rgba(255,255,255,0.30);
    border-radius: 3px; cursor: pointer; flex-shrink: 0;
  }
  .sb-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 59;
    flex-direction: column; gap: 0; margin: 0; padding: 6px 0;
    background: var(--db-blau); border-bottom: 4px solid var(--led-gelb);
    box-shadow: 0 16px 40px -16px rgba(0,0,0,0.5);
  }
  html[data-theme="night"] .sb-nav { background: #0C111B; }
  .station-board.nav-open .sb-nav { display: flex; }
  .sb-nav a { padding: 13px 24px; font-size: 13px; letter-spacing: 0.12em; opacity: 0.92; }
  .sb-nav a.sb-page { border: none; border-radius: 0; padding: 13px 24px; color: var(--led-gelb); }
  .sb-nav a.sb-page.is-active, .sb-nav a.sb-page:hover { background: rgba(255,255,255,0.06); }
  .sb-ctrl { margin-left: auto; }
  .station-board-inner .sb-nav + .sb-ctrl { margin-left: auto; }
}

/* ----- HERO · kompakter, oben weniger Luft -------------------- */
.hero-text { padding: clamp(28px, 3.2vw, 52px) clamp(24px, 3.2vw, 44px) clamp(40px, 5vw, 68px); justify-content: flex-start; }
@media (min-width: 1024px) { .hero-grid { min-height: 66vh; } }

/* ----- AKTEURE · präsenter, klare Hierarchie ------------------ */
.akteur { padding: 32px 30px 28px; }
.akteur .ak-rolle { font-size: 11px; letter-spacing: 0.2em; color: var(--anthrazit-soft); margin-bottom: 14px; }
.akteur h3 { font-size: clamp(25px, 2.3vw, 32px); margin-bottom: 14px; }
.akteur .ak-lead { font-size: 16.5px; }
html[data-theme="night"] .akteur .ak-more summary { color: var(--backstein); }

/* ----- PHASEN · Status-Label passt sauber in die Spalte ------- */
@media (min-width: 760px) { .phase { grid-template-columns: 172px 1fr; } }
.phase .ph-key .status-tag { white-space: normal; line-height: 1.3; letter-spacing: 0.12em; align-self: flex-start; }

/* ----- BILDEBENEN · Architektur-Galerie + Kalauer-Inspiration -- */
.arch-block { margin-top: clamp(44px, 5.5vw, 76px); }
.arch-block .eyebrow { color: var(--db-blau); }
.arch-block .eyebrow::before { background: var(--db-blau); }
.arch-block h3 { font-size: clamp(24px, 2.4vw, 34px); margin-bottom: 10px; }
.arch-block .lead { max-width: 64ch; }
.galerie figcaption span:first-child { font-weight: 700; color: var(--anthrazit); letter-spacing: 0.06em; }
html[data-theme="night"] .galerie figure .img-frame { background: #11151b; }
html[data-theme="night"] .galerie figure { background: var(--off-white); }
html[data-theme="night"] .mood-card { background: #0E131C; }
/* Auf Touch/kleinen Screens Bildunterschriften dauerhaft zeigen */
@media (hover: none), (max-width: 719px) {
  .mood-card .mc-overlay { opacity: 1; transform: none; }
}

/* ----- MOOD-GRID · Masonry für gemischte Formate -------------- */
.mood-grid { display: block; column-count: 3; column-gap: 18px; }
@media (max-width: 1023px) { .mood-grid { column-count: 2; } }
@media (max-width: 560px) { .mood-grid { column-count: 1; } }
.mood-card {
  display: block; width: 100%; margin: 0 0 18px; break-inside: avoid;
  position: relative; overflow: hidden; cursor: zoom-in;
  border-radius: 3px; background: var(--off-white);
}
.mood-card img {
  display: block; width: 100%; height: auto;
  transition: transform 0.5s cubic-bezier(0.2,0,0.2,1);
}
.mood-card:hover img, .mood-card:focus-within img { transform: scale(1.045); }
.mood-card .mc-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 3px;
  padding: 30px 16px 14px; margin: 0;
  background: linear-gradient(to top, rgba(20,16,14,0.82), rgba(20,16,14,0));
  color: #fff; opacity: 0; transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.mood-card:hover .mc-overlay, .mood-card:focus-within .mc-overlay { opacity: 1; transform: none; }
.mood-card .mc-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--led-gelb); }
.mood-card .mc-name { font-family: var(--font-head); font-size: 19px; letter-spacing: 0.03em; line-height: 1.05; }
html[data-theme="night"] .mood-card:hover { box-shadow: 0 0 0 1px rgba(244,184,60,0.25), 0 22px 50px -22px rgba(0,0,0,0.85); }

/* ----- ERDGESCHOSS-NUTZUNG · Grundriss-Galerie ---------------- */
.eg-block { margin: clamp(40px, 5vw, 70px) 0 clamp(8px, 1vw, 16px); }
.eg-block .eyebrow { color: var(--db-blau); }
.eg-block .eyebrow::before { background: var(--db-blau); }
.eg-block h3 { font-size: clamp(24px, 2.4vw, 34px); margin-bottom: 10px; }
.eg-block .lead { max-width: 64ch; }
.eg-grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 760px) { .eg-grid { grid-template-columns: repeat(3, 1fr); } }
.eg-card {
  margin: 0; background: var(--off-white); border: 1px solid var(--rule);
  border-top: 4px solid var(--db-blau); cursor: zoom-in; overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.eg-card:nth-child(2) { border-top-color: var(--backstein); }
.eg-card:nth-child(3) { border-top-color: var(--led-gruen); }
.eg-card:hover, .eg-card:focus-within { box-shadow: 0 20px 44px -26px rgba(0,0,0,0.55); transform: translateY(-3px); }
.eg-img { background: #fff; aspect-ratio: 5 / 4; overflow: hidden; }
.eg-img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s cubic-bezier(0.2,0,0.2,1); }
.eg-card:hover .eg-img img { transform: scale(1.04); }
html[data-theme="night"] .eg-img { background: #f2efe8; }
.eg-card figcaption { display: flex; align-items: baseline; gap: 14px; padding: 16px 18px 20px; }
.eg-no { font-family: var(--font-head); font-size: 30px; line-height: 0.8; color: var(--rule); flex-shrink: 0; }
.eg-meta strong { display: block; font-size: 17px; letter-spacing: 0.02em; margin-bottom: 4px; color: var(--anthrazit); }
.eg-meta span { font-size: 13.5px; line-height: 1.45; color: var(--anthrazit-soft); }

/* ----- KONTAKT · volle Breite, Überschrift links, Karten rechts */
.kontakt-shell { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 920px) { .kontakt-shell { grid-template-columns: minmax(280px, 0.85fr) 1.15fr; } }
.kontakt-intro h2 { margin-top: 6px; }
.kontakt-intro .lead { max-width: 42ch; }
.kontakt-press { margin-top: 22px; display: block; color: var(--anthrazit-soft); }
.kontakt-press a { color: var(--backstein); }
.kontakt-cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .kontakt-cards { grid-template-columns: 1fr 1fr; } }
.kontakt-cards .cta-card { margin: 0; height: 100%; }
.kontakt-cards .cta-card .header { display: flex; align-items: center; }

/* ----- LIGHTBOX · gemeinsame Bild-Vergrößerung ---------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 4vw;
  background: rgba(14,11,10,0.92); cursor: zoom-out;
  opacity: 0; transition: opacity 0.25s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox img { max-width: 94vw; max-height: 82vh; object-fit: contain; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7); background: #fff; }
.lightbox .lb-cap { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; color: rgba(255,255,255,0.92); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; padding: 0 20px; }
.lightbox .lb-x { position: absolute; top: 18px; right: 22px; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,0.4); background: transparent; color: #fff; border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1; }
.lightbox .lb-x:hover { background: rgba(255,255,255,0.12); }
@media (prefers-reduced-motion: reduce) { .lightbox { transition: none; } .mood-card img, .eg-img img { transition: none; } }
@media print { .lightbox { display: none !important; } }

/* ----- KLEINE SCREENS · Kopf entlasten ------------------------ */
@media (max-width: 600px) {
  .sb-logo { font-size: 19px; gap: 9px; }
  .sb-track { display: none; }
  .station-board-inner { gap: 12px; padding-left: 16px; padding-right: 16px; }
}

/* Sprach-Sichtbarkeit: nichts hier — Texttausch erfolgt per JS (data-en). */

/* ==================================================================
   NACHTMODUS — bewusst gestaltet: Abend, Ankommen, Bahnhofslichter.
   ================================================================== */
html[data-theme="night"] {
  --beige: #161A20;
  --beige-dunkel: #11151B;
  --off-white: #1F242E;
  --anthrazit: #ECE7DB;       /* jetzt: Haupttextfarbe (hell) */
  --anthrazit-soft: #A7AEBA;
  --backstein: #DC6E55;       /* hellerer Backstein für Tiefe */
  --backstein-dunkel: #C2573F;
  --db-blau: #6FA0DE;         /* blauer Akzent, lesbar auf Dunkel */
  --led-gelb: #F4B83C;
  --rule: rgba(236,231,219,0.16);
  --hero-accent: #DC6E55;
}
html[data-theme="night"] body { background: var(--beige); color: var(--anthrazit); }

/* Flächen, die im Tag über --anthrazit / --db-blau dunkel erzeugt wurden,
   im Nachtmodus auf echtes Nacht-Dunkel setzen (Variable bleibt Textfarbe). */
html[data-theme="night"] .station-board { background: #0C111B; }
html[data-theme="night"] .section-dark,
html[data-theme="night"] footer { background: #0E131C; }

/* Dunkle Sektionen behalten dunklen Grund + helle Überschrift im Nachtmodus
   (--anthrazit/--off-white invertieren sonst zu hell/dunkel und kippen den Kontrast) */
html[data-theme="night"] .page-header.dark { background: #0E131C; }
html[data-theme="night"] .page-header.dark h1 { color: #F7F3EA; }
html[data-theme="night"] .page-header.dark .lead { color: rgba(255,255,255,0.85); }
html[data-theme="night"] .page-header.dark .breadcrumb { color: rgba(255,255,255,0.7); }
html[data-theme="night"] .section-dark h2,
html[data-theme="night"] .section-dark h3 { color: #F7F3EA; }
html[data-theme="night"] .hero-photo,
html[data-theme="night"] .vergleich,
html[data-theme="night"] .inst-detail-photo,
html[data-theme="night"] .mood-card { background: #0E131C; }
html[data-theme="night"] .vor-ort,
html[data-theme="night"] .bruecke,
html[data-theme="night"] .cta-card.babenz .header { background: #18375F; }
html[data-theme="night"] .kennzahlen { border-color: #0E131C; }

/* Buttons (Tag: Fläche = --anthrazit) -> Slate im Nachtmodus */
html[data-theme="night"] .btn { background: #2A313D; border-color: #2A313D; color: var(--anthrazit); }
html[data-theme="night"] .btn:hover { background: var(--backstein); border-color: var(--backstein); color: #16181d; }
html[data-theme="night"] .btn.ghost { background: transparent; border-color: var(--anthrazit); color: var(--anthrazit); }
html[data-theme="night"] .btn.ghost:hover { background: var(--anthrazit); color: #16181d; }
html[data-theme="night"] .traeger-cta .btn { background: var(--backstein); border-color: var(--backstein); color: #16181d; }
html[data-theme="night"] .traeger-cta .btn:hover { background: var(--backstein-dunkel); border-color: var(--backstein-dunkel); }

/* Helle Schrift auf Farbflächen (Tag: --off-white) hell halten */
html[data-theme="night"] .cta-card .header { color: #F7F3EA; }

/* Karten bekommen sanfte Tiefe statt harter Kante */
html[data-theme="night"] .post-card,
html[data-theme="night"] .akteur,
html[data-theme="night"] .quelle,
html[data-theme="night"] .ziel-card,
html[data-theme="night"] .cta-card,
html[data-theme="night"] .akkordeon,
html[data-theme="night"] .einordnung,
html[data-theme="night"] .prinzip,
html[data-theme="night"] .dossier-doc,
html[data-theme="night"] .empfehlung-box,
html[data-theme="night"] .form-shell {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 40px -28px rgba(0,0,0,0.8);
}

/* Bilder im Nachtmodus etwas ruhiger / atmosphärischer */
html[data-theme="night"] .hero-photo-fig img,
html[data-theme="night"] .moeglich-frame img,
html[data-theme="night"] .vergleich img { filter: brightness(0.9) contrast(1.02) saturate(0.95); }

/* Beteiligungspakete · Nachtmodus */
html[data-theme="night"] .leiter-bruecke { background: var(--off-white); }
html[data-theme="night"] .paket-karte { background: var(--off-white); box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 40px -28px rgba(0,0,0,0.8); }
html[data-theme="night"] .paket-karte:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 22px 48px -22px rgba(0,0,0,0.85); }
html[data-theme="night"] .paket-karte[data-tier="7"] { box-shadow: 0 0 0 1px rgba(246,197,68,0.4), 0 18px 40px -28px rgba(0,0,0,0.8); }
html[data-theme="night"] .pk-bild { background: #0E131C; }
html[data-theme="night"] .pk-bild img { filter: brightness(0.92) contrast(1.02) saturate(0.96); }

/* Tweaks-Panel (nur Startseite) im Nachtmodus */
html[data-theme="night"] .tweaks-head { background: #0C111B; color: #F7F3EA; }
html[data-theme="night"] .tw-fab { background: #0C111B; color: var(--led-gelb); }
html[data-theme="night"] .tw-seg button { background: var(--off-white); color: var(--anthrazit-soft); }
html[data-theme="night"] .tw-seg button.is-active { background: var(--anthrazit); color: var(--beige); }

/* Sanfter Übergang beim Moduswechsel — nicht für Bewegungsempfindliche */
@media (prefers-reduced-motion: no-preference) {
  body, .station-board, .post-card, .akteur, .cta-card, .btn,
  footer, .section-dark, .hero, .page-header, .quelle, .ziel-card {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
  }
}

/* ----- HERO-ROUTE · Fahrplan als ruhige editoriale Liste ------- */
.hero-route { margin-top: clamp(24px, 3vw, 40px); max-width: 430px; }
.hr-title {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--anthrazit-soft);
  margin-bottom: 8px;
}
.hr-title .arrow { transition: transform 0.2s ease; }
.hr-title:hover { color: var(--backstein); }
.hr-title:hover .arrow { transform: translateY(2px); }
.hr-list { list-style: none; margin: 0; padding: 0; }
.hr-list li { border-top: 1px solid var(--rule); }
.hr-list li:last-child { border-bottom: 1px solid var(--rule); }
.hr-list a {
  display: flex; align-items: baseline; gap: 15px;
  padding: 11px 2px; text-decoration: none; color: var(--anthrazit);
  transition: color 0.18s ease, padding-left 0.18s ease;
}
.hr-list a::after {
  content: "→"; margin-left: auto; align-self: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--backstein);
  opacity: 0; transform: translateX(-5px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.hr-list a:hover, .hr-list a:focus-visible { color: var(--backstein); padding-left: 8px; }
.hr-list a:hover::after, .hr-list a:focus-visible::after { opacity: 1; transform: none; }
.hr-no { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--anthrazit-soft); min-width: 18px; flex-shrink: 0; transition: color 0.18s ease; }
.hr-list a:hover .hr-no { color: var(--backstein); }
.hr-label { font-family: var(--font-body); font-weight: 600; font-size: 15px; letter-spacing: 0.01em; line-height: 1.25; }

/* ----- KOPF · exakte vertikale Ausrichtung aller Elemente ------ */
.station-board-inner { display: flex; align-items: center; }
.station-board-inner > * { align-self: center; }
.sb-logo { display: inline-flex; align-items: center; line-height: 1; }
.sb-logo .sb-mark { display: inline-flex; align-items: center; }
.sb-nav { align-items: center; }
.sb-nav a { display: inline-flex; align-items: center; line-height: 1; }
.sb-ctrl { display: flex; align-items: center; }
.sb-seg, .sb-seg button, .sb-mode, .sb-burger { align-items: center; }
