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

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: #cc5238;
    color: #fdf2f0;
}

/* Smooth focus outlines */
:focus-visible {
    outline: 2px solid #cc5238;
    outline-offset: 2px;
}

/* Hero animations - above the fold, always visible */
.hero-content {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-image {
    animation: fadeIn 1s ease-out forwards;
}

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

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

/* Navigation */
#navbar {
    background: rgba(251, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    border-bottom-color: #f0e6d8;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.05);
}

/* Mobile menu */
.mobile-link {
    transition: opacity 0.2s ease;
}

/* Service cards */
.service-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Gallery items */
.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.3s ease;
}

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

/* Scroll reveal animations - below the fold only */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .gallery-item img {
        transition: none;
    }
}

/* Form styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #f5b5a5 !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: #d4b896;
    border-radius: 3px;
}

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

/* Responsive tweaks */
@media (max-width: 768px) {
    .hero-content {
        animation: fadeInUp 0.6s ease-out forwards;
    }
}
