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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    min-height: 100vh;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal.visible:nth-child(2) { transition-delay: 100ms; }
.reveal.visible:nth-child(3) { transition-delay: 200ms; }
.reveal.visible:nth-child(4) { transition-delay: 300ms; }

/* Scroll dot 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 scroll state */
nav.scrolled {
    background: rgba(254, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(139, 26, 77, 0.08);
}

nav.scrolled .font-display {
    color: #8B1A4D !important;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Hover card lift */
.reveal:hover {
    transform: translateY(-4px);
}

/* Custom selection color */
::selection {
    background: rgba(139, 26, 77, 0.15);
    color: #8B1A4D;
}

/* Smooth focus styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid #8B1A4D;
    outline-offset: 2px;
}

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