/* =========================================
           VARIABLES GLOBALES (Colores y Tipografía)
           ========================================= */
:root {
    --color-bg-light: #f5f4f0;
    /* Color arena claro */
    --color-bg-dark: #2c2e30;
    /* Marrón oscuro */
    --color-text-dark: #2c251f;
    --color-text-light: #f5f4f0;
    --color-accent: #8b7d6b;
    --color-bg-alt: #e4dfd5;

    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;

    --spacing-section: 8rem;
    --spacing-container: 5%;
}

/* =========================================
           RESET BÁSICO
           ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =========================================
           CLASES DE UTILIDAD PARA ANIMACIONES SCROLL (CSS PURO)
           ========================================= */
/* Animación base */
@keyframes fadeUpIn {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@supports (animation-timeline: view()) {
    .anim-fade-up {
        animation: fadeUpIn linear both;
        animation-timeline: view();
        animation-range: entry 5% cover 30%;
    }

    .anim-fade-in {
        animation: fadeIn linear both;
        animation-timeline: view();
        animation-range: entry 5% cover 40%;
    }

    /* Regular load animations for Hero */
    .hero-anim-load {
        animation: fadeUpIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
        opacity: 0;
    }

    .hero-delay-1 {
        animation-delay: 0.2s;
    }

    .hero-delay-2 {
        animation-delay: 0.4s;
    }

    .hero-delay-3 {
        animation-delay: 0.6s;
    }

    /* Retrasos para elementos en grupo (stagger) */
    .anim-delay-1 {
        animation-range: entry 15% cover 35%;
    }

    .anim-delay-2 {
        animation-range: entry 20% cover 40%;
    }

    .anim-delay-3 {
        animation-range: entry 25% cover 45%;
    }
}

/* =========================================
   MISTERFRONT LOGO & ANIMATIONS
   ========================================= */
.mf-container {
    display: flex;
    align-items: center;
    justify-content: center; /* Center horizontally for footer */
    flex-wrap: wrap;
    gap: 6px;
}

.mf-link {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Space between text and logo */
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.mf-logo-full {
    height: 1.25em; /* Scaled seamlessly relative to parent text */
    width: auto;
    display: inline-block;
    transform-origin: center;
    font-size: 1.25rem; /* Explicitly requested by user */
}

.mf-svg-white {
    fill: currentColor; /* Dynamically adapts to parent background contrast */
    transition: fill 0.3s ease;
}

.mf-svg-accent {
    fill: var(--color-accent);
    transition: fill 0.3s ease;
}

.mf-text {
    font-weight: 500;
    display: inline-flex;
}

.mf-char {
    display: inline-block;
}

@keyframes mfRevealGroup {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Clases para tipografía */
h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.1;
}

.text-italic {
    font-style: italic;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid currentColor;
    padding: 10px 0;
    margin-top: 2rem;
    transition: gap 0.3s ease;
}

.cta-link:hover {
    gap: 15px;
}

.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 3rem;
    display: block;
}

.section-padding {
    padding: var(--spacing-section) var(--spacing-container);
}

/* =========================================
           Temas (light/dark)
           ========================================= */
.theme-dark {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

.theme-light {
    background-color: var(--color-bg-alt);
    color: var(--color-text-dark);
}

/* =========================================
   RESPONSIVE OVERRIDES (MOBILE & TABLET)
   ========================================= */

@media (max-width: 900px) {
    /* Scaling the global section spacing moderately to adapt negative space */
    :root {
        --spacing-section: 5rem;
    }

    .section-padding {
        padding: var(--spacing-section) var(--spacing-container);
    }
}
