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

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

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

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

::-webkit-scrollbar-track {
    background: #FDF8F3;
}

::-webkit-scrollbar-thumb {
    background: #B85C38;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A04D2F;
}

/* Selection */
::selection {
    background: #B85C38;
    color: #FDF8F3;
}

/* Navbar */
.nav-logo-text {
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.navbar-scrolled .nav-logo-text {
    text-shadow: none;
    color: #3D2418;
}

.navbar-scrolled .nav-link {
    color: rgba(61, 36, 24, 0.7);
}

.navbar-scrolled .nav-link:hover {
    color: #3D2418;
}

/* Mobile Menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Hero Animations */
.hero-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.3s;
}

.hero-headline {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease forwards 0.5s;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.7s;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.9s;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Line Animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* Reveal Animations (below-fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #B85C38, #D0704E);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Form Styles */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233D2418' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Button Hover Effects */
a, button {
    transition: all 0.3s ease;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #B85C38;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav, #mobileMenu, .scroll-line, button {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .bg-cream, .bg-white, .bg-terra-50 {
        background: white !important;
    }
}
