/* DrainMaster Scroll-Video-Header - scroll-hero.css
 * Gepinnte Fullscreen-Sektion, vier Kapitel mit je eigenem Video.
 * Ohne JS oder bei prefers-reduced-motion: Posterframe plus sichtbares
 * erstes Kapitel (Klasse .is-static), kein Pinning.
 */

.dm-hero {
    --dm-header-hoehe: 0px;
    position: relative;
    background: #0e1410;
    /* Aus dem begrenzten Theme-/Elementor-Container ausbrechen:
       der Header soll ueber die volle Fensterbreite laufen. */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Elementor-Wrapper um den Shortcode nicht einschnueren */
.elementor-widget-shortcode:has(.dm-hero),
.elementor-widget-shortcode:has(.dm-staffel) {
    width: 100%;
}

.dm-hero__stage {
    position: relative;
    /* Der Shop-Header ist sticky. Ohne Abzug schiebt sich das Video darunter
       und es entsteht oben ein abgeschnittener Videostreifen. */
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    isolation: isolate;
}

/* Video sauber unter den Header legen, nicht darueber */
.dm-hero { z-index: 0; }

.dm-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.dm-hero__video.is-active { opacity: 1 !important; z-index: 1; }

.dm-hero.is-static .dm-hero__video { display: none; }
.dm-hero.is-static .dm-hero__video:first-of-type { display: block; opacity: 1; }

/* Scrim fuer Textlesbarkeit */
.dm-hero__stage::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(to top, rgba(8, 14, 10, 0.55) 0%, rgba(8, 14, 10, 0) 38%),
        linear-gradient(100deg, rgba(8, 14, 10, 0.62) 0%, rgba(8, 14, 10, 0.18) 42%, rgba(8, 14, 10, 0) 62%);
}

/* ---------- Overlays ---------- */

.dm-hero__overlay {
    position: absolute;
    z-index: 3;
    left: clamp(20px, 6vw, 90px);
    top: 50%;
    transform: translateY(-50%);
    max-width: min(720px, 52vw);
    opacity: 0;
    /* nie unter den mitscrollenden Header rutschen */
    margin-top: calc(var(--dm-header-hoehe, 110px) / 2);
}

/* Beim Seitenaufruf sitzt die Sektion unter Ankuendigungsbanner und Header
   und ragt um genau diesen Betrag unter die Falz. Mittig in der Sektion
   heisst dann: fast am unteren Bildrand. Der halbe Ueberhang zieht den
   Block auf die Mitte des sichtbaren Teils; sobald ScrollTrigger anheftet,
   ist der Ueberhang null und es bleibt bei der Sektionsmitte. */
.dm-hero__overlay,
.dm-hero__outro {
    top: calc(50% - var(--dm-hero-ueberhang, 0px) / 2);
}

/* Kapitel 1 ist beim Seitenaufruf sofort da. Ohne das steht der Besucher
   vor einem Video ohne Aussage und muss erst scrollen, damit Text erscheint. */
.dm-hero__overlay[data-hero-chapter="0"] {
    opacity: 1;
}

.dm-hero.is-static .dm-hero__overlay { opacity: 1 !important; transform: translateY(-50%) !important; }
.dm-hero.is-static .dm-hero__overlay:not([data-hero-chapter="0"]) { display: none; }

.dm-hero__kicker {
    display: inline-block;
    background: #5c7d1f;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.dm-hero__title {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 4.6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 26px rgba(0, 0, 0, 0.45);
}

.dm-hero__text {
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(15px, 1.7vw, 21px);
    line-height: 1.5;
    max-width: 34em;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
}

.dm-hero__usps {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.dm-hero__usps li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 15px;
    border-radius: 999px;
}

