*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Smooth scroll offset for fixed header */
section[id] {
    scroll-margin-top: 80px;
}

/* Selection color */
::selection {
    background: #b82d48;
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f6;
}
::-webkit-scrollbar-thumb {
    background: #f6a3b5;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b82d48;
}

/* Header scroll state */
header.scrolled {
    background: rgba(250, 248, 246, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(184, 45, 72, 0.08);
}

header.scrolled #header {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children .animate-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .animate-on-scroll:nth-child(6) { transition-delay: 0.3s; }

/* Mobile menu animation */
#mobileMenu {
    animation: fadeIn 0.3s ease forwards;
}

/* Image hover zoom */
.group img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #b82d48;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}
