/* =========================================
   SANTUARIO DEL MONCAYO - MAIN STYLES (MONOLITHIC RESTORE)
   ========================================= */

/* 0.0 CINEMATIC LOADER */
.cinematic-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 1.8s cubic-bezier(0.19, 1, 0.22, 1), visibility 1.8s;
}

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

/* Background Image Layer */
.loader-bg {
    position: absolute;
    inset: 0;
    background-image: url('../assets/img/optimized/preloader-santuario.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: fadeInBg 2s ease forwards;
    z-index: 1;
}

/* Gradient Overlay to ensure text visibility */
.loader-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.85) 100%);
}

@keyframes fadeInBg {
    0% {
        opacity: 0;
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Content area (centered above the mountain) */
.loader-content {
    text-align: center;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    /* Use margin instead of gap for fine control */
    margin-bottom: 20vh;
    /* Push content up from center so mountain peeks below */
}

/* The prelude text */
.loader-prelude {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5em;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1.5s 0.2s both;
}

/* The altitude display */
.loader-altitude-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.loader-ring-outer {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(211, 84, 0, 0.08);
    border-radius: 50%;
    animation: spinRing 12s linear infinite;
}

.loader-ring-inner {
    position: absolute;
    width: 170px;
    height: 170px;
    border: 1px solid rgba(211, 84, 0, 0.06);
    border-top: 1.5px solid rgba(211, 84, 0, 0.5);
    border-radius: 50%;
    animation: spinRing 6s cubic-bezier(0.4, 0, 0.6, 1) infinite reverse;
}

.loader-altitude {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 10vw, 6.5rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(175deg, #ffffff 30%, #d35400 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s 0.5s both;
}

.loader-unit {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.68);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.45);
    margin-left: 6px;
    align-self: flex-end;
    padding-bottom: 0.5rem;
}

/* "metros de altitud" label */
.loader-sublabel {
    font-family: var(--font-body);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.75rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s 0.8s both;
}

/* The blinking status text */
.loader-text {
    font-family: var(--font-body);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(211, 84, 0, 0.8);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 1s 0.6s both;
}

.loader-text::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
    flex-shrink: 0;
}

/* Enter CTA button */
.loader-btn {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.3s ease, background 0.3s ease;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    padding: 16px 50px;
    border-radius: 50px;
    background: transparent;
    border: 1px solid rgba(211, 84, 0, 0.6);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.loader-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 50px;
}

.loader-btn:hover::before {
    opacity: 1;
}

.loader-btn:hover {
    box-shadow: 0 0 40px rgba(211, 84, 0, 0.4), 0 0 80px rgba(211, 84, 0, 0.15);
    border-color: var(--primary);
}

.loader-btn span {
    position: relative;
    z-index: 1;
}

.loader-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.loader-btn.hidden {
    display: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Removed scroll-snap-type for performance / lenis compatibility */
html {
    scroll-behavior: smooth;
}

/* 0. VIDEO INTRO (HERO BACKGROUND) */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    transition: opacity 1.5s ease;
    /* Ensures crisp GPU-composited layer */
    transform: translateZ(0);
    filter: saturate(var(--img-saturation))
            brightness(var(--img-brightness))
            hue-rotate(var(--img-hue-rotate));
}

.hero-video.ended {
    pointer-events: none;
}

.hero-video.scroll-scrubbed {
    transition: filter 1.2s ease, opacity 0.8s ease;
}

.intro-hidden {
    opacity: 0;
    transition: opacity 1s ease 0.3s;
}

.intro-hidden.revealed {
    opacity: 1;
}

.intro-skip-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    z-index: 1001;
}

body.hero-scroll-mode .intro-skip-btn {
    right: 112px;
}

.intro-skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.intro-skip-btn.hidden {
    display: none;
}

.intro-unmute-btn {
    position: absolute;
    bottom: 40px;
    left: 40px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    z-index: 120;
}

.intro-unmute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.intro-unmute-btn.hidden {
    display: none;
}

body.hero-scroll-mode .intro-unmute-btn,
body.hero-static-mode .intro-unmute-btn {
    display: none;
}

/* 1. VARIABLES & RESET */
:root {
    --primary: #b85b2a;
    --primary-hover: #c96b35;
    --stone: #b8a48e;
    --wood: #4f3427;
    --dark: #050505;
    --light: #f4f4f4;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);

    /* Weather Theme Reactive Variables (defaults = clear/warm) */
    --theme-bg-top: #1a0f0a;
    --theme-bg-bottom: #000;
    --theme-glow-color: rgba(211, 84, 0, 0.15);
    --theme-overlay-vignette: rgba(0, 0, 0, 0.4);

    /* === GLOBAL ATMOSPHERE VARIABLES (Phase: respira) === */
    /* Card shadows — reactive to theme light direction & color */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.18);
    --shadow-card: 0 14px 40px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 22px 60px rgba(0, 0, 0, 0.45);

    /* Image filters — reactive saturation/brightness/hue per theme */
    --img-saturation: 1;
    --img-brightness: 1;
    --img-hue-rotate: 0deg;

    /* Borders & radius — softer in snow/dawn, sharper at night */
    --border-soft: rgba(255, 255, 255, 0.06);
    --border-warm: rgba(211, 84, 0, 0.18);
    --radius-card: 8px;

    /* Heading weight — heavier on dark themes for legibility */
    --heading-weight: 400;

    /* Time-of-day overlay tint — set by body.time-* classes */
    --time-tint: transparent;

    /* Updated from JS when the opening bar is visible */
    --opening-bar-offset: 46px;
}

/* ============================================
   WEATHER THEME SYSTEM (Phase 2)
   ============================================ */

/* Theme: Clear Day (day, codes 0-2) — warm amber/golden */
body.theme-clear {
    --theme-bg-top: #1c0f06;
    --theme-bg-bottom: #000;
    --theme-glow-color: rgba(241, 196, 15, 0.12);
    --shadow-card: 0 16px 44px -8px rgba(120, 60, 0, 0.35);
    --shadow-card-hover: 0 26px 70px -10px rgba(180, 90, 0, 0.5);
    --img-saturation: 1.05;
    --border-soft: rgba(255, 215, 130, 0.08);
    --border-warm: rgba(211, 84, 0, 0.22);
    --radius-card: 8px;
    --heading-weight: 400;
}

/* Theme: Cloudy Day (day, codes 3-48) — cool steel-grey */
body.theme-cloudy {
    --theme-bg-top: #0d1014;
    --theme-bg-bottom: #050508;
    --theme-glow-color: rgba(120, 140, 160, 0.08);
    --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.32);
    --shadow-card-hover: 0 18px 50px rgba(0, 0, 0, 0.45);
    --img-saturation: 0.9;
    --border-soft: rgba(180, 200, 220, 0.06);
    --radius-card: 10px;
    --heading-weight: 400;
}

/* Theme: Rain (codes 51-67) — dark green-slate drama */
body.theme-rain {
    --theme-bg-top: #060d0a;
    --theme-bg-bottom: #03080a;
    --theme-glow-color: rgba(52, 152, 219, 0.1);
    --shadow-card: 0 10px 28px rgba(0, 20, 30, 0.45);
    --shadow-card-hover: 0 16px 44px rgba(0, 30, 50, 0.55);
    --img-saturation: 0.85;
    --img-brightness: 0.95;
    --border-soft: rgba(150, 190, 220, 0.07);
    --radius-card: 10px;
    --heading-weight: 500;
}

/* Theme: Snow (codes 71-77, 85-86) — cold blue-white */
body.theme-snow {
    --theme-bg-top: #060a12;
    --theme-bg-bottom: #03050d;
    --theme-glow-color: rgba(180, 210, 255, 0.1);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-card-hover: 0 14px 36px rgba(0, 0, 0, 0.32);
    --img-saturation: 0.7;
    --img-brightness: 1.05;
    --border-soft: rgba(200, 220, 255, 0.1);
    --radius-card: 16px;
    --heading-weight: 400;
}

/* Theme: Night (is_day = 0) — deep midnight blue */
body.theme-night {
    --theme-bg-top: #020510;
    --theme-bg-bottom: #000003;
    --theme-glow-color: rgba(100, 120, 200, 0.1);
    --shadow-card: 0 18px 50px rgba(20, 30, 80, 0.5);
    --shadow-card-hover: 0 26px 70px rgba(40, 60, 120, 0.55);
    --img-saturation: 0.9;
    --img-brightness: 0.95;
    --border-soft: rgba(120, 140, 220, 0.08);
    --radius-card: 6px;
    --heading-weight: 600;
}

/* Theme: Dawn (~45min before/after sunrise) — soft rose-gold */
body.theme-dawn {
    --theme-bg-top: #1a0a12;
    --theme-bg-bottom: #0a0205;
    --theme-glow-color: rgba(255, 100, 120, 0.18);
    --shadow-card: 0 14px 38px -6px rgba(180, 70, 90, 0.32);
    --shadow-card-hover: 0 22px 58px -8px rgba(220, 90, 110, 0.42);
    --img-saturation: 0.95;
    --img-hue-rotate: -3deg;
    --border-soft: rgba(255, 180, 200, 0.1);
    --radius-card: 14px;
    --heading-weight: 400;
}

/* Theme: Sunset (~45min before/after sunset) — deep orange-magenta */
body.theme-sunset {
    --theme-bg-top: #1a0800;
    --theme-bg-bottom: #0a0200;
    --theme-glow-color: rgba(255, 80, 20, 0.22);
    --shadow-card: 0 20px 60px -10px rgba(180, 60, 0, 0.45);
    --shadow-card-hover: 0 32px 80px -10px rgba(220, 80, 10, 0.55);
    --img-saturation: 1.15;
    --img-hue-rotate: 4deg;
    --border-soft: rgba(255, 150, 90, 0.12);
    --border-warm: rgba(255, 100, 30, 0.3);
    --radius-card: 8px;
    --heading-weight: 600;
}

/* Apply theme variables to the body background */
body.theme-night,
body.theme-dawn,
body.theme-sunset,
body.theme-snow,
body.theme-rain,
body.theme-clear,
body.theme-cloudy {
    background: radial-gradient(ellipse at top, var(--theme-bg-top) 0%, var(--theme-bg-bottom) 60%, #000 100%);
    background-size: 120% 120%;
    animation: breathe 15s ease-in-out infinite alternate;
    transition: background 3s ease;
}

/* Apply glow color from theme variable */
.hero-glow {
    background: radial-gradient(circle, var(--theme-glow-color) 0%, transparent 70%);
}

/* ============================================
   TIME-OF-DAY OVERLAY (Phase: respira)
   Adds a subtle tint that mixes with the weather theme
   based on the current hour. Even on a clear day, 8am
   feels different from 14h or 21h.
   ============================================ */
body.time-predawn {
    --time-tint: rgba(60, 80, 140, 0.10);
}

body.time-morning {
    --time-tint: rgba(255, 200, 160, 0.06);
    --img-saturation: 1;
}

body.time-midday {
    --time-tint: transparent;
}

body.time-golden {
    --time-tint: rgba(255, 150, 60, 0.10);
    --img-saturation: 1.12;
}

body.time-dusk {
    --time-tint: rgba(255, 80, 30, 0.14);
    --img-saturation: 1.1;
}

body.time-night-deep {
    --time-tint: rgba(20, 30, 80, 0.18);
    --img-brightness: 0.92;
}

/* When the restaurant is closed today, intensify the night tint
   subliminally so the page feels "asleep" even at midday. */
body.is-closed-today {
    --time-tint: rgba(15, 20, 60, 0.22);
    --img-saturation: 0.85;
    --img-brightness: 0.94;
}

/* Global tint layer — sits above background, below content.
   Excluded from hero (z-index 5+) so video/WebGL stay pristine. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--time-tint);
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 2;
    transition: background 2s ease;
}

/* ============================================
   WEATHER CANVAS (Phase 2 — Particles)
   ============================================ */
#weather-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
    /* Above hero bg, below hero content */
    opacity: 0;
    transition: opacity 2s ease;
}

