/* ── Video / GIF giriş — tam ekran, tıklayınca başlar ── */

html:has(body.intro-video-mode),
html:has(body.intro-gif-mode) {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.intro-gif-mode,
body.intro-video-mode {
    background: #000;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

body.intro-gif-mode .intro-background,
body.intro-video-mode .intro-background {
    display: none;
}

body.intro-video-mode .hero-stage.hero-stage--video {
    position: fixed;
    inset: 0;
    z-index: 100;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100%;
    padding: 0 !important;
    margin: 0;
    display: block;
    background: #000;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    overflow: hidden;
}

.hero-stage--gif {
    position: fixed;
    inset: 0;
    z-index: 100;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 48px;
    background: #000;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.hero-stage--gif:focus-visible,
.hero-stage--video:focus-visible {
    outline: 3px solid rgba(179, 155, 105, 0.5);
    outline-offset: -6px;
}

.hero-stage--gif.is-locked,
.hero-stage--video.is-locked {
    pointer-events: none;
    cursor: default;
}

/* Tam ekran medya alanı */
.intro-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.intro-media .envelope-poster {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: none;
    transform: translate(-50%, -50%) scale(1.02);
    object-fit: cover;
    object-position: center center;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    background: #000;
    z-index: 2;
}

.intro-media .envelope-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: none;
    transform: translate(-50%, -50%) scale(1.02);
    object-fit: cover;
    object-position: center center;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    background: #000;
    z-index: 1;
}

.envelope-poster,
.envelope-gif {
    display: block;
    width: min(420px, 92vw);
    height: auto;
    max-height: calc(100dvh - 100px);
    object-fit: contain;
    margin: 0 auto;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    background: #000;
}

.envelope-video.is-hidden,
.envelope-gif.is-hidden,
.envelope-poster.is-hidden {
    display: none;
}

.open-prompt {
    margin-top: 28px;
    text-align: center;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.hero-stage--video .open-prompt {
    position: absolute;
    left: 0;
    right: 0;
    top: 70%;
    bottom: auto;
    transform: translateY(-50%);
    margin-top: 0;
    z-index: 200;
    padding: 0 20px;
}

.open-prompt.is-hidden {
    opacity: 0;
}

.hero-stage--video .open-hint {
    color: #3a2418;
    font-size: clamp(0.78rem, 3.2vw, 0.92rem);
    font-weight: 600;
    letter-spacing: 3px;
    text-shadow:
        0 1px 3px rgba(255, 255, 255, 0.85),
        0 2px 14px rgba(255, 255, 255, 0.55),
        0 1px 5px rgba(0, 0, 0, 0.28);
    animation: hintPulseVideo 2.5s ease-in-out infinite;
}

.hero-stage--video .open-divider {
    color: #4a3228;
    margin-top: 12px;
    font-size: 0.6rem;
}

.hero-stage--video .open-divider::before,
.hero-stage--video .open-divider::after {
    width: 56px;
    background: rgba(58, 36, 24, 0.55);
}

.open-hint {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    animation: hintPulse 2.5s ease-in-out infinite;
}

.open-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    color: #b39b69;
    font-size: 0.55rem;
}

.open-divider::before,
.open-divider::after {
    content: '';
    width: 48px;
    height: 1px;
    background: rgba(179, 155, 105, 0.5);
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@keyframes hintPulseVideo {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.88;
    }
    50% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.hero-stage--video .open-divider span {
    display: inline-block;
    animation: dividerSpin 6s ease-in-out infinite;
}

@keyframes dividerSpin {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.7; }
    50% { transform: rotate(180deg) scale(1.15); opacity: 1; }
}

.redirect-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 220;
    padding: 14px 18px 16px;
    background: linear-gradient(
        180deg,
        rgba(252, 250, 245, 0.92) 0%,
        rgba(244, 237, 228, 0.98) 100%
    );
    border-top: 1px solid rgba(179, 155, 105, 0.55);
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.45s ease, opacity 0.45s ease;
    opacity: 0;
    pointer-events: none;
}

.redirect-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.redirect-bar__text {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.62rem, 2.8vw, 0.72rem);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #5c5549;
    margin: 0;
}

.redirect-bar__progress {
    margin: 10px auto 0;
    width: min(200px, 70%);
    height: 2px;
    background: rgba(179, 155, 105, 0.25);
    border-radius: 2px;
    overflow: hidden;
}

.redirect-bar__progress span {
    display: block;
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, transparent, #b39b69, transparent);
    animation: redirectBarSlide 1.4s ease-in-out infinite;
}

@keyframes redirectBarSlide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

@media (max-width: 480px) {
    .envelope-poster,
    .envelope-gif {
        width: min(360px, 96vw);
        max-height: calc(100dvh - 80px);
    }

    .hero-stage--gif {
        padding: 16px 8px 40px;
    }

    .intro-media .envelope-poster,
    .intro-media .envelope-video {
        transform: translate(-50%, -50%) scale(1.04);
    }
}

/* Masaüstü: telefon (9:16) çerçevesi ortada */
@media (min-width: 601px) {
    body.intro-video-mode .hero-stage.hero-stage--video {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: min(430px, 56.25dvh, 100vw);
        height: min(100dvh, calc(min(430px, 56.25dvh, 100vw) * 16 / 9));
        max-height: 100dvh;
        border-radius: 14px;
        box-shadow: 0 16px 56px rgba(0, 0, 0, 0.55);
    }

    body.intro-video-mode .intro-media .envelope-poster,
    body.intro-video-mode .intro-media .envelope-video {
        transform: translate(-50%, -50%) scale(1);
    }
}
