/* Base styles and custom utilities */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    min-height: 100vh;
}

/* Scroll reveal base state - content is visible by default */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply hidden state when JS is available via progressive enhancement */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(30px);
}

.js-enabled .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* Navbar transition */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 250, 245, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(26, 18, 9, 0.08);
}

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

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

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

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

/* Selection color */
::selection {
    background: #e85a38;
    color: #fdfaf5;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Geometric accent shapes */
.geometric-accent {
    position: absolute;
    pointer-events: none;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Card hover glow effect */
.glow-hover:hover {
    box-shadow: 0 0 40px rgba(232, 90, 56, 0.15);
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #e85a38, #d4a55a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button press effect */
.btn-press {
    transition: transform 0.1s ease;
}

.btn-press:active {
    transform: scale(0.97);
}

/* Service card pattern overlay */
.service-card-pattern {
    background-image: radial-gradient(circle at 20% 20%, rgba(232, 90, 56, 0.03) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(212, 165, 90, 0.03) 0%, transparent 50%);
}