#weather-canvas.active {
    opacity: 1;
}

/* ============================================
   WEATHER NARRATIVE (Phase 2)
   ============================================ */
.weather-narrative {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.05em;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 1.5rem;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
    min-height: 1.2em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1.5s ease 0.5s, transform 1.5s ease 0.5s, color 2s ease;
}

.weather-narrative.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tint narrative text per theme */
body.theme-snow .weather-narrative {
    color: rgba(210, 228, 255, 0.75);
}

body.theme-rain .weather-narrative {
    color: rgba(180, 215, 238, 0.74);
}

body.theme-night .weather-narrative {
    color: rgba(190, 202, 235, 0.7);
}

body.theme-dawn .weather-narrative {
    color: rgba(255, 205, 190, 0.74);
}

body.theme-sunset .weather-narrative {
    color: rgba(255, 184, 135, 0.76);
}

body.theme-clear .weather-narrative {
    color: rgba(255, 228, 170, 0.76);
}

/* ============================================
   WEBGL PARTICLE CANVAS (Phase 4)
   ============================================ */
#webgl-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    /* above hero video, below overlay/content */
    opacity: 0;
    animation: webglFadeIn 4s ease 1.5s forwards;
    mix-blend-mode: screen;
    /* additive blending — glows over dark bg */
}

@keyframes webglFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Reduced on mobile for performance */
@media(max-width: 768px) {
    #webgl-canvas {
        display: none;
    }
}

/* ============================================
   SOUND TOGGLE BUTTON (Phase 4)
   ============================================ */
.sound-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(5, 5, 5, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 9px 16px 9px 12px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.sound-toggle:hover {
    background: rgba(211, 84, 0, 0.12);
    border-color: rgba(211, 84, 0, 0.3);
    color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.sound-toggle.active {
    background: rgba(211, 84, 0, 0.15);
    border-color: rgba(211, 84, 0, 0.4);
    color: rgba(255, 255, 255, 0.85);
}

.sound-toggle.active .sound-label {
    color: var(--primary);
}

.sound-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.sound-icon svg {
    width: 100%;
    height: 100%;
}

.sound-icon.hidden {
    display: none;
}

.sound-label {
    transition: color 0.3s ease;
}

/* Subtle pulse when sound is active */
.sound-toggle.active::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    animation: livePulse 1.5s infinite;
    margin-right: 4px;
}

@media(max-width: 768px) {
    .sound-toggle {
        bottom: 20px;
        left: 16px;
        padding: 8px 12px 8px 10px;
        font-size: 0.62rem;
    }
}



/* ============================================
   3D TILT — shine overlay (Phase 5)
   ============================================ */
.tilt-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 10;
    transition: background 0.15s ease;
}

.feature-card,
.masonry-item,
.menu-category-card {
    overflow: hidden;
    position: relative;
}

.dragging {
    cursor: grabbing !important;
    -webkit-user-select: none;
    user-select: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    background: linear-gradient(180deg, #11100e 0%, #070605 58%, #020202 100%);
    background-size: 100% 100%;
    color: var(--light);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

@keyframes breathe {
    0% {
        background-size: 110% 110%;
    }

    100% {
        background-size: 130% 130%;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

/* 2. TYPOGRAPHY & UTILS */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    /* Reactive: heavier on dark themes for legibility */
    line-height: 1.1;
    letter-spacing: -0.02em;
    transition: font-weight 1.2s ease;
}

.text-primary {
    color: var(--primary) !important;
}

.italic {
    font-style: italic;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 4rem;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.section {
    padding: 120px 0;
    position: relative;
    z-index: 2;
    scroll-margin-top: 90px;
}

.scrolly-section {
    scroll-margin-top: 90px;
}

@media(max-width: 768px) {
    .section {
        padding: 70px 0;
    }
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.section-desc {
    font-size: 1.1rem;
    color: #888;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* 3. HERO SECTION (Cinema) */
.hero-section {
    position: relative;
    z-index: 5;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    /* Uses dynamic viewport height on mobile (excludes browser bar) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    background: transparent;
}

.hero-section.hero-scroll-enabled {
    min-height: 100vh;
    min-height: 100dvh;
}

.hero-section.hero-scroll-static .hero-bg {
    position: relative;
    overflow: hidden;
    background: #050505;
}

.hero-section.hero-scroll-static .hero-bg::before,
.hero-section.hero-scroll-static .hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../assets/img/optimized/hero-still-santuario-risco.jpg');
    background-repeat: no-repeat;
    transition: filter 1.5s ease, opacity 1.5s ease;
}

.hero-section.hero-scroll-static .hero-bg::before {
    background-size: cover;
    background-position: center 48%;
    filter: blur(18px)
            saturate(calc(var(--img-saturation) * 1.04))
            brightness(calc(var(--img-brightness) * 0.82))
            hue-rotate(var(--img-hue-rotate));
    transform: scale(1.08);
    opacity: 0.72;
}

.hero-section.hero-scroll-static .hero-bg::after {
    left: 50%;
    right: auto;
    width: min(68vw, 1040px);
    background-size: cover;
    background-position: 58% center;
    transform: translateX(-50%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
    filter: saturate(var(--img-saturation))
            brightness(var(--img-brightness))
            hue-rotate(var(--img-hue-rotate));
    opacity: 0.94;
}

.hero-section.hero-scroll-static .hero-video {
    display: none;
}

.hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg {
    width: 100%;
    height: 100%;
    /* Background removed — video last frame serves as bg */
    background: #050505;
    filter: saturate(var(--img-saturation))
            brightness(var(--img-brightness))
            hue-rotate(var(--img-hue-rotate));
    transition: filter 1.5s ease;
}

/* FIREFLIES */
.firefly {
    display: none;
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFD700, 0 0 20px #FF8C00;
    opacity: 0;
    animation: floatUp 5s infinite;
    z-index: 5;
    pointer-events: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-10vh) scale(1.5);
        opacity: 0;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Vignette + Strong Bottom Fade to blend seamlessly with the dark starry background */
    background:
        linear-gradient(to bottom, transparent 70%, var(--dark) 100%),
        radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 4;
}

.hero-section.hero-scroll-enabled .hero-overlay {
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.28) 48%, var(--dark) 100%),
        radial-gradient(circle at 42% 36%, transparent 0%, rgba(0, 0, 0, 0.25) 46%, rgba(0, 0, 0, 0.72) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0%, transparent 46%, rgba(0, 0, 0, 0.24) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    padding-top: 60px;
    width: 100%;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.hero-section.hero-scroll-enabled .hero-content {
    will-change: opacity, transform;
}

.hero-section.hero-scroll-enabled .hero-content.revealed {
    transition: opacity 0.18s linear, transform 0.18s linear;
}

/* Ambient Glow Orb */
.hero-glow {
    display: none;
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(211, 84, 0, 0.15) 0%, transparent 70%);
    z-index: 3;
    pointer-events: none;
    animation: pulseGlow 6s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Altitude Badge */
.altitude-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
}

.altitude-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border: 1px solid rgba(184, 164, 142, 0.3);
    border-top: 1px solid var(--primary);
    border-radius: 50%;
    animation: none;
}

@keyframes spinRing {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.altitude-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.altitude-unit {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

/* Hero Title - Cinematic */
.hero-title {
    font-size: 5vw;
    margin-bottom: 30px;
    line-height: 1;
}

.hero-title-line {
    display: inline-block;
    color: white;
}

.hero-title-accent {
    display: inline-block;
    font-style: italic;
    color: var(--primary);
    background: none;
    background-size: auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: currentColor;
    animation: none;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@media(max-width:768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
        margin-bottom: 24px;
    }

    .hero-content {
        padding-top: 90px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .altitude-number {
        font-size: 2.8rem;
    }

    .altitude-ring {
        width: 90px;
        height: 90px;
        /* Cheaper spin on mobile */
        animation-duration: 12s;
    }

    .altitude-badge {
        margin-bottom: 20px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .intro-skip-btn {
        bottom: 20px;
        right: 16px;
        padding: 10px 18px;
        font-size: 0.75rem;
    }

    .intro-unmute-btn {
        bottom: 20px;
        left: 16px;
        padding: 10px 16px;
        font-size: 0.75rem;
    }
}

.hero-subtitle {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 40px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
}

/* CTA Glow */
.btn-glow {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    animation: none;
}

@keyframes btnPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(211, 84, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(211, 84, 0, 0.7), 0 0 80px rgba(211, 84, 0, 0.3);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-lg {
    padding: 18px 50px;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.75rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.07);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
}

/* Hero Buttons */
.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Weather Widget - Upgraded */
.weather-widget {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.06);
    padding: 12px 30px;
    border-radius: 50px;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100% - 2rem);
}

.weather-widget:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(184, 164, 142, 0.25);
}

.weather-live-dot {
    width: 6px;
    height: 6px;
    background: #e74c3c;
    border-radius: 50%;
    animation: none;
    opacity: 0.8;
}

@keyframes livePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }

    50% {
        box-shadow: 0 0 0 6px transparent;
    }
}

.weather-icon {
    font-size: 0.68rem;
    color: var(--stone);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.weather-temp {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-heading);
}

.weather-desc {
    font-size: 0.7rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.weather-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 15px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
    animation: fadeInUp 1.5s 2s both;
}

.scroll-indicator span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.4);
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
    animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: rotate(45deg) translateY(0);
    }

    40% {
        transform: rotate(45deg) translateY(8px);
    }

    60% {
        transform: rotate(45deg) translateY(4px);
    }
}

/* 4. AVAILABILITY BAR - GLASSMORPHISM */
.availability-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: rgba(10, 10, 10, 0.7);
    /* Dark Glass */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    font-weight: 300;
    transition: all 0.3s ease;
}

.availability-bar:hover {
    background: rgba(10, 10, 10, 0.9);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #FFEB3B;
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 235, 59, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px transparent;
    }

    100% {
        box-shadow: none;
    }
}

/* 5. NAVBAR */
.navbar {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: background 0.3s,
                top 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--primary);
}

@media(max-width:768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.95);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
        z-index: 999;
        display: flex;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 12px 24px;
        display: block;
        width: 100%;
        text-align: center;
    }

    .nav-cta {
        display: none;
    }
}

/* Hamburger Button */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
    padding: 15px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media(max-width:768px) {
    .hamburger {
        display: flex;
    }
}

/* Navbar Sticky on Scroll */
.navbar.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.9);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    padding: 10px 0;
}

/* 7.1 WEBGL CINEMA & DYNAMIC LIGHTS (Phase: 3D Scrolly) */
#history-webgl-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0; /* Hidden by default; JS fades it in once Three.js shaders load successfully */
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1);
}

#history-webgl-canvas.webgl-active {
    opacity: 1;
}

/* Candil medieval warm lantern dynamic masking */
.history-spotlight-mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    /* Ultra-Premium Stage spotlight lens: clean transparent center, subtle golden halo, smooth transition to pitch dark outer masking */
    background: radial-gradient(
        circle 280px at var(--spotlight-x, 50%) var(--spotlight-y, 50%), 
        transparent 0%, 
        rgba(230, 205, 172, 0.06) 35%, 
        rgba(5, 5, 5, 0.72) 75%, 
        rgba(5, 5, 5, 0.97) 94%, 
        #050505 100%
    );
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: background;
}

.history-spotlight-mask.mask-active {
    opacity: 1;
}

.proof-item .stars {
    color: var(--stone);
    letter-spacing: 2px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.proof-item p {
    font-style: italic;
    color: rgba(232, 224, 214, 0.86);
    font-size: 1.1rem;
    /* Slightly larger for readability */
    font-weight: 300;
    margin: 0;
    font-family: var(--font-heading);
}

/* Calligraphic ink drawing SVG ornaments inside card corners */
.ink-ornament {
    position: absolute;
    width: 48px;
    height: 48px;
    color: rgba(230, 205, 172, 0.16);
    pointer-events: none;
    z-index: 3;
    transition: color 0.4s ease;
}

.ink-ornament.top-left {
    top: 14px;
    left: 14px;
}
}

