/* ==========================================================================
   1. VARIABLES, FUENTES Y RESET
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --font-heading: 'Helvetica Now Display Bold', sans-serif;
    --font-body: 'Inter', sans-serif;
    --color-text: #192837;
    --color-accent: #7342E2;
    --color-login-bg: #F2F2EE;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-login-bg);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Fondo de Vídeo Principal */
.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* ==========================================================================
   2. CABECERA (NAVBAR)
   ========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100; /* Asegura que se sitúe por encima del contenido al hacer scroll */
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(242, 242, 238, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(25, 40, 55, 0.05);
}

@media (min-width: 640px) {
    .navbar { padding: 1.25rem 2rem; }
}

.logo {
    display: flex;
    align-items: center;
}

.nav-desktop {
    display: none;
    gap: 2rem;
    align-items: center;
}

.nav-desktop a {
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    transition: opacity 0.2s ease;
}

.nav-desktop a:hover { 
    opacity: 0.7; 
}

.auth-buttons-desktop {
    display: none;
    gap: 0.75rem;
    align-items: center;
}

@media (min-width: 768px) {
    .nav-desktop, .auth-buttons-desktop { display: flex; }
    .btn-menu-mobile { display: none; }
}

/* ==========================================================================
   3. BOTONES COMPARTIDOS
   ========================================================================== */
button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-signin {
    background-color: #F2F2EE;
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
}
.btn-signin:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.btn-signin:active { transform: scale(0.95); }

.btn-start {
    background-color: var(--color-accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
}
.btn-start:hover { box-shadow: 0 10px 15px -3px rgba(115, 66, 226, 0.3); }
.btn-start:active { transform: scale(0.95); }

.btn-menu-mobile {
    background: transparent;
    color: var(--color-text);
    padding: 0.25rem;
    z-index: 50;
}

.w-full {
    width: 100%;
    padding: 0.875rem;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   4. SECCIÓN HERO (ZONA PRINCIPAL)
   ========================================================================== */
.hero-container {
    position: relative;
    z-index: 10;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(40px, 8vw, 72px) 1.25rem 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.hero-content {
    max-width: 660px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.65rem, 5vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.nowrap { 
    white-space: nowrap; 
}

.inline-icon {
    display: inline;
    vertical-align: middle;
    position: relative;
    top: -2px;
    margin: 0 4px;
}
.inline-icon.fingerprint { margin-left: 6px; }

p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    line-height: 1.65;
    color: var(--color-text);
    opacity: 0.8;
    max-width: 560px;
    margin-bottom: 2.5rem;
}

.btn-cta {
    background-color: var(--color-accent);
    color: #fff;
    font-weight: 600;
    border-radius: 50px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    padding: 17px 24px;
    min-width: 210px;
    box-shadow: 0 4px 24px rgba(115, 66, 226, 0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.btn-cta:hover { transform: scale(1.04); filter: brightness(1.1); }
.btn-cta:active { transform: scale(0.96); }

/* ==========================================================================
   5. SECCIONES DE CONTENIDO ADICIONAL
   ========================================================================== */
.content-section {
    position: relative;
    z-index: 10;
    padding: 6rem 1.25rem;
    width: 100%;
    scroll-margin-top: 90px; /* Margen para que no quede oculto detrás del menú sticky */
}

.bg-alt {
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.section-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.section-container h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.section-container p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 auto 3rem;
    max-width: 700px;
    color: var(--color-text);
    opacity: 0.8;
}

/* Grid de Bloques de Beneficios */
.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left;
}

@media (min-width: 768px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Formulario del Bloque de Ayuda */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(25, 40, 55, 0.15);
    border-radius: 0.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    background: #fff;
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(115, 66, 226, 0.1);
}

.btn-primary {
    background-color: var(--color-accent);
    color: #fff;
    font-weight: 600;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: scale(0.98); }

/* ==========================================================================
   6. MENÚ LATERAL MÓVIL (SLIDE SHEET)
   ========================================================================== */
.mobile-menu-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 999; /* Máxima prioridad sobre cualquier otra capa */
    pointer-events: none;
    visibility: hidden;
}
.mobile-menu-wrapper.active {
    pointer-events: auto;
    visibility: visible;
}

.menu-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(25, 40, 55, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-menu-wrapper.active .menu-backdrop { opacity: 1; }

.menu-sheet {
    position: absolute;
    top: 0; right: 0;
    width: min(88vw, 360px);
    height: 100dvh;
    background-color: #CFC8C5;
    box-shadow: -12px 0 48px rgba(25, 40, 55, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu-wrapper.active .menu-sheet {
    transform: translateX(0);
}
.mobile-menu-wrapper.closing .menu-sheet {
    transition: transform 0.35s cubic-bezier(0.55, 0, 1, 0.45);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
}

.btn-close {
    width: 40px; height: 40px;
    border-radius: 50%;
    background-color: rgba(25, 40, 55, 0.1);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-close:active { transform: scale(0.9); }

.menu-divider {
    height: 1px;
    background-color: rgba(25, 40, 55, 0.12);
    margin: 0 24px;
}

.nav-mobile {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem 0;
    gap: 0.5rem;
}

.nav-mobile a {
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    transition: background-color 0.2s;
    opacity: 0;
    transform: translateX(24px);
}
.nav-mobile a:hover { background-color: rgba(0, 0, 0, 0.1); }

.mobile-menu-wrapper.active .nav-mobile a {
    animation: slideInRight 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(0.18s + (var(--i) * 0.07s));
}

@keyframes slideInRight {
    to { opacity: 1; transform: translateX(0); }
}

.auth-buttons-mobile {
    margin-top: auto;
    padding: 1.5rem;
}

/* ==========================================================================
   7. SISTEMA DE ANIMACIONES (INTERSECTION OBSERVER Y FADE-UP)
   ========================================================================== */
.animate-fade-up {
    opacity: 0;
    transform: translateY(28px);
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--delay);
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}