/* =============================================================================
   Animations-Bausteine der Living-Room-Seite
   -----------------------------------------------------------------------------
   Alle Animationsregeln liegen gebündelt in dieser Datei, damit nicht auf jeder
   Seite dasselbe <style> steht.

   Alle Klassen sind gepräfixt (lrt-, lrp-, lrn-, lre-, lrk-) und kollidieren
   nicht mit site.css. Reine CSS- und SVG-Animationen, keine Abhängigkeiten,
   ausser bei der Karte (d3, liegt lokal unter assets/js/vendor/).

   prefers-reduced-motion ist überall berücksichtigt: wer Bewegung reduziert hat,
   sieht den Endzustand statt der Animation.
   ============================================================================= */

/* ---------- Tür, schwingt auf (lrt-) ---------- */
.lrt-szene { position:relative; height:300px; max-width:560px; margin:0 auto; background:var(--surface-2,#F6EBE0); border-radius:14px; overflow:hidden; display:flex; align-items:center; justify-content:center; gap:56px; }
  .lrt-tuer-rahmen { position:relative; width:150px; height:230px; perspective:600px; align-self:flex-end; }
  .lrt-wand { position:absolute; inset:0; background:#2A211C; border-radius:8px 8px 0 0; }
  .lrt-innen { position:absolute; left:8px; top:8px; right:8px; bottom:0; background:linear-gradient(180deg,#FFE9BD,#F7C46A); animation:lrt-doorLight 9s ease-in-out infinite; }
  .lrt-schein { position:absolute; left:50%; bottom:0; width:280px; height:60px; margin-left:-140px; background:radial-gradient(ellipse at 50% 0%, rgba(250,200,110,.55), rgba(250,200,110,0) 70%); transform:translateY(100%); animation:lrt-doorLight 9s ease-in-out infinite; }
  .lrt-blatt { position:absolute; left:8px; top:8px; right:8px; bottom:0; background:var(--red,#C0392B); border-radius:4px 4px 0 0; transform-origin:left center; animation:lrt-doorSwing 9s ease-in-out infinite; box-shadow:inset -3px 0 0 rgba(0,0,0,.18); }
  .lrt-klinke { position:absolute; right:10px; top:50%; width:9px; height:9px; border-radius:50%; background:var(--bg,#FFFBF6); }
  .lrt-text { max-width:250px; }
  .lrt-eyebrow { font-size:12px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:var(--muted,#6B5C53); }
  .lrt-titel { font-size:30px; font-weight:800; line-height:1.15; color:var(--ink,#231D19); margin-top:8px; }
  .lrt-titel .lrt-mark { color:var(--red,#C0392B); }
  .lrt-sub { font-family:'Newsreader',Georgia,serif; font-style:italic; font-size:17px; color:var(--muted,#6B5C53); margin-top:10px; }
  @keyframes lrt-doorSwing { 0%,14% {transform:rotateY(0deg);} 30%,76% {transform:rotateY(-72deg);} 92%,100% {transform:rotateY(0deg);} }
  @keyframes lrt-doorLight { 0%,16% {opacity:0;} 34%,74% {opacity:1;} 92%,100% {opacity:0;} }
  @media (prefers-reduced-motion: reduce) { .lrt-szene * { animation:none !important; } .lrt-blatt { transform:rotateY(-72deg); } .lrt-innen,.lrt-schein { opacity:1; } }

/* ---------- Podcast-Equalizer (lrp-) ---------- */
.lrp-szene { display:flex; align-items:center; justify-content:center; gap:44px; max-width:640px; margin:0 auto; min-height:220px; }
  .lrp-eq { display:flex; align-items:center; gap:7px; height:90px; }
  .lrp-eq span { width:9px; border-radius:5px; background:var(--red,#C0392B); transform-origin:bottom; animation:lrp-eqBar 1s ease-in-out infinite; }
  .lrp-eq span:nth-child(1) { height:70px; animation-duration:1.1s; }
  .lrp-eq span:nth-child(2) { height:88px; animation-duration:.9s; animation-delay:.15s; }
  .lrp-eq span:nth-child(3) { height:56px; background:#E8A398; animation-duration:1.3s; animation-delay:.3s; }
  .lrp-eq span:nth-child(4) { height:82px; animation-delay:.05s; }
  .lrp-eq span:nth-child(5) { height:64px; background:#E8A398; animation-duration:1.2s; animation-delay:.4s; }
  .lrp-eq span:nth-child(6) { height:90px; animation-duration:.85s; animation-delay:.2s; }
  .lrp-eq span:nth-child(7) { height:52px; background:#E8A398; animation-duration:1.15s; animation-delay:.5s; }
  .lrp-eyebrow { font-size:12px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:var(--muted,#6B5C53); }
  .lrp-titel { font-size:26px; font-weight:800; line-height:1.15; color:var(--ink,#231D19); margin-top:6px; max-width:220px; }
  @keyframes lrp-eqBar { 0%,100% {transform:scaleY(.25);} 50% {transform:scaleY(1);} }
  @media (prefers-reduced-motion: reduce) { .lrp-eq span { animation:none !important; transform:scaleY(.6); } }

/* ---------- Netzwerk, Leute und Fäden (lrn-) ---------- */
.lrn-szene { max-width:640px; margin:0 auto; }
  .lrn-szene svg { display:block; width:100%; height:auto; }
  .lrn-linie { animation:lrn-netDraw 9s ease-in-out infinite; }
  .lrn-person { animation:lrn-pop 9s ease-in-out infinite; transform:scale(0); }
  .lrn-p1 { transform-origin:165px 92px; }
  .lrn-p2 { transform-origin:130px 212px; animation-name:lrn-pop2; }
  .lrn-p3 { transform-origin:468px 84px; animation-name:lrn-pop3; }
  .lrn-p4 { transform-origin:505px 214px; animation-name:lrn-pop4; }
  .lrn-p5 { transform-origin:320px 258px; animation-name:lrn-pop5; }
  .lrn-bubble { animation:lrn-bubblePop 9s ease-in-out infinite; opacity:0; }
  .lrn-b1 { transform-origin:196px 60px; animation-delay:4s; }
  .lrn-b2 { transform-origin:444px 246px; animation-delay:5.5s; }
  @keyframes lrn-netDraw { 0%,6% {stroke-dashoffset:1;} 40% {stroke-dashoffset:0;} 88% {stroke-dashoffset:0; opacity:1;} 96%,100% {stroke-dashoffset:1; opacity:0;} }
  @keyframes lrn-pop  { 0%,6% {transform:scale(0);} 12% {transform:scale(1.12);} 16%,90% {transform:scale(1);} 97%,100% {transform:scale(0);} }
  @keyframes lrn-pop2 { 0%,16% {transform:scale(0);} 22% {transform:scale(1.12);} 26%,90% {transform:scale(1);} 97%,100% {transform:scale(0);} }
  @keyframes lrn-pop3 { 0%,26% {transform:scale(0);} 32% {transform:scale(1.12);} 36%,90% {transform:scale(1);} 97%,100% {transform:scale(0);} }
  @keyframes lrn-pop4 { 0%,36% {transform:scale(0);} 42% {transform:scale(1.12);} 46%,90% {transform:scale(1);} 97%,100% {transform:scale(0);} }
  @keyframes lrn-pop5 { 0%,46% {transform:scale(0);} 52% {transform:scale(1.12);} 56%,90% {transform:scale(1);} 97%,100% {transform:scale(0);} }
  @keyframes lrn-bubblePop { 0%,8% {opacity:0; transform:scale(.7);} 16%,42% {opacity:1; transform:scale(1);} 50%,100% {opacity:0; transform:scale(.7);} }
  @media (prefers-reduced-motion: reduce) { .lrn-szene * { animation:none !important; } .lrn-person { transform:scale(1); } .lrn-linie { stroke-dashoffset:0 !important; } }

/* ---------- Event-Sitzplätze (lre-) ---------- */
.lre-szene { position:relative; height:320px; max-width:640px; margin:0 auto; background:var(--surface-2,#F6EBE0); border-radius:14px; overflow:hidden; }
  .lre-karte { position:absolute; left:38px; top:34px; width:180px; background:var(--bg,#FFFBF6); border:1px solid var(--border-2,#EBDCCE); border-radius:12px; padding:14px 16px; box-shadow:0 8px 24px rgba(35,29,25,.08); }
  .lre-eyebrow { font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--red,#C0392B); }
  .lre-titel { font-size:19px; font-weight:800; color:var(--ink,#231D19); margin-top:4px; }
  .lre-datum { font-size:13px; color:var(--muted,#6B5C53); margin-top:4px; }
  .lre-badge { position:absolute; right:-16px; top:-14px; background:var(--red,#C0392B); color:#fff; font-size:12px; font-weight:800; padding:6px 12px; border-radius:999px; box-shadow:0 6px 14px rgba(192,57,43,.35); animation:lre-badge 9s ease-in-out infinite; transform:scale(0); }
  .lre-szene svg { position:absolute; inset:0; width:100%; height:100%; }
  .lre-gast { animation:lre-pop 9s ease-in-out infinite; transform:scale(0); }
  .lre-g1 { transform-origin:322px 196px; }
  .lre-g2 { transform-origin:402px 196px; animation-name:lre-pop2; }
  .lre-g3 { transform-origin:482px 196px; animation-name:lre-pop3; }
  .lre-g4 { transform-origin:562px 196px; animation-name:lre-pop4; }
  @keyframes lre-pop  { 0%,6% {transform:scale(0);} 12% {transform:scale(1.12);} 16%,90% {transform:scale(1);} 97%,100% {transform:scale(0);} }
  @keyframes lre-pop2 { 0%,16% {transform:scale(0);} 22% {transform:scale(1.12);} 26%,90% {transform:scale(1);} 97%,100% {transform:scale(0);} }
  @keyframes lre-pop3 { 0%,26% {transform:scale(0);} 32% {transform:scale(1.12);} 36%,90% {transform:scale(1);} 97%,100% {transform:scale(0);} }
  @keyframes lre-pop4 { 0%,36% {transform:scale(0);} 42% {transform:scale(1.12);} 46%,90% {transform:scale(1);} 97%,100% {transform:scale(0);} }
  @keyframes lre-badge { 0%,58% {transform:scale(0) rotate(-8deg);} 65% {transform:scale(1.15) rotate(3deg);} 70%,90% {transform:scale(1) rotate(-3deg);} 97%,100% {transform:scale(0);} }
  @media (prefers-reduced-motion: reduce) { .lre-szene * { animation:none !important; } .lre-gast,.lre-badge { transform:scale(1); } }

/* ---------- Regionalkarte (lrk-) ----------
   Aus karte-region.html übernommen. Die Umrisse zeichnet animationen.js mit d3
   aus assets/daten/kreise-rhein-ruhr.geo.json (amtliche Kreisgrenzen, Quelle
   deutschlandGeoJSON, auf das Umfeld von Ratingen gekürzt und lokal abgelegt,
   damit die Seite ohne fremde Server auskommt). */
.lrk-karte { background:#fff; border:1px solid var(--border,#F2E4D6); border-radius:18px; box-shadow:var(--shadow,0 2px 6px rgba(35,29,25,.06)); padding:18px; }
.lrk-karte svg { display:block; width:100%; height:auto; }
.lrk-note { font-size:13px; color:var(--muted,#6B5C53); margin-top:14px; }
.kreis { opacity:0; animation:kreisIn .7s ease-out forwards; }
@keyframes kreisIn { from { opacity:0; } to { opacity:1; } }
.lbl { opacity:0; animation:kreisIn .6s ease-out forwards; }
.lamp-wrap { opacity:0; animation:lampPop .6s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes lampPop { from { opacity:0; transform:scale(0); } to { opacity:1; transform:scale(1); } }
.ring { transform-box:fill-box; transform-origin:center; animation:ringPulse 2.4s ease-out infinite; }
@keyframes ringPulse { 0% { transform:scale(.3); opacity:.8; } 100% { transform:scale(2.6); opacity:0; } }
@media (prefers-reduced-motion: reduce) {
  .kreis, .lbl, .lamp-wrap { opacity:1; animation:none !important; }
  .ring { animation:none !important; opacity:.25; }
}

/* Hinweisstreifen auf den Varianten-Seiten */
.animvar { background:#EDE3FF; color:#3B2A6B; border-bottom:1px solid #D9C9FA; font-size:13.5px; padding:9px 22px; text-align:center; }
.animvar b { font-weight:800; }
.animvar a { color:#3B2A6B; font-weight:700; }

/* ---------- Einbau in das Seitenraster ----------
   Die Bausteine sollen aussehen wie ein Bild der Seite, nicht wie ein
   eingeklebter Kasten. Deshalb sitzen sie in derselben Form wie die Fotos:
   gleicher Radius, gleicher Schatten, gleiche Spaltenaufteilung. */
.anim-neben { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; align-items: center; }
.anim-figur {
  border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lift);
  background: var(--surface-2); display: grid; place-items: center; padding: 26px;
}
.anim-figur > div { width: 100%; }

/* Tür: ohne eigenen Kasten, sie sitzt ja schon in einer Figur */
.anim-figur .lrt-szene { height: 320px; max-width: none; background: transparent; border-radius: 0; gap: 0; }
.anim-figur .lrt-tuer-rahmen { width: 208px; height: 300px; }
.anim-figur .lrt-schein { width: 360px; margin-left: -180px; }

/* Sitzplätze: Szene füllt die Figur, die Terminkarte übernimmt den Kartenstil der Seite */
.anim-figur .lre-szene { height: 300px; max-width: none; background: transparent; border-radius: 0; }
.anim-figur .lre-karte { left: 12px; top: 10px; width: 168px; border-radius: 16px; box-shadow: var(--shadow); }

/* Netzwerk: reine Grafik, kein Kasten drumherum */
/* Achtung: kein margin-left:auto. Ein Gitter-Element mit automatischem Rand
   wird nicht mehr auf die Spalte gestreckt, sondern auf seinen Inhalt
   geschrumpft. Dann fällt das SVG auf seine Standardgröße von 300 px zurück. */
.anim-netz { width: 100%; max-width: 580px; justify-self: end; }

/* Equalizer als Marke neben einer Überschrift */
.anim-kopf { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.anim-kopf .lrp-szene { gap: 22px; min-height: 0; margin: 0; max-width: none; }
.anim-kopf .lrp-eq { height: 62px; }
.anim-kopf .lrp-eq span { width: 7px; }
.anim-kopf svg { width: 54px; height: auto; }

@media (max-width: 900px) {
  .anim-neben { grid-template-columns: 1fr; gap: 24px; }
  .anim-netz { justify-self: center; }
  .anim-figur { padding: 18px; }
  .anim-figur .lrt-szene, .anim-figur .lre-szene { height: 240px; }
}

/* Die Karte braucht mehr Breite als ein Foto, sonst sind die Städtenamen zu klein */
.anim-neben-karte { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; }
.anim-neben-karte .lrk-karte { padding: 12px; }
@media (max-width: 900px) { .anim-neben-karte { grid-template-columns: 1fr; } }

/* Equalizer als reine Marke: linksbündig, kleiner, ohne eigene Höhe */
[data-anim="equalizer"][data-pur] .lrp-szene { justify-content: flex-start; gap: 20px; min-height: 0; margin: 0; max-width: none; }
[data-anim="equalizer"][data-pur] svg { width: 52px; height: auto; }
[data-anim="equalizer"][data-pur] .lrp-eq { height: 56px; }
[data-anim="equalizer"][data-pur] .lrp-eq span { width: 7px; }

/* Foto neben einer Animation: füllt die Zeile, damit unten kein weißer Rest bleibt */
.anim-figur-bild { margin: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lift); }
/* Bild und Animation bekommen dieselbe feste Höhe, sonst zieht das Foto die Zeile
   auf und neben der Animation bleibt unten ein weißer Rest. */
.anim-neben-gleich .anim-figur-bild,
.anim-neben-gleich .anim-figur { height: clamp(240px, 26vw, 380px); }
.anim-neben-gleich .anim-figur .lre-szene { height: 100%; }
.anim-figur-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Die Terminkarte etwas tiefer setzen, sonst schneidet der Rahmen den Ausgebucht-Aufkleber an */
.anim-figur .lre-karte { top: 30px; left: 20px; }
@media (max-width: 900px) { .anim-neben-gleich .anim-figur-bild, .anim-neben-gleich .anim-figur { height: 240px; } }

/* ---------- Gründerhaus, Fenster gehen an (lrg-) ----------
   Aus dem zweiten Paket (Claude Design, 01.09.2026), unverändert übernommen. */
.lrg-szene { position:relative; min-height:320px; max-width:640px; margin:0 auto; background:#2A211C; border-radius:14px; overflow:hidden; display:flex; align-items:flex-end; justify-content:center; gap:48px; }
  .lrg-haus { position:relative; width:210px; height:264px; background:#3A2E26; border-radius:8px 8px 0 0; }
  .lrg-dach { position:absolute; left:-24px; right:-24px; top:-14px; height:16px; background:#231D19; border-radius:4px; }
  .lrg-fenster-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding:26px 30px 0; }
  .lrg-fenster { height:38px; background:#FFE9BD; border-radius:4px; box-shadow:0 0 22px rgba(250,200,110,.55); opacity:0; animation:lrg-an1 11s linear infinite; }
  .lrg-fenster:nth-child(2) { animation-name:lrg-an3; }
  .lrg-fenster:nth-child(3) { animation-name:lrg-an4; }
  .lrg-fenster:nth-child(4) { animation-name:lrg-an2; }
  .lrg-tuer { position:absolute; left:50%; bottom:0; width:52px; height:66px; margin-left:-26px; background:var(--red,#C0392B); border-radius:8px 8px 0 0; overflow:hidden; }
  .lrg-tuer-licht { position:absolute; inset:4px 4px 0; background:#FFE9BD; border-radius:6px 6px 0 0; opacity:0; animation:lrg-an5 11s linear infinite; }
  .lrg-text { max-width:240px; padding:24px 0 70px; }
  .lrg-eyebrow { font-size:12px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:#C9B8A9; }
  .lrg-titel { font-size:28px; font-weight:800; line-height:1.15; color:#FFFBF6; margin-top:8px; }
  .lrg-titel .lrg-mark { color:#F7C46A; }
  .lrg-sub { font-family:'Newsreader',Georgia,serif; font-style:italic; font-size:16px; color:#C9B8A9; margin-top:8px; }
  @keyframes lrg-an1 { 0%,6% {opacity:0;} 12%,90% {opacity:1;} 97%,100% {opacity:0;} }
  @keyframes lrg-an2 { 0%,20% {opacity:0;} 26%,90% {opacity:1;} 97%,100% {opacity:0;} }
  @keyframes lrg-an3 { 0%,34% {opacity:0;} 40%,90% {opacity:1;} 97%,100% {opacity:0;} }
  @keyframes lrg-an4 { 0%,48% {opacity:0;} 54%,90% {opacity:1;} 97%,100% {opacity:0;} }
  @keyframes lrg-an5 { 0%,62% {opacity:0;} 68%,90% {opacity:1;} 97%,100% {opacity:0;} }
  @media (prefers-reduced-motion: reduce) { .lrg-szene * { animation:none !important; } .lrg-fenster, .lrg-tuer-licht { opacity:1; } }
  @media (max-width:560px) { .lrg-szene { gap:24px; } .lrg-text { padding-bottom:24px; } }

/* Einbau in den Kopf der Gründerhaus-Seite: gleiche Form wie ein Foto */
.anim-haus { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lift); }
.anim-haus .lrg-szene { max-width: none; border-radius: 0; min-height: 0; height: clamp(260px, 26vw, 380px); gap: 0; }
