/* 1. GLOBAL VARIABLES & BASE SETUP */
:root { 
    --royal-green: #004B23; 
    --cream: #F9F8F2;
    --dark: #2A2A2A;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body { 
    background-color: var(--cream); 
    font-family: 'Inter', sans-serif; 
    overflow-x: hidden; 
    width: 100%;
}

/* Custom Luxury Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--royal-green); border-radius: 10px; }

/* 2. TYPOGRAPHY & INTERACTION */
h1, h2, h3, h4, .font-serif {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
}

.nav-item {
    transition: all 0.4s ease;
    cursor: pointer;
    opacity: 0.6;
}

.nav-item:hover {
    color: var(--royal-green);
    opacity: 1;
    letter-spacing: 0.2em;
}

/* 3. BROWSER COMPATIBILITY LAYER */
nav, #consultModal, #imageLightbox {
    z-index: 99999 !important;
    pointer-events: auto !important;
}

.parallax-bg-img, .dreams-bg-container, .dreams-visual-wrapper, .absolute.inset-0 {
    pointer-events: none !important;
}

.backdrop-blur-2xl, .backdrop-blur-md, .backdrop-blur-xl {
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
}

/* 4. MARQUEE CORE SYSTEM - PREVENT IMAGE JUMPING */
.marquee-track-1, .marquee-track-2, .marquee-track-3, .marquee-reviews {
    display: flex !important;
    flex-wrap: nowrap !important;
    white-space: nowrap;
    width: max-content !important;
    will-change: transform;
}

/* CRITICAL: This stops the browser from auto-expanding images in the marquee */
.marquee-track-1 > div, 
.marquee-track-2 > div, 
.marquee-track-3 > div {
    flex: 0 0 auto !important;
}

/* 5. SECTION 4: DREAMS KINETIC VIEW */
.dreams-visual-wrapper {
    will-change: transform;
    transition: none !important;
}

/* 6. SECTION 6: EDITORIAL SWATCH CARDS (STRICT SIZING 380x480) */
.swatch-premium-card {
    width: 380px !important;   
    height: 480px !important;  
    flex-shrink: 0 !important; 
    padding: 10px !important;
    display: block !important;
}

.swatch-museum-frame {
    background: #FFFFFF;
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.swatch-img-container {
    width: 100% !important;
    height: 350px !important; 
    overflow: hidden !important;
    position: relative;
    background: #f4f4f4;
}

.swatch-img-fixed {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
    display: block !important;
}

/* 7. SECTION 10: PORTFOLIO CARDS (STRICT SIZING 450x600) */
/* This was likely the source of your "Oversized" issue in track 2 */
.marquee-track-2 > div {
    width: 450px !important;
    height: 600px !important;
    margin-right: 48px;
    flex-shrink: 0 !important;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.marquee-track-2 img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 8. SECTION 11: TEXTURE STUDY BOXES (STRICT 320x320) */
.texture-luxury-box {
    width: 320px !important;   
    height: 320px !important;  
    flex-shrink: 0 !important; 
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08);
    overflow: hidden !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    border-radius: 4px;
}

.texture-luxury-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
}

/* 9. SECTION 7: LUXURY REVIEWS (STRICT 500x520) */
.review-luxury-card {
    width: 500px !important;           
    height: 520px !important;          
    background: var(--white) !important;
    margin-right: 40px;     
    padding: 60px !important;
    flex-shrink: 0 !important;         
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.review-quote {
    font-family: 'Playfair Display', serif !important;
    font-style: italic !important;
    font-size: 1.7rem !important;
    line-height: 1.6 !important;
    color: #1A1A1A !important; 
    opacity: 1 !important;
    white-space: normal !important; 
}

/* 10. SECTION 13: FAQ ACCORDION */
.faq-item.active {
    background-color: var(--white) !important;
    box-shadow: 0 40px 80px rgba(0,0,0,0.03);
}

.faq-item.active .faq-circle {
    background-color: var(--royal-green);
    border-color: var(--royal-green);
    color: var(--white);
}

.faq-circle {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 11. LIGHTBOX (IMAGE ZOOM) */
#imageLightbox {
    z-index: 100000 !important;
    background-color: rgba(0, 0, 0, 0); 
    transition: background-color 0.5s ease;
    pointer-events: auto;
}

#lightboxBackdrop {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    opacity: 0;
}

#lightboxImg {
    position: relative;
    z-index: 100005;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 50px 100px rgba(0,0,0,0.8);
    display: block;
    will-change: transform, opacity;
}

/* 12. FORM & UI UTILITIES */
#consultModal input, #consultModal textarea {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: border-color 0.4s ease;
}

#consultModal input:focus, #consultModal textarea:focus {
    border-color: var(--royal-green);
}

