/* ===================================================================
   vorstellung.css — Parallax-Tour durch die Webseite
   ===================================================================
   Aufbau:
     1. Pacifico-Font + Variablen
     2. Layout-Reset (scrollbar erlaubt!)
     3. Fortschrittsbalken oben
     4. Sektion-Basis (Vollbild, Parallax-BG)
     5. Hero-Sektion (Sektion 1)
     6. Generische Sektion-Inhalte (Titel, Text, CTA)
     7. Scroll-Animationen (fade-in / slide-up)
     8. Sticky kleiner Didi mit Sprechblasen
     9. Spezial-Effekte (Vinyl, TV-Flicker, etc.) — Sektion fuer Sektion
    10. Outro (Sektion 8)
    11. Responsive
    12. Reduced Motion
*/

@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

:root {
    --gold:        #f2b71b;
    --gold-bright: #ffd766;
    --red:         #c8231a;
    --red-deep:    #6a0d08;
    --orange:      #ff8a1f;
    --cream:       #f5e7c2;
    --cream-soft:  #d8c29a;
    --night-1:     #07030a;
    --night-2:     #15070a;
    --night-3:     #2a1006;
}

/* ============================================================
   LAYOUT-RESET (Scroll erlaubt, smooth, kein Overflow-X)
   ============================================================ */
html {
    scroll-behavior: smooth;
}
html, body {
    margin: 0;
    padding: 0;
    background: var(--night-1);
    color: var(--cream);
    font-family: "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
}
.app-container {
    position: relative;
    min-height: 100vh;
}

/* ============================================================
   FORTSCHRITTSBALKEN OBEN (zeigt Scroll-Position)
   ============================================================ */
.tour-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--orange), var(--gold-bright));
    z-index: 200;
    box-shadow: 0 0 12px rgba(255, 138, 31, 0.7);
    transition: width 0.1s linear;
}

/* ============================================================
   SEKTION-BASIS (jede Sektion = mind. ein Viewport hoch)
   ============================================================ */
.tour-sektion {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    overflow: hidden;
    isolation: isolate;
}
.tour-sektion-inner {
    position: relative;
    max-width: 880px;
    width: 100%;
    z-index: 2;
}

/* Parallax-Hintergrund pro Sektion -- mehrere Effekte kombiniert:
   - Scroll-Parallax via --parallax (translateY)
   - Mouse-Parallax via --mouse-x / --mouse-y (3D-Tiefe)
   - Leichter Basis-Zoom (1.08), damit Bewegung keine weissen Lücken zeigt
   - Filter "gedaempft" -> "aktiv" beim Sichtbarwerden (Section-Awake)
*/
.tour-bg {
    position: absolute;
    inset: -16% -14%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    will-change: transform, filter;
    transform:
        translate3d(
            var(--mouse-x, 0px),
            calc(var(--parallax, 0px) + var(--mouse-y, 0px)),
            0
        )
        scale(1.16);
    filter: brightness(0.65) saturate(0.8) blur(0.5px);
    transition: filter 1.4s ease-out;
}
.tour-sektion.is-active .tour-bg {
    filter: brightness(1.05) saturate(1.1) blur(0px);
}
.tour-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.55) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.65));
    transition: opacity 1.4s ease-out;
}
.tour-sektion.is-active .tour-bg::after {
    opacity: 0.85;
}

/* === 3D-Tiefen-Schicht (WebGL, via vorstellung.depth.js) ===
   Der Canvas rendert das tiefen-verschobene Bild. Das ::after-Overlay
   (Vignette) bleibt darueber. Bei aktivem WebGL uebernimmt der Shader
   die Bewegung -> CSS-Transform/Zoom abschalten. */
.tour-bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}
.tour-bg.has-webgl {
    inset: 0;
    transform: none !important;
}

/* ============================================================
   HERO (Sektion 1)
   ============================================================ */
.tour-hero {
    min-height: 100vh;
    text-align: center;
}
.tour-hero .tour-bg {
    background-image: url('../../img/Background_An.png');
}
.tour-hero .tour-bg::after {
    background:
        radial-gradient(ellipse at center, transparent 25%, rgba(0,0,0,0.45) 90%),
        linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.55));
}
.tour-hero-titel {
    font-family: "Pacifico", "Brush Script MT", cursive;
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 1;
    color: var(--gold-bright);
    margin: 0 0 18px;
    text-shadow:
        0 0 6px #fff,
        0 0 18px var(--gold-bright),
        0 0 36px var(--orange),
        0 0 64px var(--red);
    animation: tour-hero-breathe 5s ease-in-out infinite;
}
@keyframes tour-hero-breathe {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.12); }
}
.tour-hero-untertitel {
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    color: var(--cream);
    font-style: italic;
    margin: 0 0 36px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}
