/* Scroll-Kapitel fuer Anzeigen-Visuals. Scoped unter .ads-story. */

.ads-story {
    position: relative;
    isolation: isolate;
    padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
    background:
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(212, 175, 55, 0.07), transparent 60%),
        var(--color-darker);
    overflow-x: hidden;
    max-width: 100%;
}

.ads-story-intro {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem;
    padding: 0 1.25rem;
}

.ads-story-kicker {
    display: inline-block;
    margin: 0 0 0.85rem;
    color: var(--color-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.ads-story-intro .section-title {
    margin-bottom: 0.9rem;
}

.ads-story-intro p {
    color: var(--color-text-dark);
    line-height: 1.7;
    margin: 0;
}

.ads-story-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    width: 100%;
    max-width: 1240px;
    min-width: 0;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.ads-story-nav {
    position: sticky;
    top: 72px;
    z-index: 4;
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
    margin: 0 0 1.25rem;
    padding: 0.55rem 0;
    background: var(--color-darker);
    background: color-mix(in srgb, var(--color-darker) 88%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.ads-story-spine {
    display: none;
}

.ads-story-nav-list {
    display: flex;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0 0 0.15rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    min-width: 0;
}

.ads-story-nav-list::-webkit-scrollbar {
    display: none;
}

.ads-story-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 0 0 auto;
    min-width: 4.6rem;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    color: var(--color-text-dark);
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}

.ads-story-nav-num {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-gold);
    opacity: 0.55;
}

.ads-story-nav-label {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.ads-story-nav-link.is-current {
    background: rgba(212, 175, 55, 0.12);
    color: var(--color-text-light);
}

.ads-story-nav-link.is-current .ads-story-nav-num {
    opacity: 1;
}

.ads-story-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    min-width: 0;
    max-width: 100%;
    min-height: auto;
    padding: 2.25rem 0 3.25rem;
    scroll-margin-top: 7.5rem;
}

.ads-story-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    min-width: 0;
    max-width: 100%;
}

.ads-story-visual::before {
    content: "";
    position: absolute;
    width: 70%;
    height: 55%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.22), transparent 68%);
    filter: blur(18px);
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.ads-story.js-on .ads-story-panel.is-in .ads-story-visual,
.ads-story-panel.is-in .ads-story-visual {
    opacity: 1;
    transform: none;
}

.ads-story-panel.is-in .ads-story-visual::before {
    opacity: 1;
}

.ads-device {
    position: relative;
    z-index: 1;
    overflow: hidden;
    max-width: 100%;
    background: #0a0a0a;
    border: 1px solid rgba(212, 175, 55, 0.16);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.04);
}

.ads-device img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top center;
    transform: none;
}

.ads-device--phone {
    width: min(280px, 100%);
    border-radius: 32px;
    padding: 10px;
}

.ads-device--phone img {
    border-radius: 22px;
    aspect-ratio: 9 / 16;
}

.ads-device--desktop {
    width: 100%;
    max-width: 620px;
    border-radius: 16px;
}

.ads-device-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    background: #161616;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ads-device-chrome span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3a3a3a;
}