.no-reveal {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

img {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.float-item, .float-item-delayed {
    pointer-events: auto !important;
}
/* --- 1. CORE LUXURY SETTINGS --- */
:root { --royal-green: #004B23; --cream: #F9F8F2; --white: #FFFFFF; }
body { background-color: var(--cream); overflow-x: hidden; font-family: 'Inter', sans-serif; }
h1, h2, h3, h4, .font-serif { font-family: 'Playfair Display', serif; }

/* --- 2. THE MARQUEE STABILITY ENGINE --- */
.marquee-track-1, .marquee-track-2, .marquee-track-3, .marquee-reviews {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
}

/* Force children NOT to grow based on high-res original images */
.marquee-track-1 > div, .marquee-track-2 > div, .marquee-track-3 > div, .marquee-reviews > div {
    flex: 0 0 auto !important;
}

/* --- 3. SECTION-SPECIFIC RIGID DIMENSIONS --- */

/* Swatches Section */
.swatch-card-fixed {
    width: 380px !important;
    height: 480px !important;
    margin-right: 30px;
}
.swatch-museum-frame { background: white; padding: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.swatch-img-container { height: 350px; background: #f9f9f9; }
.swatch-img-fixed { width: 100%; height: 100%; object-fit: cover; }

/* Reviews Section */
.review-card-fixed {
    width: 500px !important;
    height: 520px !important;
    background: white;
    padding: 60px;
    margin-right: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}
.review-quote { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.6rem; line-height: 1.6; color: #1a1a1a; }

/* Portfolio Section */
.portfolio-card-fixed {
    width: 450px !important;
    height: 600px !important;
    margin-right: 48px;
    overflow: hidden;
}
.portfolio-card-fixed img { width: 100%; height: 100%; object-fit: cover; }

/* Texture Section */
.texture-card-fixed {
    width: 320px !important;
    height: 320px !important;
    margin-right: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    background: white;
}
.texture-card-fixed img { width: 100%; height: 100%; object-fit: cover; }

/* --- 4. ANIMATION & UI UTILS --- */
.faq-item.active .faq-answer { height: auto; opacity: 1; padding-bottom: 20px; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.parallax-bg-img { will-change: transform; pointer-events: none; }
.float-item { animation: luxuryFloat 6s ease-in-out infinite; }
@keyframes luxuryFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }


/* --- MASONRY GALLERY CORE --- */
.columns-1 { column-count: 1; }
.columns-2 { column-count: 2; }
.columns-3 { column-count: 3; }

/* Ensures images don't get cut off at the bottom of columns */
.break-inside-avoid {
    break-inside: avoid;
}

/* Smooth Image Loading */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
    transition: all 1s cubic-bezier(0.2, 1, 0.3, 1);
}

/* Hide scrollbar for category tabs on mobile */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
@font-face {
    font-family: 'Nyghtserif';
    src: url('fonts/NyghtSerif-DarkItalic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* Ensure the letters can be seen during animation */
.js-replica-letter {
    padding-right: 0.02em; /* Prevents italic clipping */
}

/* Luxury button hover */
#hero button:hover {
    background-color: #51483F !important;
    color: #cec3b8 !important;
    border-color: #51483F !important;
}
#overlap-trigger h2 {
    font-family: 'Nyghtserif', 'Cormorant Garamond', serif;
    font-weight: 300;
}

#overlap-trigger p {
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
}

/* Ensure the zoom animation we built earlier still targets the sofa background */
.js-famous-zoom {
    will-change: transform;
}
#dreams h2 {
    font-family: 'Nyghtserif', 'Cormorant Garamond', serif;
    letter-spacing: -0.05em;
    text-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Very subtle depth */
}

/* Ensure the floating image stays sharp */
.js-float-bounce {
    will-change: transform;
}

@font-face {
    font-family: 'Nyghtserif';
    src: url('fonts/NyghtSerif-DarkItalic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* Luxury Text Rendering */
#visions-gallery h2 {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Typography Weighting */
#portfolio h2 {
    font-weight: 200 !important;
    text-transform: none !important;
}

#portfolio h2 span.italic {
    font-family: 'Nyghtserif', serif;
}
/* Custom Cursor Smoothness */
#drag-cursor {
    will-change: transform;
    pointer-events: none;
}

/* Ensure the circular swatch doesn't break line flow */
.inline-flex {
    vertical-align: middle;
}
/* Local Font Folder Integration */
@font-face {
    font-family: 'Nyghtserif';
    src: url('fonts/NyghtSerif-DarkItalic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('fonts/CormorantGaramond-Light.woff2') format('woff2'); /* Adjust filename if different */
    font-weight: 300;
    font-style: normal;
}

/* Fix for smooth FAQ expansion */
.faq-answer {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: height, opacity;
}
/* Ensure FAQ items never turn white */
.faq-item, .faq-answer, .faq-item.active {
    background-color: transparent !important;
    background: transparent !important;
}

/* Ensure Question and Answer are strictly left-aligned */
.faq-item h5, .faq-item p {
    text-align: left !important;
}

/* Smooth transition for answer reveal */
.faq-answer {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}