:root {
    --ivory:   #FAF9F6;
    --charcoal:#1A1A1A;
    --brass:   #8C7355;
    --ease:    cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* ── Scrollbar hidden everywhere ── */
html, body { -ms-overflow-style: none; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
html { scroll-behavior: smooth; }

body {
    background: var(--ivory);
    color: var(--charcoal);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Sticky wrapper ── */
#scroll-wrapper { position: relative; }

#sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden; /* needed for h-scroll clipping */
    isolation: isolate;
}

/* ── Horizontal track ── */
#h-track {
    display: flex;
    height: 100%;
    will-change: transform;
}

/* ── Individual slides ── */
.slide {
    flex-shrink: 0;
    width:  100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
}

/* Amenities slide must NOT clip expanded cards */
#slide-2 {
    overflow: visible !important;
}

/* ── Split panel helpers ── */
.split-image {
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.split-text {
    width: 50%;
    height: 100%;
    background: var(--ivory);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 4rem;
}

@media (min-width: 1280px) { .split-text { padding: 0 6rem; } }

/* ── Bg image fill ── */
.bg-fill {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity:0; transform:translateY(30px); }
    to   { opacity:1; transform:translateY(0);    }
}

.slide-in { animation: fadeInUp 1.1s var(--ease) forwards; }
.slide-in-delay { animation: fadeInUp 1.1s var(--ease) 0.25s forwards; opacity:0; }

/* ── Hero heading ── */
.hero-heading {
    text-shadow: 0 8px 32px rgba(0,0,0,0.5);
    line-height: 0.9;
}
.brass-shadow { text-shadow: 2px 2px 0 var(--brass); }

/* ── Nav link underline ── */
.nav-link { position: relative; }
.nav-link::after {
    content:''; position:absolute; bottom:-4px; left:0;
    width:0; height:1px; background:var(--brass);
    transition: width 0.35s var(--ease);
}
.nav-link:hover::after { width:100%; }

/* ── Sticky CTA ── */
.sticky-cta {
    background: var(--brass); color: var(--ivory);
    transition: all 0.3s var(--ease);
}
.sticky-cta:hover { background: var(--charcoal); transform: translateY(-2px); }

/* ── Mobile: collapse to vertical ── */
@media (max-width: 767px) {
    #scroll-wrapper { height: auto !important; }
    #sticky-container { position: relative; height: auto; overflow: visible; }
    #h-track { flex-direction: column; width: 100%; transform: none !important; }
    .slide { width: 100%; height: auto; min-height: 100vh; flex-direction: column; }
    #slide-0 { height: 100vh !important; }
    #slide-2 { height: 100vh !important; overflow: hidden !important; }
    .split-image { width: 100%; height: 55vw; min-height: 260px; }
    .split-text   { width: 100%; padding: 3.5rem 2rem; }
}


/* ══════════════════════════════════════════════
   FLOATING MODAL CONTACT & IVORY MAP
   ══════════════════════════════════════════════ */

#slide-4 {
    height: 100vh !important;
    overflow: hidden !important;
    background: #0A0A0A;
}

#contact-inner {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
}

/* ── Left Column: Static Info ── */
#contact-left {
    background: #0D0D0D;
    position: relative;
    z-index: 20;
}

/* Detail styling preserved */
.detail-label {
    display: block;
    color: #8C7355;
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}
.detail-value {
    font-family: 'Bodoni Moda', serif;
    color: #FAF9F6;
    display: block;
}

/* ── Right Column: Modal Stage ── */
#contact-right {
    background: #0A0A0A;
    perspective: 2000px;
    position: relative;
}

/* ── Map & Contact Layout ── */
#map-panel {
    position: relative;
    width: 100%;
    height: 45vh;
    background: #000000 !important;
    opacity: 1;
    visibility: visible;
}

#leaflet-map {
    width: 100% !important;
    height: 100% !important;
    background: #000000 !important;
}

#contact-card {
    position: relative;
    width: 100%;
    min-height: 55vh;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-top: 1px solid rgba(140, 115, 85, 0.1);
}

@media (min-width: 768px) {
    #map-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    #contact-card {
        position: absolute;
        top: 0;
        right: 0;
        width: 40%;
        height: 100%;
        min-height: 0;
        border-top: none;
        border-left: 1px solid rgba(140, 115, 85, 0.1);
        padding: 3rem;
    }
}

/* 
   Forced 'Midnight' Transformation:
   Targeting high-contrast Ivory roads on Black background.
*/
.leaflet-layer,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-attribution {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

/* Ensure Marker is visible */
.leaflet-marker-pane {
    filter: none !important;
}

/* Custom Leaflet Popup Styling */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: #1A1A1A !important;
    color: #FAF9F6 !important;
    border: 1px solid #8C7355;
    border-radius: 8px;
}
.leaflet-popup-close-button {
    color: #FAF9F6 !important;
}

/* ══════════════════════════════════════════════
   AMENITIES — KINETIC EXPANSION SYSTEM
   ══════════════════════════════════════════════ */

/* Grid: flex row, NO overflow clip */
.amenities-grid {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    width: 100%;
    align-items: stretch;
    overflow: visible !important;
}

