@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

:root {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-bright: #1A1A1A;
    --accent: #D4AF37;
    --accent-rgb: 212, 175, 55;
    --text: #F5F5F5;
    --text-muted: #A0A0A0;
    --font-display: 'Cormorant Garamond', serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    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-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* -------------------------------------------------------------------------- //
//                                CINEMATIC TEXTURE                            //
// -------------------------------------------------------------------------- */

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.08; /* Increased for texture */
}

.light-rays {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.ray {
    position: absolute;
    width: 200%;
    height: 100px;
    background: linear-gradient(90deg, transparent, rgba(214, 175, 55, 0.03), transparent);
    transform: rotate(-45deg);
    top: -50%;
    left: -50%;
    filter: blur(50px);
}

@keyframes rayFloat {
    0%, 100% { transform: translateX(-20%) rotate(-45deg); opacity: 0; }
    50% { transform: translateX(20%) rotate(-45deg); opacity: 0.8; }
}

/* -------------------------------------------------------------------------- */
/*                                   LOADER                                   */
/* -------------------------------------------------------------------------- */

#loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader-text {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    overflow: hidden;
}

.loader-text span {
    display: inline-block;
    transform: translateY(100%);
}

.loader-progress {
    position: absolute;
    bottom: 50px;
    left: 50px;
    right: 50px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
}

/* -------------------------------------------------------------------------- */
/*                                 NAVIGATION                                 */
/* -------------------------------------------------------------------------- */

#main-nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#main-nav.scrolled {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    height: 70px;
}

.nav-link {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.4s var(--ease);
    position: relative;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease);
}

.nav-link:hover::after {
    width: 100%;
}

/* -------------------------------------------------------------------------- */
/*                                HERO & CANVAS                               */
/* -------------------------------------------------------------------------- */

#hero-lightpass {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    object-fit: cover;
    filter: blur(8px) brightness(0.6) saturate(0.8); /* Mask low quality frames */
}

#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

#hero * {
    pointer-events: auto;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, transparent 0%, rgba(10, 10, 10, 0.9) 100%),
                linear-gradient(to bottom, transparent 0%, rgba(10, 10, 10, 0.8) 100%);
    z-index: 5;
    pointer-events: none;
}

.hero-content-glass {
    background: rgba(10, 10, 10, 0.2);
    backdrop-filter: blur(4px);
    padding: 60px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    margin-left: -40px; /* Offset to align text properly */
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    overflow: hidden; /* Prevent text bleed */
}

.hero-glow {
    text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.3);
}

.container-scroll {
    position: relative;
    height: 400vh;
}

.scroll-captions-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center; /* Ensure centered text */
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    padding: 0 20px;
}

.scroll-caption h2 {
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.1em;
}

/* -------------------------------------------------------------------------- */
/*                                 TYPOGRAPHY                                 */
/* -------------------------------------------------------------------------- */

h1 {
    font-size: 8.5vw;
    line-height: 0.95;
    font-weight: 300;
    letter-spacing: -0.02em;
    font-family: var(--font-display);
    margin-bottom: 3rem; /* Spacing from subtext */
    text-wrap: balance;
}

h2 {
    font-size: 5rem;
    line-height: 1.1;
    font-weight: 300;
    letter-spacing: -0.01em;
    font-family: var(--font-display);
    margin-bottom: 2.5rem; /* Consistent spacing */
    text-wrap: balance;
}

