/* ==========================================================================
   Scroll-Video-Hero der Startseite
   Luftaufnahme -> Liegestuhl -> Tablet, gesteuert von der Scrollposition.
   Nur ab Desktop-Breite; auf Touch/Schmal uebernimmt der statische Hero
   (Klasse .is-static, gesetzt in /hero-scroll.js).
   ========================================================================== */

/* Die Sequenz: hohe Scrollbahn, in der die Buehne klebt. */
.scrollytell {
    position: relative;
    /* Scrolldistanz = Laenge der Videosteuerung. */
    height: 460vh;
    background: #04121f;
}

.scrollytell__stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #04121f;
}

.scrollytell__video,
.scrollytell__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Video-Element nicht anklickbar - Scroll gehoert der Seite. */
    pointer-events: none;
}

.scrollytell__poster {
    z-index: 1;
    opacity: 1;
    transition: opacity .6s ease;
}
.scrollytell.is-ready .scrollytell__poster { opacity: 0; }

.scrollytell__video { z-index: 2; }

/* Lesbarkeit der Typo ueber dem Bild. */
.scrollytell__scrim {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        /* Weiche Mitte, damit die Headline auch ueber hellem Sand liest. */
        radial-gradient(ellipse 78% 52% at 50% 52%, rgba(4,18,31,.62) 0%, rgba(4,18,31,.30) 55%, rgba(4,18,31,0) 100%),
        linear-gradient(to bottom, rgba(4,18,31,.55) 0%, rgba(4,18,31,0) 34%, rgba(4,18,31,0) 52%, rgba(4,18,31,.75) 100%);
}

.scrollytell__copy {
    position: absolute;
    /* Vor dem ersten Scroll ragt die Buehne um --stage-offset unter den
       Viewport (Navbar + Banner stehen darueber). Der Textblock zentriert
       deshalb nur im sichtbaren Teil - sonst rutscht er auf den
       Scroll-Hinweis. */
    inset: 0 0 var(--stage-offset, 0px) 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Untere Polsterung haelt den Text vom Scroll-Hinweis frei. */
    padding: 0 1.5rem var(--hint-space, 6rem);
    text-align: center;
    pointer-events: none;
}

.beat {
    position: absolute;
    max-width: 940px;
    color: #fff;
    opacity: 0;
    transform: translateY(28px) scale(.98);
    transition: opacity .5s ease, transform .5s ease;
}
.beat.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.beat.is-active a,
.beat.is-active .beat__cta { pointer-events: auto; }

/* Letzter Beat: Text nach unten, damit das Tablet frei bleibt. */
.beat--end {
    top: auto;
    bottom: 3rem;
}
.scrollytell.is-final .scrollytell__scrim {
    background: linear-gradient(to bottom,
        rgba(4,18,31,.42) 0%, rgba(4,18,31,0) 28%,
        rgba(4,18,31,0) 42%, rgba(4,18,31,.90) 100%);
}

.beat__eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    padding: .4rem 1rem;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: rgba(4,18,31,.28);
    backdrop-filter: blur(6px);
}

.beat h1,
.beat h2 {
    margin: 0;
    font-size: clamp(2rem, 5.4vw, 4rem);
    line-height: 1.08;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 26px rgba(0,0,0,.45);
}

.beat p {
    margin: 1.1rem auto 0;
    max-width: 680px;
    font-size: clamp(1.02rem, 1.7vw, 1.3rem);
    line-height: 1.6;
    color: rgba(255,255,255,.92);
    text-shadow: 0 2px 18px rgba(0,0,0,.5);
}

