/* ===== CSS Custom Properties ===== */
:root {
    --terracotta-50: #fdf0eb;
    --terracotta-100: #fce4d9;
    --terracotta-500: #e85533;
    --terracotta-600: #d93f22;
    --sand-200: #faebcc;
    --sand-400: #eebe6d;
    --sand-500: #e5a547;
    --cream: #FDF8F0;
    --stone-800: #292524;
    --stone-900: #1c1917;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    color: var(--stone-800);
    background: var(--cream);
    overflow-x: hidden;
}

/* ===== Geometric Background Shapes ===== */
.geo-shape {
    position: absolute;
    pointer-events: none;
    will-change: transform;
}

.shape-circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--terracotta-100) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    opacity: 0.6;
}

.shape-rect-1 {
    width: 200px;
    height: 200px;
    background: var(--sand-200);
    bottom: 10%;
    left: 5%;
    border-radius: 2rem;
    opacity: 0.5;
    transform: rotate(15deg);
}

.shape-circle-2 {
    width: 120px;
    height: 120px;
    border: 4px solid var(--terracotta-200);
    top: 30%;
    left: 15%;
    border-radius: 50%;
    opacity: 0.6;
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid var(--sand-300);
    opacity: 0.3;
    top: 20%;
    right: 25%;
    transform: rotate(-20deg);
}

.shape-stripe-1 {
    width: 8px;
    height: 200px;
    background: repeating-linear-gradient(
        to bottom,
        var(--terracotta-300) 0px,
        var(--terracotta-300) 12px,
        transparent 12px,
        transparent 24px
    );
    bottom: 15%;
    right: 10%;
    opacity: 0.4;
}

.shape-dot-pattern {
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, var(--sand-400) 2px, transparent 2px);
    background-size: 12px 12px;
    top: 40%;
    left: 8%;
    opacity: 0.4;
}

/* ===== Navbar ===== */
.nav-logo-text {
    transition: color 0.3s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: var(--stone-900);
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Menu Button Animation */
.menu-line {
    display: block;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1.25rem;
    border: 2px solid transparent;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

/* ===== Gallery ===== */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.1) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    font-weight: 900;
    color: var(--terracotta-100);
    line-height: 1;
    pointer-events: none;
}

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .gallery-item img {
        transition: none;
    }
    
    .gallery-item:hover img {
        transform: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .shape-circle-1 {
        width: 300px;
        height: 300px;
    }
    
    .shape-rect-1 {
        width: 120px;
        height: 120px;
    }
    
    .shape-triangle-1 {
        display: none;
    }
    
    .shape-stripe-1 {
        display: none;
    }
    
    .shape-dot-pattern {
        display: none;
    }
    
    .testimonial-card::before {
        font-size: 4rem;
        top: 12px;
        right: 16px;
    }
}

@media (max-width: 640px) {
    .geo-shape {
        display: none;
    }
    
    .geo-shape.shape-circle-1,
    .geo-shape.shape-rect-1 {
        display: block;
    }
}

/* ===== Selection ===== */
::selection {
    background: var(--terracotta-200);
    color: var(--stone-900);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--terracotta-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--terracotta-400);
}