.ink-ornament.bottom-right {
    bottom: 14px;
    right: 14px;
}

.ink-path {
    stroke-dasharray: 260;
    stroke-dashoffset: 260;
    transition: stroke-dashoffset 2.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Fallback: Auto-draw strokes when card is scrolled into view (IntersectionObserver or active class) */
.scrolly-step.active .ink-path,
.scrolly-step.visible .ink-path,
.step-card:hover .ink-path {
    stroke-dashoffset: 0;
    color: rgba(230, 205, 172, 0.42);
}

.sticky-bg-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    z-index: 0;
    
    /* 3D Perspective and Tilt setup */
    perspective: 1200px;
    transform-style: preserve-3d;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.sticky-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform-origin: center;
    overflow: hidden;
    isolation: isolate;

    /* ELITE EFFECT: Softened Cinematic Grayscale & Clip-Path Wipe */
    filter: grayscale(50%) contrast(1.05) brightness(0.85);
    /* Much softer desaturation */
    clip-path: inset(3% 3% 3% 3%);
    /* Very subtle crop to avoid dizziness */

    /* Dual transitions: Slow Ken Burns (30s) + Snappy Reveal (1.5s) */
    transition:
        clip-path 2s cubic-bezier(0.19, 1, 0.22, 1),
        /* Slower expansion */
        filter 2.5s ease-in-out,
        /* Slower color bleed */
        transform 30s linear;

    will-change: transform, opacity, filter;
    /* Removed clip-path from will-change to save GPU */
}

/* Base Active State */
.sticky-bg.active {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    /* Expand to full screen */
    filter: grayscale(0%) contrast(1) brightness(1);
    /* Reveal full color */
}

/* ELITE: Alternating Directional "Ken Burns" Effect (Softened) */
.sticky-bg[data-step="1"] {
    transform: scale(1.03);
    /* Start slightly zoomed */
    background-image: url('../assets/img/historia-viva/01-cima-santuario.jpg');
    background-position: center 46%;
}

.sticky-bg[data-step="1"].active {
    transform: scale(1);
}

/* Slowly zoom out */

.sticky-bg[data-step="2"] {
    transform: scale(1.05) translateX(-1%);
    background-image: url('../assets/img/historia-viva/04-protectora-dibujo.jpg');
    background-position: center 48%;
}

.sticky-bg[data-step="2"].active {
    transform: scale(1.05) translateX(1%);
}

/* Slowly pan right */

.sticky-bg[data-step="3"] {
    transform: scale(1) translateY(1.5%);
    background-image: url('../assets/img/historia-viva/03-culto-archivo.jpg');
    background-position: center 52%;
}

.sticky-bg[data-step="3"].active {
    transform: scale(1.03) translateY(-1.5%);
}

/* Slowly zoom and pan up */

.sticky-bg[data-step="4"] {
    transform: scale(1.04) translateX(1%);
    background-image: url('../assets/img/historia-viva/02-devocion-virgen.jpg');
    background-position: center 54%;
}

.sticky-bg[data-step="4"]::after {
    content: "";
    position: absolute;
    top: 50%;
    right: clamp(2rem, 8vw, 9rem);
    width: clamp(180px, 18vw, 330px);
    aspect-ratio: 614 / 856;
    background: url('../assets/img/historia-viva/04-protectora-retablo.jpg') center / contain no-repeat;
    opacity: 0.42;
    transform: translateY(-50%) rotate(-1.2deg);
    filter: sepia(0.25) drop-shadow(0 22px 50px rgba(0, 0, 0, 0.62));
    pointer-events: none;
    transition: opacity 1.2s ease, transform 1.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.sticky-bg[data-step="4"].active {
    transform: scale(1) translateX(-1%);
}

#historia[data-active-step="4"] .sticky-bg[data-step="4"]::after {
    opacity: 0.58;
    transform: translateY(-50%) rotate(-1.2deg) scale(1.04);
}

/* Slowly zoom out and pan left */

.sticky-bg[data-step="5"] {
    transform: scale(1.01);
    background-image: url('../assets/img/historia-viva/05-tradicion-comedor.jpg');
    background-position: center 58%;
}

.sticky-bg[data-step="5"].active {
    transform: scale(1.06);
    /* Reduced zoom in, from 1.1 */
}

/* Deep slow zoom in */

.sticky-bg[data-step="6"] {
    transform: scale(1.05) translateY(-1%);
    /* Reduced translation from 2% */
    /* Start high */
    background-image: url('../assets/img/historia-viva/06-destino-vistas.jpg');
    background-position: center 48%;
}

.sticky-bg[data-step="6"].active {
    transform: scale(1) translateY(0);
}

/* Settle down to reality */

/* Removed redundant original background declarations from here since they are included in the Ken Burns block above */

.split-map iframe,
.map-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.sticky-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Cinematic gradient: transparent top, pitch black bottom - Perfect for centered text */
    background:
        radial-gradient(ellipse at 50% 53%, rgba(0, 0, 0, 0.46) 0%, rgba(0, 0, 0, 0.18) 42%, rgba(0, 0, 0, 0.48) 82%, rgba(0, 0, 0, 0.7) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.08) 30%, rgba(0, 0, 0, 0.56) 60%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 1;
    pointer-events: none;
}

.sticky-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle noise texture for 35mm film look */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    opacity: 0.6;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 2;
}

/* Historia viva: museum-grade atmospheric layer */
.history-museum-stage {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
}

.history-museum-stage::before,
.history-museum-stage::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.history-museum-stage::before {
    top: 12vh;
    bottom: 12vh;
    left: clamp(1rem, 5vw, 5.5rem);
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(230, 205, 172, 0.48), transparent);
    opacity: 0.22;
}

.history-museum-stage::after {
    right: clamp(1rem, 4vw, 5rem);
    bottom: clamp(2rem, 9vh, 6rem);
    width: clamp(120px, 18vw, 260px);
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(211, 84, 0, 0.62), transparent);
    opacity: 0.34;
}

.museum-light-beam {
    position: absolute;
    inset: -15%;
    background:
        radial-gradient(circle at var(--museum-light-x, 50%) var(--museum-light-y, 42%), rgba(255, 210, 150, 0.2), transparent 28%),
        linear-gradient(112deg, transparent 8%, rgba(255, 220, 170, 0.05) 36%, transparent 62%);
    mix-blend-mode: screen;
    opacity: 0.42;
    transform: translate3d(0, 0, 0);
    transition: opacity 1.4s ease, background 1.4s ease;
}

#historia[data-active-step="1"] {
    --museum-light-x: 20%;
    --museum-light-y: 36%;
}

#historia[data-active-step="2"] {
    --museum-light-x: 73%;
    --museum-light-y: 25%;
}

#historia[data-active-step="3"] {
    --museum-light-x: 82%;
    --museum-light-y: 66%;
}

#historia[data-active-step="4"] {
    --museum-light-x: 70%;
    --museum-light-y: 44%;
}

#historia[data-active-step="5"] {
    --museum-light-x: 22%;
    --museum-light-y: 68%;
}

#historia[data-active-step="6"] {
    --museum-light-x: 80%;
    --museum-light-y: 72%;
}

.museum-artifact {
    position: absolute;
    width: clamp(150px, 18vw, 285px);
    min-height: 112px;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(230, 205, 172, 0.18);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018)),
        rgba(12, 10, 8, 0.18);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.96);
    filter: blur(8px);
    transition:
        opacity 0.95s ease,
        transform 1.35s cubic-bezier(0.19, 1, 0.22, 1),
        filter 0.95s ease,
        border-color 0.95s ease;
}

.museum-artifact::before,
.museum-artifact::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.museum-artifact::before {
    inset: 10px;
    border: 1px solid rgba(211, 84, 0, 0.22);
    opacity: 0.68;
}

.museum-artifact::after {
    left: 1.2rem;
    right: 1.2rem;
    bottom: 0.9rem;
    height: 1px;
    background: linear-gradient(to right, rgba(211, 84, 0, 0.8), transparent);
}

.artifact-number,
.artifact-label {
    display: block;
    position: relative;
    z-index: 1;
}

.artifact-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 0.95;
    color: #e6cdac;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}

.artifact-label {
    margin-top: 0.65rem;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.66);
}

.museum-artifact--altitude {
    top: 17vh;
    left: clamp(2rem, 7vw, 8rem);
    border-radius: 50%;
    aspect-ratio: 1;
    min-height: 0;
    display: grid;
    align-content: center;
    text-align: center;
    transform: translate3d(-24px, 18px, 0) scale(0.9);
}

.museum-artifact--altitude::before {
    border-radius: 50%;
}

.museum-artifact--altitude::after {
    left: 50%;
    right: auto;
    bottom: 16%;
    width: 42%;
    transform: translateX(-50%);
}

.museum-artifact--origin {
    top: 16vh;
    right: clamp(2rem, 7vw, 8rem);
    transform: translate3d(34px, 16px, 0) rotate(1.6deg) scale(0.96);
}

.museum-artifact--archive {
    right: clamp(4rem, 8vw, 8rem);
    bottom: 16vh;
    background:
        repeating-linear-gradient(to bottom, rgba(230, 205, 172, 0.12) 0 1px, transparent 1px 13px),
        linear-gradient(135deg, rgba(80, 60, 42, 0.86), rgba(20, 14, 10, 0.78));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-color: rgba(230, 205, 172, 0.28);
    transform: translate3d(30px, 28px, 0) rotate(-2deg) scale(0.96);
}

.museum-artifact--archive .artifact-number {
    color: #f3dfbf;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.72);
}

.museum-artifact--archive .artifact-label {
    color: rgba(255, 255, 255, 0.82);
}

.museum-artifact--archive::before {
    background:
        radial-gradient(circle at 78% 78%, rgba(130, 18, 12, 0.36), transparent 18%),
        linear-gradient(to right, transparent 0 62%, rgba(211, 84, 0, 0.18) 62% 63%, transparent 63%);
}

.museum-artifact--protectora {
    left: clamp(1.5rem, 6vw, 7rem);
    bottom: 14vh;
    transform: translate3d(-28px, 22px, 0) rotate(-1deg) scale(0.96);
}

.museum-artifact--protectora::before {
    background: radial-gradient(circle at 50% 44%, rgba(255, 210, 130, 0.18), transparent 36%);
}

.museum-artifact--tradicion {
    left: clamp(2rem, 7vw, 8rem);
    bottom: 13vh;
    border-color: rgba(211, 84, 0, 0.28);
    background:
        radial-gradient(circle at 18% 76%, rgba(211, 84, 0, 0.2), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018));
    transform: translate3d(-30px, 22px, 0) scale(0.96);
}

.museum-artifact--destino {
    right: clamp(2rem, 7vw, 8rem);
    bottom: 13vh;
    text-align: right;
    transform: translate3d(34px, 22px, 0) scale(0.96);
}

.museum-artifact--destino::before {
    border-radius: 999px;
    inset: 16px;
}

#historia[data-active-step="1"] .museum-artifact--altitude,
#historia[data-active-step="2"] .museum-artifact--origin,
#historia[data-active-step="3"] .museum-artifact--archive,
#historia[data-active-step="4"] .museum-artifact--protectora,
#historia[data-active-step="5"] .museum-artifact--tradicion,
#historia[data-active-step="6"] .museum-artifact--destino {
    opacity: 0.88;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    filter: blur(0);
}

#historia[data-active-step="3"] .museum-artifact--archive {
    opacity: 0.94;
    filter: none;
    transform: translate3d(0, 0, 0) rotate(-1deg) scale(1);
}

#historia[data-active-step="2"] .museum-artifact--origin,
#historia[data-active-step="4"] .museum-artifact--protectora {
    border-color: rgba(230, 205, 172, 0.28);
}

