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

/* ===== SCROLL REVEAL ANIMATIONS ===== */
/* Default state: fully visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

    .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; }
}

/* ===== NAVBAR SCROLL STATE ===== */
#navbar.scrolled {
    background: rgba(255, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(128, 0, 32, 0.08);
}

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

#mobile-menu .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 5;
}

/* ===== MOBILE LINKS ===== */
.mobile-link {
    opacity: 1;
    transform: none;
}

/* ===== BUTTON HOVER EFFECTS ===== */
a {
    text-decoration: none;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FFF8F5;
}

::-webkit-scrollbar-thumb {
    background: #b51f38;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #800020;
}

/* ===== SELECTION ===== */
::selection {
    background: #fce1e8;
    color: #800020;
}

/* ===== FORM FOCUS STATES ===== */
input:focus, textarea:focus {
    outline: none;
}

/* ===== IMAGE LAZY LOAD FALLBACK ===== */
img[loading="lazy"] {
    opacity: 1;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
    }

    h2 {
        font-size: 2rem !important;
    }

    .grid lg\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
}
