/* Intro „reel" — hype reel z prác (?intro=reel). Načítava sa len na index.html.
   Film je „fyzický" materiál — HUD je biely a REC červené bez ohľadu na mood;
   pozadie pri strihu do čista ostáva var(--Background), aby nadviazalo na hero. */

#intro-overlay.intro--reel {
    display: block;
    overflow: hidden;
}
#intro-overlay.intro--reel .intro-logo-svg { display: none; }

.reel {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ── Zábery ── */
.reel__frames {
    position: absolute;
    inset: 0;
    z-index: 0; /* vlastný stacking context — z-index záberov (rastie s každým strihom) ostane pod slovom a HUD */
    overflow: hidden;
}
.reel__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    visibility: hidden;
    will-change: transform;
}
.reel__img.is-on { visibility: visible; }

.reel__flash {
    position: absolute;
    inset: 0;
    background: var(--Pill-bg, var(--Light-purple));
    visibility: hidden;
}
.reel__flash.is-on { visibility: visible; }

.reel__vignette {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.5) 100%);
}

/* zrno — statická šumová textúra posúvaná po krokoch (lacné, bez filtra na každý frame) */
.reel__grain {
    position: absolute;
    z-index: 3;
    inset: -50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 220px 220px;
    opacity: 0.16;
    mix-blend-mode: overlay;
    animation: reel-grain 0.36s steps(3) infinite;
}
@keyframes reel-grain {
    0%   { transform: translate(0, 0); }
    33%  { transform: translate(-4%, 3%); }
    66%  { transform: translate(3%, -5%); }
    100% { transform: translate(0, 0); }
}

/* ── Slovo cez záber — nálepka (fialová páska s tmavým písmom), vždy čitateľná na hocijakej fotke ── */
.reel__word {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    z-index: 2;
}
.reel__word span {
    padding: 0.04em 0.16em 0.02em;
    background: var(--Pill-bg, var(--Light-purple));
    color: #0d0b12;
    font-family: 'Lemon', 'FoundersGrotesk', sans-serif;
    font-weight: 900;
    font-size: clamp(56px, 18vw, 230px);
    line-height: 1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    font-feature-settings: "ss01" 1;
    white-space: nowrap;
    box-shadow: 0 0.12em 0.4em rgba(0, 0, 0, 0.35);
}

/* ── HUD kamery ── */
.reel__hud {
    position: absolute;
    z-index: 4;
    inset: clamp(18px, 3vw, 40px);
    color: #fff;
    font-family: 'FoundersGrotesk', sans-serif;
    font-size: clamp(10px, 0.85vw, 13px);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.55);
}
.reel__hud > span { position: absolute; }
.reel__tl { top: 0; left: 0; }
.reel__tr { top: 0; right: 0; display: flex; align-items: center; gap: 8px; }
.reel__bl { bottom: 0; left: 0; }
.reel__br { bottom: 0; right: 0; }
.reel__rec-label { font-weight: inherit; }
.reel__rec {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff3355;
    box-shadow: 0 0 10px rgba(255, 51, 85, 0.8);
    animation: reel-rec 0.5s steps(1) infinite;
}
.reel__rec.is-stop {
    border-radius: 1px;
    background: currentColor;
    box-shadow: none;
    animation: none;
}
@keyframes reel-rec {
    50% { opacity: 0; }
}

/* ── Strih do čista (brzda) — zábery preč, HUD prevezme farbu stránky (biela by na svetlom moode zmizla) ── */
.reel.is-cut .reel__frames,
.reel.is-cut .reel__word,
.reel.is-cut .reel__vignette { visibility: hidden; }
.reel.is-cut .reel__hud {
    color: var(--White);
    text-shadow: none;
}
