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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Selection */
::selection {
    background: rgba(160, 33, 56, 0.4);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #3d0a13;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #711b2e;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
#menu-btn.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active #bar2 {
    opacity: 0;
}
#menu-btn.active #bar3 {
    width: 100%;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Smooth anchor scrolling offset */
[id^="section"] {
    scroll-margin-top: 80px;
}

/* Image hover parallax */
.group img {
    will-change: transform;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #f9a5b8;
    outline-offset: 2px;
    border-radius: 4px;
}

/* 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 !important;
        transform: none !important;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .font-display {
        line-height: 1.1;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    #hero h1 br {
        display: none;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.25rem;
    }
}
