/* =========================================
   1. TIPOGRAFÍAS (@font-face)
   ========================================= */

/* Lora (Fuente Variable) */
@font-face {
    font-family: 'Lora';
    src: url('../fonts/Lora-VariableFont_wght.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lora';
    src: url('../fonts/Lora-Italic-VariableFont_wght.woff2') format('woff2');
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
}

/* Lato (Fuentes Estáticas) */
@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* =========================================
   2. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */

:root {
    /* Colores */
    --color-black: #000000;
    --color-white: #ffffff;
    --color-grey-dark: #333333;
    --color-grey-light: #f5f5f5;

    /* Fuentes */
    --font-serif: 'Lora', serif;
    --font-sans: 'Lato', sans-serif;

    /* Espaciado */
    --spacing-macro: 12rem;
    --spacing-base: 2rem;
}


html {
    scroll-behavior: smooth;
}

/* Compensa la altura del header fijo al navegar hacia el ancla (ajustar '5rem' a la altura del header) */
section[id] {
    scroll-margin-top: 5rem;
}

/* Opcional: Respeta las preferencias del sistema del usuario para animaciones reducidas */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}


/* =========================================
   3. RESET Y BASE
   ========================================= */

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-black);
    background-color: var(--color-white);
    line-height: 1.6;
    font-size: 1.25rem;
    -webkit-font-smoothing: antialiased;
}

/* Clases utilitarias de texto */
.font-serif { font-family: var(--font-serif); font-weight: 400; }
.font-sans { font-family: var(--font-sans); font-weight: 300; }
.italic { font-style: italic; }
.text-center { text-align: center; }


/* =========================================
   4. ESTRUCTURA Y UTILIDADES
   ========================================= */

.section-padding {
    padding-top: var(--spacing-macro);
    padding-bottom: var(--spacing-macro);
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-base);
}

/* Tratamiento Fotográfico */
.img-grayscale-hover {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(80%);
    transition: filter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.img-grayscale-hover:hover {
    filter: grayscale(20%);
}

/* Animaciones de entrada (IntersectionObserver) */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* =========================================
   5. COMPONENTES: BOTONES Y ENLACES
   ========================================= */

/* CTA Minimalista */
.cta-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--color-black);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    position: relative;
}

.cta-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-black);
    transform: scaleX(0.3);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.cta-link:hover::after {
    transform: scaleX(1);
}


/* =========================================
   6. HEADER Y NAVEGACIÓN
   ========================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid var(--color-grey-light);
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: -1;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem var(--spacing-base);
    min-height: 4rem;
}

/* Logotipo */
.site-logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--color-black);
    line-height: 0.85;
    padding: 0.5rem 0;
}

.logo-main {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    letter-spacing: -0.02em;
}

.logo-sub {
    display: flex;
    align-items: baseline;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    letter-spacing: -0.02em;
    margin-left: 12%;
}

.logo-prep {
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    color: var(--color-grey-dark);
    margin-right: 0.25rem;
    font-weight: 300;
}

/* Navegación Escritorio */
.nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--color-grey-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-black);
}

/* Ocultar botón menú en escritorio */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

/* =========================================
   BOTÓN CTA - CABECERA
   ========================================= */
.site-header__nav .btn-cta {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 0.6rem 1.5rem;
    border-radius: 2px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 0.5rem;
}

.site-header__nav .btn-cta:hover {
    background-color: var(--color-grey-dark);
    color: var(--color-white);
}

.icon-whatsapp {
    flex-shrink: 0;
    display: inline-block;
    transition: transform 0.3s ease;
}

.site-header__nav .btn-cta:hover .icon-whatsapp {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .site-header__nav .btn-cta {
        margin-top: 1rem;
        width: 80%;
        max-width: 300px;
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* =========================================
   7. FOOTER
   ========================================= */

.site-footer {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 4rem var(--spacing-base) 2rem;
}

.site-footer__container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
    border-bottom: 1px solid var(--color-grey-dark);
    padding-bottom: 2rem;
}

.footer-col {
    box-sizing: border-box;
    flex: 0 0 calc(33.333% - 1.34rem);
}

.footer-col h3,
.footer-col h4 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-top: 0;
    margin-bottom: 1rem;
}

.footer-col p,
.footer-col a {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: var(--color-white);
    text-decoration: none;
    line-height: 1.8;
    margin: 0.5rem 0;
}

.footer-col address {
    font-style: normal;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col a:hover {
    color: var(--color-grey-light);
}

.site-footer__bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    text-align: center;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    color: #888;
}

/* Estilos para el contenedor de redes sociales */
.social-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
}

/* Enlaces de iconos */
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    /* Transiciones suaves para color y posición */
    transition: color 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* El SVG hereda el color del texto mediante 'currentColor' */
.social-links .icon-social {
    width: 24px;
    height: 24px;
    fill: currentColor;
    display: block;
}

/* Interacción Hover: Cambio de color y pequeña elevación premium */
.social-links a:hover {
    color: var(--color-grey-light);
    transform: translateY(-4px);
}

/* Quitar margen inferior del párrafo para alinear mejor visualmente con los iconos */
.footer-col p + .social-links {
    margin-top: 1rem;
}


/* =========================================
   8. MEDIA QUERIES (Móviles y Tablets)
   ========================================= */

@media (max-width: 768px) {
    .macro-reducido {
        --spacing-macro: 8rem;
    }
    /* Estructura general */
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* Header y Navegación Móvil */
    .header-container {
        flex-wrap: nowrap;
    }

    .site-logo {
        position: relative;
        z-index: 10;
    }

    /* Botón Hamburguesa */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        position: relative;
        z-index: 10;
        height: 44px; /* Añadimos un alto fijo para mejorar el área de clic en móviles */
    }

    /* Línea central */
    .hamburger {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--color-black);
        transition: background-color 0.3s ease;
        position: relative;
    }

    /* Líneas superior e inferior */
    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--color-black);
        transition: transform 0.3s ease;
    }

    /* Separación geométrica simétrica */
    .hamburger::before { top: -8px; }
    .hamburger::after { top: 8px; }

    /* Estado Activo (La "X") */
    .menu-toggle.is-active .hamburger {
        background-color: transparent;
    }

    /* Al ser absolutas y simétricas, trasladar exactamente 8px las funde en el centro antes de rotar */
    .menu-toggle.is-active .hamburger::before {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.is-active .hamburger::after {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Menú a Pantalla Completa (Móvil) */
    .site-header__nav {
        position: absolute;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--color-white);
        z-index: 5;
        margin-top: 0;
        overflow-y: auto;

        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 20vh;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
    }

    .site-header__nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        width: 100%;
    }

    .nav-link {
        font-size: 1.25rem;
    }

    /* Footer Móvil */
    .site-footer__container {
        flex-direction: column;
    }

    .footer-col {
        flex: 0 0 100%;
        text-align: center;
    }

    /* Centrar iconos de redes sociales en el footer de móvil */
    .social-links {
        justify-content: center;
    }
}
