/* ============================================
   NUBAY - SCROLL HERO + PREMIUM HEADER
   Two-phase hero: EARTH → CLOUDS
   ============================================ */

/* ---- PREMIUM HEADER ---- */
.premium-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 32px;
    background: transparent;
    border-bottom: none;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-header.scrolled {
    background: rgba(246, 166, 19, 0.95); /* Yellow #f6a613 */
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 2px solid rgba(108, 78, 175, 0.6); /* Purple #6c4eaf border */
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    transition: height 0.5s ease;
}

.premium-header.scrolled .header-inner {
    height: 64px;
}

.header-logo img {
    width: 100px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 0 12px rgba(246, 166, 19, 0.6));
}

.premium-header.scrolled .header-logo img {
    width: 75px;
    filter: drop-shadow(0 0 8px rgba(108, 78, 175, 0.5)); /* Purple shadow on yellow bg */
}

.header-logo:hover img {
    transform: scale(1.1) rotate(-3deg);
    filter: drop-shadow(0 0 20px rgba(246, 166, 19, 0.9));
}

.premium-header.scrolled .header-logo:hover img {
    filter: drop-shadow(0 0 20px rgba(108, 78, 175, 0.9));
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.header-nav a {
    font-family: "Fido W01 Regular", "Bangers", cursive;
    font-size: 1.15rem;
    color: #f6ebc0; /* Cream Default */
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    padding: 4px 0;
}

/* Swap text color to purple when bar is yellow */
.premium-header.scrolled .header-nav a {
    color: #6c4eaf;
}

.header-nav a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: #6c4eaf; /* Purple Effect default */
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(108, 78, 175, 0.8);
}

.premium-header.scrolled .header-nav a::before {
    background: #f6ebc0; /* Cream Effect when scrolled */
    box-shadow: 0 0 10px rgba(246, 235, 192, 0.8);
}

.header-nav a:hover {
    color: #f6a613;
    text-shadow: 0 0 15px rgba(246, 166, 19, 0.4);
}

.premium-header.scrolled .header-nav a:hover {
    color: #1a0a2e; /* Deep dark on hover when in yellow */
    text-shadow: 0 0 15px rgba(108, 78, 175, 0.3);
}

.header-nav a:hover::before {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions button,
.header-actions a {
    color: #f6ebc0;
    transition: all 0.3s ease;
}

.premium-header.scrolled .header-actions button,
.premium-header.scrolled .header-actions a {
    color: #6c4eaf;
}

.header-actions button:hover,
.header-actions a:hover {
    color: #f6a613;
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(246, 166, 19, 0.5));
}

.premium-header.scrolled .header-actions button:hover,
.premium-header.scrolled .header-actions a:hover {
    color: #1a0a2e;
    filter: drop-shadow(0 0 8px rgba(108, 78, 175, 0.5));
}

@media (max-width: 768px) {
    .header-nav { display: none; }
    .header-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(246, 166, 19, 0.98); /* Yellow Dropdown */
        backdrop-filter: blur(24px);
        padding: 24px;
        gap: 20px;
        border-bottom: 2px solid rgba(108, 78, 175, 0.5);
        animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .header-nav.open a {
        color: #6c4eaf; /* Force purple on mobile drop */
    }
    .header-nav.open a::before {
        background: #f6ebc0;
    }
    .premium-header { padding: 0 16px; }
}

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

/* ---- VIDEO HERO ---- */
.video-hero {
    position: relative;
    height: 500vh;
    background: linear-gradient(180deg, #1a0a2e 0%, #130a21 30%, #2d0949 60%, #1a0a2e 100%);
}

.video-hero__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Video — Forzamos que llene el contenedor SIEMPRE sin importar el ratio o navegador */
.video-hero__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: none !important;
    will-change: transform;
}

/* Stronger overlay for text readability + Colorization */
/* Stronger overlay for text readability + Colorization */
.video-hero__overlay {
    position: absolute;
    inset: 0;
    /* Soft colorized gradient mixed gradient restored for premium vibe */
    background:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.6) 100%),
        linear-gradient(145deg, rgba(108, 78, 175, 0.5) 0%, rgba(108, 78, 175, 0.15) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Authentic Frosted Edge Vignette Restored */
.video-hero__vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    box-shadow: inset 0 0 150px 60px rgba(0, 0, 0, 0.7);
}

/* ---- CONTENT LAYER ---- */
.video-hero__content {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

/* ---- SCROLL TEXT ANIMATIONS (Brutal & Alive) ---- */
.scroll-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    opacity: 0;
    /* Massive Brutal intro state: squashed, rotated and blurred */
    transform: translateY(80px) scale(0.8) rotate(-4deg);
    /* Restored aggressive blur and contrast for text */
    filter: blur(40px) contrast(150%);
    transition:
        opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
    pointer-events: none;
}

.scroll-text.visible {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    /* Restored initial filter to allow proper reverse transitions */
    filter: blur(0px) contrast(100%);
    pointer-events: auto;
    /* The core of it "not staying still": A continuous breathing animation */
    animation: brutalAlive 5s ease-in-out infinite alternate both;
}

