/* ============================
   RESET & BASE
   ============================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --black-soft: #0d0d0d;
    --black-rich: #050505;
    --white: #FFFFFF;
    --white-muted: #A0A0A0;
    --gold: #C5A059;

    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    --font-title: Arial, Helvetica, sans-serif;

    --ease-smooth: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--black);
    font-family: var(--font-body);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ============================
   ACCESIBILIDAD: FOCUS & SKIP LINK
   ============================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 300;
    background: var(--gold);
    color: var(--black);
    padding: 0.8rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    transition: top 0.3s var(--ease-out);
}

.skip-link:focus {
    top: 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================
   LOADER
   ============================ */
.loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--black);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s var(--ease-smooth), visibility 1s var(--ease-smooth);
}

.loader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader__content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader__brand {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 400;
    letter-spacing: 0.5rem;
    color: var(--white);
    text-transform: uppercase;
}

.loader__bar {
    width: 200px;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.loader__progress {
    width: 0%;
    height: 100%;
    background: var(--gold);
    transition: width 0.3s linear;
}

.loader__text {
    font-size: 0.65rem;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    color: var(--white-muted);
}

/* ============================
   FULLSCREEN MAIN
   ============================ */
.main-fullscreen {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* ============================
   BACKGROUND SLIDER
   ============================ */
.bg-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.bg-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s var(--ease-smooth);
    will-change: opacity;
}

.bg-slider__slide.active {
    opacity: 1;
}

.bg-slider__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    transition: transform 7s var(--ease-smooth);
}

.bg-slider__slide.active .bg-slider__image {
    transform: scale(1);
}

/* ============================
   OVERLAY
   ============================ */
.bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%),
        rgba(0,0,0,0.45);
}

/* ============================
   HERO CONTENT
   ============================ */
.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.hero-content__overline {
    font-size: 0.7rem;
    letter-spacing: 0.4rem;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUpSubtle 1.2s var(--ease-out) 1.4s forwards;
    text-shadow: 0 0 20px rgba(0,0,0,0.8), 0 0 40px rgba(0,0,0,0.5);
}

.hero-content__title {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 3rem;
}

.hero-content__line {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--white);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUpSubtle 1.4s var(--ease-out) forwards;
    text-shadow: 0 0 30px rgba(0,0,0,0.7), 0 0 60px rgba(0,0,0,0.4);
}

.hero-content__line:first-child {
    animation-delay: 1.8s;
}

.hero-content__line--offset {
    animation-delay: 2.2s;
    margin-left: clamp(1rem, 4vw, 3rem);
}

.hero-content__line--gold {
    color: var(--gold);
    font-style: italic;
    animation-delay: 2.6s;
    margin-left: clamp(2rem, 8vw, 6rem);
}

.hero-content__cta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    animation: fadeUpSubtle 1.2s var(--ease-out) 3.2s forwards;
}

/* ============================
   BUTTONS
   ============================ */
.btn {
    padding: 0.9rem 2.5rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: all 0.4s var(--ease-smooth);
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn--primary {
    background: transparent;
    border-color: var(--gold);
    color: var(--gold);
}

.btn--primary:hover {
    background: var(--gold);
    color: var(--black);
}

.btn--secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.btn--secondary:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

/* ============================
   SLIDE INDICATOR
   ============================ */
.slide-indicator {
    position: fixed;
    bottom: 2.5rem;
    left: 2.5rem;
    z-index: 50;
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.15rem;
    color: var(--white-muted);
    opacity: 0;
    animation: fadeUpSubtle 1.2s var(--ease-out) 3.2s forwards;
}

.slide-indicator__current {
    font-size: 1.2rem;
    color: var(--gold);
    font-weight: 500;
}

.slide-indicator__separator {
    color: rgba(255, 255, 255, 0.3);
}

/* ============================
   SIDE NAVIGATION
   ============================ */
.side-nav__brand {
    position: fixed;
    top: calc(2.5rem + env(safe-area-inset-top, 0px));
    left: calc(2.5rem + env(safe-area-inset-left, 0px));
    z-index: 56;
    display: flex;
    align-items: center;
    height: 40px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.12rem;
    color: var(--white);
    text-shadow: 0 0 20px rgba(0,0,0,0.8), 0 0 40px rgba(0,0,0,0.5);
    transition: color 0.4s;
    opacity: 0;
    animation: fadeUpSubtle 1.2s var(--ease-out) 3.2s forwards;
}

.side-nav__brand:hover {
    color: var(--gold);
}

/*
 * IMPORTANTE: .side-nav NO debe llevar `transform` ni una animación que lo
 * anime (ni siquiera con `forwards` tras terminar), porque cualquier valor de
 * `transform` distinto de `none` en un ancestro convierte a ese ancestro en
 * el "containing block" de sus descendientes `position: fixed`. Como
 * .side-nav envuelve a .side-nav__panel (fixed, pensado para posicionarse
 * respecto al viewport), eso rompía por completo el menú: el panel se abría
 * casi totalmente fuera de la pantalla. Por eso el fade-in de entrada se
 * aplica por separado a .side-nav__toggle y .side-nav__brand, no aquí.
 */
.side-nav {
    position: fixed;
    top: calc(2.5rem + env(safe-area-inset-top, 0px));
    right: calc(2.5rem + env(safe-area-inset-right, 0px));
    z-index: 50;
}

body.nav-open {
    overflow: hidden !important;
}

.side-nav__toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0;
    position: relative;
    z-index: 60;
    opacity: 0;
    animation: fadeUpSubtle 1.2s var(--ease-out) 3.2s forwards;
}

