/* ── Base & Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #FDF8F4; }
::-webkit-scrollbar-thumb { background: #D1D5DE; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #A8B0C0; }

/* ── Selection ── */
::selection { background: #FFC8BE; color: #1E2128; }

/* ── Reveal Animations (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }
}

/* ── Navbar Glass ── */
#navbar.scrolled {
    background: rgba(253, 248, 244, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.04);
}

#navbar.scrolled .font-serif {
    color: #1E2128;
}

#navbar.scrolled .nav-line {
    background: #2C3038;
}

/* ── Mobile Menu ── */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #F95C44;
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 100%;
}

/* ── Hamburger Animation ── */
#mobile-toggle.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#mobile-toggle.active .nav-line:nth-child(2) {
    opacity: 0;
}
#mobile-toggle.active .nav-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ── Smooth Image Loading ── */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ── Button Focus States ── */
a:focus-visible, button:focus-visible {
    outline: 2px solid #F95C44;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Subtle Pattern Overlay ── */
.hero-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
    background-size: 24px 24px;
}
