/* --- CONFIGURACIÓN BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ffffff;
    color: #333333;
    overflow-x: hidden;
}

/* --- MENÚ SUPERIOR --- */
.navbar {
    background-color: #1e2a3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    min-height: 160px;
    position: relative;
}
.nav-left, .nav-right {
    display: flex;
    gap: 40px;
    flex: 1;
}
.nav-right {
    justify-content: flex-end;
}
.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s, transform 0.3s;
}
.navbar a:hover {
    color: #a0aec0;
    transform: translateY(-2px);
}
.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* --- LOGO MAGICO --- */
.nav-center .logo {
    height: 180px;
    filter: invert(1) brightness(2);
    mix-blend-mode: screen;
    transition: transform 0.4s ease;
    cursor: pointer;
}
.nav-center .logo:hover {
    transform: scale(1.12);
}

/* --- BOTÓN HAMBURGUESA (oculto en escritorio) --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    z-index: 20;
}

/* --- MENÚ MÓVIL (oculto por defecto) --- */
.mobile-menu {
    display: none;
    flex-direction: column;
    background-color: #1e2a3a;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
}
.mobile-menu.open {
    max-height: 300px;
}
.mobile-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 16px 8%;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- TEXTO GIGANTE CENTRAL --- */
.hero-text {
    text-align: center;
    padding: 90px 20px 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Estado INICIAL (oculto) de cada elemento */
.hero-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #a8adb5; /* plateado */
    margin-bottom: 18px;
    opacity: 0;
}

.serif-title {
    font-family: 'Playfair Display', serif;
    line-height: 1.15;
}

.line-wrap {
    display: block;
    overflow: hidden;
}

.text-line {
    display: inline-block;
    font-size: clamp(35px, 5vw, 55px);
    transform: translateY(110%);
    opacity: 0;
}

.text-dark {
    color: #2d3748;
}
.text-gradient {
    background: linear-gradient(90deg, #2d3748, #d4d7dc, #2d3748);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-position: 0% center;
}

.hero-underline {
    display: block;
    width: 0;
    height: 3px;
    margin-top: 26px;
    background: linear-gradient(90deg, transparent, #a8adb5, transparent);
}

/* --- Cuando el texto ENTRA en pantalla (clase añadida por JS) --- */
/* Selectores simples y sin solapamientos, para que ninguna regla pise a otra */
.hero-text.in-view .hero-eyebrow {
    animation: fadeInSimple 0.8s ease-out 0.1s forwards;
}

.hero-text.in-view .text-gradient {
    animation: revealLine 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards,
               shine 5s ease-out 1s 1;
}
.hero-text.in-view .text-dark {
    animation: revealLine 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.hero-text.in-view .hero-underline {
    animation: drawLine 1s ease-out 0.9s forwards;
}

@keyframes revealLine {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInSimple {
    to { opacity: 1; }
}

@keyframes shine {
    to { background-position: -300% center; }
}

@keyframes drawLine {
    to { width: 140px; }
}

/* --- BARRA DE MARCAS (CARRUSEL INFINITO, SIN PAUSA) --- */
.brand-bar {
    display: flex;
    overflow: hidden;
    padding: 40px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 40px;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.brand-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: scrollLeft 20s linear infinite;
    will-change: transform;
}
.brand-bar:hover .brand-track {
    animation-play-state: paused;
}
@keyframes scrollLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 7vw;
}
.brand-item img {
    height: 50px;
    width: auto;
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.4s ease;
}
.brand-item:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.15);
}
.brand-text {
    font-size: 22px;
    color: #718096;
    font-weight: 700;
    text-transform: lowercase;
    white-space: nowrap;
    transition: all 0.3s ease;
}
.brand-item:hover .brand-text {
    color: #2d3748;
    transform: scale(1.05);
}

/* --- SECCIÓN DEL RENDER --- */
.image-showcase {
    width: 85%;
    max-width: 1100px;
    margin: 0 auto 60px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.render-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s ease;
}
.image-showcase:hover .render-img {
    transform: scale(1.04);
}

/* --- ANIMACIONES GENERALES --- */
.fade-in-down { animation: fadeInDown 1s ease-out; }
.fade-in { animation: fadeIn 1.5s ease-out; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- RESPONSIVE (MÓVIL Y TABLET) --- */
@media (max-width: 768px) {
    .navbar {
        min-height: 100px;
        padding: 0 5%;
    }
    .nav-left, .nav-right {
        display: none;
    }
    .nav-center .logo {
        height: 100px;
    }
    .menu-toggle {
        display: block;
    }
    .mobile-menu {
        display: flex;
    }
    .hero-text {
        padding: 60px 20px 50px;
    }
    .brand-item {
        margin-right: 12vw;
    }
    .brand-text {
        font-size: 16px;
    }
}