.scroll-text.fade-out {
    opacity: 0;
    /* Aggressive Brutal outro state: stretches out, spins and blurs into heaven */
    transform: translateY(-80px) scale(1.15) rotate(5deg);
    /* Restored intense fade blur */
    filter: blur(30px) contrast(180%);
    pointer-events: none;
}

/* Continuous "I am Alive" micro-movements (Softened so it's elegant) */
@keyframes brutalAlive {
    0% { transform: translateY(0px) rotate(0deg) skewX(0deg); }
    50% { transform: translateY(-6px) rotate(0.8deg) skewX(-0.5deg); }
    100% { transform: translateY(0px) rotate(0deg) skewX(0deg); }
}

/* ---- SUPER INTERACTIVE TEXT HOVERS ---- */
.scroll-text h1 {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    pointer-events: auto; /* Ensure text can be hovered */
}

/* Phase 1: Earth hover (Brand Orange-Yellow Neon) */
.scroll-text[data-scroll-phase="1"] h1:hover {
    color: #f6a613 !important;
    transform: scale(1.08) rotate(-2deg);
    text-shadow: 
        5px 5px 0px #000, 
        0 0 30px rgba(246, 166, 19, 1), 
        0 0 80px rgba(255, 255, 255, 0.5) !important;
}

/* Phase 2: Clouds hover (Brand Green Neon) */
.scroll-text[data-scroll-phase="2"] h1:hover {
    color: #9dc43c !important;
    transform: scale(1.08) rotate(2deg);
    text-shadow: 
        5px 5px 0px #000, 
        0 0 30px rgba(157, 196, 60, 1), 
        0 0 80px rgba(255, 255, 255, 0.5) !important;
}

/* ==============================================
   PHASE 1: EARTH — Naturaleza / Tierra
   ============================================== */

.earth-tagline {
    font-family: "Fido W01 Regular", "Bangers", cursive;
    font-size: clamp(3.5rem, 11vw, 9rem);
    line-height: 0.95;
    letter-spacing: 6px;
    color: #f7ecc1;
    text-shadow:
        4px 4px 0 rgba(30, 60, 20, 0.8),
        0 0 30px rgba(34, 80, 20, 0.5),
        0 0 80px rgba(34, 80, 20, 0.3);
    margin-bottom: 16px;
}

.earth-tagline .accent {
    color: #7ec850;
    display: block;
    font-size: 1.2em;
    text-shadow:
        4px 4px 0 rgba(30, 60, 20, 0.9),
        0 0 40px rgba(100, 180, 60, 0.4),
        0 0 100px rgba(80, 160, 40, 0.2);
}

.earth-sub {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: rgba(247, 236, 193, 0.9);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* -- Nature Border Glow (CSS only — no icons) -- */
.hero-leaves {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-leaves.active {
    opacity: 1;
}

/* Green nature glow on left and right edges */
.hero-leaves::before,
.hero-leaves::after {
    content: '';
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    animation: natureGlow 4s ease-in-out infinite;
}

.hero-leaves::before {
    left: 0;
    background: linear-gradient(90deg,
        rgba(76, 175, 80, 0.25) 0%,
        rgba(76, 175, 80, 0.08) 40%,
        transparent 100%);
}

.hero-leaves::after {
    right: 0;
    background: linear-gradient(-90deg,
        rgba(76, 175, 80, 0.25) 0%,
        rgba(76, 175, 80, 0.08) 40%,
        transparent 100%);
    animation-delay: 2s;
}

@keyframes natureGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}


/* ==============================================
   PHASE 2: CLOUDS — Cielo / Nubes
   ============================================== */

.cloud-tagline {
    font-family: "Fido W01 Regular", "Bangers", cursive;
    font-size: clamp(3.5rem, 11vw, 9rem);
    line-height: 0.95;
    letter-spacing: 6px;
    color: white;
    text-shadow:
        4px 4px 0 rgba(74, 14, 120, 0.7),
        0 0 40px rgba(255, 255, 255, 0.3),
        0 0 80px rgba(102, 217, 232, 0.2);
    margin-bottom: 16px;
}

.cloud-tagline .accent {
    display: block;
    font-size: 1.2em;
    color: #ffa900;
    text-shadow:
        4px 4px 0 rgba(74, 14, 120, 0.8),
        0 0 40px rgba(255, 169, 0, 0.4),
        0 0 100px rgba(255, 107, 0, 0.2);
}

.cloud-sub {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* -- Cloud Decorations -- */
.hero-clouds {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-clouds.active {
    opacity: 1;
}

.cloud {
    position: absolute;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 60%, transparent 100%);
    border-radius: 200px;
    opacity: 0;
    animation: none;
}

.hero-clouds.active .cloud {
    animation: cloudDrift 12s ease-in-out infinite;
}

/* Cloud shapes & positions */
.cloud--1 {
    width: 280px; height: 80px;
    left: -60px; top: 10%;
    animation-delay: 0s !important;
}
.cloud--2 {
    width: 350px; height: 100px;
    right: -80px; top: 20%;
    animation-delay: 2.5s !important;
}
.cloud--3 {
    width: 200px; height: 60px;
    left: 5%; top: 55%;
    animation-delay: 5s !important;
}
.cloud--4 {
    width: 300px; height: 85px;
    right: 3%; top: 65%;
    animation-delay: 1.5s !important;
}
.cloud--5 {
    width: 220px; height: 65px;
    left: 15%; top: 80%;
    animation-delay: 3.5s !important;
}
.cloud--6 {
    width: 260px; height: 75px;
    right: 10%; top: 8%;
    animation-delay: 6s !important;
}
.cloud--7 {
    width: 180px; height: 55px;
    left: 2%; top: 35%;
    animation-delay: 1s !important;
}
.cloud--8 {
    width: 320px; height: 90px;
    right: -40px; top: 45%;
    animation-delay: 4s !important;
}

@keyframes cloudDrift {
    0% {
        opacity: 0;
        transform: translateX(-40px);
    }
    15% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
        transform: translateX(40px);
    }
    85% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateX(-40px);
    }
}