h3 {
    font-family: var(--font-display);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

h4 {
    font-family: var(--font-display);
    font-weight: 400;
    margin-bottom: 1rem;
}

.text-reveal {
    overflow: hidden;
    display: block;
}

.text-reveal span {
    display: block;
    transform: translateY(110%);
}

/* -------------------------------------------------------------------------- */
/*                                BENTO GRID                                  */
/* -------------------------------------------------------------------------- */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.bento-item {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    padding: 40px; /* Better internal spacing */
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.bento-item:hover {
    border-color: rgba(var(--accent-rgb), 0.3);
}

/* -------------------------------------------------------------------------- */
/*                                MAGNETIC BTN                                */
/* -------------------------------------------------------------------------- */

.magnetic-wrap {
    display: inline-block;
}

.magnetic-btn {
    position: relative;
    padding: 20px 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: color 0.4s var(--ease);
    overflow: hidden;
}

.magnetic-btn:hover {
    color: var(--bg);
}

.btn-fill {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s var(--ease-out-expo), height 0.6s var(--ease-out-expo);
    z-index: -1;
}

.magnetic-btn:hover .btn-fill {
    width: 300%;
    height: 300%;
}

/* -------------------------------------------------------------------------- */
/*                               IMAGE PARALLAX                               */
/* -------------------------------------------------------------------------- */

.parallax-wrap {
    overflow: hidden;
    position: relative;
    border-radius: 24px;
}

.parallax-img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    transform: translateY(-10%);
}

/* -------------------------------------------------------------------------- */
/*                              BEFORE / AFTER                                */
/* -------------------------------------------------------------------------- */

.comparison-container {
    border-radius: 32px;
    overflow: hidden;
}

#slider-handle {
    width: 4px;
    background: var(--accent);
    cursor: ew-resize;
}

#slider-handle::after {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* -------------------------------------------------------------------------- */
/*                                  UTILITIES                                 */
/* -------------------------------------------------------------------------- */

.glass {
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* -------------------------------------------------------------------------- //
//                                FLOATING GALLERY                            //
// -------------------------------------------------------------------------- */

.floating-gallery {
    padding: 100px 0;
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 50px;
}

.gallery-card {
    position: relative;
    aspect-ratio: 4/5;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}

.gallery-card:hover img {
    transform: scale(1.1);
    opacity: 1;
}

.gallery-info {
    position: absolute;
    bottom: 40px; /* More padding */
    left: 40px;
    z-index: 2;
}

/* -------------------------------------------------------------------------- //
//                                REVIEWS SECTION                             //
// -------------------------------------------------------------------------- // */

.reviews-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, transparent, rgba(var(--accent-rgb), 0.05), transparent);
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.review-card {
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 32px;
    margin-bottom: 20px; /* Better spacing for stacks */
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.review-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.star-rating {
    color: var(--accent);
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
}

/* -------------------------------------------------------------------------- //
//                                FOOTER & CONTACT                            //
// -------------------------------------------------------------------------- // */

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 100px 0 50px;
}

.map-embed {
    width: 100%;
    height: 400px;
    border-radius: 32px;
    filter: grayscale(1) invert(0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* -------------------------------------------------------------------------- //
//                                RESPONSIVENESS                              //
// -------------------------------------------------------------------------- // */

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* General Spacing */
    section {
        padding: 60px 0 !important;
    }
    
    .max-w-\[1600px\] {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Typography */
    h1 {
        font-size: 14vw !important;
        line-height: 1.0 !important; /* Balanced for mobile */
        text-align: left;
    }

    h2 {
        font-size: 2.8rem !important;
        line-height: 1.1 !important;
    }

    .hero-desc {
        font-size: 1rem !important;
        margin-bottom: 40px !important;
    }

    /* Hero Section */
    .hero-content-glass {
        padding: 30px 20px !important;
        margin-left: 0 !important;
        border-radius: 20px !important;
        backdrop-filter: blur(10px) !important;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px !important;
    }

    .magnetic-btn {
        width: 100%;
        text-align: center;
        padding: 18px 30px !important;
    }

    /* Scroll Captions */
    .scroll-caption h2 {
        font-size: 2.5rem !important;
    }
    
    .scroll-caption p {
        font-size: 1.1rem !important;
    }

    /* Grids */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }

    .gallery-card {
        aspect-ratio: 4/5 !important;
    }

    .floating-gallery {
        overflow: hidden; /* Hide the ribbon overflow */
        padding-bottom: 100px !important;
    }

    .bento-item {
        aspect-ratio: auto !important;
        padding: 30px !important;
    }

    /* Map & Contact */
    .map-embed {
        height: 300px;
        margin-top: 40px;
    }

    .review-grid {
        grid-template-columns: 1fr;
    }

    /* Background Optimization */
    #hero-lightpass {
        filter: blur(5px) brightness(0.5); /* Lighter blur for performance */
    }

    .light-rays {
        display: none; /* Remove heavy animations on mobile */
    }

    /* Nav */
    #main-nav {
        height: 80px;
    }
    
    #main-nav .nav-link {
        display: none; 
    }
}