@media(max-width: 900px) {
    .sticky-overlay {
        background:
            radial-gradient(ellipse at 50% 58%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 42%, rgba(0, 0, 0, 0.56) 84%, rgba(0, 0, 0, 0.76) 100%),
            linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.08) 40%, rgba(0, 0, 0, 0.62) 66%, rgba(0, 0, 0, 0.95) 100%);
    }

    .history-museum-stage {
        display: none;
    }
}

.scrolly-content {
    position: relative;
    z-index: 10;
    margin-top: -100vh;
    /* Keeps text overlaying the pinned backgrounds */
    padding-bottom: 0;
}

/* INITIALLY hidden intro background overlay */
.scrolly-intro {
    background: linear-gradient(to bottom, #0d0d0d 20%, transparent 100%);
}

/* ELITE: Atmospheric Particles System */
#particles-container {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 3;
    /* Above background and gradient, below text */
    pointer-events: none;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.6) 0%, rgba(212, 175, 55, 0) 70%);
    border-radius: 50%;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(110vh) translateX(0) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-10vh) translateX(40px) scale(1.5);
        opacity: 0;
    }
}

.scrolly-step {
    min-height: 110vh;
    display: flex;
    align-items: center;
    /* Center vertically in the viewport */
    justify-content: center;
    /* Lock to the center */
    padding: 20vh 5vw;
    /* Add top padding to push text down slightly in the center */
    position: relative;
    z-index: 2;
    /* Removed scroll-snap-align for smooth performance */
}

.scrolly-step:nth-child(even),
.scrolly-step:nth-child(odd) {
    justify-content: center;
    /* Always centered */
    padding-left: 5vw;
    padding-right: 5vw;
}

/* Timeline Dot - REMOVED for pure cinematic look */

@media(max-width:900px) {

    /* Performance: Disable particles and intense grain on mobile */
    #particles-container {
        display: none;
    }

    .sticky-overlay::before {
        opacity: 0.3;
    }

    /* Lighter grain */

    .scrolly-step {
        min-height: 100vh;
        align-items: flex-end;
        /* Push to bottom on mobile so image is pristine above */
        padding: 5vh 5vw 10vh 5vw;
        margin-bottom: 0;
    }

    .scrolly-step:nth-child(even),
    .scrolly-step:nth-child(odd) {
        justify-content: center;
        /* Center text on mobile */
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .scrolly-step:last-child {
        margin-bottom: 0;
    }
}

/* Premium Typography Wrapper -> NO CARDS. Just Typography. */
.step-card {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    padding: 0;
    max-width: min(760px, calc(100vw - 12rem));
    width: 100%;
    border: none;
    /* Removed bulk transition. We stagger children now. */
    opacity: 1;
    position: relative;
    box-shadow: none;
    text-align: center;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.68);
}

/* GSAP controls all step card animations — children start at natural state */
.step-card>* {
    position: relative;
    z-index: 1;
    will-change: transform, opacity;
}

#historia .step-card[data-museum-label]::before {
    content: attr(data-museum-label);
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    line-height: 1.35;
    text-transform: uppercase;
    color: rgba(230, 205, 172, 0.74);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.85s ease, transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

#historia .step-card[data-museum-label]::before {
    border-left: 1px solid rgba(211, 84, 0, 0.72);
    padding-left: 0.85rem;
}

#historia .scrolly-step.is-active .step-card[data-museum-label]::before {
    opacity: 1;
    transform: translateY(0);
}

/* Watermark removed for clean cinematic look */
.step-card::after {
    display: none;
}

/* ============================================
   SCROLLY PROGRESS BAR (Phase 3 — GSAP)
   ============================================ */
.scrolly-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), #f1c40f);
    z-index: 9998;
    transform-origin: left;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    box-shadow: 0 0 12px rgba(211, 84, 0, 0.5);
}

.scrolly-progress-bar.active {
    opacity: 1;
}

/* ============================================
   ENHANCED PIPS (Phase 3)
   ============================================ */
.scrolly-pips {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

.scrolly-pip {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background 0.5s ease, transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}

.scrolly-pip::after {
    content: attr(title);
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    font-family: var(--font-body);
}

.scrolly-pip:hover::after {
    opacity: 1;
}

.scrolly-pip.active {
    background: var(--primary);
    transform: scale(1.8);
    box-shadow: 0 0 14px rgba(211, 84, 0, 0.8);
}

@media(max-width: 768px) {
    .scrolly-pips {
        display: none;
    }
}

.step-chapter {
    display: block;
    color: rgba(212, 175, 55, 0.9);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

/* Massive Year Design Element with Gold Gradient Mask */
.step-year {
    font-family: var(--font-heading);
    font-size: 5rem;
    line-height: 1;
    font-weight: 300;
    letter-spacing: 0;
    margin-bottom: 1rem;
    display: block;

    /* Elite Gradient Text Mask */
    background: linear-gradient(to bottom, #ffffff 0%, #e6cdac 50%, #d4af37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.95;

    /* Slight drop shadow to lift it off the background */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.step-card h3 {
    font-size: clamp(2.9rem, 4.2vw, 3.75rem);
    margin: 0 0 1.45rem 0;
    color: var(--primary);
    line-height: 1.08;
    letter-spacing: 0;
    font-weight: 400;
    text-wrap: balance;
}

.step-card p {
    font-size: clamp(1.12rem, 1.2vw, 1.34rem);
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.66;
    margin-bottom: 1.25rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.step-card p:last-child {
    margin-bottom: 0;
}

/* Scrolly Pips Navigation */
.scrolly-pips {
    position: absolute;
    right: 4vw;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* More spacing for the line */
    z-index: 20;
}

/* Vertical connector line */
.scrolly-pips::before {
    content: '';
    position: absolute;
    top: 15px;
    bottom: 15px;
    left: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-50%);
    z-index: -1;
}

.scrolly-pip {
    width: 3px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.scrolly-pip.active {
    background: var(--primary);
    height: 60px;
}

/* Scrolly Intro Slide */
.scrolly-intro .step-card {
    opacity: 1;
    /* Always fully visible on start */
    transform: translateY(0);
}

.scrolly-intro .intro-chapter {
    color: white;
    letter-spacing: 8px;
}

.scrolly-intro-title {
    font-size: clamp(4.2rem, 7vw, 6.4rem);
    color: var(--primary);
    margin: 1.5rem 0;
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.scrolly-intro-sub {
    font-size: clamp(1.12rem, 1.35vw, 1.42rem);
    color: rgba(255, 255, 255, 0.84);
    max-width: 660px;
    margin: 0 auto;
    line-height: 1.55;
}

/* Scroll Hint Animation */
.scrolly-scroll-hint {
    margin-top: 6rem;
    opacity: 0.6;
    animation: none;
}

.scrolly-scroll-hint span {
    display: block;
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    margin: 0 auto;
}

@keyframes pulseScroll {

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

    50% {
        transform: translateY(15px);
        opacity: 1;
    }
}

@media(max-width: 768px) {
    .step-card h3 {
        font-size: 2.6rem;
        /* Much larger on mobile */
        margin-bottom: 1.2rem;
        letter-spacing: 0;
    }

    .step-chapter {
        font-size: 0.75rem;
        letter-spacing: 3px;
        margin-bottom: 0.3rem;
    }

    .step-year {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .step-card p {
        font-size: 1.25rem;
        /* Larger paragraph on mobile */
        color: rgba(255, 255, 255, 0.95);
        line-height: 1.6;
    }
}

/* 8. FEATURES GRID (EXPERIENCE) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    padding: 40px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    text-align: left;
    transition: transform 0.3s ease,
                background 0.3s ease,
                border-color 0.3s ease,
                border-radius 1.2s ease,
                box-shadow 1.2s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-warm);
    box-shadow: var(--shadow-card-hover);
}

.feature-icon {
    font-size: 0.72rem;
    margin-bottom: 20px;
    display: block;
    color: var(--stone);
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.feature-card p {
    color: #aaa;
}

@media(max-width:768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* 9. MENU (CARTA) STYLES - MERGED FROM DAILY-MENU-ULTRA.CSS */
#menu-dia-section.menu-dia-hidden {
    display: none !important;
}

#menu-dia-section {
    position: relative;
    padding: 6rem 0;
    overflow: visible;
}

.daily-menu-card {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(10, 10, 10, 0.85);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-warm);
    border-radius: calc(var(--radius-card) * 0.5);
    padding: 5rem;
    box-shadow: var(--shadow-card-hover), inset 0 0 80px rgba(0, 0, 0, 1);
    text-align: center;
    color: #f0f0f0;
    z-index: 10;
    transition: border-color 1.2s ease, border-radius 1.2s ease, box-shadow 1.2s ease;
}

@media(max-width: 768px) {
    .daily-menu-card {
        padding: 1.5rem 0.5rem;
        margin: 0 0.5rem;
        /* Ensure card never exceeds screen */
        width: calc(100% - 1rem);
    }

    .daily-title {
        font-size: 2.2rem;
        word-break: break-word;
    }

    .daily-price {
        font-size: 2.2rem;
    }

    .daily-col h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .daily-col li {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        padding: 0 4px;
        word-break: break-word;
    }

    .daily-col {
        padding: 0.5rem 0;
    }

    .daily-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0;
        margin-bottom: 2rem;
    }

    /* Keep separators on mobile but make them subtle */
    .daily-col:not(:last-child)::after {
        display: block;
        opacity: 0.4;
    }
}

.daily-menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--stone), transparent);
}

.daily-header {
    margin-bottom: 4rem;
    position: relative;
}

.daily-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--stone);
    margin-bottom: 1.5rem;
}

.daily-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 5rem;
    font-weight: 400;
    color: #fff;
    line-height: 1;
    color: #fff;
    background: none;
    -webkit-text-fill-color: currentColor;
    letter-spacing: 0;
}

.daily-date {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: #888;
    margin-top: 1rem;
}

.daily-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    margin-bottom: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.daily-col {
    padding: 3rem 1rem;
    position: relative;
}

.daily-col:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20%;
    bottom: 20%;
    right: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.daily-col h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    color: var(--stone);
    margin-bottom: 2rem;
}

.daily-col li {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.daily-col li:hover {
    color: #fff;
    transform: none;
    text-shadow: none;
}

.daily-footer {
    padding-top: 2rem;
}

.daily-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4.5rem;
    color: #fff;
    margin-bottom: 1rem;
    display: block;
}

@media(max-width: 900px) {
    .daily-grid {
        grid-template-columns: 1fr;
    }
}

/* 10. CALENDAR WIDGET (ULTRA) - MERGED */
.calendar-widget-ultra {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border: none !important;
    padding: 20px 0 !important;
    max-width: 900px;
    margin: 40px auto 0;
    box-shadow: none !important;
    text-align: center;
    position: relative;
    z-index: 50;
}

.cal-grid-ultra {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.cal-day-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.cal-day-block:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(184, 164, 142, 0.28);
}

.cal-day-block.is-closed {
    background: rgba(192, 57, 43, 0.08);
    border-color: rgba(192, 57, 43, 0.35);
}

.cal-day-block.is-closed .day-name,
.cal-day-block.is-closed .day-number {
    color: rgba(255, 255, 255, 0.72);
}

.day-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #ccc;
}

.day-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin: 5px 0;
}