.ads-device-chrome span:nth-child(1) { background: #ff5f57; }
.ads-device-chrome span:nth-child(2) { background: #febc2e; }
.ads-device-chrome span:nth-child(3) { background: #28c840; }

.ads-device--desktop img {
    aspect-ratio: 16 / 10;
}

.ads-story-copy {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
}

.ads-story-watermark {
    position: absolute;
    top: -0.6rem;
    left: 0;
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-gold);
    opacity: 0.08;
    pointer-events: none;
    user-select: none;
}

.ads-story-tag {
    position: relative;
    margin: 0 0 0.55rem;
    color: var(--color-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.ads-story-copy h3 {
    position: relative;
    margin: 0 0 0.85rem;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 7vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-text-light);
}

.ads-story-lead {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--color-text);
    max-width: 100%;
}

.ads-story-note {
    margin: 0;
    max-width: 100%;
    color: var(--color-text-dark);
    line-height: 1.7;
}

.ads-story-next {
    margin: 1.35rem 0 0;
    color: var(--color-gold);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ads-story-cta {
    align-self: flex-start;
    max-width: 100%;
    margin-top: 1.5rem;
}

@media (min-width: 980px) {
    .ads-story-intro {
        padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    }

    .ads-story-layout {
        grid-template-columns: 148px minmax(0, 1fr);
        gap: 1.5rem;
        align-items: start;
        padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    }

    .ads-story-nav {
        position: sticky;
        top: 28vh;
        margin: 0;
        padding: 0;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: 0;
        flex-direction: row;
        align-items: stretch;
        height: auto;
        align-self: start;
    }

    .ads-story-spine {
        display: block;
        position: relative;
        width: 2px;
        margin: 0.4rem 0.85rem 0.4rem 0.55rem;
        background: rgba(212, 175, 55, 0.16);
        border-radius: 2px;
        overflow: hidden;
        flex-shrink: 0;
        align-self: stretch;
        min-height: 280px;
    }

    .ads-story-spine-fill {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, var(--color-gold), var(--color-gold-light));
        transform: scaleY(var(--ads-story-progress, 0));
        transform-origin: top center;
        transition: transform 0.12s linear;
    }

    .ads-story-nav-list {
        flex-direction: column;
        overflow: visible;
        gap: 0.15rem;
        width: auto;
        padding: 0;
    }

    .ads-story-nav-link {
        min-width: 0;
        padding: 0.45rem 0.5rem;
        flex-direction: row;
        align-items: baseline;
        gap: 0.55rem;
    }

    .ads-story-nav-label {
        font-size: 0.8rem;
    }

    .ads-story-panel {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: clamp(2rem, 5vw, 4.5rem);
        min-height: 100vh;
        min-height: 100dvh;
        align-items: center;
        padding: 5rem 0;
        scroll-margin-top: 0;
    }

    .ads-story-panel.is-flip .ads-story-visual {
        order: 2;
    }

    .ads-story-watermark {
        top: -1.4rem;
        left: -0.2rem;
        font-size: clamp(4.5rem, 12vw, 7rem);
    }

    .ads-story-copy h3 {
        font-size: clamp(1.85rem, 4vw, 3rem);
    }

    .ads-story-lead {
        font-size: 1.15rem;
    }

    .ads-story-note {
        max-width: 38rem;
    }

    .ads-story-next {
        font-size: 0.82rem;
        letter-spacing: 0.08em;
    }

    .ads-device--phone {
        width: min(360px, 100%);
    }

    .ads-device img {
        transition: transform 7s ease-out;
    }

    .ads-story-panel.is-in .ads-device img {
        transform: scale(1.04);
    }

    .ads-device--phone.is-float,
    .ads-device--desktop.is-float {
        animation: adsStoryFloat 5.5s ease-in-out infinite;
    }
}

@keyframes adsStoryFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
    .ads-story-visual,
    .ads-story-tag,
    .ads-story-copy h3,
    .ads-story-lead,
    .ads-story-note,
    .ads-story-next,
    .ads-story-cta,
    .ads-device img {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    .ads-story-visual::before {
        opacity: 0.45;
    }

    .ads-device--phone.is-float,
    .ads-device--desktop.is-float {
        animation: none;
    }
}

:root:not([data-theme="dark"]) .ads-story {
    background:
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(184, 115, 51, 0.08), transparent 60%),
        var(--color-darker);
}

:root:not([data-theme="dark"]) .ads-story-nav {
    border-bottom-color: rgba(184, 115, 51, 0.14);
}

:root:not([data-theme="dark"]) .ads-device {
    border-color: rgba(184, 115, 51, 0.22);
    box-shadow: 0 24px 50px rgba(43, 33, 24, 0.12);
}

@media (min-width: 980px) {
    :root:not([data-theme="dark"]) .ads-story-nav {
        border-bottom: 0;
    }
}
