/* --- VARIABLES Y RESET --- */
:root {
    --color-blanco: #ffffff;
    --color-negro: #0B0F14;
    --color-acento: #22C7A9;          /* verde-azulado principal */
    --color-acento-hover: #1AA88E;
    --color-fondo-suave: #EAFBF7;     /* fondo suave con tinte del acento */
    --color-gris-bg: #F5F7F9;
    --color-texto-principal: #16202A;
    --sombra-suave: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--color-blanco);
    color: var(--color-texto-principal);
    overflow-x: hidden;
    padding-top: 80px;
}

/* --- NAVBAR (Flotante y Fija) --- */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 60%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 30px;
    border-radius: 50px;
    box-shadow: var(--sombra-suave);
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    height: 30px;
}

.logo-icon {
    display: flex;
    color: var(--color-acento);
    transition: transform 0.4s ease;
}
.logo-icon svg { width: 22px; height: 22px; }
.logo:hover .logo-icon { transform: rotate(180deg); }

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--color-texto-principal);
}

/* --- MENU MOVIL --- */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    height: 30px;
    justify-content: center;
    margin-left: auto;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-negro);
    border-radius: 3px;
    transition: all 0.3s;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: var(--color-negro);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background-color: var(--color-acento);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:hover { color: var(--color-acento); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.btn-login {
    text-decoration: none;
    background-color: var(--color-acento);
    color: var(--color-blanco);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}
.btn-login:hover {
    background-color: var(--color-acento-hover);
    transform: translateY(-2px);
}


/* --- HERO --- */
.hero {
    position: relative;
    width: 100%;
    min-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 100px;
    margin-top: -80px; /* cancela el padding-top del body: el video llega hasta y=0, el navbar flota encima */
    background-color: #0B0F14;
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.68) saturate(1.1) contrast(1.05);
    transform: scale(1.02);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(18, 48, 59, 0.4) 0%, rgba(11, 15, 20, 0.55) 65%),
        linear-gradient(180deg, rgba(11,15,20,0.25) 0%, rgba(11,15,20,0.7) 100%);
}

/* Manchas de luz flotantes sobre el video, refuerzan el color de marca */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.3;
    z-index: 0;
    animation: float-blob 14s ease-in-out infinite;
    pointer-events: none;
}
.hero::before {
    width: 420px;
    height: 420px;
    background: var(--color-acento);
    top: -120px;
    left: 8%;
}
.hero::after {
    width: 340px;
    height: 340px;
    background: #2E8CFF;
    bottom: -100px;
    right: 6%;
    animation-delay: -7s;
}
@keyframes float-blob {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -25px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-logo-icon {
    display: flex;
    color: var(--color-acento);
    filter: drop-shadow(0 0 10px rgba(34, 199, 169, 0.6));
    animation: pulse-glow 3s ease-in-out infinite;
}
.hero-logo-icon svg { width: 26px; height: 26px; }

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(34, 199, 169, 0.5)); }
    50% { filter: drop-shadow(0 0 16px rgba(34, 199, 169, 0.9)); }
}

.hero-logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--color-blanco);
}

.hero-content h1 {
    font-size: clamp(2.1rem, 5.5vw + 1rem, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-blanco);
    line-height: 1.15;
}

