/* ==========================================================================
   intro-splash.css - uvítacia animácia cez celú obrazovku na úvodnej stránke.

   Vkladá ju includes/intro-splash.php a ukáže sa len raz za prehliadač.
   Tlačidlá pauzy a zvuku používajú vzhľad z intro.css (.intro-ctl).
   ========================================================================== */

.intro-splash {
    position: fixed;
    inset: 0;
    z-index: 3000;                 /* nad všetkým vrátane lišty cookies (1000) */
    background: #000;
    opacity: 1;
    transition: opacity .7s ease, transform .7s ease;
}
.intro-splash[hidden] { display: none; }

/* Odchod do webu: animácia sa zdvihne a rozplynie */
.intro-splash.is-leaving { opacity: 0; transform: translateY(-4vh) scale(1.04); pointer-events: none; }

.intro-splash-frame { position: absolute; inset: 0; }
.intro-splash-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Kým sa animácia načíta, nech plocha nie je prázdna */
.intro-splash::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #141414 0%, #000 70%);
    transition: opacity .8s;
}
.intro-splash.is-live::after { opacity: 0; }

/* Priehľadná vrstva nad animáciou: chytá koliesko myši, ťahanie prstom
   a kliknutie, ktoré by inak zhltol iframe. Tlačidlá ležia nad ňou. */
.intro-splash-catch { position: absolute; inset: 0; z-index: 1; }

/* --- Preskočiť (vpravo hore) --- */
.intro-splash-skip {
    position: absolute;
    top: 26px;
    right: 26px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 40px;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffffbf;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color .25s, color .25s, background-color .25s;
}
.intro-splash-skip:hover { border-color: #F06A28; color: #F06A28; background: rgba(0, 0, 0, .75); }
.intro-splash-skip svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2.4; }

/* --- Pauza a zvuk (vpravo dole) --- */
.intro-splash-ctl {
    position: absolute;
    right: 26px;
    bottom: 26px;
    z-index: 2;
    display: flex;
    gap: 12px;
}
.intro-splash .intro-ctl {
    width: 46px;
    height: 46px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
}
.intro-splash .intro-ctl svg { width: 17px; height: 17px; }

/* --- Pozvánka skrolovať (dole v strede) --- */
.intro-splash-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 30px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #ffffff8c;
    font-size: .68rem;
    letter-spacing: .18rem;
    text-transform: uppercase;
    pointer-events: none;
    transition: opacity .4s;
}
.intro-splash-hint svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; animation: intro-bounce 2.2s ease-in-out infinite; }

/* --- Koniec animácie: posledný záber sa stlmí a ponúkne vstup na web.
   Bez stlmenia by sa pozvánka bila so záverečným tlačidlom v samotnej
   animácii, ktoré je zhruba v tých istých miestach. --- */
.intro-splash.is-ended .intro-splash-frame {
    opacity: .28;
    filter: blur(3px);
    transition: opacity 1s ease, filter 1s ease;
}

.intro-splash-end {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .8s ease, transform .8s ease;
}
.intro-splash-end .intro-splash-enter { pointer-events: auto; }
.intro-splash-end[hidden] { display: none; }
.intro-splash-end.is-in { opacity: 1; transform: none; }

.intro-splash-enter {
    padding: 17px 44px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50px;
    background: rgba(0, 0, 0, .4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: inherit;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .16rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color .3s, transform .3s;
}
.intro-splash-enter:hover { border-color: #F06A28; transform: translateY(-2px); }

/* Svetelný prechod cez text - ako keď nad niečím rozmýšľa AI */
.intro-splash-enter span {
    background: linear-gradient(100deg, #ffffff 25%, #F06A28 45%, #ffffff 65%);
    background-size: 240% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: intro-shine 3.2s linear infinite;
}
@keyframes intro-shine {
    0%   { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

/* Kým animácia beží, stránka pod ňou sa nesmie skrolovať */
html.intro-splash-open, html.intro-splash-open body { overflow: hidden; }

/* Na telefóne je dole úzko: pozvánka skrolovať sa roztiahne skoro cez celú
   šírku a liezla by pod tlačidlá. Tlačidlá preto idú nad ňu. */
@media (max-width: 600px) {
    .intro-splash-skip { top: 18px; right: 18px; padding: 9px 15px; font-size: .68rem; }
    .intro-splash-ctl { right: 18px; bottom: 76px; gap: 10px; }
    .intro-splash .intro-ctl { width: 42px; height: 42px; }
    .intro-splash .intro-ctl svg { width: 16px; height: 16px; }
    .intro-splash-hint { bottom: 22px; font-size: .62rem; letter-spacing: .14rem; }
    .intro-splash-enter { padding: 15px 32px; font-size: .82rem; letter-spacing: .12rem; }
}

@media (prefers-reduced-motion: reduce) {
    .intro-splash, .intro-splash-end { transition: none; }
    .intro-splash-hint svg, .intro-splash-enter span { animation: none; }
    .intro-splash-enter span { color: #fff; background: none; -webkit-text-fill-color: #fff; }
}
