:root {
    /* Default to Wood Theme Variables */
    --bg-dark: #1a1412;        
    --bg-dark-alt: #231b18;    
    --bg-light: #191614;
    --text-primary: #f8f1ec;   
    --text-muted: #c4b5a3;     
    --accent: #dca370;         
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --hero-bg: radial-gradient(circle at center, #2e231e 0%, #1a1412 100%);
    --header-bg: rgba(26, 20, 18, 0.95);
    --border-color: rgba(255,255,255,0.05);
    --btn-primary-text: #1a1412;
    --step-num-color: rgba(255,255,255,0.05);
    --step-bg-hover: rgba(255,255,255,0.03);
    --footer-bg: #0a0908;
    --theme-btn-bg: rgba(255,255,255,0.05);
}

[data-theme="marble"] {
    --bg-dark: #fcfcfc;        
    --bg-dark-alt: #f0f0f0;    
    --bg-light: #ffffff;
    --text-primary: #1b1614;   /* African Ebony */
    --text-muted: #5e524d;     /* African Ebony shade */
    --accent: #3a2e28;         /* Rich African Ebony */
    --hero-bg: radial-gradient(circle at center, #ffffff 0%, #e6e6e6 100%);
    --header-bg: rgba(252, 252, 252, 0.95);
    --border-color: rgba(0,0,0,0.1);
    --btn-primary-text: #ffffff;
    --step-num-color: rgba(0,0,0,0.05);
    --step-bg-hover: rgba(0,0,0,0.03);
    --footer-bg: #e6e6e6;
    --theme-btn-bg: rgba(0,0,0,0.05);
}

[data-theme="wood"] {
    --bg-dark: #1a1412;        
    --bg-dark-alt: #231b18;    
    --bg-light: #191614;
    --text-primary: #f8f1ec;   
    --text-muted: #c4b5a3;     
    --accent: #dca370;         
    --hero-bg: radial-gradient(circle at center, #2e231e 0%, #1a1412 100%);
    --header-bg: rgba(26, 20, 18, 0.95);
    --border-color: rgba(255,255,255,0.05);
    --btn-primary-text: #1a1412;
    --step-num-color: rgba(255,255,255,0.05);
    --step-bg-hover: rgba(255,255,255,0.03);
    --footer-bg: #0a0908;
    --theme-btn-bg: rgba(255,255,255,0.05);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

h1 { font-size: 4rem; letter-spacing: -1px; font-weight: 300; margin-bottom: 0.5rem; }
h1 span { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
h2 { font-size: 2.5rem; font-weight: 300; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; font-weight: 400; margin-bottom: 8px; }
h4 { font-size: 1.2rem; font-weight: 400; color: var(--accent); margin-bottom: 12px; }
p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 1.5rem; }

.section-badge {
    display: inline-block; font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 2px; color: var(--accent); border-bottom: 1px solid var(--accent);
    padding-bottom: 4px; margin-bottom: 1rem;
}

/* Header Task Bar Styles */
#site-header {
    position: fixed; top: -100px; left: 0; width: 100%; z-index: 1000;
    transition: top 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    background: var(--header-bg); border-bottom: 1px solid var(--border-color);
    padding: 10px 40px; box-sizing: border-box; backdrop-filter: blur(5px);
    zoom: 0.75;
}
#site-header.visible { top: 0; }
.header-container { align-items: center; display: flex; justify-content: space-between; max-width: 1200px; margin: 0 auto; }
.header-title.cursive-brand { font-size: 2rem; margin-bottom: 0; color: var(--text-primary); }

.cursive-brand { font-family: 'Alex Brush', cursive, var(--font-serif); font-size: 3.5rem; font-weight: 400; line-height: 1.1; color: var(--text-primary); }

/* Scroll Animation Sequence Area */
#animation-container { position: relative; width: 100%; }

#canvas-wrapper {
    position: sticky; top: 0; left: 0; width: 100vw; height: 100vh; overflow: hidden;
    background: var(--hero-bg); z-index: 1;
    transition: background 0.6s ease;
}

/* New Reference Image Container */
#reference-wrapper {
    position: absolute;  /* Changed from fixed to absolute to stick inside canvas-wrapper */
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 32vw; height: 32vw;
    max-width: 450px; max-height: 450px;
    z-index: 10;
    pointer-events: none;
    opacity: 0; /* Handled by GSAP */
}

#reference-image-container {
    position: relative; width: 100%; height: 100%;
    border-radius: 0%; /* Animates to 50% circular */
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    background: #000;
}

#ref-color, #ref-grey {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 20%; 
}

#ref-grey {
    opacity: 0;
}

#timelapse-label {
    position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%);
    width: max-content; font-size: 0.9rem; letter-spacing: 2px;
    text-transform: uppercase; color: var(--accent); opacity: 0;
}

canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }

#hero-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 10; pointer-events: none; max-width: 800px; width: 100%; text-align: center;
}

/* Scroll Tracks */
.scroll-track-section { height: 120vh; width: 100%; }

/* Content Sections */
#main-content { position: relative; z-index: 20; background: var(--bg-dark); zoom: 0.75; }
.content-section { padding: 100px 0; }
.dark-bg { background: var(--bg-dark-alt); }
.light-bg { background: var(--bg-light); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 800px; }
.center { text-align: center; }

/* Grid Layouts */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

/* Images */
.img-col img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.4); transition: transform 0.5s ease, filter 0.5s ease; }
.img-col img:hover { transform: scale(1.02); }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-top: 50px; }
.product-card { cursor: pointer; }
.card-img-wrap { overflow: hidden; border-radius: 8px; margin-bottom: 20px; aspect-ratio: 4/5; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease, filter 0.6s ease; }
.product-card:hover .card-img-wrap img { transform: scale(1.08); }