/* Base card: takes equal share, stays in place */
.amenity-card {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    z-index: 10;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Inner face of the card */
.amenity-card .card-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    height: 100%;
    min-height: 220px;
    overflow: hidden; /* clip inner content cleanly */
    border-color: rgba(250, 249, 246, 0.06);
    transition:
        border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        background   0.6s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow   0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Expand-left cards: row reversed handled in HTML, keep inner LTR order consistent */
.amenity-card.expand-left .card-inner {
    flex-direction: row-reverse;
}

/* ── HOVERED CARD ── */
.amenity-card:hover {
    flex: 0 0 42%;       /* grow to roughly 42% of grid width */
    z-index: 9999 !important;
    position: relative;
}

.amenity-card:hover .card-inner {
    border-color: rgba(140, 115, 85, 0.7);
    background: rgba(20, 20, 20, 0.98) !important;
    box-shadow:
        0 0 30px  rgba(140, 115, 85, 0.3),    /* copper glow */
        0 40px 80px -20px rgba(0, 0, 0, 0.9); /* depth shadow */
}

/* Main Content: icon + title — fixed width, never shrinks */
.main-content {
    flex: 0 0 150px;
    min-width: 150px;
    transition: flex 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 0.5rem;
}

/* Expanded info panel: hidden by default, slides out */
.expanded-info {
    flex: 0 0 0;       /* collapsed */
    overflow: hidden;
    opacity: 0;
    transition:
        flex    0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.05s,
        opacity 0.4s ease 0.2s;
}

.amenity-card:hover .expanded-info {
    flex: 1 1 auto;    /* expand to fill remaining space */
    opacity: 1;
}

/* Text inside expanded panel: nowrap prevents weird wrapping mid-animation */
.expanded-info p {
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(250, 249, 246, 0.92); /* Linen/Ivory */
    pointer-events: none;
    display: inline-block;  /* needed for nowrap to work correctly */
}

/* ══════════════════════════════════════════════
   KINETIC BACKGROUND BLUR
   Applied via JS: body.amenity-focused
   ══════════════════════════════════════════════ */

/* Full-screen blur overlay — sits over everything */
#kinetic-blur-layer {
    position: fixed;
    inset: 0;
    z-index: 500;       /* below nav (z:200 is nav, but nav is 300 in style) */
    pointer-events: none;
    backdrop-filter: blur(0px) brightness(1);
    -webkit-backdrop-filter: blur(0px) brightness(1);
    background: transparent;
    transition:
        backdrop-filter 0.5s ease-in-out,
        -webkit-backdrop-filter 0.5s ease-in-out,
        background 0.5s ease-in-out;
    will-change: backdrop-filter;
}

body.amenity-focused #kinetic-blur-layer {
    backdrop-filter: blur(12px) brightness(0.7);
    -webkit-backdrop-filter: blur(12px) brightness(0.7);
    background: rgba(0, 0, 0, 0.15);
}

/* Amenities section itself: punched ABOVE the blur layer, perfectly sharp */
#slide-2 {
    position: relative;
    z-index: 600 !important; /* above the blur overlay */
}

/* Nav stays on top of everything */
nav.fixed {
    z-index: 900 !important;
}

/* Remove the old intra-slide blur that didn't work */
body.is-blurry #amenities-blur-overlay,
body.is-blurry #slide-0,
body.is-blurry #slide-1,
body.is-blurry #slide-3,
body.is-blurry #slide-4 { /* legacy rules — now handled by #kinetic-blur-layer */ }

/* Mobile: stack vertically, no expansion needed */
@media (max-width: 768px) {
    .amenities-grid {
        flex-direction: column;
    }
    .amenity-card {
        flex: 0 0 auto;
        width: 100%;
    }
    .amenity-card:hover {
        flex: 0 0 auto;
        z-index: 10 !important;
    }
    .amenity-card:hover .expanded-info {
        flex: 0 0 auto;
    }
    .expanded-info p {
        white-space: normal;
        width: 100%;
    }
}

/* ── Preserved Marker Styles (Copper/Brass) ── */
@keyframes orange-ping {
    0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.8; }
    70%  { transform: translate(-50%, -50%) scale(4.5); opacity: 0;   }
    100% { transform: translate(-50%, -50%) scale(1);   opacity: 0;   }
}
.pin-pulse-ring {
    position: absolute; top: 50%; left: 50%;
    width: 20px; height: 20px; border-radius: 50%; background: #8C7355;
    animation: orange-ping 3s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.pin-dot {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 12px; height: 12px; border-radius: 50%; background: #8C7355;
    border: 2px solid #FAF9F6; box-shadow: 0 0 15px rgba(140, 115, 85, 0.6); z-index: 2;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    #contact-inner {
        flex-direction: column;
        overflow-y: auto;
    }
    #slide-4 {
        height: auto !important;
        overflow: visible !important;
    }
    #contact-left, #contact-right {
        width: 100% !important;
        height: auto;
        min-height: 50vh;
    }
    #contact-left {
        padding-top: 5rem;
        padding-bottom: 3rem;
        border-right: none;
        border-bottom: 1px solid rgba(140, 115, 85, 0.1);
    }
    #contact-right {
        height: 60vh;
    }
}