.side-nav__line {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--white);
    transition: all 0.4s var(--ease-smooth);
    transform-origin: center;
}

.side-nav--open .side-nav__line:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.side-nav--open .side-nav__line:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

.side-nav__panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 55;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 4rem;
    padding-top: calc(5rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.6s var(--ease-smooth);
}

.side-nav--open .side-nav__panel {
    transform: translateX(0);
}

.side-nav__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.side-nav__link {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--white-muted);
    transition: color 0.4s, padding-left 0.4s;
    display: block;
}

.side-nav__link:hover,
.side-nav__link.active {
    color: var(--gold);
    padding-left: 1rem;
}

.side-nav__footer {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-nav__phone {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.15rem;
    color: var(--white);
    transition: color 0.4s;
}

.side-nav__phone:hover {
    color: var(--gold);
}

.side-nav__social {
    display: flex;
    gap: 1.2rem;
}

.side-nav__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: var(--white-muted);
    transition: all 0.4s var(--ease-smooth);
}

.side-nav__social-link:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(197, 160, 89, 0.1);
}

/* ============================
   ANIMATIONS
   ============================ */
@keyframes fadeUpSubtle {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
    .hero-content__line {
        font-size: clamp(2.8rem, 10vw, 5rem);
    }
    
    .hero-content__line--offset {
        margin-left: clamp(0.8rem, 3vw, 2rem);
    }
    
    .hero-content__line--gold {
        margin-left: clamp(1.5rem, 6vw, 4rem);
    }
    
    .side-nav__panel {
        width: 380px;
        padding: 4rem 3rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 1.5rem;
    }
    
    .hero-content__overline {
        font-size: 0.6rem;
        letter-spacing: 0.3rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-content__title {
        margin-bottom: 2rem;
    }
    
    .hero-content__line {
        font-size: clamp(2.2rem, 14vw, 3.8rem);
    }
    
    .hero-content__line--offset {
        margin-left: clamp(0.5rem, 4vw, 1.5rem);
    }
    
    .hero-content__line--gold {
        margin-left: clamp(1rem, 8vw, 3rem);
    }
    
    .hero-content__cta {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .side-nav__brand {
        top: calc(1.4rem + env(safe-area-inset-top, 0px));
        left: calc(1.5rem + env(safe-area-inset-left, 0px));
        height: 38px;
        font-size: 0.95rem;
        letter-spacing: 0.08rem;
    }

    .side-nav {
        top: calc(1.4rem + env(safe-area-inset-top, 0px));
        right: calc(1.5rem + env(safe-area-inset-right, 0px));
    }

    .side-nav__toggle {
        width: 38px;
        height: 38px;
        gap: 5px;
    }

    .side-nav__panel {
        width: 100%;
        max-width: 100vw;
        padding: 6.5rem 2rem 2.5rem;
        padding-top: calc(6.5rem + env(safe-area-inset-top, 0px));
        padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
        justify-content: flex-start;
    }

    .side-nav__list {
        gap: 1.3rem;
    }

    .side-nav__link {
        font-size: 1.5rem;
    }

    .side-nav__footer {
        margin-top: 2.5rem;
        gap: 1.2rem;
    }

    .side-nav__phone {
        font-size: 0.9rem;
    }
    
    .slide-indicator {
        bottom: 1.5rem;
        left: 1.5rem;
        font-size: 0.7rem;
    }
    
    .slide-indicator__current {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .side-nav__brand {
        font-size: 0.8rem;
        letter-spacing: 0.05rem;
        left: calc(1.25rem + env(safe-area-inset-left, 0px));
    }

    .side-nav {
        right: calc(1.25rem + env(safe-area-inset-right, 0px));
    }

    .hero-content__line {
        font-size: clamp(1.8rem, 16vw, 3rem);
    }
    
    .hero-content__line--offset {
        margin-left: clamp(0.3rem, 3vw, 1rem);
    }
    
    .hero-content__line--gold {
        margin-left: clamp(0.6rem, 6vw, 2rem);
    }
    
    .hero-content__cta {
        max-width: 260px;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.65rem;
        letter-spacing: 0.15rem;
    }
    
    .side-nav__panel {
        padding: 5.5rem 1.5rem 2rem;
        padding-top: calc(5.5rem + env(safe-area-inset-top, 0px));
        padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    }

    .side-nav__link {
        font-size: 1.35rem;
    }

    .side-nav__social-link {
        width: 34px;
        height: 34px;
    }

    .side-nav__social-link svg {
        width: 16px;
        height: 16px;
    }
}

/* Pantallas bajas (móvil en horizontal, ventanas cortas) */
@media (max-height: 480px) and (max-width: 900px) {
    .side-nav__panel {
        justify-content: flex-start;
        padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    }

    .side-nav__list {
        gap: 0.8rem;
    }

    .side-nav__link {
        font-size: 1.2rem;
    }

    .side-nav__separator {
        margin: 1rem 0;
    }

    .side-nav__footer {
        margin-top: 1.5rem;
        gap: 0.8rem;
    }
}

/* ============================
   SEPARADOR Y BOTÓN PROVEEDORES EN MENÚ
   ============================ */
.side-nav__separator {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.side-nav__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.9rem 2rem;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    transition: all 0.4s var(--ease-smooth);
    text-decoration: none;
}

.side-nav__cta:hover {
    background: var(--gold);
    color: var(--black);
}

.side-nav__cta-text {
    font-weight: 500;
}