:root {
    --brand-teal: #054852;
    --brand-red: #D6453F;
    --brand-celeste: #7EC8E8;
    --bg-dark: var(--brand-teal);
    --bg-darker: #043239;
    --accent-cream: #E6D2B0;
    --accent-orange: var(--brand-red);
    --pattern-navy: var(--brand-teal);
    --pattern-cream: #C7AD84;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Safari toma el color de overscroll del fondo de html, no del body.
   Al igualarlo al azul marino, la barra de navegación y el área de rubber-band
   se funden con el hero en lugar de mostrar el crema del .horizontal-wrapper */
html {
    background-color: var(--bg-dark); /* Safari overscroll color must match hero */
}

body {
    background-color: var(--bg-dark);
    color: var(--accent-cream);
    font-family: 'Syne', sans-serif;
    overflow-x: hidden;
    min-height: 100dvh;
    position: relative;
    z-index: 0;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    text-transform: uppercase;
    line-height: 1;
}

h1 {
    font-family: 'Fraunces', serif;
    font-weight: 700;
}

/* --- HEADER & LOGO --- */
header, .menu-header {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 2rem 4rem; display: flex;
    justify-content: space-between; align-items: center;
    z-index: 100;
}

.logo {
    font-family: 'Pacifico', cursive;
    font-size: 2.2rem;
    color: var(--accent-orange);
    text-shadow: 2px 2px 0px var(--bg-darker);
    text-transform: none;
    font-style: normal;
    text-decoration: none;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

/* Imagen de logo dentro del .logo container */
.logo img {
    height: 104px;
    width: auto;
    display: block;
    object-fit: contain;
}


.menu-open, .menu-close { font-weight: 800; font-size: 0.9rem; letter-spacing: 2px; cursor: pointer; transition: color 0.4s ease, opacity 0.3s ease; }
.menu-open { color: var(--brand-red); }
.menu-open:hover { opacity: 0.7; }
.menu-close:hover { color: var(--brand-red); }

/* --- MENÚ OVERLAY MEJORADO --- */
/* --- MENÚ OVERLAY (Efecto Splash Orgánico / Agua) --- */
.menu-overlay {
    position: fixed; 
    top: 0; left: 0; width: 100vw; height: 100dvh;
    z-index: 200;
    display: flex; flex-direction: column; justify-content: center;
    
    /* Ocultamos el contenedor y los textos al principio */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.5s;
    pointer-events: none;
    
    /* El fondo ya no es un color sólido acá, lo van a hacer las gotas */
    background: transparent; 
}

.menu-overlay.active { 
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease;
    pointer-events: auto; 
}

/* 1. Gota Principal de Agua (Azul Oscuro) */
.menu-overlay::before {
    content: '';
    position: absolute;
    top: 1rem; right: 3rem;
    width: 150px; height: 150px;
    background-color: rgba(5, 72, 82, 0.98);
    
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    
    transform-origin: center;
    transform: scale(0) rotate(0deg);
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), border-radius 1.2s ease;
    z-index: -1; 
}

/* 2. Gota Secundaria del Splash */
.menu-overlay::after {
    content: '';
    position: absolute;
    top: 3rem; right: 5rem;
    width: 80px; height: 80px;
    background-color: rgba(214, 69, 63, 0.5);
    
    /* Otra forma irregular distinta */
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    
    transform-origin: center;
    transform: scale(0) rotate(0deg);
    transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -2; 
}

/* Animación cuando hacés clic en MENÚ + */
.menu-overlay.active::before {
    transform: scale(30) rotate(45deg); /* Inunda toda la pantalla */
    border-radius: 50%; /* Se estabiliza y aplana al final */
}

.menu-overlay.active::after {
    transform: scale(35) rotate(-20deg); /* Salpica por detrás */
}

.menu-content-wrapper {
    display: flex; justify-content: space-between; align-items: flex-end;
    width: 80%; max-width: 1200px; margin: 0 auto;
}

.menu-links { display: flex; flex-direction: column; text-align: left; gap: 1.5rem; }
.menu-links a {
    color: var(--accent-cream); text-decoration: none;
    font-family: 'Playfair Display', serif; font-size: 4rem; font-style: italic;
    transition: color 0.3s ease, transform 0.3s; transform-origin: left;
}
.menu-links a:hover { color: var(--accent-orange); transform: translateX(15px); }

.menu-info { display: flex; flex-direction: column; gap: 3rem; text-align: right; }
.menu-subtitle { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: var(--accent-orange); margin-bottom: 1rem; font-weight: 800; }
.social-links, .legal-links { display: flex; flex-direction: column; gap: 0.5rem; }
.social-links a, .legal-links a {
    color: var(--accent-cream); text-decoration: none; font-size: 1.1rem;
    transition: color 0.3s;
}
.social-links a:hover, .legal-links a:hover { color: var(--accent-orange); }
.legal-links a { font-size: 0.9rem; opacity: 0.8; }

/* Media Query para el menú en móviles */
@media (max-width: 768px) {
    .menu-content-wrapper { flex-direction: column; align-items: flex-start; gap: 3rem; }
    .menu-info { text-align: left; }
    .menu-links a { font-size: 2.5rem; }
}

/* --- HERO --- */
.hero {
    position: relative; 
    width: 100%;
    height: 100dvh;    /* fallback para browsers viejos */
    height: 100dvh;   /* dynamic viewport height para Safari */
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    overflow: hidden; text-align: center;
    z-index: 0;
}
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    height: 100dvh;
    overflow: hidden;
    z-index: -2;
}
.video-background video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(5,72,82,0.3) 0%, rgba(5,72,82,0.95) 100%); z-index: -1;
}
.pre-title { font-size: clamp(0.65rem, 2.8vw, 1rem); font-weight: 800; letter-spacing: 4px; text-transform: uppercase; color: var(--accent-cream); opacity: 0.75; margin-bottom: 1.5rem; }
.hero-content { position: relative; z-index: 2; } /* por encima del wave-divider */
.hero-content h1 { font-size: clamp(4rem, 10vw, 8rem); text-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.scroll-indicator { position: absolute; bottom: 90px; font-size: 0.8rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; opacity: 0.7; animation: bounce 2s infinite; z-index: 2; }

/* --- WAVE DIVIDERS --- */
.wave-divider { line-height: 0; overflow: hidden; }
.wave-divider svg { display: block; width: 100%; }

.wave-divider--hero {
    position: absolute;
    bottom: -1px; /* -1px elimina el gap subpixel entre secciones */
    left: 0;
    width: 100%;
    z-index: 1;
}
.wave-divider--hero svg { height: clamp(50px, 6vw, 80px); }

.wave-divider--footer { width: 100%; }
.wave-divider--footer svg { height: 40px; }

@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* --- HORIZONTAL SCROLL & PANELS --- */
/* --- REGLA BASE PARA MATAR EL SCROLLBAR --- */
/* overflow-x:hidden solo en body — ponerlo en html también rompe el cálculo de dvh en WebKit */
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* --- HORIZONTAL SCROLL & PANELS --- */
.horizontal-wrapper { 
    background: var(--accent-cream); 
    color: var(--bg-dark); 
    width: 100vw;      /* Forzamos el ancho a la ventana completa */
    max-width: 100%;   /* Evita que se desborde */
    overflow: hidden; 
}

.horizontal-container { 
    display: flex; 
    width: max-content; 
    height: 100dvh; 
}

.panel {
    width: 100vw;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8vw;
    flex: 0 0 100vw;
    box-sizing: border-box;
    contain: layout style;
    position: relative; /* necesario para ::before patterns */
}

/* El contenido del panel debe flotar sobre el patrón de fondo */
.panel-content {
    position: relative;
    z-index: 1;
}

.panel:nth-child(even) { background: var(--bg-dark); color: var(--accent-cream); }
.panel:last-child { background: var(--bg-darker); color: var(--accent-cream); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; max-width: 1200px; width: 100%; }
.split.reverse .text-block { order: 2; }
.split.reverse .mockup-block { order: 1; }

.text-block h2 { font-size: clamp(2.5rem, 4vw, 4rem); margin-bottom: 1.5rem; }
.highlight { color: var(--accent-orange); }
.text-block p { font-size: 1.2rem; line-height: 1.7; font-weight: 500; margin-bottom: 2rem; opacity: 0.9; }

.feature-tags { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.feature-tags span {
    padding: 7px 15px; border: 1px solid currentColor; border-radius: 30px;
    font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.feature-tags span:hover {
    background-color: currentColor;
    color: var(--bg-dark);
}

/* --- MOCKUP iPHONE STYLE --- */
.mockup-block { display: flex; justify-content: center; position: relative; }

/* Fondo tribal maorí cubriendo todo el panel donde aparece el celular.
   La imagen fuente es vertical; en desktop (paneles horizontales) usamos una
   versión pre-rotada 90° para que "cover" no tenga que hacer zoom extremo.
   En mobile (panel angosto y alto) se usa la imagen original vertical. */
.panel:has(.mockup-block)::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--pattern-navy);
    -webkit-mask: url('images/fondomaorifinal-mask-h.png') center / cover no-repeat;
    mask: url('images/fondomaorifinal-mask-h.png') center / cover no-repeat;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* Sobre paneles oscuros el patrón pasa a crema para mantener contraste */
.panel:nth-child(even):has(.mockup-block)::before,
.panel:last-child:has(.mockup-block)::before {
    background-color: var(--pattern-cream);
}

.phone-mockup {
    width: 300px; height: 640px; 
    border: 14px solid #111; border-radius: 45px; 
    background-color: #222; overflow: hidden; position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3), inset 0 0 10px rgba(255,255,255,0.1);
    will-change: transform;
}
.phone-mockup::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 110px; height: 25px; background: #111;
    border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; z-index: 10;
}
.app-screen { width: 100%; height: 100%; object-fit: cover; z-index: 1; }

.float-anim { animation: floating 6s ease-in-out infinite; }
.float-anim-alt { animation: floating 6s ease-in-out infinite alternate-reverse; }

/* =====================================================================
   PHONE MOCKUP CAROUSEL — CSS crossfade entre múltiples pantallas
   El primer .app-screen define el layout (position: static).
   Los siguientes se posicionan absolute encima y animan su opacidad.
   ===================================================================== */
.phone-mockup .app-screen:nth-child(n+2) {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
}

/* 2 imágenes — ciclo 8s */
.carousel-2 .app-screen:nth-child(1) { animation: cr2a 8s ease-in-out infinite; }
.carousel-2 .app-screen:nth-child(2) { animation: cr2b 8s ease-in-out infinite; }
@keyframes cr2a { 0%,42%{opacity:1} 50%,92%{opacity:0} 100%{opacity:1} }
@keyframes cr2b { 0%,42%{opacity:0} 50%,92%{opacity:1} 100%{opacity:0} }

/* 3 imágenes — ciclo 9s */
.carousel-3 .app-screen:nth-child(1) { animation: cr3a 9s ease-in-out infinite; }
.carousel-3 .app-screen:nth-child(2) { animation: cr3b 9s ease-in-out infinite; }
.carousel-3 .app-screen:nth-child(3) { animation: cr3c 9s ease-in-out infinite; }
@keyframes cr3a { 0%,28%{opacity:1} 33%,94%{opacity:0} 100%{opacity:1} }
@keyframes cr3b { 0%,33%{opacity:0} 39%,61%{opacity:1} 66%,100%{opacity:0} }
@keyframes cr3c { 0%,66%{opacity:0} 72%,94%{opacity:1} 100%{opacity:0} }

/* 4 imágenes — ciclo 12s */
.carousel-4 .app-screen:nth-child(1) { animation: cr4a 12s ease-in-out infinite; }
.carousel-4 .app-screen:nth-child(2) { animation: cr4b 12s ease-in-out infinite; }
.carousel-4 .app-screen:nth-child(3) { animation: cr4c 12s ease-in-out infinite; }
.carousel-4 .app-screen:nth-child(4) { animation: cr4d 12s ease-in-out infinite; }
@keyframes cr4a { 0%,21%{opacity:1} 25%,96%{opacity:0} 100%{opacity:1} }
@keyframes cr4b { 0%,25%{opacity:0} 29%,46%{opacity:1} 50%,100%{opacity:0} }
@keyframes cr4c { 0%,50%{opacity:0} 54%,71%{opacity:1} 75%,100%{opacity:0} }
@keyframes cr4d { 0%,75%{opacity:0} 79%,96%{opacity:1} 100%{opacity:0} }

/* 5 imágenes — ciclo 15s */
.carousel-5 .app-screen:nth-child(1) { animation: cr5a 15s ease-in-out infinite; }
.carousel-5 .app-screen:nth-child(2) { animation: cr5b 15s ease-in-out infinite; }
.carousel-5 .app-screen:nth-child(3) { animation: cr5c 15s ease-in-out infinite; }
.carousel-5 .app-screen:nth-child(4) { animation: cr5d 15s ease-in-out infinite; }
.carousel-5 .app-screen:nth-child(5) { animation: cr5e 15s ease-in-out infinite; }
@keyframes cr5a { 0%,17%{opacity:1} 20%,97%{opacity:0} 100%{opacity:1} }
@keyframes cr5b { 0%,20%{opacity:0} 23%,37%{opacity:1} 40%,100%{opacity:0} }
@keyframes cr5c { 0%,40%{opacity:0} 43%,57%{opacity:1} 60%,100%{opacity:0} }
@keyframes cr5d { 0%,60%{opacity:0} 63%,77%{opacity:1} 80%,100%{opacity:0} }
@keyframes cr5e { 0%,80%{opacity:0} 83%,97%{opacity:1} 100%{opacity:0} }

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* --- FORMULARIO WAITLIST (CTA) --- */
.text-center { text-align: center; max-width: 700px; margin: 0 auto; }
.waitlist-form {
    display: flex; gap: 10px; margin-top: 3rem; justify-content: center;
    flex-wrap: wrap;
}
.waitlist-input {
    padding: 1.2rem 1.5rem; border-radius: 50px; border: 2px solid transparent;
    outline: none; font-family: 'Syne', sans-serif; font-size: 1rem;
    width: 100%; max-width: 350px; background: rgba(255,255,255,0.1); color: #fff;
    transition: border-color 0.3s;
}
.waitlist-input::placeholder { color: rgba(255,255,255,0.5); }
.waitlist-input:focus { border-color: var(--accent-orange); background: rgba(255,255,255,0.15); }

.btn-primary {
    padding: 1.2rem 2.5rem; background-color: var(--accent-orange); color: var(--bg-dark);
    text-decoration: none; font-weight: 800; font-family: 'Syne', sans-serif; font-size: 1rem; text-transform: uppercase; letter-spacing: 2px;
    border-radius: 8px; transition: transform 0.3s, background-color 0.3s; border: none; cursor: pointer;
}
.btn-primary:hover { background-color: #B83B35; transform: translateY(-4px); box-shadow: 0 12px 28px rgba(214, 69, 63, 0.4); }

/* --- FOOTER --- */
.site-footer { background-color: var(--bg-dark); padding: 4rem 4rem 2rem; text-align: center; }
.footer-tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--accent-cream);
    opacity: 0.55;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}
