/* =====================================================
   CSS CRÍTICO — carga primero, previene FOUC/CLS
   ===================================================== */

/* Evita desbordamiento horizontal en TODO el documento */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: #0A0A0A;
    color: #F5F0E8;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Navbar fija desde el inicio */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    padding: 1.5rem 2rem;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Hero base */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a0508;
    overflow: hidden;
}

.hero-content {
    position: absolute;
    bottom: 6vh;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 10;
}

/* Botón dorado desde el inicio */
.btn-primary {
    display: inline-block;
    background: #C9A84C;
    border: 2px solid #F0D060;
    color: #0A0A0A;
    font-weight: 700;
    padding: 1.2rem 3rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.4);
}

/* Back-to-top invisible al inicio */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    opacity: 0;
    pointer-events: none;
}

/* Animación del botón hero — CSS puro, sin depender de AOS */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-cta-animate {
    animation: heroFadeUp 0.8s ease-out 0.3s both;
}

/* Reservar espacio para títulos mientras cargan las fuentes 
   Previene CLS (Cumulative Layout Shift) */
.section-title,
.cinzel,
.logo-small,
.hero-title {
    /* font-size mínimo garantizado antes que carguen fuentes */
    min-height: 1em;
}

/* Hamburger visible en móvil desde frame 0 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .btn-primary {
        font-size: 0.9rem;
        padding: 1rem 2rem;
        letter-spacing: 1.5px;
    }

    /* Navbar padding correcto en móvil */
    .navbar {
        padding: 1rem 1.5rem;
    }
}
