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

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

body {
    overflow-x: hidden;
}

/* Scroll reveal animations — progressive enhancement */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

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

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

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(157, 23, 77, 0.08);
}

/* Subtle line decorations */
.line-accent {
    position: relative;
}

.line-accent::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, #fbbf24, transparent);
}

/* Image loading placeholder */
img {
    background-color: #fce7f3;
}

/* Selection color */
::selection {
    background: #fbcfe8;
    color: #500724;
}

/* Smooth focus outlines */
a:focus-visible, button:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 2px;
}

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

/* Mobile adjustments */
@media (max-width: 768px) {
    .font-serif { line-height: 1.15; }
}
