/* ==========================================================================
   KURZFILM — Teaser im Startseiten-Hero + Film-Dialog (08.10.2026)
   Verhalten: assets/js/film.js. Der Dialog hängt an <body>, liegt also
   außerhalb von .vl-fp — darum nur globale Tokens aus base.css verwenden.
   ========================================================================== */

/* ---------- Teaser ---------- */
.vl-film-teaser {
    position: relative;
    background: #1b1d45;
}

.vl-film-teaser__stage {
    display: block;
    width: 100%;
    height: 100%;
}

/* Ohne JS: das bisherige Foto */
.vl-film-teaser noscript img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vl-film-teaser__play {
    position: absolute;
    left: 1.25rem;
    bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem 0.5rem 0.5rem;
    border: 0;
    border-radius: 999px;
    background: #fbefdc;
    color: #2f2f2f;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(10, 10, 40, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vl-film-teaser__play[hidden] {
    display: none;
}

.vl-film-teaser__play:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(10, 10, 40, 0.45);
}

.vl-film-teaser__play:focus-visible {
    outline: 3px solid #f6b941;
    outline-offset: 3px;
}

.vl-film-teaser__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
}

.vl-film-teaser__icon svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: 2px;
}

.vl-film-teaser__time {
    font-weight: 400;
    color: var(--color-text-muted);
}

/* ---------- Hero als Nachtband (.vl-fp__hero--film) ----------
   Der Hero übernimmt den Nachthimmel des Films, damit der Film nicht als
   Kasten neben dem Text steht, sondern den Bereich trägt: Er läuft bis an
   den rechten Fensterrand und verläuft nach links (mobil: nach unten) weich
   in den Hintergrund. Einstieg: zuerst blendet der Film auf, dann folgt der
   Slogan, zuletzt der Knopf mit einem einmaligen Lichtring. */
.vl-fp__hero--film {
    background: linear-gradient(180deg, #141838 0%, #1f1c4a 70%, #26214f 100%);
    overflow: hidden;
}

.vl-fp__hero--film .vl-fp__hero-eyebrow {
    color: #f6b941;
}

.vl-fp__hero--film .vl-fp__hero-title {
    color: #fbefdc;
}

.vl-fp__hero--film .vl-fp__hero-thread {
    background: #f6b941;
}

.vl-fp__hero--film .vl-film-teaser {
    background: transparent;
}

.vl-fp__hero--film .vl-film-teaser__stage {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 72%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 72%, transparent 100%);
}

@media (min-width: 900px) {
    .vl-fp__hero--film .vl-fp__hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
        min-height: min(80vh, 760px);
    }
    .vl-fp__hero--film .vl-fp__hero-text {
        position: relative;
        z-index: 1;
    }
    /* Film bis an den Fensterrand, linke Kante läuft unter den Text */
    .vl-fp__hero--film .vl-film-teaser {
        margin-left: -14%;
        margin-right: min(0px, calc((100vw - var(--container)) / -2));
    }
    .vl-fp__hero--film .vl-film-teaser__stage {
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
        mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
    }
    .vl-fp__hero--film .vl-film-teaser__play {
        left: 58%;
        bottom: 2.5rem;
        transform: translateX(-50%);
    }
    .vl-fp__hero--film .vl-film-teaser__play:hover {
        transform: translate(-50%, -2px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .vl-fp__hero--film .vl-fp__hero-media {
        animation: vl-film-rise 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0s both;
    }
    .vl-fp__hero--film .vl-fp__hero-eyebrow {
        animation-delay: 0.9s;
    }
    .vl-fp__hero--film .vl-fp__hero-title {
        animation-delay: 1.05s;
    }
    .vl-fp__hero--film .vl-fp__hero-thread {
        animation-delay: 2.1s;
    }
    .vl-fp__hero--film .vl-film-teaser__play:not([hidden]) {
        animation: vl-film-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.7s both;
    }
    /* Lichtring: läuft zweimal, dann Ruhe — kein Dauer-Blinken */
    .vl-film-teaser__play::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        border: 2px solid #f6b941;
        opacity: 0;
        pointer-events: none;
        animation: vl-film-halo 1.6s ease-out 2.4s 2;
    }
}

@keyframes vl-film-rise {
    from { opacity: 0; transform: scale(1.08); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes vl-film-pop {
    from { opacity: 0; scale: 0.6; }
    to   { opacity: 1; scale: 1; }
}

@keyframes vl-film-halo {
    from { opacity: 0.9; transform: scale(1); }
    to   { opacity: 0; transform: scale(1.35, 1.8); }
}

/* ---------- Film-Dialog ---------- */
.vl-film {
    width: min(1280px, calc(100vw - 2rem));
    max-width: none;
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: #10122e;
    color: #fbefdc;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.vl-film::backdrop {
    background: rgba(8, 8, 24, 0.86);
}

.vl-film__stage {
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 9rem);
    margin: 0 auto;
    background: #141838;
}

.vl-film__svg {
    display: block;
    width: 100%;
    height: 100%;
}

.vl-film__bigplay {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 5rem;
    height: 5rem;
    border: 0;
    border-radius: 50%;
    background: rgba(251, 239, 220, 0.92);
    color: var(--color-primary);
    cursor: pointer;
}

.vl-film__bigplay[hidden] {
    display: none;
}

.vl-film__bigplay svg {
    width: 2.25rem;
    height: 2.25rem;
    margin-left: 4px;
}

.vl-film__end {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1rem;
}

.vl-film__end[hidden] {
    display: none;
}

.vl-film__cta,
.vl-film__again {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.vl-film__cta {
    border: 0;
    background: #fbefdc;
    color: var(--color-primary);
}

.vl-film__again {
    border: 1px solid rgba(251, 239, 220, 0.5);
    background: transparent;
    color: #fbefdc;
}

.vl-film__cta:hover {
    background: #fff;
}

.vl-film__again:hover {
    border-color: #fbefdc;
}

/* Untertitel unter dem Bild — verdecken nichts von der Zeichnung */
.vl-film__caption {
    min-height: 3.2em;
    margin: 0;
    padding: 0.85rem 1.5rem 0.35rem;
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.45;
    text-align: center;
    color: #fbefdc;
}

.vl-film.no-cc .vl-film__caption {
    visibility: hidden;
}

.vl-film__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem 0.85rem;
}

.vl-film__btn {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fbefdc;
    cursor: pointer;
}

.vl-film__btn:hover {
    background: rgba(251, 239, 220, 0.12);
}

.vl-film__btn svg {
    width: 1.375rem;
    height: 1.375rem;
}

.vl-film__cc[aria-pressed="false"] {
    opacity: 0.45;
}

.vl-film__bar :focus-visible,
.vl-film__stage :focus-visible {
    outline: 3px solid #f6b941;
    outline-offset: 2px;
}

.vl-film__seek {
    flex: 1;
    min-width: 0;
    accent-color: #f6b941;
}

.vl-film__time {
    flex: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    color: rgba(251, 239, 220, 0.75);
}

@media (max-width: 600px) {
    .vl-film {
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .vl-film__time {
        display: none;
    }
    .vl-film-teaser__play {
        left: 1rem;
        bottom: 1rem;
    }
}
