/* === BASE === */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(196, 112, 75, 0.2);
    color: #2A2421;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAF7F3;
}
::-webkit-scrollbar-thumb {
    background: #C4A87E;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C4704B;
}

/* === NAVBAR === */
#site-header {
    background: rgba(250, 247, 243, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(196, 112, 75, 0.08);
    transition: box-shadow 0.4s ease, background 0.4s ease;
}

#site-header.scrolled {
    box-shadow: 0 1px 20px rgba(42, 36, 33, 0.06);
    background: rgba(250, 247, 243, 0.97);
}

/* === MOBILE MENU === */
#mobile-menu {
    background: rgba(250, 247, 243, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

#mobile-menu.open {
    transform: translateX(0);
}

.mobile-nav-link {
    position: relative;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* === HERO LABEL === */
.hero-label {
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

/* === HERO HEADLINE === */
.hero-headline {
    opacity: 0;
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.35s;
}

/* === HERO BODY === */
.hero-body {
    opacity: 0;
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.5s;
}

/* === HERO CTA === */
.hero-cta {
    opacity: 0;
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.65s;
}

/* === HERO DIVIDER === */
.hero-divider {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.85s;
}

/* === HERO IMAGE === */
.hero-image {
    opacity: 0;
    animation: fadeIn 1.1s ease forwards;
    animation-delay: 0.4s;
}

/* === FLOATING CARD === */
.floating-card {
    opacity: 0;
    animation: floatIn 0.8s ease forwards;
    animation-delay: 0.9s;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === SECTION REVEAL (below fold) === */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }
.reveal[data-delay="6"] { transition-delay: 0.6s; }

/* Stagger children */
.stagger-children > * {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stagger-children > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.19s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.26s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.33s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.40s; }

/* === SERVICE CARDS === */
.service-card {
    transition: background-color 0.5s ease;
}

.service-card:hover svg {
    transform: scale(1.05);
    transition: transform 0.4s ease;
}

.service-card svg {
    transition: transform 0.4s ease;
}

/* === PROCESS STEPS === */
.process-step {
    transition: background-color 0.3s ease;
}

.process-step:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* === WORK ITEMS === */
.work-item {
    transition: background-color 0.5s ease;
}

.work-item:hover {
    background: #F5F0E8;
}

/* === TESTIMONIAL CARDS === */
.testimonial-card {
    transition: background-color 0.5s ease;
}

.testimonial-card:hover {
    background: #F5F0E8;
}

/* === FOOTER LINKS === */
footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #C4704B;
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* === FORM INPUTS === */
#contact-form input:focus,
#contact-form textarea:focus {
    border-color: #C4704B !important;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: rgba(107, 100, 96, 0.5);
}

/* === PREFERS REDUCED MOTION === */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .stagger-children > * {
        opacity: 0;
        transform: translateY(16px);
    }
    
    .stagger-children > *.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === REDUCED MOTION (content always visible) === */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal,
    .stagger-children > * {
        opacity: 1;
        transform: none;
    }
    
    .hero-label,
    .hero-headline,
    .hero-body,
    .hero-cta,
    .hero-divider,
    .hero-image,
    .floating-card {
        opacity: 1;
        animation: none;
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}
