/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; }

/* ── Nav ──────────────────────────────────────────────── */
#nav {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#nav.scrolled {
    background: rgba(255, 248, 248, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(140, 62, 77, 0.08), 0 4px 24px rgba(140, 62, 77, 0.06);
}

/* ── Nav Links ────────────────────────────────────────── */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #8c3e4d;
    border-radius: 1px;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ── Mobile Menu ──────────────────────────────────────── */
.mobile-link {
    position: relative;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin: 0 -0.75rem;
}
.mobile-link:hover {
    background: rgba(140, 62, 77, 0.06);
}

/* ── Reveal Animations (progressive enhancement) ─────── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        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);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
    .reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Fallback: content always visible if JS disabled */
:not(.reveal) { opacity: 1 !important; transform: none !important; }

/* ── Smooth image loading ─────────────────────────────── */
img {
    background-color: rgba(140, 62, 77, 0.05);
    transition: opacity 0.3s ease;
}

/* ── Selection ────────────────────────────────────────── */
::selection {
    background: rgba(140, 62, 77, 0.15);
    color: #34151b;
}

/* ── Focus ────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid #8c3e4d;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fff8f8; }
::-webkit-scrollbar-thumb { background: #f4d1d9; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #e8a8b8; }
</style>
