/* Intro: sobre cerrado con sello 3D que se quiebra y se abre como puertas. */
#video-loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    perspective: 1500px;
    overflow: hidden;
    --swing: 104deg;
    --seal: 300px;
    -webkit-user-select: none;
    user-select: none;
}

.intro-half {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 5;
    overflow: hidden;
    backface-visibility: hidden;
    background: #f4eee3;
    will-change: transform;
    transition: transform 1.25s cubic-bezier(.62, .02, .24, 1) .12s, opacity .5s ease 1s;
}
.intro-half.l { left: 0; transform-origin: 0 50%; box-shadow: 8px 0 22px rgba(43,45,28, .12); }
.intro-half.r { right: 0; transform-origin: 100% 50%; box-shadow: -8px 0 22px rgba(43,45,28, .12); }
.opening .intro-half.l { transform: rotateY(var(--swing)); opacity: 0; }
.opening .intro-half.r { transform: rotateY(calc(var(--swing) * -1)); opacity: 0; }

.intro-face {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 200%;
    background:
        radial-gradient(120% 90% at 50% 40%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #f6f0e6, #efe7da);
}
.intro-half.l .intro-face { left: 0; }
.intro-half.r .intro-face { right: 0; }
.intro-face::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(99,107,47, .4);
}
.intro-face > p {
    position: absolute;
    left: 50%;
    width: 100%;
    margin: 0;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
}
.intro-face .k {
    top: max(9%, calc(env(safe-area-inset-top, 0px) + 36px));
    font: 600 10.5px "Work Sans", sans-serif;
    letter-spacing: .38em;
    text-transform: uppercase;
    color: #636b2f;
}
.intro-face .sg {
    top: calc(40% + var(--seal) / 2 + 30px);
    font: 700 clamp(30px, 7vw, 46px)/1 "Dancing Script", cursive;
    color: #4a5028;
}
.intro-face .hint {
    top: calc(40% + var(--seal) / 2 + 92px);
    font: 500 11px "Work Sans", sans-serif;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #6a6d58;
    animation: introPulse 2.4s ease-in-out infinite;
}
@keyframes introPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

#intro-gl {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    pointer-events: none;
    display: block;
}
.intro-tap {
    position: absolute;
    z-index: 9;
    left: 50%;
    top: 40%;
    width: var(--seal);
    height: var(--seal);
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.intro-tap:focus-visible { outline: 2px solid #636b2f; outline-offset: 4px; }
.opening .intro-tap { pointer-events: none; }

.intro-flash {
    position: absolute;
    z-index: 7;
    left: 50%;
    top: 40%;
    width: 140vmax;
    height: 140vmax;
    margin: -70vmax 0 0 -70vmax;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
    opacity: 0;
    pointer-events: none;
    transform: scale(.05);
}
.opening .intro-flash { animation: introFlash .75s ease-out .3s both; }
@keyframes introFlash {
    0% { opacity: .85; transform: scale(.05); }
    100% { opacity: 0; transform: scale(.5); }
}

@media (prefers-reduced-motion: reduce) {
    .intro-half { transition: opacity .6s ease; }
    .opening .intro-half.l, .opening .intro-half.r { transform: none; opacity: 0; }
    .intro-face .hint, .opening .intro-flash { animation: none; }
}