.status-pill {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.status-open {
    background: #27ae60;
    color: white;
    box-shadow: none;
}

.status-closed {
    background: #c0392b;
    color: white;
    opacity: 0.8;
}

@media(max-width: 768px) {
    .cal-grid-ultra {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 6px;
    }

    .cal-day-block {
        padding: 10px 5px;
    }

    .day-number {
        font-size: 1.4rem;
    }

    .status-pill {
        font-size: 0.5rem;
        padding: 2px 5px;
    }
}

@media(max-width: 480px) {
    .cal-grid-ultra {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

/* 11. MASONRY GALLERY */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}

@media(max-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media(max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: border-radius 1.2s ease, box-shadow 1.2s ease;
}

.masonry-item:hover {
    box-shadow: var(--shadow-card-hover);
}

.masonry-item img {
    transition: transform 0.5s, filter 1.2s ease;
    width: 100%;
    height: auto;
    min-height: 220px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
    filter: saturate(var(--img-saturation))
            brightness(var(--img-brightness))
            hue-rotate(var(--img-hue-rotate));
}

.masonry-item:nth-child(2n) img {
    aspect-ratio: 4 / 5;
}

.masonry-item:nth-child(3n) img {
    aspect-ratio: 16 / 10;
}

.masonry-item:hover img {
    transform: scale(1.05);
}

.masonry-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
}

.masonry-overlay span {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: white;
    font-weight: 300;
}

/* 12. LOCATION / SPLIT MAP */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background:
        radial-gradient(circle at 18% 12%, rgba(211, 84, 0, 0.08), transparent 36%),
        linear-gradient(135deg, rgba(17, 14, 12, 0.96), rgba(6, 6, 6, 0.98));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: border-radius 1.2s ease, box-shadow 1.2s ease, border-color 1.2s ease;
}

.split-content {
    padding: 4rem;
    align-self: center;
}

.split-map {
    position: relative;
    min-height: clamp(440px, 42vw, 560px);
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(135deg, rgba(12, 12, 12, 0.9), rgba(0, 0, 0, 0.94)),
        #0b0b0b;
    touch-action: pan-y;
}

.split-map::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 42%, transparent 0%, rgba(0, 0, 0, 0.04) 42%, rgba(0, 0, 0, 0.34) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.18));
    opacity: 0.74;
    transition: opacity 0.45s ease;
}

.split-map.map-interactive {
    touch-action: auto;
}

.split-map.map-interactive::before {
    opacity: 0.2;
}

.split-map .map-iframe {
    z-index: 0;
    opacity: 0.86;
    transform: scale(1.01);
    pointer-events: none;
    filter:
        saturate(var(--img-saturation))
        brightness(calc(var(--img-brightness) * 0.88))
        hue-rotate(var(--img-hue-rotate));
    transition: opacity 0.45s ease, filter 0.45s ease, transform 0.45s ease;
}

.split-map.map-consent-pending .map-iframe {
    opacity: 0;
    pointer-events: none;
}

.map-consent-placeholder {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.85rem;
    padding: clamp(2rem, 5vw, 4rem);
    background:
        radial-gradient(circle at 24% 28%, rgba(211, 84, 0, 0.18), transparent 36%),
        linear-gradient(135deg, rgba(14, 13, 11, 0.94), rgba(5, 5, 5, 0.98));
    color: rgba(255, 255, 255, 0.88);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.split-map.map-consent-pending .map-consent-placeholder {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.split-map.map-consent-pending .map-interaction-panel {
    opacity: 0;
    pointer-events: none;
}

.map-consent-kicker {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
}

.map-consent-placeholder p {
    max-width: 340px;
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.08;
}

.map-consent-btn {
    margin-top: 0.5rem;
    padding: 0.82rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font: 700 0.78rem/1 var(--font-body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.map-consent-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(211, 84, 0, 0.7);
    background: rgba(211, 84, 0, 0.18);
}

.split-map.map-interactive .map-iframe {
    opacity: 0.98;
    transform: scale(1);
    pointer-events: auto;
    filter:
        saturate(var(--img-saturation))
        brightness(var(--img-brightness))
        hue-rotate(var(--img-hue-rotate));
}

.map-interaction-panel {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: calc(var(--radius-card) * 0.75);
    background: rgba(8, 8, 8, 0.72);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
    pointer-events: auto;
    transition: border-radius 1.2s ease, background 0.35s ease, transform 0.35s ease;
}

.split-map.map-interactive .map-interaction-panel {
    background: rgba(5, 5, 5, 0.8);
}

.map-panel-copy {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
}

.map-panel-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    line-height: 1;
    color: #fff;
}

.map-panel-subtitle {
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.62);
    letter-spacing: 0.12em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.map-toggle {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 0.95rem;
    border: 1px solid rgba(211, 84, 0, 0.56);
    border-radius: 999px;
    background: rgba(211, 84, 0, 0.18);
    color: #fff;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.map-toggle:hover,
.map-toggle:focus-visible {
    background: rgba(211, 84, 0, 0.32);
    border-color: rgba(211, 84, 0, 0.9);
    outline: none;
    transform: translateY(-1px);
}

.map-toggle[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.34);
}

.route-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
    border-radius: 4px;
}

.route-from {
    color: white;
    font-weight: 600;
}

.route-time {
    color: var(--primary);
}

@media(max-width:768px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .split-map {
        min-height: min(72dvh, 520px);
    }

    .map-interaction-panel {
        right: 0.75rem;
        top: 0.75rem;
        bottom: auto;
        left: 0.75rem;
        align-items: center;
        flex-direction: row;
        gap: 0.75rem;
        padding: 0.85rem;
    }

    .map-panel-title {
        font-size: 0.98rem;
    }

    .map-panel-subtitle {
        display: none;
    }

    .map-toggle {
        width: auto;
    }
}

/* 13. FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-top: 2px solid var(--primary);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    box-shadow: var(--shadow-soft);
    transition: border-radius 1.2s ease, box-shadow 1.2s ease, background 0.3s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.035);
    box-shadow: var(--shadow-card);
}

.faq-item h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: white;
}

.faq-item p {
    font-size: 0.9rem;
    color: #aaa;
}

@media(max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* 14. CLOSING CTA */
.closing-cta-section {
    padding-top: 90px;
    padding-bottom: 100px;
    background:
        linear-gradient(180deg, rgba(79, 52, 39, 0.18), rgba(5, 5, 5, 0.92)),
        radial-gradient(circle at center top, rgba(184, 164, 142, 0.12), transparent 55%);
    border-top: 1px solid rgba(184, 164, 142, 0.12);
}

.closing-cta {
    text-align: center;
    max-width: 820px;
}

.closing-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--stone);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.closing-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

@media(max-width: 768px) {
    .closing-cta-section {
        padding-top: 70px;
        padding-bottom: 80px;
    }

    .closing-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Section Dividers */
.section-divider {
    width: 120px;
    height: 2px;
    margin: 0 auto 40px;
    background: linear-gradient(90deg, transparent, var(--stone), transparent);
}

/* 14. FOOTER */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid #222;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    text-align: left;
    margin-bottom: 40px;
}

@media(max-width:768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-brand h3 {
    color: white;
    margin-bottom: 5px;
    letter-spacing: 2px;
    font-size: 1.3rem;
}

.footer-tagline {
    color: var(--primary);
    font-style: italic;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.footer-brand p {
    color: #888;
    font-size: 0.9rem;
}

.footer-hours h4,
.footer-contact h4 {
    color: white;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-family: var(--font-body);
    font-weight: 600;
}

.footer-hours p {
    color: #aaa;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.footer-closed {
    color: #c0392b;
    font-weight: 600;
}

.footer-phone {
    font-size: 1.8rem;
    color: white;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-phone:hover {
    color: var(--primary);
}

.footer-phone-secondary {
    font-size: 1.1rem;
    color: #ccc;
    display: block;
    margin-bottom: 8px;
}

.footer-phone-secondary:hover {
    color: var(--primary);
}

.footer-email {
    color: #aaa;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 15px;
}

.footer-email:hover {
    color: var(--primary);
}

.footer-map-btn {
    padding: 8px 20px;
    font-size: 0.75rem;
}

.copyright {
    color: #555;
    font-size: 0.8rem;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.78rem;
}

.footer-legal-links a,
.footer-legal-links button {
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-legal-links a:hover,
.footer-legal-links button:hover {
    color: var(--primary);
}

/* 15. EXTRAS */
.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    z-index: 999;
    transition: transform 0.3s;
}

.floating-cta:hover {
    transform: scale(1.1);
}

.consent-banner-open .floating-cta,
.consent-modal-open .floating-cta {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.86);
}

.cta-icon {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Animation Utils */
.scroll-reveal {
    opacity: 1;
    /* Safety: Default to visible */
    transform: translateY(0);
    transition: all 0.8s ease;
}

/* JS will add this class if it successfully initializes animations */
.js-animating .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-text,
.reveal-text-delay {
    /* Keep header animations as they are critical for 'WOW' factor, but ensure they don't hide permanent content if animation fails */
    animation: fadeInUp 1s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   INTERACTIVE MENU RESTORATION
   ========================================= */

/* 1. Background Layer */
.menu-bg-layer {
    position: fixed;
    inset: 0;
    display: block;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.025);
    transition: opacity 0.45s ease,
                transform 1.2s ease,
                filter 1.2s ease;
    will-change: opacity, transform;
    contain: layout paint style;
    filter: saturate(calc(var(--img-saturation) * 1.04))
            brightness(calc(var(--img-brightness) * 0.98))
            hue-rotate(var(--img-hue-rotate))
            contrast(1.04);
}

.menu-bg-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.34) 52%, rgba(0, 0, 0, 0.72) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.28) 42%, rgba(0, 0, 0, 0.62) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.08) 38%, rgba(0, 0, 0, 0.68) 100%);
}

.menu-bg-layer.active {
    opacity: 1;
    transform: scale(1);
}

