/* Home page only — clean relaunch, scoped to .home-page */

.home-page .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.home-page .site-nav {
    max-width: 1440px;
    padding-top: 22px;
    padding-bottom: 22px;
}

.home-page .site-logo {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #faf8f5;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.home-page .site-menu a {
    color: rgba(250, 248, 245, 0.92);
    background: transparent;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Enlaces planos (no HOME / Villas / Book) */
.home-page .site-header:not(.site-header--scrolled) .site-menu > a:not([href="index.html"]):not([href="villas.html"]):not(.nav-book):hover,
.home-page .site-header:not(.site-header--scrolled) .site-menu > a:not([href="index.html"]):not([href="villas.html"]):not(.nav-book)[aria-current="page"] {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* HOME — pastilla oscura (misma referencia que páginas internas) */
.home-page .site-header:not(.site-header--scrolled) .site-menu > a[href="index.html"] {
    background: rgba(255, 255, 255, 0.11) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25) !important;
}

.home-page .site-header:not(.site-header--scrolled) .site-menu > a[href="index.html"]:hover,
.home-page .site-header:not(.site-header--scrolled) .site-menu > a[href="index.html"][aria-current="page"] {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

/* Sobre el vídeo: Villas = pastilla clara, Book = pastilla oscura (misma lógica que el resto del sitio) */
.home-page .site-header:not(.site-header--scrolled) .site-menu > a[href="villas.html"] {
    background: rgba(255, 252, 248, 0.96) !important;
    color: #1a1512 !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2) !important;
}

.home-page .site-header:not(.site-header--scrolled) .site-menu > a[href="villas.html"]:hover,
.home-page .site-header:not(.site-header--scrolled) .site-menu > a[href="villas.html"][aria-current="page"] {
    background: #fff !important;
    color: #1a1512 !important;
}

.home-page .site-menu .nav-book {
    background: #1a1512 !important;
    color: #faf8f5 !important;
    border: 1px solid rgba(26, 21, 18, 0.95) !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28) !important;
}

.home-page .site-menu .nav-book:hover {
    background: #2a221d !important;
    color: #faf8f5 !important;
}

/* Al hacer scroll: misma barra oscura que el resto del sitio (referencia global) */
.home-page .site-header.site-header--scrolled {
    background: linear-gradient(180deg, #0c0a09 0%, #141110 48%, #0d0b0a 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.home-page .site-header.site-header--scrolled .site-logo {
    color: #faf8f5;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.home-page .site-header.site-header--scrolled .site-menu a {
    color: rgba(250, 248, 245, 0.94);
}

.home-page .site-header.site-header--scrolled .site-menu > a:not([href="index.html"]):not([href="villas.html"]):not(.nav-book):hover,
.home-page .site-header.site-header--scrolled .site-menu > a:not([href="index.html"]):not([href="villas.html"]):not(.nav-book)[aria-current="page"] {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.home-page .site-header.site-header--scrolled .site-menu > a[href="index.html"] {
    background: rgba(255, 255, 255, 0.11) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25) !important;
}

.home-page .site-header.site-header--scrolled .site-menu > a[href="index.html"]:hover,
.home-page .site-header.site-header--scrolled .site-menu > a[href="index.html"][aria-current="page"] {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

.home-page .site-header.site-header--scrolled .site-menu > a[href="villas.html"] {
    background: #fffef9 !important;
    color: #1a1512 !important;
    border: 1px solid rgba(255, 255, 255, 0.42) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22) !important;
}

.home-page .site-header.site-header--scrolled .site-menu > a[href="villas.html"]:hover,
.home-page .site-header.site-header--scrolled .site-menu > a[href="villas.html"][aria-current="page"] {
    background: #ffffff !important;
    color: #1a1512 !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
}

.home-page .site-header.site-header--scrolled .site-menu .nav-book {
    background: #1a1512 !important;
    color: #faf8f5 !important;
    border: 1px solid rgba(0, 0, 0, 0.45) !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35) !important;
}

.home-page .site-header.site-header--scrolled .site-menu .nav-book:hover {
    background: #2a221d !important;
    color: #faf8f5 !important;
}

/* Cinematic hero — padding-top reserva hueco del header fijo para que el título no quede bajo el menú */
.home-hero {
    position: relative;
    min-height: min(92vh, 900px);
    display: flex;
    align-items: flex-end;
    padding: max(96px, calc(env(safe-area-inset-top, 0px) + 88px)) 0 0;
    margin: 0;
    overflow: hidden;
    background: #0d0b0a;
    box-sizing: border-box;
}

.home-hero__media {
    position: absolute;
    inset: 0;
}

/* YouTube hero background (official embed; mute + playlist id required for loop) */
.home-hero__youtube {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background: #000;
    z-index: 0;
}

/* Contenedor del reproductor (API YouTube); el iframe lo inyecta YT.Player */
#homeHeroYoutubePlayer.home-hero__youtube-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-width: 177.78vh;
    min-height: 100vh;
    transform: translate(-50%, -50%) scale(1.08);
    overflow: hidden;
}

