/* ===== 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;
}

::selection {
    background: #d13a18;
    color: #fefdf8;
}

/* ===== Navigation ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #d13a18;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #d13a18 !important;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(15, 26, 15, 0.08);
}

.nav-scrolled .nav-logo-text {
    color: #0f1a0f !important;
}

.nav-scrolled .nav-link {
    color: rgba(15, 26, 15, 0.7) !important;
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, #d13a18 0%, #ae2f17 100%);
    color: #fefdf8;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(209, 58, 24, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(209, 58, 24, 0.4);
    background: linear-gradient(135deg, #e05228 0%, #d13a18 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ===== Mobile Menu ===== */
.mobile-nav-link {
    position: relative;
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.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; }

/* ===== Gallery Scroll Animation ===== */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll {
    animation: scroll 30s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* ===== 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;
    }
    
    .animate-scroll {
        animation: none;
    }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d13a18;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Image loading ===== */
img {
    image-rendering: auto;
}

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

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

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

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

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

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