/* Sizing and positions applied to the sublayers for clean transitions */
.menu-bg-sublayer {
    position: absolute;
    inset: 0;
    opacity: 0;
    will-change: opacity;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.menu-bg-sublayer.active {
    opacity: 1;
}

/* Sizing and positions inherited by the sublayers based on the parent's current category class */
.menu-bg-layer.wine-mode .menu-bg-sublayer {
    background-size: cover;
    background-position: center 52%;
}

.menu-bg-layer.wine-portrait-mode .menu-bg-sublayer {
    background-size: cover;
    background-position: center;
}

.menu-bg-layer.wine-landscape-mode .menu-bg-sublayer {
    background-size: cover;
    background-position: center 52%;
}

.menu-bg-layer:not(.wine-mode) .menu-bg-sublayer {
    background-size: cover;
    background-position: center 48%;
}

@media(max-width: 768px) {

    /* Disable menu hover bg on mobile — too heavy and not needed (tap, not hover) */
    .menu-bg-layer {
        display: none;
    }
}

/* 2. Menu Grid Layout (Masonry Style) */
.menu-grid {
    column-count: 2;
    column-gap: 6rem;
    padding: 2rem 0;
}

@media(max-width: 900px) {
    .menu-grid {
        column-count: 1;
    }
}

/* 3. Menu Items Styling */
.menu-category {
    break-inside: avoid;
    /* Prevent a category from splitting across columns */
    page-break-inside: avoid;
    margin-bottom: 3rem;
    /* Add bottom margin so they stack cleanly within columns */
}

.category-title {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Thinner divider */
    padding-bottom: 15px;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.menu-item {
    position: relative;
    padding: 1.5rem 0;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    cursor: pointer;
    transition: padding 0.4s ease,
                border-color 1.2s ease,
                color 0.35s ease;
}

.menu-item:hover {
    padding-left: 20px;
    border-bottom-color: var(--primary);
}

.menu-item:hover .menu-item-name {
    color: var(--primary);
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    position: relative;
    z-index: 2;
}

.menu-item-price {
    font-weight: 700;
    color: #fff;
}

.menu-item-desc {
    font-size: 0.95rem;
    color: #aaa;
    margin-top: 5px;
    max-width: 90%;
    position: relative;
    z-index: 2;
}

/* Mobile Image (Hidden on Desktop usually, but good for active state) */
.mobile-accordion-img {
    height: 0;
    width: 100%;
    background-size: cover;
    background-position: center;
    transition: height 0.3s ease, filter 1.2s ease, border-radius 1.2s ease;
    overflow: hidden;
    margin-top: 10px;
    border-radius: calc(var(--radius-card) * 0.5);
    filter: saturate(var(--img-saturation))
            brightness(var(--img-brightness))
            hue-rotate(var(--img-hue-rotate));
}

.menu-item.active .mobile-accordion-img {
    height: 200px;
    /* Show on click/tap */
}

/* Mobile Photo Badge */
.mobile-photo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.72rem;
    font-family: var(--font-body);
    background: rgba(211, 84, 0, 0.12);
    border: 1px solid rgba(211, 84, 0, 0.35);
    color: var(--primary);
    padding: 3px 9px;
    border-radius: 12px;
    margin-left: 10px;
    vertical-align: middle;
    transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.menu-item.active .mobile-photo-badge {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

@media (min-width: 769px) {
    .menu-item.has-menu-image .mobile-accordion-img {
        display: none;
    }
    .mobile-photo-badge {
        display: none !important;
    }
}

/* =========================================
   MOBILE PERFORMANCE & RESPONSIVE OVERRIDES
   ========================================= */
@media(max-width: 768px) {

    /* Kill heavy background animation — #1 cause of scroll jank */
    body {
        animation: none;
        background-size: 100% 100%;
    }

    /* Stop hero glow pulsing on mobile */
    .hero-glow {
        animation: none;
    }

    /* Stop shimmer on title (GPU intensive) */
    .hero-title-accent {
        animation: none;
        background-position: 0% 50%;
        color: #f07935;
        text-shadow: 0 2px 16px rgba(0, 0, 0, 0.82);
    }

    /* Stop button glow pulse */
    .btn-glow {
        animation: none;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    }

    .hero-actions .btn-glass {
        min-width: 220px;
        background: rgba(5, 5, 5, 0.48);
        border-color: rgba(255, 255, 255, 0.42);
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
    }

    /* Fix navbar position on mobile — start fixed at top */
    .navbar {
        position: fixed;
        top: 0;
        background: rgba(5, 5, 5, 0.85);
        -webkit-backdrop-filter: blur(15px);
        backdrop-filter: blur(15px);
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Section title scaling */
    .section-title {
        font-size: 2.2rem;
    }

    .section-desc {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Split layout padding */
    .split-content {
        padding: 2rem 1.5rem;
    }

    /* Step card padding */
    .step-card {
        padding: 1.5rem;
    }

    .step-card h3 {
        font-size: 1.8rem;
    }

    /* Proof item wrapping */
    .proof-item {
        flex-direction: column;
        gap: 8px;
    }

    .proof-item p {
        font-size: 0.85rem;
    }

    /* Category title size */
    .category-title {
        font-size: 1.7rem;
    }

    /* Hero section: fill exactly the mobile screen (no extra gap at bottom) */
    .hero-section {
        min-height: 100svh;
        /* small viewport height — most compatible */
        height: auto;
        justify-content: flex-start;
    }

    .hero-content {
        min-height: 100svh;
        padding-top: 76px;
        padding-left: 1rem;
        padding-right: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    .altitude-badge {
        margin-bottom: 10px;
    }

    .altitude-ring {
        width: 72px;
        height: 72px;
    }

    .altitude-number {
        font-size: 2.1rem;
    }

    .altitude-unit {
        font-size: 0.55rem;
        letter-spacing: 0.22em;
    }

    .hero-title {
        font-size: 1.85rem;
        line-height: 1.08;
        margin-bottom: 12px;
    }

    .hero-subtitle {
        max-width: 320px;
        padding: 0;
        margin-bottom: 18px;
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .hero-actions {
        margin-bottom: 14px;
    }

    .hero-actions .btn-lg {
        padding: 12px 30px;
        font-size: 0.85rem;
    }

    /* Hero video — force cover on mobile */
    .hero-video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        object-fit: cover;
        object-position: center center;
    }

    .hero-section.hero-scroll-static .hero-bg {
        background-image: url('../assets/img/optimized/hero-still-santuario-risco-mobile.jpg');
        background-size: cover;
        background-position: 58% center;
    }

    .hero-section.hero-scroll-static .hero-bg::before,
    .hero-section.hero-scroll-static .hero-bg::after {
        display: none;
    }

    /* Once ended, go back to absolute so page scrolls normally */
    .hero-video.ended {
        position: absolute;
        will-change: auto;
    }

    /* Footer phone size on mobile */
    .footer-phone {
        font-size: 1.4rem;
    }

    /* Floating CTA smaller on mobile */
    .floating-cta {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        bottom: 20px;
        right: 20px;
    }

    /* MENU CARTA — más compacto en móvil */
    .category-title {
        font-size: 1.3rem;
        letter-spacing: 2px;
        margin-bottom: 1.2rem;
        padding-bottom: 10px;
    }

    .menu-item {
        padding: 0.9rem 0;
    }

    .menu-item-header {
        font-size: 1rem;
        flex-wrap: wrap;
        gap: 2px 8px;
    }

    .menu-item-name {
        flex: 1 1 100%;
        /* name takes full width */
        word-break: break-word;
    }

    .menu-item-price {
        flex: 0 0 auto;
        color: var(--primary);
        font-size: 0.9rem;
    }

    .menu-item-desc {
        font-size: 0.8rem;
        margin-top: 2px;
    }

    .menu-grid {
        gap: 2rem;
    }

    /* Weather widget on mobile — hide the long label text */
    .weather-label {
        display: none;
    }

    .weather-widget {
        gap: 10px;
        max-width: 320px;
        padding: 8px 14px;
        margin-bottom: 10px;
    }

    .weather-icon {
        font-size: 1.35rem;
    }

    .weather-narrative {
        max-width: 320px;
        margin: 10px auto 12px;
        font-size: 0.68rem;
        line-height: 1.45;
    }

    .calendar-widget-ultra {
        width: 100%;
        max-width: 343px;
        margin: 12px auto 0;
        padding: 0 !important;
    }

    .cal-grid-ultra {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 4px;
    }

    .cal-day-block {
        min-width: 0;
        padding: 7px 2px;
        border-radius: 6px;
    }

    .day-name {
        font-size: 0.5rem;
    }

    .day-number {
        font-size: 1.05rem;
        margin: 2px 0;
    }

    .status-pill {
        font-size: 0.42rem;
        padding: 1px 3px;
    }

    /* Daily header margin reduced */
    .daily-header {
        margin-bottom: 1.5rem;
    }

    /* Scrollytelling — disable sticky on mobile to prevent scroll trapping */
    #historia {
        background: #050505;
        overflow: hidden;
    }

    #historia .sticky-bg-wrapper {
        display: none;
    }

    #historia .scrolly-content {
        margin-top: 0;
    }

    #historia .scrolly-step {
        min-height: 100svh;
        align-items: flex-end;
        justify-content: flex-start;
        padding: 18vh 5.2vw 10vh;
        overflow: hidden;
        isolation: isolate;
        text-align: left;
    }

    #historia .scrolly-step::before,
    #historia .scrolly-step::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
    }

    #historia .scrolly-step::before {
        background-image: var(--scrolly-mobile-bg);
        background-size: var(--scrolly-mobile-size, cover);
        background-position: var(--scrolly-mobile-position, center);
        opacity: 0.9;
        transform: scale(1.04);
        filter: saturate(var(--img-saturation)) brightness(var(--img-brightness)) hue-rotate(var(--img-hue-rotate));
        transition: opacity 1.2s ease, transform 1.8s cubic-bezier(0.19, 1, 0.22, 1);
        z-index: -2;
    }

    #historia .scrolly-step.is-active::before {
        opacity: 0.96;
        transform: scale(1);
    }

    #historia .scrolly-step::after {
        background:
            radial-gradient(ellipse at 50% 80%, rgba(0, 0, 0, 0.64) 0%, rgba(0, 0, 0, 0.28) 42%, rgba(0, 0, 0, 0.18) 64%, rgba(0, 0, 0, 0.56) 100%),
            linear-gradient(to bottom, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.3) 38%, rgba(0, 0, 0, 0.9) 100%),
            radial-gradient(circle at 20% 82%, rgba(211, 84, 0, 0.22), transparent 42%);
        z-index: -1;
    }

    #historia .scrolly-intro {
        align-items: center;
        justify-content: center;
        text-align: center;
        background:
            radial-gradient(circle at 50% 25%, rgba(211, 84, 0, 0.2), transparent 36%),
            linear-gradient(to bottom, #120c09 0%, #050505 100%);
    }

    #historia .scrolly-intro::before,
    #historia .scrolly-intro::after {
        display: none;
    }

    #historia .scrolly-step[data-target="1"] {
        --scrolly-mobile-bg: url('../assets/img/historia-viva/01-cima-santuario-mobile-portrait.jpg');
        --scrolly-mobile-position: center center;
    }

    #historia .scrolly-step[data-target="2"] {
        --scrolly-mobile-bg: url('../assets/img/historia-viva/04-protectora-dibujo-mobile-portrait.jpg');
        --scrolly-mobile-position: center center;
    }

    #historia .scrolly-step[data-target="3"] {
        --scrolly-mobile-bg: url('../assets/img/historia-viva/03-culto-archivo-mobile-portrait.jpg');
        --scrolly-mobile-position: center center;
    }

    #historia .scrolly-step[data-target="4"] {
        --scrolly-mobile-bg: url('../assets/img/historia-viva/02-devocion-virgen-mobile-portrait.jpg');
        --scrolly-mobile-position: center center;
    }

    #historia .scrolly-step[data-target="5"] {
        --scrolly-mobile-bg: url('../assets/img/historia-viva/05-tradicion-comedor-mobile-portrait.jpg');
        --scrolly-mobile-position: center center;
    }

    #historia .scrolly-step[data-target="6"] {
        --scrolly-mobile-bg: url('../assets/img/historia-viva/06-destino-vistas-mobile-portrait.jpg');
        --scrolly-mobile-position: center center;
    }

    #historia .step-card {
        max-width: 34rem;
        padding: 0;
        text-align: left;
    }

    #historia .step-card[data-museum-label]::before {
        margin-bottom: 0.75rem;
        padding-left: 0.65rem;
        font-size: 0.56rem;
        letter-spacing: 0.18em;
        color: rgba(230, 205, 172, 0.78);
    }

    #historia .scrolly-intro .step-card {
        text-align: center;
    }

    #historia .step-chapter {
        font-size: 0.7rem;
        letter-spacing: 0.24em;
        margin-bottom: 0.55rem;
    }

    #historia .step-year {
        font-size: 0.82rem;
        letter-spacing: 0.2em;
        margin-bottom: 0.75rem;
        color: rgba(255, 255, 255, 0.72);
        background: none;
        filter: none;
        text-transform: uppercase;
    }

    #historia .step-card h3 {
        font-size: 2.2rem;
        line-height: 1.04;
        margin-bottom: 1rem;
        text-wrap: balance;
    }

    #historia .scrolly-step[data-target="4"] .step-card h3 {
        font-size: 1.9rem;
    }

    #historia .step-card p {
        font-size: 1.02rem;
        line-height: 1.55;
        max-width: 100%;
        margin-bottom: 1rem;
    }


    /* Buttons — reduce padding on mobile */
    .btn {
        padding: 12px 28px;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 8px 18px;
        font-size: 0.75rem;
    }

    /* Features grid — add horizontal padding */
    .feature-card {
        padding: 24px;
    }
}

/* =========================================
   OPENING STATUS BAR (Phase: respira)
   Shows when restaurant is closing soon, closed today,
   or closed by holiday. Sits above the navbar.
   ========================================= */
/* Navbar Sticky on Scroll */
.navbar.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.9);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    padding: 10px 0;
    padding: 0;
}