.footer-links { margin: 0 0 2rem; display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap;}
.footer-links a { color: var(--accent-cream); text-decoration: none; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; transition: color 0.3s; letter-spacing: 1px;}
.footer-links a:hover { color: var(--accent-orange); }
.footer-bottom { padding-top: 1.5rem; font-size: 0.8rem; color: rgba(230, 210, 176, 0.45); }


/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {

    /* Ocultar canvases pesados en mobile — JS también los saltea */
    #canvas3d,
    #wind-canvas {
        display: none;
    }

    /* --- Horizontal scroll: desactivado en mobile --- */
    .horizontal-wrapper {
        display: block !important;
        height: auto !important;
        overflow: hidden;
    }

    .horizontal-container {
        display: flex;
        flex-direction: column;
        width: 100% !important;
        height: auto !important;
        transform: none !important;
    }

    /* --- Panels: bloques que respiran --- */
    .panel {
        width: 100%;
        height: auto;
        min-height: 100dvh;
        padding: calc(clamp(4.5rem, 12vw, 6rem) + env(safe-area-inset-top)) clamp(1.25rem, 6vw, 2rem) calc(clamp(3rem, 8vw, 4.5rem) + env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* --- Grid: pasa a flujo vertical centrado --- */
    .split {
        display: flex;
        flex-direction: column;
        gap: clamp(2rem, 6vw, 3rem);
        text-align: center;
    }

    .split .text-block { order: 1; }
    .split .mockup-block { order: 2; }

    /* --- Hero --- */
    .hero-content h1 {
        font-size: clamp(3rem, 14vw, 5rem);
        line-height: 0.95;
    }

    .pre-title {
        letter-spacing: 3px;
    }

    .scroll-indicator {
        font-size: 0.65rem;
        letter-spacing: 3px;
        bottom: 72px;
    }

    /* --- Tipografías de panel con clamp() --- */
    .text-block h2,
    .text-center h2 {
        font-size: clamp(2rem, 8.5vw, 3rem);
        line-height: 1.05;
        margin-bottom: clamp(0.75rem, 3vw, 1.25rem);
    }

    .text-block p,
    .text-center > p {
        font-size: clamp(0.9rem, 3.8vw, 1.1rem);
        line-height: 1.68;
        margin-bottom: clamp(1.25rem, 4vw, 1.75rem);
    }

    .feature-tags {
        justify-content: center;
        gap: 0.5rem;
    }

    .feature-tags span {
        font-size: 0.68rem;
        padding: 6px 13px;
    }

    /* --- Mockup iPhone: proporcional y profundo --- */
    .mockup-block {
        width: 100%;
        display: flex;
        justify-content: center;
        padding-bottom: 0.25rem;
    }

    .panel:has(.mockup-block)::before {
        -webkit-mask-image: url('images/fondomaorifinal-mask.png');
        mask-image: url('images/fondomaorifinal-mask.png');
        opacity: 0.07;
    }

    .phone-mockup {
        width: clamp(145px, 38vw, 190px);
        height: clamp(300px, 80vw, 400px);
        border-width: 10px;
        border-radius: 34px;
        animation: none !important;
        box-shadow:
            0 22px 55px rgba(0, 0, 0, 0.45),
            inset 0 0 8px rgba(255, 255, 255, 0.07);
    }

    /* Normaliza el orden en mobile: siempre texto primero, mockup abajo */
    .split.reverse .text-block { order: 1; }
    .split.reverse .mockup-block { order: 2; }

    .phone-mockup::before {
        width: 70px;
        height: 16px;
    }

    /* --- CTA Panel --- */
    .panel-cta {
        padding-top: clamp(4rem, 10vw, 6rem);
        padding-bottom: clamp(4rem, 10vw, 6rem);
    }

    .panel-cta .text-center {
        width: 100%;
        padding: 0 0.25rem;
    }

    /* --- Waitlist Form --- */
    .waitlist-form {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.75rem;
        margin-top: 1.75rem !important;
    }

    .waitlist-input {
        max-width: 100%;
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .btn-primary,
    .btn-submit {
        width: 100%;
        text-align: center;
        padding: 1rem 2rem;
    }

    /* --- Header --- */
    header, .menu-header {
        padding: 1.25rem 1.5rem;
    }

    .logo {
        font-size: 1.7rem;
    }
    .logo img {
        height: 76px;
    }
}


/* --- LOGO BADGE (CTA Panel) --- */
.logo-badge {
    width: clamp(180px, 22vw, 240px);
    height: clamp(180px, 22vw, 240px);
    border-radius: 30%;
    object-fit: contain;
    object-position: center center;
    background-color: var(--bg-darker);
    padding: 4%;
    border: 3px solid var(--accent-orange);
    box-shadow:
        0 0 0 6px rgba(245, 135, 50, 0.15),
        0 18px 45px rgba(0, 0, 0, 0.5);
    display: block;
    margin: 0 auto clamp(1.5rem, 4vw, 2.5rem);
    animation: badge-pulse 4s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(245, 135, 50, 0.15), 0 18px 45px rgba(0,0,0,0.5); }
    50%       { box-shadow: 0 0 0 12px rgba(245, 135, 50, 0.08), 0 22px 50px rgba(0,0,0,0.6); }
}

@media (max-width: 768px) {
    .logo-badge {
        width: clamp(140px, 36vw, 180px);
        height: clamp(140px, 36vw, 180px);
        margin-bottom: 1.5rem;
    }
}

/* --- APP STORES BUTTONS --- */
.app-stores {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.store-btn {
    background-color: #000;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s, border-color 0.3s;
    min-width: 180px;
}

.store-btn:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: var(--accent-orange);
    box-shadow: 0 14px 32px rgba(245, 135, 50, 0.22);
}

.store-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.store-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.1;
}

