/* ════════════════════════════════════════════════════════════════
   Event-Reels — /veranstaltungen/reels/
   ────────────────────────────────────────────────────────────────
   Kopfbereich wie die Fotos-Seite (.hero-sektion aus Bricks), die
   Reel-Bahnen 1:1 wie .pt-reels auf /business/partner/. Masse,
   Kontraste und Begruendungen stammen von dort; wer hier etwas
   aendert, liest vorher die Kommentare in seite-partner.css.

   TOKENS AN DER WURZELKLASSE, NICHT AN :root, und jedes var() mit
   Rueckfallwert. Die Ueberlagerung haengt das Skript an den body —
   ausserhalb von .er-seite. Deshalb steht .er-modal in der Liste.
   ════════════════════════════════════════════════════════════════ */

.er-seite,
.er-modal {
  --er-dunkel:    #0a0a0a;
  --er-gold:      #b69a4c;
  --er-gold-hell: #cbb069;
  --er-schrift:   var(--myk-font-display, "Outfit", system-ui, sans-serif);
}

.er-seite { background: var(--er-dunkel, #0a0a0a); color: #fff; }

.er-innen { width: 85%; max-width: 1440px; margin: 0 auto; }

/* Nur fuer die Sprachausgabe. Jeder Ort, an dem die Klasse haengt,
   braucht einen positionierten Elternteil — sonst rutscht sie aus der
   scrollenden Bahn und die Seite laesst sich waagerecht ziehen
   (Partnerseite, 1371 px, siehe .pt-reel-start-sr). */
.er-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ─── Kopfbereich wie „Fotos und Erinnerungen" ───
   Der Verlauf endet in Tiefschwarz statt im Blaugrau der Fotos-Seite:
   darunter beginnt sofort das dunkle Band, und eine Kante zwischen
   zwei fast gleichen Dunkeltoenen saehe nach Versehen aus. */
.er-held {
  position: relative;
  height: 60vh;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 84px 0;
  background-color: #191923;
  background-size: cover;
  background-position: center center;
}

/* Voll deckend ab 96 % und 2 px ueber die Kante: sonst blitzt bei
   krummen Hoehen die unterste Bildzeile als helle Haarlinie durch
   (auf Staging gesehen, 26.09.2026). */
.er-held::before {
  content: "";
  position: absolute;
  inset: 0 0 -2px;
  pointer-events: none;
  background-image: linear-gradient(rgba(10, 10, 10, 0), var(--er-dunkel, #0a0a0a) 96%);
}

/* Schichten: Video unten, Verlauf darueber, Text oben. */
.er-held > * { position: relative; z-index: 2; }
.er-held::before { z-index: 1; }

.er-held > .er-held-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.er-seite .er-held-titel {
  margin: 0 0 10px;
  font-family: var(--er-schrift);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.er-held-unter {
  width: 60%;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
}

/* ─── Band ─── */
.er-band { padding: clamp(3rem, 5vw, 5rem) 0 clamp(5rem, 8vw, 8rem); }

.er-band-kopf {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2rem, 3vw, 3rem);
}

.er-lead {
  max-width: 60ch;
  margin: 0;
  font-size: clamp(1.05rem, 0.4vw + 0.95rem, 1.2rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.76);
}

.er-leer { margin: 0; color: rgba(255, 255, 255, 0.62); }

.er-jahr { margin-top: clamp(2.5rem, 4vw, 3.5rem); }
.er-jahr:first-of-type { margin-top: 0; }

.er-jahr-kopf {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.er-seite .er-jahr-titel {
  margin: 0;
  font-family: var(--er-schrift);
  font-size: clamp(1.9rem, 2.4vw + 0.6rem, 3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}

.er-nav { display: flex; gap: 0.6rem; flex: 0 0 auto; }

/* ─── Knoepfe: Pfeile und Pause ───
   Rand 0.55 statt 0.28 — der Kreis ist das Einzige, was den Knopf als
   Knopf ausweist, und muss 3:1 schaffen (Partnerseite: rund 4,6:1). */
.er-seite .er-knopf {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.er-seite .er-knopf:hover:not([aria-disabled="true"]) {
  background: var(--er-gold-hell, #cbb069);
  border-color: var(--er-gold-hell, #cbb069);
  color: var(--er-dunkel, #0a0a0a);
}

.er-knopf:focus-visible { outline: 2px solid var(--er-gold-hell, #cbb069); outline-offset: 2px; }

/* Am Anschlag gesperrt, aber weiter fokussierbar (aria-disabled). */
.er-knopf[aria-disabled="true"] { opacity: 0.45; cursor: default; }

.er-knopf--pause { position: relative; }
.er-knopf-i { display: grid; place-items: center; }
.er-i { fill: currentColor; }
.er-knopf--pause .er-i { width: 16px; height: 16px; }
.er-knopf--pause .er-i-play { display: none; }
.er-knopf--pause[aria-pressed="true"] .er-i-pause { display: none; }
.er-knopf--pause[aria-pressed="true"] .er-i-play  { display: block; }
.er-i-pause, .er-i-play { display: block; line-height: 0; }

/* ─── Bahn ─── */
.er-rahmen { position: relative; }

.er-rahmen:focus-visible {
  outline: 2px solid var(--er-gold-hell, #cbb069);
  outline-offset: -4px;
  border-radius: 10px;
}

.er-bahn {
  list-style: none;
  margin: 0;
  padding: 0 max(calc(50vw - 720px), 7.5vw) 1rem;
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  /* muss dem padding-left entsprechen, sonst rastet die erste Karte
     unter dem Innenabstand ein */
  scroll-padding-left: max(calc(50vw - 720px), 7.5vw);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.er-bahn::-webkit-scrollbar { height: 6px; }
.er-bahn::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }
.er-bahn::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.28); border-radius: 3px; }

.er-reel {
  flex: 0 0 auto;
  width: clamp(200px, 20vw, 250px);
  margin: 0;
  scroll-snap-align: start;
}

.er-buehne {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  background: #16161a;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.er-video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Die ganze Flaeche ist anklickbar, das Zeichen steht dauerhaft da —
   auch ohne Zeigegeraet muss erkennbar sein, dass sich etwas oeffnet. */
.er-seite .er-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0.7rem;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.er-start-i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.68);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.er-start-i .er-i { width: 15px; height: 15px; }

/* Auf Gold steht Tiefdunkel, nie Weiss. */
.er-buehne:hover .er-start-i,
.er-start:focus-visible .er-start-i {
  background: var(--er-gold-hell, #cbb069);
  color: var(--er-dunkel, #0a0a0a);
  transform: scale(1.08);
}

/* Ring nach innen (overflow: hidden) und zweifarbig, damit er auf
   hellen Standbildern nicht verschwindet. */
.er-seite .er-start:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(10, 10, 10, 0.85), inset 0 0 0 6px var(--er-gold-hell, #cbb069);
  border-radius: 10px;
}

/* ─── Beschriftung ─── */
.er-fuss { padding-top: 1rem; }

.er-monat {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--er-schrift);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--er-gold-hell, #cbb069);
}

.er-seite .er-titel {
  margin: 0 0 0.4rem;
  font-family: var(--er-schrift);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}

.er-ort {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}

.er-seite .er-galerie {
  font-family: var(--er-schrift);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--er-gold-hell, #cbb069);
  text-decoration: none;
}

.er-seite .er-galerie:hover { text-decoration: underline; text-underline-offset: 3px; }
.er-galerie:focus-visible { outline: 2px solid var(--er-gold-hell, #cbb069); outline-offset: 3px; border-radius: 2px; }

/* ─── Weiter ─── */
.er-weiter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(3rem, 5vw, 4.5rem);
}

.er-seite .er-pille {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font-family: var(--er-schrift);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.er-seite .er-pille--gold {
  background: var(--er-gold-hell, #cbb069);
  border-color: var(--er-gold-hell, #cbb069);
  color: var(--er-dunkel, #0a0a0a);
}

.er-seite .er-pille:hover { background: #fff; border-color: #fff; color: var(--er-dunkel, #0a0a0a); }
.er-pille:focus-visible { outline: 2px solid var(--er-gold-hell, #cbb069); outline-offset: 3px; }

/* ─── Ueberlagerung ───
   Die Hoehe fuehrt, nicht die Breite — ein 9:16-Video passt sonst auf
   keinem Laptop ins Bild. */
.er-modal { position: fixed; inset: 0; z-index: 99999; display: none; }
.er-modal[aria-hidden="false"] { display: block; }

.er-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.82);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.er-modal-panel {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: 92vw;
  margin: 5vh auto 0;
}

.er-modal-video {
  display: block;
  height: min(82vh, 780px);
  max-width: 92vw;
  object-fit: contain;
  border-radius: 10px;
  background: #000;
}

.er-modal-titel {
  margin: 0.75rem 0 0;
  text-align: center;
  font-family: var(--er-schrift);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

/* Das Kreuz sitzt IM Bild — oberhalb bleibt bei 82vh kein Platz. */
.er-modal .er-modal-zu {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 10, 10, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.er-modal .er-modal-zu:hover {
  background: var(--er-gold-hell, #cbb069);
  border-color: var(--er-gold-hell, #cbb069);
  color: var(--er-dunkel, #0a0a0a);
}

.er-modal-zu:focus-visible {
  outline: 2px solid var(--er-gold-hell, #cbb069);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(10, 10, 10, 0.85);
}

/* ─── Kleinere Bildschirme ─── */
@media (max-width: 1100px) {
  .er-bahn { padding-left: 7.5vw; padding-right: 7.5vw; scroll-padding-left: 7.5vw; }
}

@media (max-width: 991px) {
  .er-held-unter { width: 95%; line-height: 1.3; }
}

@media (max-width: 767px) {
  .er-held { height: 55vh; }
  .er-held-unter { width: 100%; }
}

@media (max-width: 720px) {
  .er-band-kopf { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .er-reel { width: 62vw; }
}

@media (max-width: 600px) {
  .er-modal-panel { margin-top: 6vh; }
  .er-modal-video { height: min(76vh, 640px); }
}

@media (max-width: 478px) {
  .er-seite .er-held-titel { font-size: 45px; }
}

/* „2022/2023" brach bei 320 px nach dem Schraegstrich um, es fehlten 5 px
   neben den Pfeilen. Kleinerer Abstand statt kleinerer Schrift. */
@media (max-width: 400px) {
  .er-jahr-kopf { gap: 0.75rem; }
  .er-seite .er-jahr-titel { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .er-bahn { scroll-behavior: auto; }
  .er-start-i { transition: none; }
  .er-buehne:hover .er-start-i,
  .er-start:focus-visible .er-start-i { transform: none; }
}