/* 6. SOCIAL PROOF STRIP */
.social-proof-strip {
    padding: 60px 0;
    /* Cinematic gradient visual bridge to eliminate vertical cuts */
    background: linear-gradient(
        to bottom,
        rgba(5, 5, 5, 0.8) 0%,
        rgba(12, 8, 6, 0.4) 50%,
        rgba(5, 5, 5, 0.8) 100%
    );
    border-top: 1px solid rgba(230, 205, 172, 0.04);
    border-bottom: 1px solid rgba(230, 205, 172, 0.04);
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* Warm atmospheric radial light orb behind reviews */
.social-proof-strip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 180px;
    background: radial-gradient(circle, rgba(230, 205, 172, 0.035) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
    filter: blur(30px);
}

.review-rotator {
    overflow: hidden;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 15px 0;
    display: flex;
    align-items: center;
    z-index: 2;
    
    /* Fading edges mask: removes card borders and cuts smoothly at viewport margins */
    mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

/* Horizontal sliding track */
.review-marquee-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: marquee-scroll 65s linear infinite;
    will-change: transform;
}

/* Pause track smooth scroll on hover for easy reading */
.review-marquee-track:hover {
    animation-play-state: paused;
}

/* GPU hardware accelerated translation keyframes */
@keyframes marquee-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Ultra-Premium Glassmorphic Testimonial Cards */
.review-card {
    background: rgba(255, 255, 255, 0.012);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 22px 26px;
    width: 320px;
    min-width: 320px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: 
        background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        border-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: grab;
}

.review-card:active {
    cursor: grabbing;
}

.review-card:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(230, 205, 172, 0.24);
    transform: translate3d(0, -6px, 0);
    box-shadow: 
        0 18px 45px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(230, 205, 172, 0.04);
}

/* Card Header: Stars & Verified indicator */
.review-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.review-card-top .stars {
    color: #f1c40f;
    letter-spacing: 2px;
    font-size: 0.8rem;
    text-shadow: 0 0 6px rgba(241, 196, 15, 0.35);
}

.review-verified {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.32);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.verified-dot {
    width: 5px;
    height: 5px;
    background-color: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #2ecc71;
}

/* Review content typography */
.review-text {
    font-style: italic;
    color: #e6cdac;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 300;
    margin: 0;
    font-family: var(--font-heading);
}

/* Card Footer: Author & Google verified origin */
.review-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 12px;
}

.author-name {
    font-size: 0.82rem;
    color: #ffffff;
    font-weight: 500;
}

.review-platform {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.36);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.google-icon {
    width: 11px;
    height: 11px;
    color: rgba(255, 255, 255, 0.36);
}

/* 6.1 RESPONSIVE ADJUSTMENTS FOR REVIEWS */
@media (max-width: 768px) {
    .social-proof-strip {
        padding: 45px 0;
    }
    
    .review-rotator {
        padding: 5px 0;
        /* Broader visible area on small mobile viewports */
        mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    }
    
    .review-marquee-track {
        gap: 16px;
        /* Slightly speed up relative to viewport size */
        animation-duration: 48s;
    }
    
    .review-card {
        width: 280px;
        min-width: 280px;
        max-width: 290px;
        padding: 18px 20px;
        gap: 12px;
    }
    
    .review-text {
        font-size: 0.9rem;
    }
}

.opening-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 250;
    padding: 9px 20px;
    min-height: var(--opening-bar-offset);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(
        to bottom,
        rgba(8, 8, 12, 0.94) 0%,
        rgba(8, 8, 12, 0.82) 100%
    );
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-warm);
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-style: italic;
    letter-spacing: 0.02em;
    box-sizing: border-box;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1),
                opacity 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.opening-bar.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.opening-bar.bar-closed {
    border-bottom-color: rgba(150, 160, 200, 0.3);
}

.opening-bar.bar-closing-soon {
    border-bottom-color: rgba(255, 165, 50, 0.4);
}

.opening-bar-icon {
    font-size: 1rem;
    opacity: 0.85;
}

.opening-bar-text {
    margin: 0;
    font-weight: 400;
}

.opening-bar-text strong {
    font-weight: 600;
    color: var(--primary);
}

/* When opening bar is visible, push the navbar by its measured height. */
body.has-opening-bar .navbar,
body.has-opening-bar .navbar.scrolled {
    top: calc(var(--opening-bar-offset) + 2px);
}

/* Atenuate the navbar CTA on closed days — quiet signal, not blocking */
body.is-closed-today .nav-cta {
    opacity: 0.55;
    transition: opacity 0.5s ease;
}

@media (max-width: 600px) {
    .opening-bar {
        font-size: 0.82rem;
        padding: 8px 12px;
        gap: 8px;
    }

    .opening-bar-text {
        line-height: 1.3;
    }
}

@media (max-width: 768px) {
    body.has-opening-bar .hero-content {
        padding-top: calc(76px + var(--opening-bar-offset));
    }
}

/* =========================================
   FOOTER "NOW IN MONCAYO" (Phase: respira)
   Live local time + temp under the brand block.
   ========================================= */
.footer-now {
    margin-top: 6px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: rgba(240, 240, 240, 0.55);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-now .now-pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d35400;
    box-shadow: 0 0 8px rgba(211, 84, 0, 0.6);
    animation: nowPulse 2.4s ease-in-out infinite;
    flex-shrink: 0;
}

#moncayo-now-time,
#moncayo-now-temp {
    color: rgba(255, 255, 255, 0.78);
    font-variant-numeric: tabular-nums;
}

@keyframes nowPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.85);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Consent banner and legal pages */
.cookie-banner {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 1100;
    width: min(680px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    padding: clamp(16px, 2vw, 22px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(211, 84, 0, 0.18), transparent 42%),
        rgba(8, 8, 8, 0.88);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    color: #fff;
}

.cookie-banner[hidden],
.cookie-modal[hidden] {
    display: none;
}

.cookie-banner-copy strong {
    display: block;
    margin-bottom: 0.35rem;
    font-family: var(--font-heading);
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    font-weight: 600;
}

.cookie-banner-copy p {
    margin: 0;
    max-width: 58ch;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: grid;
    grid-template-columns: minmax(150px, 1.2fr) minmax(112px, 0.64fr) minmax(124px, 0.7fr);
    gap: 10px;
}

.cookie-modal-actions {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(140px, 0.72fr);
    gap: 10px;
}

.cookie-banner-actions .btn,
.cookie-modal-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0.82rem 1rem;
    text-align: center;
    white-space: nowrap;
    line-height: 1.1;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    background: rgba(0, 0, 0, 0.62);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.cookie-modal-panel {
    position: relative;
    width: min(560px, 100%);
    max-height: min(720px, calc(100svh - 36px));
    overflow: auto;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    background:
        radial-gradient(circle at 90% 0%, rgba(211, 84, 0, 0.18), transparent 38%),
        #090909;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.58);
    color: #fff;
}

.cookie-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.cookie-modal-panel h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.cookie-modal-panel p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.55;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
    cursor: pointer;
}

.consent-modal-open {
    overflow: hidden;
}

.cookie-toggle input {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
}

.cookie-toggle strong,
.cookie-toggle small {
    display: block;
}

.cookie-toggle small {
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.58);
}

.legal-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 8%, rgba(211, 84, 0, 0.16), transparent 34%),
        linear-gradient(135deg, #11100f 0%, #050505 58%, #090806 100%);
    color: rgba(255, 255, 255, 0.84);
}

.legal-main {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(36px, 7vw, 80px) 0;
}

.legal-back {
    display: inline-flex;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}

.legal-back:hover {
    color: var(--primary);
}