.store-text small {
    font-size: 0.6rem;
    text-transform: uppercase;
    opacity: 0.7;
    font-weight: 800;
}

.store-text span {
    font-size: 1.1rem;
    font-weight: 700;
}

.waitlist-hint {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ajuste para que el formulario no pegue tanto arriba */
.waitlist-form {
    margin-top: 1.5rem !important;
}

@media (max-width: 768px) {
    .app-stores {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .store-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

/* --- VIDEO INTRO (Panel 1, después del hero) ---
   Fondo crema (default), para que el wave-divider del hero siga integrado
   con el panel de abajo tal como pasaba antes de agregar este panel. */
.panel-video .pre-title {
    color: var(--bg-dark);
    opacity: 0.55;
}

.video-showcase {
    position: relative;
    width: 100%;
    max-width: 820px;
    margin: clamp(2rem, 5vw, 3rem) auto 0;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    background-color: #fff;
    border: 3px solid var(--accent-orange);
    box-shadow:
        0 0 0 6px rgba(214, 69, 63, 0.15),
        0 25px 60px rgba(0, 0, 0, 0.5);
}

.video-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(4, 50, 57, 0.28);
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.video-showcase.playing::before { opacity: 0; }

.intro-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #fff;
}

.intro-video::backdrop {
    background-color: #fff;
}

.intro-video:fullscreen,
.intro-video:-webkit-full-screen {
    object-fit: contain;
    background-color: #fff;
}

.video-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: clamp(60px, 9vw, 90px);
    height: clamp(60px, 9vw, 90px);
    border-radius: 50%;
    border: none;
    background-color: rgba(230, 210, 176, 0.95);
    color: var(--brand-red);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
}

.video-play-btn svg {
    width: 38%;
    height: 38%;
    margin-left: 4%; /* centra ópticamente el triángulo de "play" */
}

.video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.08);
    background-color: var(--accent-cream);
}

