/* ==========================================================================
   Szene «Die Verwandlung» — Scroll-Prototyp der Startseite (Konzept A, Entscheid 07.10.2026)
   Partitur: 02_Design/partitur-index.md · Storyboard: 02_Design/storyboard-scrollytelling_2026-10-07/
   Zwei Fassungen aus einem Markup:
   - html.szene-an (Skript, Desktop quer, Bewegung erlaubt): gepinnte Bühne, Komposition im Entwurfsmass
     1440×900 (.szene__box), vom Skript auf den Bildschirm skaliert. Alles bewegt sich nur über transform,
     opacity und clip-path.
   - sonst (ohne Skript, schmal, Hochformat, reduzierte Bewegung): Hero wie bisher, darunter .umbau-statisch.
   ========================================================================== */

.szene .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Gemeinsam: Grund (Navy, Punktraster, Glow wie .hero) ---------- */
/* --szene-leise: Grau für Untertext und Hinweis auf der hellen Bühne (#EEF0F3 bis #F3F4F6). --text-muted erreicht
   dort nur 4,2 : 1, dieses Grau 5,1 : 1 */
.szene { position: relative; --szene-leise: #5F6673; }
.szene__grund {
    position: absolute; inset: 0; background-color: var(--blue);
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 26px 26px;
    overflow: hidden; pointer-events: none;
}
.szene__grund::before {
    content: ''; position: absolute; top: -150px; left: -150px; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(196,240,82,0.15) 0%, rgba(196,240,82,0) 65%);
    animation: hero-glow-pulse 8s ease-in-out infinite;
}

/* ---------- Objekt: Browserrahmen (Muster .vergleich auf /webseiten) ---------- */
.szene__objekt { margin: 0; border-radius: 22px; overflow: hidden; background: #16233C; box-shadow: 0 30px 80px rgba(3,10,24,0.55); position: relative; transition: box-shadow 0.5s; }
.szene--hell .szene__objekt { box-shadow: 0 30px 80px rgba(6,15,30,0.22); }
.szene__objekt::after { content: ''; position: absolute; inset: 0; border-radius: 22px; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10); z-index: 4; }
.objekt__leiste { display: flex; align-items: center; gap: 11px; padding: 10px 14px; background: #101C31; }
.objekt__punkte { display: flex; gap: 6px; flex-shrink: 0; }
.objekt__punkte i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.20); }
.objekt__adresse { flex: 1; display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.30); border-radius: 7px; padding: 5px 11px; font-size: 11.8px; line-height: 1.2; color: rgba(255,255,255,0.66); letter-spacing: 0.01em; white-space: nowrap; }
.objekt__adresse svg { width: 11px; height: 11px; opacity: 0.55; flex-shrink: 0; }
.objekt__buehne { position: relative; aspect-ratio: 1200 / 750; overflow: hidden; }
.objekt__bild { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; max-width: none; }

/* ==========================================================================
   Fassung ohne Szene
   ========================================================================== */
html:not(.szene-an) .szene { background: var(--blue); color: var(--white); overflow: hidden; isolation: isolate; }
html:not(.szene-an) .szene__buehne { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 6rem 0 4rem; }
html:not(.szene-an) .szene__box {
    position: relative; z-index: 1; width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 2rem;
    display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 4rem; align-items: center;
}
html:not(.szene-an) .szene__satz,
html:not(.szene-an) .szene__ergebnis,
html:not(.szene-an) .szene__schluss,
html:not(.szene-an) .etikett,
html:not(.szene-an) .szene__linien,
html:not(.szene-an) .szene__gesamt,
html:not(.szene-an) .szene__blatt,
html:not(.szene-an) .szene__hinweis,
html:not(.szene-an) .szene__pille,
html:not(.szene-an) .objekt__wasch,
html:not(.szene-an) .objekt__band { display: none; }
/* Ohne Szene zeigt der Hero das Ergebnis, das Vorher steht im statischen Vergleich darunter */
html:not(.szene-an) .objekt__neu { clip-path: none; }
html:not(.szene-an) .objekt__alt, html:not(.szene-an) .objekt__marke--alt { visibility: hidden; }
@media (max-width: 1024px) {   /* wie .hero__inner auf der Live-Seite */
    html:not(.szene-an) .szene__box { grid-template-columns: 1fr; gap: 3rem; }
}
@media (max-width: 640px) {
    html:not(.szene-an) .szene__buehne { padding: 6rem 0 3.5rem; min-height: auto; }
    html:not(.szene-an) .szene__box { padding: 0 1.25rem; }
    html:not(.szene-an) .szene__objekt { border-radius: 14px; }
}

