/* ===== BASE & RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F0F7;
}
::-webkit-scrollbar-thumb {
    background: #B892B8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7D447D;
}

/* ===== NAV SCROLLED STATE ===== */
#nav.scrolled {
    background: rgba(245, 240, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(91, 44, 111, 0.08);
}

#nav.scrolled .font-serif {
    color: #1A0D20;
}

#nav.scrolled a:not(.inline-flex) {
    color: #5B2C6F;
}

#nav.scrolled a:not(.inline-flex):hover {
    color: #D97706;
}

/* ===== MOBILE MENU ===== */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

#mobileMenu a {
    display: block;
    padding: 0.5rem 0;
}

/* ===== SECTION REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.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; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
}

@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;
        transform: none;
    }
}

/* ===== HERO DECORATIVE PULSE ===== */
@keyframes pulse-soft {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.animate-pulse {
    animation: pulse-soft 2s ease-in-out infinite;
}

/* ===== FLOATING CARD ANIMATION ===== */
@media (prefers-reduced-motion: no-preference) {
    .floating-card {
        animation: float 4s ease-in-out infinite;
    }
    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-8px); }
    }
}

/* ===== FORM FOCUS STYLES ===== */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* ===== LINK UNDERLINE ANIMATION ===== */
a:not(.inline-flex):not(img):not(button):not(.font-serif) {
    position: relative;
}

/* ===== SELECTION ===== */
::selection {
    background: #D4BFD4;
    color: #1A0D20;
}