.video-showcase.playing .video-play-btn {
    opacity: 0;
    pointer-events: none;
}



/* --- PRELOADER (deshabilitado temporalmente) --- */
.preloader {
    display: none;
}

.pl-koru {
    position: absolute;
    top: 50%;
    width: clamp(150px, 18vw, 250px);
    opacity: 0;
}
.pl-koru--l {
    left: -20px;
    animation: plKoruL 1.4s 0.4s ease both;
}
.pl-koru--r {
    right: -20px;
    animation: plKoruR 1.4s 0.4s ease both;
}

.pl-center {
    text-align: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pl-logo {
    width: clamp(130px, 22vw, 210px);
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    opacity: 0;
    animation: plLogoIn 0.9s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(230,210,176,0.15);
}

.pl-tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--accent-cream);
    font-size: clamp(0.8rem, 1.4vw, 1rem);
    margin-top: 1.2rem;
    opacity: 0;
    letter-spacing: 0.06em;
    animation: plFadeIn 0.8s 0.9s ease both;
}

.pl-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 1.5rem;
}
.pl-dots span {
    width: 7px; height: 7px;
    background: var(--accent-orange);
    border-radius: 50%;
    opacity: 0.2;
    animation: plDot 1.4s ease-in-out infinite;
}
.pl-dots span:nth-child(2) { animation-delay: 0.2s; }
.pl-dots span:nth-child(3) { animation-delay: 0.4s; }

