/* Base */
*, *::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: #B85C38;
    color: #FDF9F5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FDF9F5;
}
::-webkit-scrollbar-thumb {
    background: #D4B58E;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B85C38;
}

/* Header */
#header {
    background: transparent;
}

#header.scrolled {
    background: rgba(253, 249, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

#header.dark-bg {
    color: #1C1917;
}

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

#mobile-menu.active .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

#mobile-menu.active .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.active .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.active .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(5) { animation-delay: 0.25s; }
#mobile-menu.active .mobile-link:nth-child(6) { animation-delay: 0.3s; }

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

/* Hamburger animation */
.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle.open .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-toggle.open .menu-line:last-child {
    opacity: 0;
    transform: translateX(-8px);
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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