/*
Theme Name: Mirage Beach Club
Description: Luxury Editorial Theme for Mirage Sanctuary
Version: 1.0
*/

/* =========================================
   1. GLOBAL VARIABLES & RESET
========================================= */
:root {
    --lux-bg: #fdfdfc;
    --lux-ivory: #fdfdfc;
    --lux-black: #121212;
    --lux-text: #1a1a1a;
    --lux-gold: #b19470;
    --lux-sand: #f7f7f5;
    --lux-bronze: #5a4634;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--lux-bg);
    color: var(--lux-text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.4s var(--ease);
}

.container { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 40px; 
}

/* =========================================
   2. HEADER & MOBILE MENU
========================================= */
.site-header {
    position: fixed; 
    top: 0; left: 0; width: 100%;
    z-index: 1000; 
    padding: 40px 0;
    transition: transform 0.8s var(--ease), background 0.8s var(--ease), padding 0.8s var(--ease);
    color: #fff; /* Bianco di base per le immagini hero */
}

.site-header.scrolled {
    padding: 20px 0;
    background: rgba(253, 253, 252, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.03);
    color: var(--lux-text);
}

.header-inner {
    display: flex; justify-content: space-between; align-items: center;
}

.site-branding .logo-text {
    font-family: var(--font-serif);
    font-size: 1.8rem; letter-spacing: 4px;
    text-transform: uppercase; font-weight: 300;
}

.main-navigation ul {
    display: flex; gap: 50px; list-style: none;
}

.main-navigation a {
    text-transform: uppercase; font-size: 0.7rem;
    letter-spacing: 3px; font-weight: 300;
    opacity: 0.8;
}
.main-navigation a:hover { opacity: 1; color: var(--lux-gold); }

/* Menu Toggle & Overlay Mobile */
.menu-toggle { 
    display: none; cursor: pointer; font-size: 0.7rem; 
    letter-spacing: 2px; text-transform: uppercase; z-index: 1100; position: relative;
}

.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--lux-black); color: var(--lux-ivory);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; z-index: 1050;
    transition: all 0.6s var(--ease);
}
.mobile-menu-overlay.is-open { opacity: 1; visibility: visible; }

.mobile-nav { text-align: center; display: flex; flex-direction: column; gap: 30px; }
.mobile-nav a {
    font-family: var(--font-serif); font-size: 3rem;
    font-weight: 300; text-transform: lowercase; font-style: italic;
    opacity: 0; transform: translateY(20px); transition: all 0.6s var(--ease);
}
.mobile-menu-overlay.is-open .mobile-nav a { opacity: 1; transform: translateY(0); }
.mobile-nav a:hover { color: var(--lux-gold); }

/* =========================================
   3. FRONT PAGE: PARALLAX NARRATIVE
========================================= */
/* Hero Cinematic */
.hero-parallax {
    height: 100vh; position: relative;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; background-color: #000;
}
.hero-parallax img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.8;
    transform: scale(1.1); transition: transform 12s var(--ease);
}
.hero-parallax.active img { transform: scale(1); }

.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; }
.hero-content h1 {
    font-family: var(--font-serif); font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 300; line-height: 0.8; margin: 0; letter-spacing: -2px;
}
.hero-content span {
    display: block; font-family: var(--font-sans); text-transform: uppercase; 
    letter-spacing: 12px; font-size: 0.7rem; margin-top: 40px; opacity: 0.6;
}

/* The Perspective */
.section-perspective { padding: 200px 0; position: relative; }
.perspective-grid { display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; }
.perspective-image {
    grid-column: 1 / 9; position: relative; aspect-ratio: 16/9; 
    overflow: hidden; z-index: 1;
}
.perspective-image img { width: 100%; height: 100%; object-fit: cover; }

.perspective-text {
    grid-column: 7 / 12; background: var(--lux-ivory);
    padding: 80px; z-index: 2; margin-top: -100px; 
    box-shadow: 40px 40px 80px rgba(0,0,0,0.03);
}
.perspective-text h2 {
    font-family: var(--font-serif); font-size: 3.5rem;
    line-height: 1; margin-bottom: 30px; font-weight: 300;
}
.perspective-text p {
    font-family: var(--font-sans); font-size: 1rem;
    line-height: 1.8; color: #666; font-weight: 300;
}

/* The Archive (Parallax Grid) */
.section-archive { padding: 100px 0 200px; background-color: var(--lux-sand); }
.archive-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 30px; position: relative; }

.archive-item { position: relative; overflow: hidden; }
.item-v { grid-column: 2 / 6; aspect-ratio: 3/4; transform: translateY(50px); }
.item-h { grid-column: 7 / 13; aspect-ratio: 16/10; margin-top: 150px; }
.item-d { grid-column: 5 / 9; aspect-ratio: 1/1; margin-top: -100px; z-index: 3; border: 15px solid var(--lux-sand); }
.archive-item img { width: 100%; height: 100%; object-fit: cover; }