/* Theme Image Blending */
[data-theme="wood"] .img-col img, [data-theme="wood"] .card-img-wrap img {
    filter: sepia(0.2) brightness(0.95) contrast(1.05);
}
[data-theme="marble"] .img-col img, [data-theme="marble"] .card-img-wrap img {
    filter: grayscale(0.3) brightness(1.05) contrast(1.1);
}
.product-card h3 { transition: color 0.3s ease; }
.product-card:hover h3 { color: var(--accent); }



/* Steps Row */
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-top: 60px; }
.step { 
    position: relative; 
    padding: 30px 20px; 
    border-radius: 12px; 
    background: transparent; 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.4s ease, box-shadow 0.4s ease;
}
.step:hover {
    transform: translateY(-10px) scale(1.03);
    background: var(--step-bg-hover);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}
.step-num { 
    font-size: 3rem; 
    font-weight: 200; 
    color: var(--step-num-color); 
    position: absolute; 
    top: -10px; 
    left: 10px; 
    z-index: 0; 
    transition: color 0.4s ease;
}
.step:hover .step-num {
    color: rgba(212, 163, 115, 0.15);
}
.step h4, .step p { position: relative; z-index: 1; }

/* Buttons */
.btn { padding: 14px 28px; border-radius: 30px; font-family: var(--font-sans); font-size: 1rem; font-weight: 500; cursor: pointer; transition: all 0.3s ease; border: none; }
.btn-primary { background: var(--accent); color: var(--btn-primary-text); }
.btn-primary:hover { background: var(--text-primary); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--step-bg-hover); }
.action-buttons { display: flex; gap: 16px; justify-content: center; margin-top: 30px; }
.pricing-text span { color: var(--accent); font-size: 1.4rem; font-weight: 500; }

/* Footer */
.footer { background: var(--footer-bg); padding: 80px 0 30px; border-top: 1px solid var(--border-color); zoom: 0.75; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; margin-bottom: 10px; display: block; transition: color 0.3s; }
.footer a:hover { color: var(--accent); }
.footer-bottom { text-align: center; border-top: 1px solid var(--border-color); padding-top: 30px; font-size: 0.85rem; }

/* Responsive */
@media (max-width: 900px) {
    #reference-wrapper { width: 50vw; height: 50vw; }
    h1 { font-size: 3rem; }
    .two-col { grid-template-columns: 1fr; }
    .steps-row { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .footer-grid { grid-template-columns: 1fr; }
    #hero-overlay { width: 90%; }
    .cursive-brand { font-size: 2.5rem; }
}
@media (max-width: 600px) {
    .steps-row { grid-template-columns: 1fr; }
    .action-buttons { flex-direction: column; }
}

/* Header button and urgency text */
.top-order-btn { text-decoration: none; font-size: 0.9rem; padding: 10px 24px; }
.urgency-text { font-size: 1rem; color: var(--accent); margin: 1.5rem auto 2.5rem; max-width: 650px; line-height: 1.5; opacity: 0.9; }
a.btn { text-decoration: none; display: inline-block; }

/* Lenis smooth scrolling styles */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* Theme Switcher */
#theme-switcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    background: var(--theme-btn-bg);
    padding: 8px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    zoom: 0.75;
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    color: var(--text-primary);
}

.theme-btn.active {
    background: var(--accent);
    color: var(--bg-dark);
}

/* Contact Details */
.contact-link { display: flex; align-items: center; gap: 10px; color: var(--text-muted); text-decoration: none; margin-bottom: 12px; transition: color 0.3s ease; }
.contact-link:hover { color: var(--accent); }
.contact-icon { stroke: var(--accent); transition: stroke 0.3s ease; flex-shrink: 0; }
.contact-link:hover .contact-icon { stroke: var(--text-primary); }

/* Modal Styles */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
    zoom: 0.75;
}

.modal-overlay.active {
    opacity: 1; pointer-events: auto;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 16px;
    width: 90%; max-width: 450px;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute; top: 15px; right: 20px;
    background: transparent; border: none;
    color: var(--text-muted); font-size: 2rem;
    cursor: pointer; transition: color 0.3s ease;
}
.close-modal:hover { color: var(--accent); }

.modal-title { margin-bottom: 10px; color: var(--text-primary); font-size: 1.8rem; }
.modal-subtitle { margin-bottom: 30px; font-size: 1rem; color: var(--text-muted); }

.modal-option-btn {
    display: flex; align-items: center; justify-content: center; gap: 15px;
    width: 100%; padding: 15px; margin-bottom: 15px;
    background: var(--theme-btn-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.1rem; font-weight: 500; font-family: var(--font-sans);
    cursor: pointer; text-decoration: none;
    transition: all 0.3s ease;
}

.modal-option-btn:hover {
    background: var(--step-bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.modal-option-btn svg { stroke: currentColor; }

.email-copy-box {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-dark-alt);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 20px 0 10px;
}

#email-text { font-family: monospace; font-size: 1.1rem; color: var(--text-primary); }

.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

.copy-feedback { color: var(--accent); font-size: 0.9rem; height: 20px; margin-bottom: 15px; font-weight: 500; }

.back-btn {
    background: transparent; border: none;
    color: var(--text-muted); font-size: 0.95rem; font-family: var(--font-sans);
    cursor: pointer; transition: color 0.3s ease;
    text-decoration: underline;
}
.back-btn:hover { color: var(--text-primary); }