.tour-hero-scroll {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gold-bright);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 12px;
    animation: tour-hero-scroll-bob 2s ease-in-out infinite;
}
.tour-hero-scroll-pfeil {
    font-size: 1.6rem;
    line-height: 1;
}
@keyframes tour-hero-scroll-bob {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50%      { transform: translateY(8px); opacity: 1; }
}

/* ============================================================
   GENERISCHE SEKTION-INHALTE
   ============================================================ */
.tour-sektion-nummer {
    display: inline-block;
    font-family: "Pacifico", cursive;
    color: var(--orange);
    font-size: 1.2rem;
    margin-bottom: 8px;
    opacity: 0.85;
    text-shadow: 0 0 12px rgba(255, 138, 31, 0.6);
}
.tour-titel {
    font-family: "Pacifico", "Brush Script MT", cursive;
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    color: var(--gold-bright);
    margin: 0 0 16px;
    line-height: 1.1;
    text-shadow:
        0 0 8px rgba(255, 200, 80, 0.5),
        0 0 24px rgba(255, 138, 31, 0.4);
}
.tour-text {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.65;
    color: var(--cream);
    margin: 0 0 24px;
    max-width: 620px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.tour-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(180deg, var(--red), var(--red-deep));
    color: #fff;
    border: 1px solid var(--gold-bright);
    box-shadow:
        0 6px 18px rgba(0,0,0,0.5),
        0 0 18px rgba(255, 193, 7, 0.45);
    transition: transform 0.15s ease, box-shadow 0.3s ease;
}
.tour-cta:hover,
.tour-cta:focus-visible {
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
    box-shadow:
        0 10px 24px rgba(0,0,0,0.55),
        0 0 28px rgba(255, 193, 7, 0.8);
    outline: 0;
}

/* ============================================================
   SCROLL-ANIMATIONEN (IntersectionObserver setzt .is-visible)
   ============================================================ */
.tour-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.tour-fade.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.tour-fade--left  { transform: translateX(-40px); }
.tour-fade--right { transform: translateX(40px); }
.tour-fade--left.is-visible,
.tour-fade--right.is-visible { transform: translateX(0); }

.tour-fade--delay-1 { transition-delay: 0.15s; }
.tour-fade--delay-2 { transition-delay: 0.30s; }
.tour-fade--delay-3 { transition-delay: 0.45s; }

/* ============================================================
   STICKY KLEINER DIDI MIT SPRECHBLASE
   ============================================================ */
.tour-didi {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: scale(0.6) translateY(-20px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 1.2, 0.3, 1);
    pointer-events: none;
}
.tour-didi.is-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}
.tour-didi-bubble {
    background: linear-gradient(180deg, #fff8e0 0%, #f0e2c0 100%);
    color: var(--night-2);
    padding: 10px 16px;
    border-radius: 18px;
    border: 2px solid var(--gold-bright);
    box-shadow:
        0 8px 20px rgba(0,0,0,0.5),
        0 0 16px rgba(255, 193, 7, 0.4);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    max-width: 220px;
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}
.tour-didi.is-visible .tour-didi-bubble {
    opacity: 1;
    transform: translateX(0);
}
.tour-didi-bubble::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -10px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-left-color: var(--gold-bright);
}
.tour-didi-bubble::before {
    content: '';
    position: absolute;
    top: 24px;
    right: -7px;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-left-color: #f0e2c0;
    z-index: 1;
}

.tour-didi-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 3px solid var(--gold-bright);
    background: #1a0805 center/cover no-repeat;
    background-image: url('../../img/DidiAvatar.png');
    background-position: center top;
    box-shadow:
        0 8px 22px rgba(0,0,0,0.6),
        0 0 22px rgba(255, 193, 7, 0.5);
    cursor: pointer;
    flex-shrink: 0;
    animation: tour-didi-breathe 3.2s ease-in-out infinite;
}
@keyframes tour-didi-breathe {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.35)); }
    50%      { filter: drop-shadow(0 0 18px rgba(255, 193, 7, 0.75)); }
}