.archive-caption {
    position: absolute; bottom: 40px; left: 40px; color: #fff; z-index: 4;
    font-family: var(--font-serif); font-size: 1.8rem; opacity: 0;
}
.archive-item:hover .archive-caption { opacity: 1; }

/* The Horizon */
.section-horizon {
    height: 80vh; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.horizon-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 120%;
    background: url('https://images.unsplash.com/photo-1519046904884-53103b34b206?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    z-index: 1;
}
.horizon-content { position: relative; z-index: 2; text-align: center; color: #fff; max-width: 800px; }
.horizon-content h2 { font-family: var(--font-serif); font-size: 4rem; font-weight: 300; margin-bottom: 40px; }

.cta-button {
    display: inline-block; padding: 20px 50px; border: 1px solid #fff; color: #fff;
    text-transform: uppercase; letter-spacing: 4px; font-size: 0.7rem;
}
.cta-button:hover { background: #fff; color: var(--lux-black); }

/* =========================================
   4. FOOTER
========================================= */
.site-footer {
    padding: 100px 0 40px; background-color: var(--lux-bg);
    border-top: 1px solid rgba(0,0,0,0.03); text-align: center; color: var(--lux-text);
}
.footer-quote {
    font-family: var(--font-serif); font-size: 1.5rem; 
    font-style: italic; margin-bottom: 60px; opacity: 0.6;
}
.footer-nav { display: flex; justify-content: center; gap: 40px; margin-bottom: 60px; }
.footer-nav a { text-transform: uppercase; font-size: 0.65rem; letter-spacing: 2px; }
.footer-nav a:hover { color: var(--lux-gold); }
.footer-bottom { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.4; }

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(60px); transition: all 1.2s var(--ease); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Responsive Settings */
@media (max-width: 992px) {
    .desktop-only { display: none; }
    .menu-toggle { display: block; }
    .perspective-grid, .archive-grid { display: flex; flex-direction: column; }
    .perspective-text { grid-column: auto; margin-top: -50px; padding: 40px 20px; }
    .item-v, .item-h, .item-d { width: 100%; margin: 0; aspect-ratio: 4/5; transform: none !important; }
    .section-perspective, .section-archive { padding: 100px 0; }
    .hero-content h1 { font-size: 5rem; }
}

.site-branding .logo-link {
    display: block;
    line-height: 0;
}

.logo-img {
    height: auto;
    width: 180px; /* Regola la larghezza in base alle proporzioni del tuo logo */
    transition: width 0.8s var(--ease);
}

/* Effetto quando l'utente scrolla: il logo può rimpicciolirsi leggermente */
.site-header.scrolled .logo-img {
    width: 150px;
}

@media (max-width: 992px) {
    .logo-img {
        width: 140px; /* Logo leggermente più piccolo su mobile */
    }
}

/* Stile esclusivo per l'immagine di sfondo */
.hero-parallax .hero-bg-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.8;
    transform: scale(1.1); transition: transform 12s var(--ease);
    z-index: 1;
}
.hero-parallax.active .hero-bg-img { transform: scale(1); }

/* Stile esclusivo per il logo centrato */
.hero-logo {
    position: relative;
    z-index: 10;
    width: auto;
    max-width: 400px; /* Modifica questo valore per farlo più grande o più piccolo */
    height: auto;
    margin: 0 auto 20px auto;
    display: block;
    object-fit: contain;
    transform: none !important; /* Impedisce che il logo subisca lo zoom dello sfondo */
}


/* Forza la dimensione anche allo scroll */
.site-header.scrolled .main-navigation a {
    font-size: 1rem; /* Puoi decidere di rimpicciolirlo leggermente allo scroll */
    font-weight: 700; 
}

/* =========================================
       FIX VISIBILITÀ MENU MOBILE (LA "X")
    ========================================= */
    /* 1. L'header deve stare sopra l'overlay panna */
    .site-header { z-index: 1200 !important; }
    .mobile-menu-overlay { z-index: 1100 !important; }

    /* 2. Quando apri il menu, togliamo lo sfondo all'header */
    .site-header.menu-is-open {
        background: transparent !important;
        backdrop-filter: none !important;
        border-bottom: none !important;
    }

    /* 3. La "X" diventa scura per leggersi sul panna */
    .site-header.menu-is-open .menu-toggle span {
        background-color: #2C2A28 !important; 
    }

    /* 4. Opzionale ma elegante: anche il logo diventa scuro sul panna */
    .site-header.menu-is-open .logo-img {
        filter: brightness(0) !important;
    }