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

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

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

::selection {
    background: rgba(120, 31, 55, 0.15);
    color: #781f37;
}

/* ========== SCROLL REVEAL (progressive enhancement) ========== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

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

    .reveal-left.is-hidden {
        opacity: 0;
        transform: translateX(-30px);
    }

    .reveal-right.is-hidden {
        opacity: 0;
        transform: translateX(30px);
    }
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

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

/* ========== HEADER SHADOW ON SCROLL ========== */
#site-header.scrolled {
    box-shadow: 0 1px 20px rgba(120, 31, 55, 0.08);
}

/* ========== MOBILE MENU ========== */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

.mobile-nav-link {
    position: relative;
}

/* ========== FOCUS STYLES ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c9a87c;
    outline-offset: 2px;
}

/* ========== SMOOTH SCROLL OFFSET ========== */
section[id] {
    scroll-margin-top: 80px;
}

/* ========== IMAGE LOADING ========== */
img {
    display: block;
    max-width: 100%;
}

/* ========== FORM PLACEHOLDER COLOR ========== */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #781f37;
}
