/* ============================================================
   CINEMATIC IMMERSIVE — Upsell Video Page
   Design System: Syne (display) + DM Sans (body)
   Dominant: Deep Navy #030712
   Accent: Eletric Blue #00E5FF
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00E5FF;
    --primary-dark: #0088CC;
    --primary-glow: rgba(0, 229, 255, 0.4);
    --surface: #030712;
    --white: #FFFFFF;
    --white-60: rgba(255, 255, 255, 0.6);
    --white-12: rgba(255, 255, 255, 0.12);
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden; /* Strict no-scroll */
    -webkit-text-size-adjust: 100%;
    background: var(--surface);
    color: var(--white);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

/* ===== PAGE WRAPPER ===== */
.page-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===== AMBIENT BACKGROUND ===== */
.bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-img {
    position: absolute;
    width: 120%;
    height: 120%;
    object-fit: cover;
    filter: blur(60px) brightness(0.4);
    opacity: 0.15;
    transition: transform 10s ease-out;
}

.bg-img--top {
    top: -10%;
    left: -10%;
    transform-origin: top left;
    animation: driftSlow 20s infinite alternate;
}

.bg-img--bottom {
    bottom: -10%;
    right: -10%;
    transform-origin: bottom right;
    animation: driftSlow 25s infinite alternate-reverse;
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 20, 40, 0.8) 0%, rgba(3, 7, 18, 0.98) 100%);
}

.bg-grain {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    mix-blend-mode: overlay;
}

@keyframes driftSlow {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-2%, -2%); }
}

/* ===== MAIN CONTENT LAYOUT ===== */
.content-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ===== HEADER ===== */
.header {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 24px;
    animation: fadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.header__logo {
    height: 48px;
    width: auto;
    object-fit: cover;
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.15));
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== VIDEO CONTAINER ===== */
.video-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    animation: fadeScale 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-height: 100%;
    aspect-ratio: 16/9; /* Optimize for mobile portrait video */
    border-radius: 24px;
    border: 1px solid var(--white-12);
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.video-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle at center, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.5;
    z-index: -1;
    filter: blur(40px);
    border-radius: 50%;
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { opacity: 0.3; transform: scale(0.9); }
    100% { opacity: 0.6; transform: scale(1.1); }
}



@keyframes fadeScale {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== CTA FOOTER ===== */
.footer-cta {
    flex-shrink: 0;
    width: 100%;
    padding-top: 32px;
    padding-bottom: env(safe-area-inset-bottom, 12px);
    position: relative;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
    opacity: 0;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.footer-cta__glow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60px;
    background: var(--primary);
    filter: blur(50px);
    opacity: 0.15;
    pointer-events: none;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 22px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 16px;
    color: var(--surface);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(0, 229, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: btnPulse 2s ease-in-out infinite;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    animation: shimmerLight 3s infinite;
}

@keyframes btnPulse {
    0%, 100% { 
        box-shadow: 0 8px 32px rgba(0, 229, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2); 
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 12px 48px rgba(0, 229, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2); 
        transform: scale(1.02);
    }
}

@keyframes shimmerLight {
    0% { transform: translateX(-100%); }
    20%, 100% { transform: translateX(100%); }
}

.btn-primary__text {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    position: relative;
    z-index: 2;
}

.btn-primary__icon {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 2;
    animation: slideRight 1.5s ease-in-out infinite;
}

@keyframes slideRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

/* ===== RESPONSIVE TWEAKS (Vertical Constraint focus) ===== */
@media (max-height: 700px) {
    .content-layout { padding: 16px 16px; }
    .header { padding-bottom: 16px; }
    .header__logo { height: 40px; }
    .footer-cta { padding-top: 20px; }
    .btn-primary { padding: 18px 20px; }
    .btn-primary__text { font-size: 1.05rem; }
}

@media (max-height: 600px) {
    .header__logo { height: 32px; }
    .btn-primary { padding: 16px; }
    .btn-primary__text { font-size: 0.95rem; }
}

@media (max-width: 380px) {
    .countdown-timer { font-size: 1.8rem; }
    .countdown-label { font-size: 0.6rem; }
    .btn-primary__text { font-size: 0.95rem; }
    .btn-primary { padding: 14px 16px; }
    .timer-section { gap: 12px; margin-bottom: 12px; }
    .countdown-wrapper { padding: 8px 16px; }
}

/* ===== NEW STYLES FOR TITLE AND UNMUTE ===== */
.video-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 0.03em;
    text-shadow: 0 0 16px var(--primary-glow);
    animation: textPulse 1.2s ease-in-out infinite alternate;
}

@keyframes textPulse {
    0% { opacity: 0.8; text-shadow: 0 0 10px var(--primary-glow); transform: scale(0.98); }
    100% { opacity: 1; text-shadow: 0 0 24px var(--primary); transform: scale(1.02); }
}

.unmute-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10;
    cursor: pointer;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

.unmute-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--white);
    background: rgba(0, 229, 255, 0.15);
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    animation: btnPulse 1.5s infinite;
}

.unmute-btn span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.unmute-icon {
    width: 32px;
    height: 32px;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== COUNTDOWN TIMER AREA ===== */
.timer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    margin-bottom: 16px;
    animation: fadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    z-index: 2;
}

.timer-images-row {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    justify-content: center;
}

.timer-image-wrapper {
    flex: 1;
    max-width: 140px;
    aspect-ratio: 7/4;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
    background: var(--surface);
}

.timer-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.countdown-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.15) 0%, rgba(0, 229, 255, 0.05) 100%);
    border: 1px solid var(--primary-glow);
    border-top: 2px solid var(--primary);
    padding: 12px 20px;
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 229, 255, 0.2);
    backdrop-filter: blur(10px);
}

.countdown-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 0 8px var(--primary-glow);
}

.countdown-timer {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 0 0 12px var(--primary-glow), 0 0 24px var(--primary);
    letter-spacing: 0.05em;
    line-height: 1;
}

/* DECORATIVE ELEMENTS */
.decorative-glow {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}
.line-glow {
    top: 22%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 20px 8px var(--primary-glow);
    opacity: 0.6;
}

/* ===== VIDEO MODAL STYLES ===== */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 10px;
}
.video-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}
.modal-content {
    position: relative;
    width: 100%;
    max-width: 450px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.3);
    z-index: 2;
    display: flex;
    aspect-ratio: 9/16;
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.close-modal:hover {
    background: rgba(0,0,0,0.9);
}

