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

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    overflow-x: hidden;
}

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

::selection {
    background-color: #7B2D3B;
    color: #fff8f9;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .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.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always visible if JS is disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== CARD HOVER ===== */
.card-hover {
    will-change: transform;
}

.card-hover:hover {
    transform: translateY(-4px);
}

/* ===== NAVBAR SHADOW ON SCROLL ===== */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(123, 45, 59, 0.1);
}

/* ===== NAV LINKS ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #7B2D3B;
    border-radius: 1px;
    transition: all 0.25s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* ===== MOBILE NAV ===== */
.mobile-nav-link {
    border-radius: 0.75rem;
}

/* ===== INPUT FOCUS RING ANIMATION ===== */
input:focus,
select:focus,
textarea:focus {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* ===== BUTTON RIPPLE EFFECT ===== */
button, a {
    position: relative;
    overflow: visible;
}

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

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

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

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

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
    .font-display {
        word-spacing: -0.02em;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    #navbar, #mobile-menu, .reveal {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #7B2D3B;
    }
}