.beat__cta {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Scroll-Hinweis, verschwindet nach dem ersten Scroll. */
.scrollytell__hint {
    position: absolute;
    left: 50%;
    /* Vor dem ersten Scroll steht die Buehne noch unter Navbar + Banner und
       ragt entsprechend unten aus dem Viewport. --stage-offset (aus
       /hero-scroll.js) holt den Hinweis wieder ins Bild. */
    bottom: calc(1.5rem + var(--stage-offset, 0px));
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    color: rgba(255,255,255,.9);
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: opacity .4s ease;
}
/* letter-spacing haengt hinter dem letzten Buchstaben - ohne Ausgleich
   sitzt das Wort minimal links der Maus. */
.scrollytell__hint span:last-child { padding-left: .12em; }
.scrollytell.is-scrolled .scrollytell__hint { opacity: 0; }

.scrollytell__mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,.8);
    border-radius: 999px;
    position: relative;
}
.scrollytell__mouse::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: #fff;
    animation: urlaubWheel 1.7s ease-in-out infinite;
}
@keyframes urlaubWheel {
    0%   { transform: translateY(0);    opacity: 1; }
    70%  { transform: translateY(14px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 0; }
}

/* Fortschrittsbalken der Sequenz. */
.scrollytell__progress {
    position: absolute;
    left: 0; right: 0;
    bottom: var(--stage-offset, 0px);
    z-index: 6;
    height: 3px;
    background: rgba(255,255,255,.16);
}
.scrollytell__progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--primary, #e8365d);
}

/* Uebergabe an die Seite: Text unter der Sequenz. */
.after-stage {
    background: #fff;
}

/* Der echte Screenshot direkt nach dem Zoom aufs Tablet. */
.tablet-frame {
    max-width: 1080px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 30px 70px rgba(15,23,42,.28);
}
.tablet-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* Statischer Hero: Mobil, Touch-Geraete und Reduced Motion.
   Kein Video geladen - nur das Standbild mit dem ersten Textblock. */
.scrollytell.is-static { height: auto; }

.scrollytell.is-static .scrollytell__stage {
    position: relative;
    height: auto;
}

.scrollytell.is-static .scrollytell__video,
.scrollytell.is-static .scrollytell__hint,
.scrollytell.is-static .scrollytell__progress { display: none; }

.scrollytell.is-static .scrollytell__poster { opacity: 1; }

.scrollytell.is-static .scrollytell__copy {
    position: relative;
    min-height: 72vh;
    min-height: 72svh;
    padding: 5.5rem 1.5rem 4.5rem;
}

.scrollytell.is-static .beat {
    position: relative;
    opacity: 1;
    transform: none;
}
/* Im statischen Hero traegt nur der erste Block Text. */
.scrollytell.is-static .beat:not(.beat--lead) { display: none; }
.scrollytell.is-static .beat--lead a { pointer-events: auto; }

/* Flache Viewports (13"-Notebooks, ~700-820px Hoehe): Headline, Fliesstext
   und Abstaende zurueckdrehen, damit CTA und Scroll-Hinweis frei bleiben. */
@media (min-width: 821px) and (max-height: 900px) {
    .beat h1,
    .beat h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
    .beat p {
        margin-top: .85rem;
        font-size: 1.05rem;
        line-height: 1.5;
    }
    .beat__eyebrow {
        margin-bottom: .6rem;
        padding: .3rem .85rem;
        font-size: .74rem;
    }
    .beat__cta { margin-top: 1.4rem; }
    .beat--end { bottom: 2rem; }
    .scrollytell__stage { --hint-space: 5rem; }
}

@media (min-width: 821px) and (max-height: 760px) {
    .beat h1,
    .beat h2 { font-size: clamp(1.75rem, 3.1vw, 2.5rem); }
    .beat p {
        font-size: 1rem;
        max-width: 620px;
    }
    .beat__cta { margin-top: 1.15rem; }
    .scrollytell__mouse { height: 34px; width: 22px; }
    .scrollytell__hint { gap: .35rem; }
    .scrollytell__stage { --hint-space: 4.25rem; }
}

@media (max-width: 640px) {
    .scrollytell { height: 400vh; }
    .beat p { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .beat { transition: none; }
    .scrollytell__mouse::after { animation: none; }
}
