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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(114, 47, 55, 0.6);
    color: #F9EDED;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #120E0B;
}
::-webkit-scrollbar-thumb {
    background: #722F37;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4A017;
}

/* Scroll indicator animation */
@keyframes scrollDot {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
.animate-scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

/* Navbar */
#navbar {
    background: transparent;
}
#navbar.scrolled {
    background: rgba(18, 14, 11, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
}
#navbar.scrolled .nav-link {
    color: rgba(250, 240, 230, 0.9);
}

/* Hero animations */
.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.25s; }
.hero-elem:nth-child(3) { animation-delay: 0.4s; }
.hero-elem:nth-child(4) { animation-delay: 0.55s; }

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

/* Scroll reveal (below fold only) */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    /* JS adds .revealed class */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-elem {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .reveal-up, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-scroll-dot {
        animation: none;
        opacity: 0.6;
    }
    html {
        scroll-behavior: auto;
    }
    img {
        transition: none;
    }
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Menu toggle animation */
.menu-line {
    display: block;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#menuToggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuToggle.active .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}
#menuToggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 6;
}

/* Mobile links */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Form styles */
input, textarea {
    font-family: 'Raleway', system-ui, sans-serif;
}
input:focus, textarea:focus {
    outline: none;
    border-color: #D4A017 !important;
    box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.2);
}

/* Contact form success message */
#formSuccess {
    display: none;
}
#formSuccess.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
