/* PTJ · Apertura cinematográfica de puerta */
html.ptj-opening-lock,
body.ptj-opening-lock {
    overflow: hidden !important;
    height: 100% !important;
    overscroll-behavior: none;
    touch-action: none;
}

.ptj-door-opening {
    position: fixed;
    inset: 0;
    z-index: 10000000;
    overflow: hidden;
    background: #050b1c;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: opacity 520ms cubic-bezier(.4,0,.2,1), visibility 520ms linear, background-color 420ms ease;
}


/* Warm luminous veil used only during the last part of the opening.
   It bridges the final golden flash into the invitation underneath. */
.ptj-door-opening::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: var(--ptj-door-glow, 0);
    background:
        radial-gradient(circle at 50% 47%, rgba(255, 244, 205, .96) 0%, rgba(255, 222, 145, .72) 30%, rgba(244, 187, 80, .34) 58%, rgba(210, 139, 40, 0) 82%);
    mix-blend-mode: screen;
    transition: opacity 120ms linear;
}

.ptj-door-opening.is-finished {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ptj-door-opening__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    background: #050b1c;
    will-change: filter, opacity;
    transition: opacity 140ms linear, filter 180ms ease;
}

.ptj-door-opening__tap {
    position: absolute;
    left: 50%;
    bottom: calc(max(12vh, 82px) + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(242, 224, 191, .86);
    opacity: 1;
    transition: opacity 260ms ease, transform 260ms ease;
    pointer-events: none;
}

.ptj-door-opening.is-playing .ptj-door-opening__tap {
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
}

.ptj-door-opening__tap-icon {
    position: relative;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(230, 206, 163, .34);
    border-radius: 999px;
    background: rgba(5, 11, 28, .26);
    box-shadow: 0 8px 26px rgba(0,0,0,.22), inset 0 0 18px rgba(255,228,174,.045);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.ptj-door-opening__tap-icon svg {
    width: 22px;
    height: 22px;
    opacity: .86;
}

.ptj-door-opening__tap-icon::before,
.ptj-door-opening__tap-icon::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 999px;
    border: 1px solid rgba(226, 196, 143, .24);
    opacity: 0;
    transform: scale(.90);
    pointer-events: none;
}

.ptj-door-opening.is-ready .ptj-door-opening__tap-icon::before {
    animation: ptjDoorRipple 1.7s ease-out infinite;
}

.ptj-door-opening.is-ready .ptj-door-opening__tap-icon::after {
    animation: ptjDoorRipple 1.7s ease-out infinite .34s;
}

.ptj-door-opening__tap-text {
    font-family: 'Times New Roman', Times, serif;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: .15em;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0,0,0,.45);
}

.ptj-door-opening.is-preparing .ptj-door-opening__tap-icon {
    animation: ptjDoorPreparing 1.25s ease-in-out infinite;
}

.ptj-door-opening.is-preparing .ptj-door-opening__tap-icon::before,
.ptj-door-opening.is-preparing .ptj-door-opening__tap-icon::after {
    animation: none !important;
}

.ptj-door-opening.is-preload-error .ptj-door-opening__tap-icon {
    animation: ptjDoorRetry 1.4s ease-in-out infinite;
}

@keyframes ptjDoorRipple {
    0%, 6% { opacity: 0; transform: scale(.90); }
    20% { opacity: .42; }
    52% { opacity: 0; transform: scale(1.42); }
    100% { opacity: 0; transform: scale(1.42); }
}

@keyframes ptjDoorPreparing {
    0%, 100% { transform: scale(.98); opacity: .66; }
    50% { transform: scale(1.035); opacity: .94; }
}

@keyframes ptjDoorRetry {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
    .ptj-door-opening__tap-icon,
    .ptj-door-opening__tap-icon::before,
    .ptj-door-opening__tap-icon::after {
        animation: none !important;
    }
}

.ptj-door-opening.is-finished::after {
    opacity: 0 !important;
    transition: none !important;
}

.ptj-door-opening.is-finished .ptj-door-opening__video {
    opacity: 0 !important;
}


/* PTJ V6 · Clean logo handoff.
   Keep the cover monogram completely hidden while the door opening is active,
   then reveal it only once through its original fadeInLeft0 animation. */
#circuloIntro.ptj-intro-pending {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(-50px);
}
