/* ============================================================
   BANDBEE BÜHNE (ADR-0026) — Homepage und öffentliche Partner-Startseite
   Baut auf tokens.css auf (eine Quelle für Raster, Schrift, Radien, Markenfarben und beide Themes, #2945)
   und trägt nur, was die Bühne anders braucht. Laden NACH tokens.css.

   - Teil 1: Bühnen-Tokens (--stage-*), ohne Bereich, damit auch die Großansicht wirkt, die als <dialog> am
     <body> hängt.
   - Teil 2: Abweichungen der Bühne von den Werkzeug-Tokens, nur innerhalb von .bb-stage (Homepage: am <html>,
     Partner-Startseite: Hülle der Seite). Spezifität (0,2,0) schlägt die Theme-Blöcke von tokens.css (0,1,0).
   - Teil 3: Bühnen-Bausteine, die Homepage und Partner-Startseite teilen (Handyrahmen, Großansicht, Knöpfe,
     Kicker). Seiten-Layouts bleiben bei der Seite (Web/wwwroot/css/home.css, PartnerPortal/Pages/Index.razor.css).

   Markenwerte (--primary*, Schriftfamilien) stehen hier nicht; sie kommen aus tokens.css und wandern mit #2412
   nach brand.css.
   ============================================================ */

/* --- Teil 1: Bühnen-Tokens --- */
[data-theme="bandbee-dark"] {
  /* #2797 Bühne (Homepage): Handyrahmen, Schleier über dem Hero-Foto, Lichtschein des Offline-Abschnitts */
  --stage-phone-bezel: #0b0b0d;
  --stage-phone-ring: #3a3a42;
  --stage-phone-shadow: 0 0 0 2px var(--stage-phone-ring), 0 30px 80px rgba(0,0,0,0.6);
  /* Großansicht der Screenshots: in beiden Themes dunkel (Bild steht im Vordergrund), Text hell, 4,5:1 */
  --stage-lightbox-backdrop: rgba(12,12,14,0.92);
  --stage-lightbox-text: #f4f4f5;
  --stage-lightbox-ring: rgba(255,255,255,0.28);
  --stage-hero-scrim: linear-gradient(90deg, rgba(22,22,24,0.96) 0%, rgba(22,22,24,0.84) 45%, rgba(22,22,24,0.40) 100%);
  --stage-hero-scrim-mobile: linear-gradient(180deg, rgba(22,22,24,0.92) 0%, rgba(22,22,24,0.86) 100%);
  --stage-glow: radial-gradient(1200px 500px at 80% 50%, rgba(255,197,0,0.10), transparent 60%);
}

[data-theme="bandbee-light"] {
  /* #2797 Bühne: Rahmen bleibt dunkel (Handy), Schleier hell, damit dunkler Text auf dem Foto 4,5:1 hält */
  --stage-phone-bezel: #0b0b0d;
  --stage-phone-ring: #9a9ca4;
  --stage-phone-shadow: 0 0 0 2px var(--stage-phone-ring), 0 24px 60px rgba(14,16,24,0.30);
  /* Großansicht der Screenshots: in beiden Themes dunkel (Bild steht im Vordergrund), Text hell, 4,5:1 */
  --stage-lightbox-backdrop: rgba(12,12,14,0.92);
  --stage-lightbox-text: #f4f4f5;
  --stage-lightbox-ring: rgba(255,255,255,0.28);
  --stage-hero-scrim: linear-gradient(90deg, rgba(197,200,206,0.97) 0%, rgba(197,200,206,0.88) 45%, rgba(197,200,206,0.50) 100%);
  --stage-hero-scrim-mobile: linear-gradient(180deg, rgba(197,200,206,0.95) 0%, rgba(197,200,206,0.90) 100%);
  --stage-glow: radial-gradient(1200px 500px at 80% 50%, rgba(255,197,0,0.16), transparent 60%);
}

/* --- Teil 2: Abweichungen der Bühne (nur dunkles Theme; das helle ist identisch mit dem Werkzeug) ---
   Grund: Die Homepage (#2797) ist auf dem tieferen Anthrazit mit Gold-Hauch gestaltet und abgenommen; das
   Werkzeug wurde am 07.11.2026 freundlicher und neutraler (Vorschlag C). #2945 führt die Token-Dateien zusammen,
   ohne die Homepage optisch zu ändern, darum stehen die bisherigen Homepage-Werte hier. Angleichen ist eine
   eigene Entscheidung (Patrick), dann entfällt dieser Block. */