.legal-document {
    padding: clamp(26px, 6vw, 64px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(7, 7, 7, 0.72);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

.legal-kicker {
    display: inline-block;
    margin-bottom: 0.8rem;
    color: var(--primary);
    font: 700 0.72rem/1 var(--font-body);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.legal-document h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2.7rem, 8vw, 5.6rem);
    line-height: 0.95;
}

.legal-updated,
.legal-meta {
    color: rgba(255, 255, 255, 0.58);
}

.legal-section {
    margin-top: clamp(28px, 5vw, 42px);
}

.legal-section h2 {
    margin-bottom: 0.85rem;
    font-size: clamp(1.55rem, 4vw, 2.4rem);
}

.legal-section p,
.legal-section li {
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.7;
}

.legal-list {
    padding-left: 1.2rem;
}

.legal-data {
    display: grid;
    gap: 0.6rem;
    margin: 1rem 0 0;
    padding: 18px;
    border-left: 2px solid var(--primary);
    background: rgba(255, 255, 255, 0.045);
}

.legal-data p {
    margin: 0;
}

@media (max-width: 720px) {
    .cookie-banner {
        right: max(12px, env(safe-area-inset-right));
        left: max(12px, env(safe-area-inset-left));
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
        max-height: calc(100svh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow: auto;
        gap: 14px;
        padding: 16px;
        border-radius: 16px;
    }

    .cookie-banner-copy p {
        max-width: none;
        font-size: 0.86rem;
    }

    .cookie-banner-actions {
        grid-template-columns: 1fr 1fr;
    }

    .cookie-banner-actions [data-consent-accept] {
        grid-column: 1 / -1;
    }

    .cookie-modal-actions {
        grid-template-columns: 1fr;
    }

    .cookie-banner-actions .btn,
    .cookie-modal-actions .btn {
        min-height: 46px;
        padding-inline: 0.75rem;
        font-size: 0.72rem;
        white-space: normal;
    }

    .cookie-modal {
        align-items: end;
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }

    .cookie-modal-panel {
        width: 100%;
        max-height: calc(100svh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        border-radius: 16px;
    }

    .legal-document {
        border-radius: 12px;
    }
}

@media (max-width: 380px) {
    .cookie-banner-actions {
        grid-template-columns: 1fr;
    }

    .cookie-banner-actions [data-consent-accept] {
        grid-column: auto;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* Show opening bar instantly without slide */
    .opening-bar {
        transform: translateY(0);
    }
}

/* ==========================================================================
   SANTUARIO DEL MONCAYO - PREMIUM VISUAL & DYNAMIC EXTENSIONS (Phase: respira)
   ========================================================================== */

/* 1. GLASSMORPHIC WEATHER INSTRUMENT */
.weather-widget {
    background: rgba(10, 8, 5, 0.42) !important;
    border: 1px solid var(--border-soft) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.05),
        0 0 30px var(--theme-glow-color) !important;
    border-radius: 12px !important; /* Elegant architectural corners */
    padding: 14px 28px !important;
    gap: 18px !important;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.19, 1, 0.22, 1) !important;
}

.weather-widget:hover {
    border-color: var(--primary) !important;
    box-shadow: 
        0 16px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        0 0 45px var(--primary-hover) !important;
    transform: translateY(-3px) scale(1.01) !important;
}

.weather-live-dot {
    background: var(--primary) !important;
    width: 7px !important;
    height: 7px !important;
    box-shadow: 0 0 10px var(--primary) !important;
}

/* Responsive Theme Glowing shadows inside Widget */
body.theme-snow .weather-live-dot { background: #b4d2ff !important; box-shadow: 0 0 12px #b4d2ff !important; }
body.theme-rain .weather-live-dot { background: #3498db !important; box-shadow: 0 0 12px #3498db !important; }
body.theme-night .weather-live-dot { background: #6478c8 !important; box-shadow: 0 0 12px #6478c8 !important; }

.weather-widget {
    display: inline-flex !important;
    width: auto !important;
    max-width: min(560px, calc(100vw - 32px)) !important;
    min-height: 54px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    padding: 10px 22px !important;
    border-radius: 999px !important;
    background: rgba(10, 8, 5, 0.44) !important;
}

.weather-widget .weather-info {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    white-space: nowrap;
}

.weather-widget .weather-icon {
    flex: 0 0 auto;
    font-size: 1.12rem !important;
    line-height: 1 !important;
}

.weather-widget .weather-temp {
    font-size: 1.36rem !important;
    line-height: 1 !important;
}

.weather-widget .weather-desc,
.weather-widget .weather-label {
    white-space: nowrap;
}

@media (max-width: 680px) {
    .weather-widget {
        max-width: calc(100vw - 28px) !important;
        min-height: 48px !important;
        gap: 9px !important;
        padding: 9px 14px !important;
    }

    .weather-widget .weather-label {
        display: none !important;
    }

    .weather-widget .weather-temp {
        font-size: 1.22rem !important;
    }

    .weather-widget .weather-desc {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        font-size: 0.62rem;
        letter-spacing: 0.045em;
    }
}

/* 2. VECTOR ANIMATED WEATHER ICONS (SVG) */
.weather-svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    color: var(--primary);
    filter: drop-shadow(0 2px 8px var(--theme-glow-color));
    transition: color 1.5s ease, filter 1.5s ease;
}

body.theme-snow .weather-svg { color: #b4d2ff; }
body.theme-rain .weather-svg { color: #3498db; }
body.theme-night .weather-svg { color: #6478c8; }
body.theme-clear .weather-svg { color: #f1c40f; }

/* Sun Rays Spinning */
.svg-sun .sun-rays {
    transform-origin: center;
    animation: sunSpin 25s linear infinite;
}
@keyframes sunSpin {
    100% { transform: rotate(360deg); }
}

/* Rain falling */
.rain-drop {
    stroke-dasharray: 2, 4;
    animation: rainFall 1.0s linear infinite;
    stroke: currentColor;
}
.drop-1 { animation-delay: 0s; }
.drop-2 { animation-delay: 0.3s; }
.drop-3 { animation-delay: 0.6s; }
@keyframes rainFall {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -6; }
}

/* Snow drifting */
.snow-flake {
    animation: snowFloat 2.2s ease-in-out infinite;
    stroke: currentColor;
}
.flake-1 { animation-delay: 0s; }
.flake-2 { animation-delay: 0.7s; }
.flake-3 { animation-delay: 1.4s; }
@keyframes snowFloat {
    0% { transform: translateY(-2px) translateX(0) scale(0.7); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(4px) translateX(1px) scale(0.7); opacity: 0; }
}

/* 3. 3D CARD TILT SHINE OVERLAY */
.tilt-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    mix-blend-mode: overlay;
    opacity: 0.8;
}

/* 4. PREMIUM FOLLOW-MOUSE MENU PREVIEW (Desktop) */
.menu-hover-follower {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    will-change: transform, opacity;
}

.menu-hover-follower.active {
    pointer-events: none;
}

.follower-img-wrap {
    width: 210px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background: #0d0a08;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 24px 60px rgba(0, 0, 0, 0.66),
        0 0 30px var(--theme-glow-color);
    transform-origin: center;
    transition: border-color 0.8s ease;
    /* Soft organic crop */
    -webkit-clip-path: inset(0 round 12px);
    clip-path: inset(0 round 12px);
}

/* Aspect ratio adaptations */
.menu-hover-follower[data-type="food"] .follower-img-wrap {
    width: 320px;
    height: 200px; /* Landscape aspect ratio for foods */
}

.menu-hover-follower[data-type="wine"] .follower-img-wrap {
    width: 170px;
    height: 310px; /* Elegant vertical aspect ratio for wine bottles */
    background: linear-gradient(180deg, #100d0a 0%, #000 100%);
    border-color: var(--border-warm);
}

.follower-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(var(--img-saturation)) brightness(calc(var(--img-brightness) * 1.05));
    transform: scale(1.05);
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.menu-hover-follower.active .follower-img-wrap img {
    transform: scale(1);
}

/* 5. 3D MUSEUM ARTIFACT ROTATIONS (Scrollytelling stage) */
.museum-artifact {
    transform: perspective(1000px) translate3d(0, 35px, -150px) rotateX(18deg) rotateY(-8deg) scale(0.9) !important;
    filter: blur(8px) !important;
    opacity: 0 !important;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: 
        opacity 0.9s ease,
        transform 1.4s cubic-bezier(0.19, 1, 0.22, 1),
        filter 0.9s ease,
        border-color 0.9s ease !important;
}

#historia[data-active-step="1"] .museum-artifact--altitude,
#historia[data-active-step="2"] .museum-artifact--origin,
#historia[data-active-step="3"] .museum-artifact--archive,
#historia[data-active-step="4"] .museum-artifact--protectora,
#historia[data-active-step="5"] .museum-artifact--tradicion,
#historia[data-active-step="6"] .museum-artifact--destino {
    opacity: 0.92 !important;
    transform: perspective(1000px) translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) scale(1) !important;
    filter: blur(0) !important;
}

#historia[data-active-step="3"] .museum-artifact--archive {
    transform: perspective(1000px) translate3d(0, 0, 0) rotateX(0deg) rotateY(-2deg) scale(1) !important;
}

/* 6. MOBILE CATEGORY STRIP BUTTONS (Filter) */
.menu-categories-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 4px 20px 4px;
    margin-bottom: 2rem;
    scrollbar-width: none; /* Hide standard scrollbar */
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch; /* elastic native touch */
    border-bottom: 1px solid var(--border-soft);
    position: relative;
}

.menu-categories-strip::-webkit-scrollbar {
    display: none; /* Hide Chrome scrollbar */
}

.category-tab-btn {
    flex-shrink: 0;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 22px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

.category-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.category-tab-btn.active {
    color: #fff;
    background: rgba(211, 84, 0, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(211, 84, 0, 0.2);
}

/* Hero Depth variables and layered classes */
.hero-section.hero-scroll-static .hero-bg {
    position: relative;
    overflow: hidden;
    background: #050505;
}

.hero-section.hero-scroll-static .hero-bg-blur,
.hero-section.hero-scroll-static .hero-bg-sharp {
    position: absolute;
    inset: 0;
    background-image: url('../assets/img/optimized/hero-still-santuario-risco.jpg');
    background-repeat: no-repeat;
    transition: filter 1.5s ease, opacity 1.5s ease;
    will-change: transform, opacity, filter;
}

.hero-section.hero-scroll-static .hero-bg-blur {
    background-size: cover;
    background-position: center 48%;
    filter: blur(18px)
            saturate(calc(var(--img-saturation) * 1.04))
            brightness(calc(var(--img-brightness) * 0.82))
            hue-rotate(var(--img-hue-rotate));
    transform: scale(1.08);
    opacity: 0.72;
    z-index: 1;
}

.hero-section.hero-scroll-static .hero-bg-sharp {
    left: 50%;
    right: auto;
    width: min(68vw, 1040px);
    background-size: cover;
    background-position: 58% center;
    transform: translateX(-50%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
    filter: saturate(var(--img-saturation))
            brightness(var(--img-brightness))
            hue-rotate(var(--img-hue-rotate));
    opacity: 0.94;
    z-index: 2;
}

/* ☀️ WEATHER CONDITIONAL VISIBILITY: Full-screen crisp image under sunny/clear weather */
body.theme-clear .hero-section.hero-scroll-static .hero-bg-sharp,
body.theme-sunset .hero-section.hero-scroll-static .hero-bg-sharp,
body.theme-dawn .hero-section.hero-scroll-static .hero-bg-sharp {
    width: 100%;
    left: 0;
    transform: none;
    -webkit-mask-image: none;
    mask-image: none;
    opacity: 1;
}

body.theme-clear .hero-section.hero-scroll-static .hero-bg-blur,
body.theme-sunset .hero-section.hero-scroll-static .hero-bg-blur,
body.theme-dawn .hero-section.hero-scroll-static .hero-bg-blur {
    display: none !important;
}

@media (max-width: 768px) {
    .hero-section.hero-scroll-static .hero-bg-sharp {
        background-image: url('../assets/img/optimized/hero-still-santuario-risco-mobile.jpg');
        width: 100%;
        left: 0;
        transform: none;
        -webkit-mask-image: none;
        mask-image: none;
        opacity: 1;
        z-index: 2;
    }
    .hero-section.hero-scroll-static .hero-bg-blur {
        display: none;
    }
}

/* ============================================
   CINEMATIC MOUNTAIN FOG (Phase 4 Upgraded)
   ============================================ */
.hero-fog {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 62%; /* Low-lying mountain forest mist */
    z-index: 3; /* Above the sharp background silhouette, below overlay and text */
    pointer-events: none;
    overflow: hidden;
    mix-blend-mode: screen; /* Additive/lighter blend to look natural with sunset glow */
    opacity: 0;
    transition: opacity 2.5s cubic-bezier(0.25, 1, 0.5, 1) 0.5s;
    will-change: opacity;
}

/* Default active opacity */
.intro-hidden.revealed.hero-fog {
    opacity: 0.88;
}

/* ☀️ SOLEADO / DESPEJADO: Total transparency to let the landscape photograph shine completely */
body.theme-clear .intro-hidden.revealed.hero-fog,
body.theme-sunset .intro-hidden.revealed.hero-fog,
body.theme-dawn .intro-hidden.revealed.hero-fog {
    opacity: 0 !important;
}

/* ☁️ CUBIERTO / NUBLADO: Thick rolling fog layer */
body.theme-cloudy .intro-hidden.revealed.hero-fog {
    opacity: 0.92 !important;
}

/* 🌧️ LLUVIA: Darker slate-storm moody mist */
body.theme-rain .intro-hidden.revealed.hero-fog {
    opacity: 0.75 !important;
}

/* ❄️ NIEVE: Cold wintery frosty fog */
body.theme-snow .intro-hidden.revealed.hero-fog {
    opacity: 0.65 !important;
}

/* Individual layers */
.hero-fog-layer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 200%; /* Extra wide to allow seamless GPU-accelerated looping */
    height: 100%;
    background-repeat: repeat-x;
    background-position: left bottom;
    background-size: 50% 100%;
    will-change: transform;
}

/* Layer 1: Slow, deep background mist */
.hero-fog-1 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='300' viewBox='0 0 1000 300'%3E%3Cdefs%3E%3ClinearGradient id='g1' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='rgb(255,255,255)' stop-opacity='0.13'/%3E%3Cstop offset='50%25' stop-color='rgb(254,245,231)' stop-opacity='0.06'/%3E%3Cstop offset='100%25' stop-color='rgb(5,5,5)' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cfilter id='f1'%3E%3CfeGaussianBlur stdDeviation='35'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M0,150 Q250,70 500,150 T1000,150 L1000,300 L0,300 Z' fill='url(%23g1)' filter='url(%23f1)'/%3E%3C/svg%3E");
    opacity: 0.82;
    animation: drift-right calc(110s / var(--wind-speed-factor, 1)) linear infinite;
}

/* Layer 2: Medium speed, crawling mist */
.hero-fog-2 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='300' viewBox='0 0 1000 300'%3E%3Cdefs%3E%3ClinearGradient id='g2' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='rgb(255,255,255)' stop-opacity='0.16'/%3E%3Cstop offset='40%25' stop-color='rgb(245,245,245)' stop-opacity='0.08'/%3E%3Cstop offset='100%25' stop-color='rgb(5,5,5)' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cfilter id='f2'%3E%3CfeGaussianBlur stdDeviation='40'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M0,180 Q200,90 500,180 T1000,180 L1000,300 L0,300 Z' fill='url(%23g2)' filter='url(%23f2)'/%3E%3C/svg%3E");
    opacity: 0.68;
    animation: drift-left calc(80s / var(--wind-speed-factor, 1)) linear infinite;
    height: 92%;
}

/* Layer 3: Closer, faster, lower forest fog */
.hero-fog-3 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='300' viewBox='0 0 1000 300'%3E%3Cdefs%3E%3ClinearGradient id='g3' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='rgb(255,255,255)' stop-opacity='0.11'/%3E%3Cstop offset='60%25' stop-color='rgb(254,237,222)' stop-opacity='0.05'/%3E%3Cstop offset='100%25' stop-color='rgb(5,5,5)' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cfilter id='f3'%3E%3CfeGaussianBlur stdDeviation='24'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M0,210 Q300,130 600,210 T1000,210 L1000,300 L0,300 Z' fill='url(%23g3)' filter='url(%23f3)'/%3E%3C/svg%3E");
    opacity: 0.72;
    animation: drift-right calc(52s / var(--wind-speed-factor, 1)) linear infinite;
    height: 82%;
}

/* GPU-accelerated seamless looping animations */
@keyframes drift-right {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes drift-left {
    0% {
        transform: translate3d(-50%, 0, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

/* Perfect Adaptation to Mobile Devices (Focus on raw performance & functionality) */
@media (max-width: 768px) {
    .hero-fog {
        display: none !important; /* Completely disabled on mobile to maximize battery and loading speed */
    }
>>>>>>> 5895e76 (feat: mobile responsiveness, performance and accessibility premium optimizations)
}