.pl-wave {
    position: absolute;
    bottom: clamp(16px, 4vw, 36px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(200px, 55vw, 500px);
    opacity: 0;
    animation: plFadeIn 1.2s 0.7s ease both;
}

@keyframes plLogoIn {
    from { opacity: 0; transform: scale(0.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes plFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes plKoruL {
    from { opacity: 0; transform: translateY(-48%); }
    to   { opacity: 1; transform: translateY(-52%); }
}
@keyframes plKoruR {
    from { opacity: 0; transform: translateY(-48%) scaleX(-1); }
    to   { opacity: 1; transform: translateY(-52%) scaleX(-1); }
}
@keyframes plDot {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}

/* --- OCULTAR MARCA DE AGUA SPLINE --- */
a[href*="spline.design"],
div[class*="logo"][style*="position"],
#spline-watermark {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* --- CANVASES & 3D --- */
#canvas3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 90;
    pointer-events: none;
}

#wind-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 80;
    pointer-events: none;
    opacity: 0.4;
}

/* --- OCULTAR SCROLLBAR --- */

/* Para Chrome, Safari y Opera */
::-webkit-scrollbar {
    display: none;
}

/* Para Firefox, IE y Edge */
body {
    -ms-overflow-style: none;  /* IE y Edge */
    scrollbar-width: none;  /* Firefox */
}


/* El contenedor padre que aplica la física líquida */
.liquid-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url('#gooey'); /* AQUÍ se aplica el ID del SVG */
    z-index: -1;
}

/* Estilo base de las gotas */
.drop {
    position: absolute;
    top: 2rem;
    right: 4rem; /* Nacen desde el botón de MENÚ */
    background-color: var(--bg-dark);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- MENÚ OVERLAY (VINTAGE PREMIUM EQUILIBRADO) --- */

/* 1. Fondo del Agua */
.drop-1 { width: 100px; height: 100px; transition-delay: 0s; background-color: rgba(5, 72, 82, 0.98); }
.drop-2 { width: 150px; height: 150px; transition-delay: 0.1s; background-color: var(--brand-teal); }
.drop-3 { width: 120px; height: 120px; transition-delay: 0.2s; background-color: var(--brand-red); opacity: 0.5; }

/* 2. Cabecera */
.menu-header {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 2rem 4rem; display: flex; justify-content: space-between; align-items: center;
    z-index: 210;
}
.menu-header .menu-close { 
    color: var(--accent-cream); font-family: 'Syne', sans-serif; 
    font-weight: 700; letter-spacing: 2px; font-size: 0.8rem; transition: color 0.3s; 
    cursor: pointer;
}
.menu-header .menu-close:hover { color: var(--brand-red); }

/* 3. Contenedor Central (Acomodado para que no se corte abajo) */
.menu-content-wrapper {
    display: flex; flex-direction: column; justify-content: space-between; align-items: center;
    width: 100%; height: 100dvh; 
    padding: 6rem 4rem 2rem; /* Achicamos los márgenes para que todo entre perfecto */
    box-sizing: border-box;
    max-width: 1200px; margin: 0 auto;
}

/* 4. Links Principales: Tipografía Playfair más chica y centrada */
.menu-links {
    display: flex; flex-direction: column; text-align: center; gap: 0.8rem;
    margin-top: auto; margin-bottom: auto; /* Centra el bloque verticalmente */
}

.menu-links a {
    color: var(--accent-cream);
    text-decoration: none;
    font-family: 'Playfair Display', serif; /* Volvemos a la elegante */
    font-size: clamp(2rem, 4vw, 3.5rem); /* Tamaños medidos y proporcionales */
    font-style: italic;
    font-weight: 700;
    line-height: 1.1;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

/* Hover "Vintage": Rotación y sombra serigráfica */
.menu-links a:hover {
    color: var(--brand-red);
    transform: scale(1.05) rotate(-2deg);
    text-shadow: -3px 3px 0px rgba(126, 200, 232, 0.6);
    z-index: 10;
}

/* 5. Footer del Menú (Redes y Legales bien ubicados abajo) */
.menu-info {
    display: flex; flex-direction: row; justify-content: space-between; align-items: center;
    width: 100%; border-top: 1px solid rgba(244, 236, 216, 0.15);
    padding-top: 1.5rem;
}

.social-links, .legal-links { display: flex; gap: 1.5rem; flex-direction: row; }
.menu-subtitle { display: none; } /* Mantenemos limpio sin el título "Conectemos" */

.social-links a, .legal-links a {
    color: rgba(244, 236, 216, 0.6); font-family: 'Syne', sans-serif;
    font-weight: 600; font-size: 0.8rem; text-decoration: none; 
    text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s;
}

.social-links a:hover, .legal-links a:hover { color: var(--accent-cream); }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .menu-header { padding: 1.5rem 2rem; }
    .menu-content-wrapper { padding: 6rem 2rem 2rem; }
    .menu-links { gap: 1rem; }
    .menu-links a { font-size: 2.2rem; }
    .menu-info { flex-direction: column; align-items: center; gap: 1.5rem; border-top: none; }
    .social-links, .legal-links { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 1rem; }
}

/* Patrones decorativos — pendiente rediseño */

/* =====================================================================
   GUARDIANES DECORATIVOS (::after)
   Elementos adicionales por encima de los patrones maoríes (::before).
   Todos con pointer-events: none y z-index: 0 (debajo de .panel-content).
   ===================================================================== */

/* Ola flotante — #clima (bottom-left, navy) */
#clima::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: clamp(80px, 12vmin, 130px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 80' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23054852' stroke-width='3' stroke-linecap='round' d='M0,60 C50,20 100,70 150,40 C200,10 250,58 300,30'/%3E%3Cpath fill='none' stroke='%23054852' stroke-width='2' stroke-linecap='round' opacity='0.5' d='M0,72 C60,48 110,76 170,55 C220,36 265,66 300,48'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
}

/* Hibisco tribal — #marketplace, detrás del texto (cream) */
#marketplace::after {
    content: '';
    position: absolute;
    right: 4%;
    top: 50%;
    width: clamp(180px, 26vmin, 300px);
    height: clamp(180px, 26vmin, 300px);
    /* centrado vertical sin transform para máx compatibilidad con contain:layout */
    margin-top: calc(-1 * clamp(90px, 13vmin, 150px));
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg transform='translate(60,60)'%3E%3Cpath fill='none' stroke='%23E6D2B0' stroke-width='2' d='M0,-42 C-10,-28 -10,-14 0,0 C10,-14 10,-28 0,-42 Z' transform='rotate(0)'/%3E%3Cpath fill='none' stroke='%23E6D2B0' stroke-width='2' d='M0,-42 C-10,-28 -10,-14 0,0 C10,-14 10,-28 0,-42 Z' transform='rotate(72)'/%3E%3Cpath fill='none' stroke='%23E6D2B0' stroke-width='2' d='M0,-42 C-10,-28 -10,-14 0,0 C10,-14 10,-28 0,-42 Z' transform='rotate(144)'/%3E%3Cpath fill='none' stroke='%23E6D2B0' stroke-width='2' d='M0,-42 C-10,-28 -10,-14 0,0 C10,-14 10,-28 0,-42 Z' transform='rotate(216)'/%3E%3Cpath fill='none' stroke='%23E6D2B0' stroke-width='2' d='M0,-42 C-10,-28 -10,-14 0,0 C10,-14 10,-28 0,-42 Z' transform='rotate(288)'/%3E%3Ccircle r='10' fill='none' stroke='%23E6D2B0' stroke-width='2.5'/%3E%3Cline x1='0' y1='-10' x2='0' y2='-28' stroke='%23E6D2B0' stroke-width='2' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

/* Sol tribal grande — #stats (centrado de fondo, navy) */
#stats::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg transform='translate(100,100)'%3E%3Ccircle r='38' fill='none' stroke='%23054852' stroke-width='3.5'/%3E%3Ccircle r='24' fill='none' stroke='%23054852' stroke-width='2.5'/%3E%3Cline x1='0' y1='-44' x2='0' y2='-72' stroke='%23054852' stroke-width='4' stroke-linecap='round'/%3E%3Cline x1='0' y1='-44' x2='0' y2='-59' stroke='%23054852' stroke-width='2.5' stroke-linecap='round' transform='rotate(45)'/%3E%3Cline x1='0' y1='-44' x2='0' y2='-72' stroke='%23054852' stroke-width='4' stroke-linecap='round' transform='rotate(90)'/%3E%3Cline x1='0' y1='-44' x2='0' y2='-59' stroke='%23054852' stroke-width='2.5' stroke-linecap='round' transform='rotate(135)'/%3E%3Cline x1='0' y1='-44' x2='0' y2='-72' stroke='%23054852' stroke-width='4' stroke-linecap='round' transform='rotate(180)'/%3E%3Cline x1='0' y1='-44' x2='0' y2='-59' stroke='%23054852' stroke-width='2.5' stroke-linecap='round' transform='rotate(225)'/%3E%3Cline x1='0' y1='-44' x2='0' y2='-72' stroke='%23054852' stroke-width='4' stroke-linecap='round' transform='rotate(270)'/%3E%3Cline x1='0' y1='-44' x2='0' y2='-59' stroke='%23054852' stroke-width='2.5' stroke-linecap='round' transform='rotate(315)'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: clamp(260px, 42vmin, 480px);
    background-position: center center;
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

/* --- SOL ICON (inline, sección Clima) --- */
.sol-icon {
    display: block;
    margin-bottom: 0.8rem;
}
.sol-icon svg {
    width: 28px;
    height: 28px;
}

/* --- TRIBE ICONS (separador CTA) --- */
.tribe-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 1.75rem);
    margin: 1.5rem 0 0.75rem;
    opacity: 0.5;
}
/* Líneas decorativas a los lados */
.tribe-icons::before,
.tribe-icons::after {
    content: '';
    flex: 1;
    max-width: 70px;
    height: 1px;
    background: rgba(230, 210, 176, 0.35);
}
.tribe-icon {
    width: clamp(18px, 2.2vw, 26px);
    height: clamp(18px, 2.2vw, 26px);
    color: var(--accent-cream);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .sol-icon { display: flex; justify-content: center; }
    .tribe-icons { gap: 0.85rem; }
    .tribe-icons::before, .tribe-icons::after { max-width: 40px; }
    .tribe-icon { width: 20px; height: 20px; }
}