/* Didi-Toggle (Sprechblase ein/aus) */
.tour-didi-toggle {
    position: fixed;
    top: 90px;
    right: 130px;
    z-index: 99;
    background: rgba(20, 8, 6, 0.8);
    color: var(--cream-soft);
    border: 1px solid rgba(255, 193, 7, 0.4);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.4s ease, color 0.2s ease;
}
.tour-didi.is-visible ~ .tour-didi-toggle {
    opacity: 1;
}
.tour-didi-toggle:hover { color: var(--gold-bright); }
body.tour-didi-stumm .tour-didi-bubble {
    display: none;
}

/* ============================================================
   SEKTION 2 — DIE BAR (Startseite-Vorstellung)
   ============================================================ */
.tour-sektion--bar .tour-bg {
    background-image: url('../../img/Background_Aus.png');
}

/* ============================================================
   SEKTION 3 — DIE MUSIKBOX (Vinyl-Spin)
   ============================================================ */
.tour-sektion--musikbox .tour-bg {
    background-image: url('../../img/Background_An.png');
}
.tour-vinyl {
    width: clamp(180px, 30vw, 320px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle, #1a1a1a 22%, transparent 22.5%),
        repeating-radial-gradient(circle, #0a0a0a 0 1px, #1c1c1c 1px 4px),
        #000;
    box-shadow:
        0 18px 40px rgba(0,0,0,0.7),
        0 0 0 4px #2a1006,
        inset 0 0 60px rgba(0,0,0,0.8);
    position: relative;
    transform: rotate(var(--vinyl-rotation, 0deg));
    will-change: transform;
    margin: 20px auto;
}
.tour-vinyl::after {
    content: '';
    position: absolute;
    inset: 38%;
    background: radial-gradient(circle, var(--red) 0%, var(--red-deep) 70%);
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(200,35,26,0.5);
}

/* ============================================================
   SEKTION 4 — VIDEOS (Retro-TV-Frame mit Flicker)
   ============================================================ */
.tour-sektion--videos .tour-bg {
    background-image: url('../../img/Background_Aus.png');
}
.tour-tv {
    position: relative;
    width: clamp(280px, 50vw, 520px);
    aspect-ratio: 4 / 3;
    background: linear-gradient(180deg, #2a1c12 0%, #1a0f08 100%);
    border-radius: 18px;
    padding: 18px;
    box-shadow:
        0 18px 40px rgba(0,0,0,0.7),
        inset 0 -4px 8px rgba(0,0,0,0.7),
        inset 0 2px 4px rgba(255,200,120,0.15);
    margin: 20px auto;
}
.tour-tv-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #001a33 0%, #003366 50%, #001a33 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
}
.tour-tv-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(255,255,255,0.04) 0px,
        rgba(255,255,255,0.04) 1px,
        transparent 1px,
        transparent 3px
    );
    animation: tour-tv-scanlines 0.3s steps(2) infinite;
}
.tour-tv.is-visible .tour-tv-screen::after {
    content: '🎬';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--gold-bright);
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.8);
    animation: tour-tv-flicker 4s steps(8) infinite;
}
@keyframes tour-tv-scanlines {
    0%   { transform: translateY(0); }
    100% { transform: translateY(3px); }
}
@keyframes tour-tv-flicker {
    0%, 92%, 100% { opacity: 1; }
    93% { opacity: 0.4; }
    94% { opacity: 1; }
    95% { opacity: 0.5; }
    96% { opacity: 1; }
}

/* ============================================================
   SEKTION 5 — PERSONALISIERTE SONGS (Geschenk)
   ============================================================ */
.tour-sektion--personalisiert .tour-bg {
    background-image: url('../../img/studio.png');
}
.tour-geschenk {
    width: clamp(180px, 30vw, 280px);
    aspect-ratio: 1;
    position: relative;
    margin: 20px auto;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.tour-geschenk.is-visible { transform: rotateY(360deg); }
.tour-geschenk-box {
    position: absolute;
    inset: 18% 8% 8%;
    background: linear-gradient(180deg, #c8231a 0%, #6a0d08 100%);
    border-radius: 8px;
    box-shadow:
        0 14px 28px rgba(0,0,0,0.6),
        inset 0 0 20px rgba(0,0,0,0.4);
}
.tour-geschenk-band-v,
.tour-geschenk-band-h {
    position: absolute;
    background: linear-gradient(180deg, var(--gold-bright), var(--gold));
}
.tour-geschenk-band-v {
    top: 0; bottom: 0;
    left: 50%; width: 14%;
    transform: translateX(-50%);
}
.tour-geschenk-band-h {
    left: 0; right: 0;
    top: 50%; height: 14%;
    transform: translateY(-50%);
}
.tour-geschenk-schleife {
    position: absolute;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(2.2rem, 6vw, 4rem);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}
.tour-geschenk-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--gold-bright);
    color: var(--night-2);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transform: rotate(8deg);
}