/* ---- HERO CTA (Legacy/Standalone usage) ---- */
.hero-cta {
    display: inline-block;
    padding: 20px 60px;
    background: linear-gradient(135deg, #f6a613, #9dc43c);
    color: #2d0949;
    font-family: "Fido W01 Regular", "Bangers", cursive;
    font-size: 1.6rem;
    letter-spacing: 4px;
    font-weight: 700;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 4px 25px rgba(246, 166, 19, 0.5),
        0 0 60px rgba(157, 196, 60, 0.15);
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.hero-cta:hover {
    transform: scale(1.08);
    box-shadow:
        0 8px 45px rgba(246, 166, 19, 0.6),
        0 0 80px rgba(157, 196, 60, 0.3);
    letter-spacing: 6px;
}

.hero-cta:hover::before {
    left: 100%;
}

/* ---- SCROLL INDICATOR ---- */
.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-indicator__text {
    font-family: "Inter", sans-serif;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.scroll-indicator__line {
    width: 1px;
    height: 50px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.scroll-indicator__line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #f6a613);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

/* ---- PARTICLES (subtle) ---- */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(246, 166, 19, 0.4), transparent);
    animation: floatParticle 8s ease-in-out infinite;
}

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.1; }
    25% { transform: translateY(-25px) scale(1.1); opacity: 0.3; }
    50% { transform: translateY(-12px) scale(0.9); opacity: 0.15; }
    75% { transform: translateY(-35px) scale(1.05); opacity: 0.25; }
}

/* ---- PROGRESS BAR ---- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #f6a613, #9dc43c, #f6a613);
    z-index: 1001;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(246, 166, 19, 0.5);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .leaf { width: 50px !important; }
    .cloud { transform: scale(0.5) !important; }

    .earth-tagline,
    .cloud-tagline {
        font-size: clamp(2.5rem, 13vw, 5rem);
    }

    .hero-cta {
        padding: 14px 36px;
        font-size: 1.2rem;
    }

    /* ── HEADER MÓVIL: Siempre sólido para verse completo ── */
    .premium-header {
        padding: 0 10px !important;
        background: rgba(246, 166, 19, 0.95) !important;
        backdrop-filter: blur(24px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
        border-bottom: 2px solid rgba(108, 78, 175, 0.6) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    }
    .premium-header.scrolled {
        background: rgba(246, 166, 19, 0.95) !important;
        backdrop-filter: blur(24px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
        border-bottom: 2px solid rgba(108, 78, 175, 0.6) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    }
    .header-inner {
        height: 56px !important;
    }
    .header-logo img {
        width: 65px !important;
        filter: drop-shadow(0 0 8px rgba(108, 78, 175, 0.5)) !important;
    }
    .premium-header.scrolled .header-inner {
        height: 50px !important;
    }
    .premium-header.scrolled .header-logo img {
        width: 55px !important;
    }
    /* Textos del header en púrpura sobre fondo amarillo */
    .premium-header .header-actions button,
    .premium-header .header-actions a {
        color: #6c4eaf !important;
    }
    .premium-header .header-actions .font-comic {
        color: #1a0a2e !important;
    }

    /* ── HERO MÓVIL: altura adecuada para darle espacio a "esperar un poquitico" ── */
    .video-hero {
        height: 180vh !important;
    }
    .video-hero__sticky {
        height: 100vh !important;
        height: 100dvh !important;
    }
    .video-hero__video {
        object-fit: cover !important;
        width: 100% !important;
        height: 100% !important;
    }
    /* Vignette menos agresivo en móvil */
    .video-hero__vignette {
        box-shadow: inset 0 0 80px 30px rgba(0, 0, 0, 0.5) !important;
    }

    /* ── Scroll indicator más arriba (lejos del CTA sticky) ── */
    .scroll-indicator {
        bottom: 80px !important;
    }
}