.hero-content p {
    font-size: clamp(0.95rem, 1.2vw + 0.7rem, 1.15rem);
    margin: 0 auto 40px;
    max-width: 640px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.btn-download-app {
    text-decoration: none;
    background-color: var(--color-acento);
    color: var(--color-negro);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
}
.btn-download-app:hover {
    background-color: var(--color-acento-hover);
    color: var(--color-blanco);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(34, 199, 169, 0.35);
}

/* --- ENTRADA ESCALONADA DEL HERO --- */
.fade-up {
    opacity: 0;
    transform: translateY(25px);
    animation: fade-up 0.8s ease forwards;
}
.fade-0 { animation-delay: 0.1s; }
.fade-1 { animation-delay: 0.25s; }
.fade-2 { animation-delay: 0.4s; }
.fade-3 { animation-delay: 0.55s; }

@keyframes fade-up {
    to { opacity: 1; transform: translateY(0); }
}

/* --- MULTIDIVISA (banderas) --- */
.currencies {
    position: relative;
    z-index: 10;
    background-color: var(--color-fondo-suave);
    padding: 80px 20px 70px;
    text-align: center;
}

.currencies-header { max-width: 600px; margin: 0 auto 50px; }

.currencies-header h2 {
    font-size: clamp(1.5rem, 2.8vw + 0.8rem, 2.2rem);
    font-weight: 700;
    color: var(--color-negro);
    margin-top: 14px;
    margin-bottom: 14px;
    line-height: 1.25;
}

.currencies-header p {
    font-size: clamp(0.92rem, 0.8vw + 0.75rem, 1.05rem);
    color: #4a5761;
    line-height: 1.6;
}

.currency-flags {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
}

/* Cada bandera "voltea" hacia adentro como una ficha de moneda, en vez
   del fade/bounce de las otras secciones — encaja con el tema de
   divisas y da una entrada escalonada y distinta por cada país. */
.currency-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 110px;
    padding: 20px 10px;
    background-color: var(--color-blanco);
    border-radius: 20px;
    box-shadow: var(--sombra-suave);
    opacity: 0;
    transform: perspective(600px) rotateY(90deg);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(.34,1.2,.4,1), box-shadow 0.3s ease;
}
.reveal.active .currency-chip { opacity: 1; transform: perspective(600px) rotateY(0deg); }
.currency-chip:nth-child(1) { transition-delay: 0.05s; }
.currency-chip:nth-child(2) { transition-delay: 0.18s; }
.currency-chip:nth-child(3) { transition-delay: 0.31s; }
.currency-chip:nth-child(4) { transition-delay: 0.44s; }
.currency-chip:nth-child(5) { transition-delay: 0.57s; }
.currency-chip:nth-child(6) { transition-delay: 0.7s; }

.currency-chip:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 25px rgba(0,0,0,0.1);
}

.currency-chip .flag {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.currency-chip span:last-child {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-texto-principal);
}

/* --- BLOQUES DE CONTENIDO --- */
.main-content-blocks {
    position: relative;
    background-color: var(--color-blanco);
    padding: 80px 20px;
    z-index: 10;
}

.content-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    margin: 30px auto;
    padding: clamp(28px, 6vw, 60px);
    border-radius: clamp(22px, 4vw, 40px);
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.8s ease-out;
    cursor: default;
}

.bg-blue { background-color: var(--color-fondo-suave); }
.bg-light-gray { background-color: var(--color-gris-bg); }

.content-block:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.content-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(34, 199, 169, 0.15);
    color: var(--color-acento);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    opacity: 0;
    transform: scale(0.5) rotate(-20deg);
    transition: opacity 0.5s ease 0.15s, transform 0.5s cubic-bezier(.34,1.56,.64,1) 0.15s;
}
.content-icon svg { width: 28px; height: 28px; }
.reveal.active .content-icon { opacity: 1; transform: scale(1) rotate(0); }

.content-block:hover .content-icon {
    transform: scale(1.1) rotate(8deg);
}

.content-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--color-acento-hover);
    background-color: rgba(34, 199, 169, 0.15);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.content-text h2 {
    font-size: clamp(1.4rem, 2.6vw + 0.8rem, 2.1rem);
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--color-negro);
    line-height: 1.25;
}

.content-text p {
    font-size: clamp(0.92rem, 0.7vw + 0.78rem, 1.05rem);
    color: #555;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto;
}

/* --- SCROLL REVEAL (con efecto escalonado entre bloques) --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.content-block:nth-of-type(2) { transition-delay: 0.1s; }
.content-block:nth-of-type(3) { transition-delay: 0.2s; }
.content-block:nth-of-type(4) { transition-delay: 0.3s; }

/* --- FOOTER --- */
.site-footer {
    position: relative;
    z-index: 10;
    background-color: var(--color-negro);
    padding: 70px 20px 0;
}

.footer-top {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    max-width: 320px;
}

.footer-brand .logo-text { color: var(--color-blanco); }