#homeHeroYoutubePlayer.home-hero__youtube-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Masks zones where YouTube still injects title / watermark / “more videos” hints */
.home-hero__youtube-ui-mask {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.97) 0%, rgba(0, 0, 0, 0.55) 7%, transparent 16%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.4) 9%, transparent 18%),
        radial-gradient(ellipse 120% 90% at 100% 100%, rgba(0, 0, 0, 0.65) 0%, transparent 52%);
}

/* Scope 2.39:1 “cinema” frame without cropping the canvas */
.home-hero__letterbox {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.home-hero__letterbox-bar {
    position: absolute;
    left: 0;
    right: 0;
    height: clamp(28px, 5.5vmin, 64px);
    background: linear-gradient(180deg, #030201 0%, #0a0807 55%, transparent 100%);
}

.home-hero__letterbox-bar--top {
    top: 0;
}

.home-hero__letterbox-bar--bottom {
    bottom: 0;
    background: linear-gradient(0deg, #030201 0%, #0a0807 55%, transparent 100%);
}

.home-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        180deg,
        rgba(8, 6, 5, 0.42) 0%,
        rgba(12, 10, 9, 0.12) 42%,
        rgba(5, 4, 3, 0.62) 100%
    );
    pointer-events: none;
}

.home-hero__scrim::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 85% 65% at 50% 38%,
        transparent 0%,
        rgba(0, 0, 0, 0.18) 62%,
        rgba(0, 0, 0, 0.5) 100%
    );
    pointer-events: none;
}

.home-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(32px, 5vh, 72px) 24px clamp(48px, 8vh, 88px);
}

.home-hero__kicker {
    margin: 0 0 16px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(250, 248, 245, 0.75);
}

.home-hero__title {
    margin: 0 0 20px;
    max-width: 12ch;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2.75rem, 7vw, 4.75rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: #faf8f5;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
}

.home-hero__lead {
    margin: 0 0 32px;
    max-width: 42ch;
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(250, 248, 245, 0.88);
}

.home-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.home-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    background: #faf8f5;
    color: #1a1512;
    border: 1px solid rgba(250, 248, 245, 0.9);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, transform 0.2s ease;
}

.home-btn-primary:hover {
    background: #fff;
    transform: translateY(-1px);
}

.home-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    background: transparent;
    color: #faf8f5;
    border: 1px solid rgba(250, 248, 245, 0.45);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.home-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(250, 248, 245, 0.65);
}

.home-btn-ghost--on-light {
    color: #1a1512;
    border-color: rgba(26, 21, 18, 0.28);
}

.home-btn-ghost--on-light:hover {
    background: rgba(26, 21, 18, 0.06);
    border-color: rgba(26, 21, 18, 0.45);
    color: #1a1512;
}

/* Editorial band */
.home-band {
    padding: 96px 0;
    background: #f7f4f0;
    border-top: 1px solid rgba(40, 32, 28, 0.06);
}

.home-band__inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 0 24px;
}

.home-band__title {
    margin: 0 0 20px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.85rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #1a1512;
}

.home-band__text {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #5c534d;
}

/* Featured — tighter grid */
.home-featured {
    padding: 88px 0 100px;
    background: #fff;
}

.home-featured .intro {
    text-align: center;
    margin-bottom: 48px;
}

.home-featured .section-heading {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 600;
}

.home-featured .listing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.home-featured .villa-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(26, 21, 18, 0.06);
}

.home-featured .villa-card-media img {
    height: 300px;
}

.home-featured .villa-title {
    font-size: 1.25rem;
}

/* Destinations row */
.home-dest {
    padding: 88px 0;
    background: #f7f4f0;
}

.home-dest__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.home-dest__card {
    position: relative;
    min-height: 280px;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: #faf8f5;
    box-shadow: 0 16px 40px rgba(26, 21, 18, 0.1);
}

.home-dest__card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.home-dest__card:hover img {
    transform: scale(1.04);
}

.home-dest__card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(12, 10, 9, 0.75));
}

.home-dest__label {
    position: absolute;
    left: 22px;
    bottom: 22px;
    z-index: 1;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Closing CTA */
.home-close {
    padding: 80px 0 96px;
    background: #fff;
    text-align: center;
}

.home-close__title {
    margin: 0 0 12px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.85rem, 3vw, 2.4rem);
    font-weight: 600;
    color: #1a1512;
}

.home-close__text {
    margin: 0 0 28px;
    max-width: 48ch;
    margin-left: auto;
    margin-right: auto;
    color: #5c534d;
    line-height: 1.65;
}

.home-close__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .home-featured .listing-grid {
        grid-template-columns: 1fr;
    }

    .home-dest__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding-top: max(88px, calc(env(safe-area-inset-top, 0px) + 76px));
    }

    .home-hero__inner {
        padding-top: clamp(24px, 4vh, 48px);
    }

    .home-hero__title {
        max-width: 100%;
    }
}