.umbau-statisch__titel { font-size: clamp(1.9rem, 3.6vw, 2.5rem); color: var(--blue); max-width: 760px; margin-bottom: 0.75rem; }
.umbau-statisch__sub { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2.5rem; max-width: 640px; }
.umbau-statisch__paar { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.umbau-statisch__fall { margin: 0; }
.umbau-statisch__fall img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 18px 48px rgba(6,15,30,0.16); }
.umbau-statisch__fall figcaption { margin-top: 1rem; font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }
.umbau-statisch__fall figcaption b { display: block; font-size: 1.05rem; color: var(--blue); margin-bottom: 0.2rem; }
.umbau-statisch__cta { margin-top: 2.5rem; }
@media (max-width: 760px) { .umbau-statisch__paar { grid-template-columns: 1fr; } }
html.szene-an .umbau-statisch { display: none; }

/* ==========================================================================
   Fassung mit Szene
   ========================================================================== */
html.szene-an .szene { height: 630svh; background: var(--bg); }   /* Szene 5,3 Bildschirme Weg + Bühne */
html.szene-an .szene__buehne { position: sticky; top: 0; height: 100svh; overflow: hidden; }
html.szene-an .szene__grund { will-change: opacity; }
html.szene-an .szene__box { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 0 0; color: var(--white); }

/* Satz 1: Hero im Entwurfsmass */
html.szene-an .szene__hero { position: absolute; left: 182px; top: 205px; width: 556px; }
html.szene-an .szene__hero .hero__headline { font-size: 54px; line-height: 1.08; margin-bottom: 24px; }
html.szene-an .szene__hero .hero__lead { max-width: 531px; margin: 0 0 1.75rem; }
html.szene-an .szene__hero { text-align: left; }
html.szene-an .szene .hero__checks, html.szene-an .szene .hero__buttons { justify-content: flex-start; }   /* Live-Regel bis 1024 px zentriert */

/* Sätze 2 bis 6 */
.szene__satz { font-family: var(--font-display); font-weight: 400; font-size: 48px; line-height: 1.1; letter-spacing: -0.01em; color: var(--white); margin: 0; }
html.szene-an .szene__box > .szene__satz { position: absolute; left: 182px; top: 110px; max-width: 620px; }
.szene__satz--gross { font-size: 72px; line-height: 1; }
.szene__neu { color: var(--lime); font-variant-numeric: tabular-nums; }
.szene__sub { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,0.7); margin: 0; }
html.szene-an .szene__ergebnis { position: absolute; left: 182px; top: 330px; width: 420px; }
html.szene-an .szene__ergebnis .szene__sub { margin-top: 26px; max-width: 400px; }
html.szene-an .szene__schluss { position: absolute; left: 182px; top: 250px; width: 480px; }
html.szene-an .szene__schluss .szene__satz { font-size: 54px; }
html.szene-an .szene__schluss .szene__sub { margin: 26px 0 30px; max-width: 460px; }

/* Objekt im Entwurfsmass: Grundmass XL, Zustände über transform */
html.szene-an .szene__objekt { position: absolute; left: 440px; top: 220px; width: 920px; transform-origin: 0 0; z-index: 3; }
.objekt__wasch { position: absolute; inset: 0; background: rgba(10,31,61,0.5); -webkit-backdrop-filter: saturate(0.35); backdrop-filter: saturate(0.35); clip-path: inset(0 0 100% 0); z-index: 1; }
.objekt__neu { position: absolute; inset: 0; z-index: 2; clip-path: inset(0 0 100% 0); }
/* Marke «Alte Seite» / «Neue Seite» (Entscheid 08.10.): hängt an ihrer Ebene, beim Wischen zeigt jede Hälfte ihre eigene.
   Gegenskaliert mit --s (Rahmen-Massstab aus szene.js), damit sie in jeder Rahmengrösse gleich gross bleibt. */