.footer-tagline {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-col h3 {
    color: var(--color-blanco);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    position: relative;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-col a:hover {
    color: var(--color-acento);
    padding-left: 6px;
}

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* --- BOTÓN VOLVER ARRIBA --- */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background-color: var(--color-acento);
    color: var(--color-negro);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, visibility 0.3s;
    box-shadow: var(--sombra-suave);
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background-color: var(--color-acento-hover);
    transform: translateY(-3px);
}

/* --- RESPONSIVE --- */
/* Tablet y móvil: navbar pasa a modo hamburguesa, con "Iniciar sesión"
   dentro del panel colapsable junto a los links (no suelto al lado del
   ícono de menú). Se agrupa aquí todo lo que es reflow/estructura; el
   tamaño de letra fluido (clamp) ya se ajusta solo entre breakpoints. */
@media (max-width: 1024px) {
    body { padding-top: 70px; }
    .hero { margin-top: -70px; }

    .currencies { padding: 60px 20px 50px; }
    .currencies-header { margin-bottom: 36px; }
    .currency-flags { gap: 16px; }
    .currency-chip { width: 95px; padding: 16px 8px; }
    .currency-chip .flag { width: 46px; height: 46px; }

    .navbar {
        width: 92%;
        padding: 15px 20px;
        border-radius: 20px;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .menu-toggle { display: flex; }

    .nav-container {
        order: 3;
        flex-basis: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        width: 100%;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        margin-top: 0;
        border-top: 1px solid transparent;
        transition: all 0.5s ease-in-out;
    }

    .nav-container.active {
        max-height: 600px;
        opacity: 1;
        margin-top: 15px;
        padding-top: 20px;
        padding-bottom: 20px;
        border-top: 1px solid #eee;
    }

    .nav-links {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
        width: 100%;
        gap: 20px;
    }

    /* Dentro del panel colapsable el botón ocupa todo el ancho, en vez
       de quedar pegado al ícono de menú como en desktop. */
    .nav-container .btn-login {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 18px;
    }

    .promo-banner { padding: 45px 20px; }
    .btn-register { padding: 13px 30px; font-size: 1rem; }

    .content-block {
        padding: 40px 20px;
        margin: 20px auto;
    }

    .content-icon { width: 52px; height: 52px; }
    .content-icon svg { width: 24px; height: 24px; }

    .hero-logo-text { font-size: 1.1rem; }

    .hero::before { width: 260px; height: 260px; }
    .hero::after { width: 220px; height: 220px; }

    .footer-top {
        flex-direction: column;
        gap: 32px;
        padding-bottom: 35px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}

/* Celulares pequeños: ajustes extra de espaciado, no de tipografía
   (la tipografía ya escala sola vía clamp). */
@media (max-width: 480px) {
    body { padding-top: 64px; }

    .navbar {
        top: 12px;
        width: 94%;
        padding: 12px 16px;
    }

    .logo-text { font-size: 1.2rem; }

    .hero {
        margin-top: -64px;
        padding: 100px 16px 70px;
        min-height: 85vh;
    }

    .hero-logo { margin-bottom: 22px; }
    .hero-logo-text { font-size: 1rem; }

    .btn-download-app {
        padding: 13px 30px;
        font-size: 1rem;
    }

    .promo-banner { padding: 35px 16px; }
    .btn-register {
        width: 100%;
        text-align: center;
        padding: 13px 20px;
    }

    .content-block {
        padding: 30px 18px;
        margin: 14px auto;
        border-radius: 20px;
    }

    .content-tag { font-size: 0.72rem; }

    .footer-top { gap: 26px; padding-bottom: 28px; }
    .footer-bottom { font-size: 0.78rem; }

    .back-to-top {
        right: 12px;
        bottom: 12px;
        width: 40px;
        height: 40px;
    }
}

/* Pantallas bajas en horizontal (celular acostado): el hero a 90vh se
   come toda la pantalla y el contenido queda apretado, así que se
   relaja la altura mínima y el padding vertical. */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 20px 50px;
    }
}

/* --- PÁGINAS LEGALES (stub) --- */
.legal-page {
    min-height: 60vh;
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 20px 100px;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--color-acento-hover);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 30px;
}
.legal-back:hover { text-decoration: underline; }

.legal-page h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--color-negro);
}

.legal-page p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-page .legal-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--color-acento-hover);
    background-color: rgba(34, 199, 169, 0.15);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
}

/* Respeta si el usuario prefiere menos movimiento en pantalla */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
