/* ── Base & Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: #C1666B;
    color: #fdfbf7;
}

/* ── Navbar ── */
#navbar {
    background: transparent;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(193, 102, 107, 0.08);
}

#navbar.scrolled .nav-link,
#navbar.scrolled .mobile-nav-link,
#navbar.scrolled a {
    color: #1c1917;
}

/* ── Mobile Menu ── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-nav-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

#mobile-menu.open .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(5) { animation-delay: 0.25s; }

.menu-line {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* ── Hero Animations ── */
.hero-eyebrow {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
    opacity: 0;
}

.hero-ctas {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
    opacity: 0;
}

.hero-scroll {
    animation: fadeIn 1s ease 1.4s forwards;
    opacity: 0;
}

/* ── Reveal Animations (below fold) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Fallback: always visible if JS disabled */
.no-js .reveal,
.js .reveal {
    /* JS will add .revealed class */
}

/* ── Menu Item Hover ── */
.menu-item {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* ── Input Focus ── */
input:focus,
textarea:focus {
    border-color: #C1666B !important;
}

/* ── Animations ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Smooth Scroll Offset ── */
section[id] {
    scroll-margin-top: 80px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}