/* ============================================================
   SEKTION 6 — WERKSTATT (Split-Screen)
   ============================================================ */
.tour-sektion--werkstatt .tour-bg {
    background-image: url('../../img/Parallax.png');
}
.tour-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 24px auto;
    max-width: 720px;
}
.tour-split-side {
    background: rgba(20, 8, 6, 0.7);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 14px;
    padding: 22px;
    text-align: center;
}
.tour-split-side--analog {
    border-color: rgba(245, 231, 194, 0.4);
}
.tour-split-side--digital {
    border-color: var(--gold-bright);
    box-shadow: 0 0 18px rgba(255, 193, 7, 0.3);
}
.tour-split-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}
.tour-split-titel {
    color: var(--gold-bright);
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.tour-split-text {
    font-size: 0.92rem;
    color: var(--cream);
    margin: 0;
}
.tour-split-pfeil {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--orange);
    font-size: 1.8rem;
    margin-top: -8px;
    margin-bottom: -8px;
    animation: tour-split-pulse 2.4s ease-in-out infinite;
}
@keyframes tour-split-pulse {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50%      { transform: translateY(6px); opacity: 1; }
}

/* ============================================================
   SEKTION 7 — SPENDENZIEL (Cinematic, Counter)
   ============================================================ */
.tour-sektion--spenden {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(70, 30, 10, 0.4), transparent 70%),
        linear-gradient(180deg, var(--night-1) 0%, #1a0d05 100%);
}
.tour-sektion--spenden .tour-bg {
    background: radial-gradient(ellipse at center, rgba(180, 60, 20, 0.2), transparent 60%);
}
.tour-counter {
    display: inline-block;
    font-family: "Pacifico", cursive;
    font-size: clamp(4rem, 12vw, 8rem);
    color: var(--gold-bright);
    line-height: 1;
    margin: 16px 0 8px;
    text-shadow:
        0 0 12px rgba(255, 200, 80, 0.6),
        0 0 32px rgba(255, 138, 31, 0.4);
}
.tour-counter-label {
    display: block;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 1.1rem;
    color: var(--cream);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0.85;
}

/* ============================================================
   SEKTION 8 — OUTRO (CTA)
   ============================================================ */
.tour-outro {
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 138, 31, 0.15), transparent 60%),
        linear-gradient(180deg, var(--night-2), var(--night-1));
}
.tour-outro .tour-bg { display: none; }
.tour-outro-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 32px;
}
.tour-outro-aktionen .tour-cta--ghost {
    background: transparent;
    border-color: rgba(245, 231, 194, 0.4);
    color: var(--cream-soft);
    box-shadow: none;
}
.tour-outro-aktionen .tour-cta--ghost:hover {
    color: #fff;
    border-color: var(--cream);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .tour-didi {
        top: auto;
        bottom: 16px;
        right: 16px;
        flex-direction: row-reverse;
        align-items: center;
    }
    .tour-didi-bubble {
        max-width: 180px;
        font-size: 0.8rem;
    }
    .tour-didi-bubble::after,
    .tour-didi-bubble::before {
        left: -10px;
        right: auto;
        border-left-color: transparent;
        border-right-color: var(--gold-bright);
    }
    .tour-didi-bubble::before {
        left: -7px;
        right: auto;
        border-left-color: transparent;
        border-right-color: #f0e2c0;
    }
    .tour-didi-avatar {
        width: 60px;
        height: 60px;
    }
    .tour-didi-toggle {
        bottom: 90px;
        top: auto;
        right: 16px;
    }
    .tour-split {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .tour-hero-titel,
    .tour-didi-avatar,
    .tour-tv-screen::before,
    .tour-tv.is-visible .tour-tv-screen::after,
    .tour-split-pfeil,
    .tour-hero-scroll {
        animation: none !important;
    }
    .tour-fade {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .tour-bg { transform: none !important; }
    .tour-vinyl { transform: none !important; }
    .tour-geschenk { transform: none !important; }
}