.dm-hero__usps svg { color: #a5d454; flex-shrink: 0; }

/* ---------- Outro ---------- */

/* Outro mittig: left/right auf 0 setzen, sonst erbt es den linken
   Einzug der Kapitel-Overlays und laeuft aus dem Bild. */
.dm-hero__outro {
    left: 0;
    right: 0;
    margin-inline: auto;
    transform: translateY(-50%);
    text-align: center;
    max-width: min(760px, 88vw);
    padding-inline: 20px;
}

.dm-hero.is-static .dm-hero__outro { display: none; }

.dm-hero__sterne {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    color: #fff;
    flex-wrap: wrap;
}

.dm-hero__sterne-wert { font-size: 30px; font-weight: 700; }
.dm-hero__sterne-icons { color: #f5c518; font-size: 26px; letter-spacing: 2px; }
.dm-hero__sterne-quelle { font-size: 15px; color: rgba(255, 255, 255, 0.8); }

.dm-hero__cta {
    display: inline-block;
    margin-top: 26px;
    background: #5c7d1f;
    color: #fff !important;
    font-size: 17px;
    font-weight: 700;
    padding: 16px 38px;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, transform 0.2s ease;
}

.dm-hero__cta:hover { background: #4d6b18; color: #fff !important; transform: translateY(-1px); }

/* ---------- Chrome ---------- */

.dm-hero__dots {
    position: absolute;
    z-index: 5;
    right: clamp(12px, 2.5vw, 34px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dm-hero__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    transition: background 0.25s ease, transform 0.25s ease;
}

.dm-hero__dot.is-active { background: #fff; transform: scale(1.25); }

.dm-hero__hint {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
    animation: dm-hero-bob 2.2s ease-in-out infinite;
}

@keyframes dm-hero-bob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(6px); }
}

/* Rechts unten sitzt das Trusted-Shops-Badge, links unten das
   Cookie-Icon von Complianz. Der Skip-Button weicht nach oben aus. */
.dm-hero__skip {
    position: absolute;
    z-index: 5;
    left: clamp(12px, 2.5vw, 34px);
    bottom: 84px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 16, 12, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff !important;
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 999px;
    text-decoration: none;
    backdrop-filter: blur(3px);
}

.dm-hero__skip:hover { background: rgba(10, 16, 12, 0.8); color: #fff !important; }

.dm-hero.is-static .dm-hero__dots,
.dm-hero.is-static .dm-hero__hint,
.dm-hero.is-static .dm-hero__skip { display: none; }

/* Ladehinweis beim Kapitelwechsel */
.dm-hero__stage::before {
    content: '';
    position: absolute;
    z-index: 6;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dm-hero.is-loading .dm-hero__stage::before {
    opacity: 1;
    animation: dm-hero-spin 0.8s linear infinite;
}

@keyframes dm-hero-spin { to { transform: rotate(360deg); } }

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
    /* Auf dem Handy sitzen ueber dem Hero noch Ankuendigungsbanner und
       Shop-Header. Stand der Text mittig, war er beim Aufruf gar nicht zu
       sehen. Er beginnt deshalb direkt unter dem Header, spannt sich aber
       ueber die volle Hoehe: Titel und Text oben, die Merkmale schiebt
       margin-top:auto ans untere Ende. So ist die Flaeche oben und unten
       belegt und die Mitte bleibt dem Video als Buehne. */
    .dm-hero__overlay {
        left: 18px;
        right: 18px;
        max-width: none;
        top: calc(var(--dm-header-hoehe, 110px) + 22px);
        /* Platz fuer das Trusted-Shops-Siegel unten links, plus der Betrag,
           um den die Sektion beim Seitenaufruf unter die Falz ragt. */
        bottom: calc(152px + var(--dm-hero-ueberhang, 0px));
        transform: none;
        display: flex;
        flex-direction: column;
        /* ohne das streckt der Flex-Container den Kicker auf volle Breite */
        align-items: flex-start;
    }

    .dm-hero__usps { width: 100%; }

    .dm-hero__usps {
        margin-top: auto;
        margin-bottom: 0;
    }

    /* Die Merkmale stehen jetzt tief im Bild, wo es hell werden kann.
       Der Verlauf von unten haelt sie lesbar. */
    .dm-hero__stage::after {
        background:
            linear-gradient(to top, rgba(8, 14, 10, 0.78) 0%, rgba(8, 14, 10, 0.34) 26%, rgba(8, 14, 10, 0) 52%),
            linear-gradient(to bottom, rgba(8, 14, 10, 0.62) 0%, rgba(8, 14, 10, 0) 34%);
    }

    .dm-hero.is-static .dm-hero__overlay { transform: none !important; }

    .dm-hero__outro {
        left: 0;
        right: 0;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        padding-inline: 18px;
    }

    .dm-hero__title { font-size: clamp(25px, 7.5vw, 34px); }
    .dm-hero__text  { font-size: 15px; }
    .dm-hero__usps li { font-size: 13px; padding: 8px 13px; }
    .dm-hero__dots { display: none; }
    .dm-hero__hint { bottom: 26px; }
    .dm-hero__skip { bottom: 92px; }
}

@media (prefers-reduced-motion: reduce) {
    .dm-hero__hint { animation: none; }
    .dm-hero.is-loading .dm-hero__stage::before { animation: none; }
}
