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

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

body {
    overflow-x: hidden;
}

::selection {
    background: #B8582D;
    color: #FDFBF7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FDFBF7;
}
::-webkit-scrollbar-thumb {
    background: #D4A96A;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B8582D;
}

/* Navbar */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.nav-fixed.scrolled {
    background-color: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(184, 88, 45, 0.1);
}

.nav-link {
    position: relative;
}

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

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

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

.nav-fixed.scrolled .nav-link:hover {
    color: #B8582D !important;
}

/* Mobile Menu */
.mobile-menu-open {
    overflow: hidden;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#bar1.open {
    transform: translateY(6px) rotate(45deg);
}

#bar2.open {
    opacity: 0;
    transform: translateX(10px);
}

#bar3.open {
    transform: translateY(-6px) rotate(-45deg);
}

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

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        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-left {
        opacity: 0;
        transform: translateX(-40px);
        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-right {
        opacity: 0;
        transform: translateX(40px);
        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-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* Form Focus Styles */
input:focus,
textarea:focus {
    border-bottom-color: #B8582D !important;
}

/* Smooth Image Loading */
img {
    image-rendering: auto;
}

/* Print Styles */
@media print {
    .nav-fixed,
    .scroll-line {
        display: none;
    }
}