.objekt__marke { position: absolute; left: 2.2%; bottom: 8%; z-index: 1; padding: 4px 10px; border-radius: 99px; font: 600 12.5px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; pointer-events: none; transform-origin: 0 100%; transform: scale(calc(1 / var(--s, 1))); }
.objekt__marke--alt { background: rgba(10,31,61,0.85); color: #fff; }
.objekt__marke--neu { background: var(--lime); color: var(--blue); }
.objekt__band { position: absolute; left: 0; right: 0; top: -1.5px; height: 3px; background: var(--lime); z-index: 3; opacity: 0; }

/* Etiketten (Check-Diagnose) */
.etikett { position: absolute; left: 0; top: 0; z-index: 9; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 222px; padding: 9px 12px 8px; background: rgba(10,31,61,0.94); border: 1px solid rgba(196,240,82,0.55); border-radius: 10px; opacity: 0; transform-origin: 50% 50%; }
.etikett b { font: 600 13px/1.2 Inter, system-ui, sans-serif; color: #fff; }
.etikett strong { font: 600 22px/1 Inter, system-ui, sans-serif; color: var(--lime); white-space: nowrap; font-variant-numeric: tabular-nums; }
.etikett strong small { font: 500 11px/1 Inter, system-ui, sans-serif; color: rgba(255,255,255,0.6); margin-left: 2px; }

.szene__linien { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; z-index: 6; pointer-events: none; overflow: visible; }
.szene__linien g { opacity: 0; }
.szene__linien line { stroke: var(--lime); stroke-width: 2; transition: stroke 0.4s; }
.szene__linien circle { fill: var(--lime); stroke: rgba(10,31,61,0.9); stroke-width: 3; transition: stroke 0.4s; }
.szene--hell .szene__linien line { stroke: #8DB82A; }
.szene--hell .szene__linien circle { stroke: #fff; }

.szene__gesamt { position: absolute; left: 150px; top: 735px; margin: 0; font-family: var(--font-display); font-size: 120px; line-height: 0.9; color: var(--white); opacity: 0; font-variant-numeric: tabular-nums; }
.szene__gesamt small { font-family: Inter, system-ui, sans-serif; font-size: 26px; color: rgba(255,255,255,0.6); margin-left: 8px; }
.szene__gesamt-lbl { display: block; font: 500 14px/1.3 Inter, system-ui, sans-serif; color: rgba(255,255,255,0.6); margin-top: 12px; }

/* Artefakt: Report-Blatt (Muster .heroreport__page, ×1,5) */
.szene__blatt { position: absolute; left: 740px; top: 140px; width: 440px; z-index: 8; background: var(--white); border-radius: 10px; padding: 30px 28px 18px; box-shadow: 0 24px 64px rgba(6,15,30,0.18); color: var(--text); will-change: transform; transform: translateY(900px); }
.blatt__lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--lime-text); margin: 0 0 6px; }
.blatt__titel { font-size: 26px; font-weight: 600; color: var(--blue); margin: 0 0 8px; letter-spacing: -0.02em; line-height: 1.2; }
.blatt__intro { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin: 0 0 16px; }
.blatt__kopf, .blatt__zeile { display: grid; grid-template-columns: 26px 1fr 52px 96px; gap: 10px; align-items: center; }
.blatt__kopf { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding-bottom: 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.blatt__zeile { padding: 9px 0; border-bottom: 1px solid rgba(229,231,235,0.7); font-size: 14px; line-height: 1.3; color: var(--text); }
.blatt__zeile span:nth-child(1) { color: var(--text-muted); font-weight: 600; font-size: 12px; }
.blatt__wert { font-weight: 600; color: var(--blue); text-align: right; display: inline-block; }
html.szene-an .blatt__wert { opacity: 0; }
.blatt__balken { display: block; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.blatt__total { display: flex; justify-content: space-between; padding-top: 12px; margin: 4px 0 0; font-size: 15px; font-weight: 700; color: var(--blue); }
.blatt__note { font-size: 11px; color: var(--text-muted); line-height: 1.5; margin: 10px 0 0; }
.blatt__fuss { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); border-top: 1px solid var(--border); margin: 14px 0 0; padding-top: 10px; }

/* Hinweis, Pille. Der Hinweis steht bündig mit der rechten Rahmenkante (XL und A7: 1360) und bricht nur am Satzende
   (Zeilenumbruch im Text, pre-line), nie mitten im Satz (Entscheid 08.10.) */
.szene__hinweis { position: absolute; right: 80px; bottom: 15px; margin: 0; max-width: 640px; text-align: right; white-space: pre-line; font: 500 12px/1.4 Inter, system-ui, sans-serif; color: rgba(255,255,255,0.55); opacity: 0; transition: color 0.4s; }
.szene--hell .szene__hinweis { color: var(--szene-leise); }
.szene__pille { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); margin: 0; display: inline-flex; gap: 8px; align-items: center; padding: 9px 16px; border-radius: 99px; border: 1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.07); font: 500 13px/1 Inter, system-ui, sans-serif; color: rgba(255,255,255,0.85); z-index: 9; transition: color 0.4s, border-color 0.4s, background 0.4s; }
.szene--hell .szene__pille { border-color: rgba(10,31,61,0.2); background: rgba(10,31,61,0.04); color: var(--blue); }

/* Helle Bühne (ab Satz 5): Schrift und Zweitknopf auf Navy umstellen */
.szene--hell .szene__satz { color: var(--blue); }
.szene--hell .szene__neu { color: var(--lime-text); }
.szene--hell .szene__sub { color: var(--szene-leise); }
.szene--hell .szene__schluss .btn-secondary { border-color: rgba(10,31,61,0.25); color: var(--blue); }
.szene--hell .szene__schluss .btn-secondary:hover { border-color: rgba(10,31,61,0.5); color: var(--blue); }

.szene__debug { position: fixed; right: 12px; top: 84px; z-index: 2000; background: rgba(0,0,0,0.75); color: #C4F052; font: 12px/1.4 ui-monospace, monospace; padding: 8px 10px; border-radius: 8px; white-space: pre; pointer-events: none; }