[data-theme="bandbee-dark"].bb-stage,
[data-theme="bandbee-dark"] .bb-stage {
  --bg: #161618;
  --bg-elevated: #1e1e22;
  --surface: #27272c;
  --surface-hover: #313136;
  --surface-elevated: #313136;
  --surface-active: #3c3c42;
  --border: rgba(255,200,50,0.08);
  --text-secondary: #b0b0ba; /* 8,6:1 auf --bg, 7,0:1 auf --surface */
  /* 4,3:1 auf --bg, 3,6:1 auf --surface: unter 4,5:1. Unverändert von der Homepage übernommen (#2945 ändert sie
     optisch nicht); neue Bühnen-Texte nehmen --text-secondary. */
  --text-tertiary: #78788a;
  --shadow-sm: 0 1px 3px rgba(8,8,10,0.45);
  --input-bg: #1c1c20;
  --header-bg: rgba(22,22,24,0.92);
  --hero-gradient: linear-gradient(135deg, #161618 0%, #1e1c14 100%);
}

/* --- Teil 3: Bühnen-Bausteine --- */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Handyrahmen (Web: Shared/AppScreenshot.razor, PartnerPortal: Shared/StageScreenshot.razor), Bild 430:932. Das
   Seitenverhältnis gilt für das Bild, nicht für den Rahmen samt Polsterung: sonst ist die Innenfläche schmaler als
   430:932, object-fit: cover schneidet links und rechts je ~8 App-Pixel ab, und Text am Rand der App verliert
   Buchstaben („quipment“, Befund Patrick 11.11.2026). */
.phone {
    width: min(300px, 70vw);
    border-radius: 44px;
    padding: 10px;
    background: var(--stage-phone-bezel);
    box-shadow: var(--stage-phone-shadow);
    justify-self: center;
    flex-shrink: 0;
}
.phone picture, .phone img {
    display: block;
    width: 100%;
    height: auto;
}
.phone img {
    aspect-ratio: 430 / 932;
    object-fit: cover;
    object-position: top;
    border-radius: 34px;
}
.phone.sm { width: min(240px, 60vw); }
.phone.xs { width: 120px; border-radius: 20px; padding: 5px; }
.phone.xs img { border-radius: 15px; }
@media (prefers-reduced-motion: no-preference) {
    .phone.tilt { transform: rotate(-4deg); }
}

/* Großansicht (js/stage-lightbox.js): das Bild ist ein Knopf, Rahmen und Maße bleiben */
.phone-zoom {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 34px;
    background: none;
    color: inherit;
    font: inherit;
    cursor: zoom-in;
}
.phone.xs .phone-zoom { border-radius: 15px; }
.phone-zoom:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.phone-zoom-hint {
    position: absolute;
    right: var(--s-8);
    bottom: var(--s-8);
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--stage-lightbox-backdrop);
    color: var(--stage-lightbox-text);
    font-size: 1.25rem;
    opacity: 0.85;
    pointer-events: none;
}
.phone.xs .phone-zoom-hint { right: 4px; bottom: 4px; width: 1.5rem; height: 1.5rem; font-size: 1rem; }
.phone-zoom:hover .phone-zoom-hint, .phone-zoom:focus-visible .phone-zoom-hint { opacity: 1; background: var(--primary); color: var(--primary-text); }

html.stage-lightbox-open { overflow: hidden; }
.stage-lightbox {
    box-sizing: border-box;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: var(--s-16);
    border: 0;
    background: transparent;
    color: var(--stage-lightbox-text);
    overscroll-behavior: contain;
}
.stage-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.stage-lightbox::backdrop { background: var(--stage-lightbox-backdrop); }
.stage-lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-12);
    margin: 0;
    max-width: 100%;
    max-height: 100%;
}
.stage-lightbox-figure picture { display: contents; }
.stage-lightbox-img {
    display: block;
    width: auto;
    height: auto;
    /* so groß wie möglich: Rand, Schließen-Knopf (oben) und Bildunterschrift abgezogen */
    max-width: calc(100vw - 2 * var(--s-16));
    max-height: calc(100dvh - 9rem);
    border-radius: var(--radius-lg);
    box-shadow: var(--stage-phone-shadow);
    cursor: default;
}
.stage-lightbox-caption {
    max-width: 40rem;
    text-align: center;
    font-size: 0.9375rem;
    line-height: 1.4;
}
.stage-lightbox-close {
    position: fixed;
    top: var(--s-16);
    right: var(--s-16);
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 1px solid var(--stage-lightbox-ring);
    border-radius: 50%;
    background: var(--stage-lightbox-backdrop);
    color: var(--stage-lightbox-text);
    cursor: pointer;
}
.stage-lightbox-close .material-symbols-outlined { font-size: 1.75rem; }
.stage-lightbox-close:hover { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.stage-lightbox-close:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Knöpfe */
.stage-btns { display: flex; gap: var(--s-16); flex-wrap: wrap; margin-top: var(--s-24); }
.stage-btn {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: var(--s-12) var(--s-24);
    border-radius: var(--radius-sm);
    font-weight: var(--fw-bold);
    text-decoration: none;
    transition: background-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.stage-btn-primary { background: var(--primary); color: var(--primary-text); }
.stage-btn-secondary { border: 2px solid var(--primary); color: var(--heading-color); } /* dunkel = --primary; hell dunkles Gold (4,5:1) */
.stage-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
@media (hover: hover) {
    .stage-btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-glow); color: var(--primary-text); }
    .stage-btn-secondary:hover { box-shadow: var(--shadow-glow); }
}

.stage-kicker {
    color: var(--heading-color) !important;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: var(--fs-sm) !important;
    margin-bottom: var(--s-8) !important;
}
