/* ═══════════════════════════════════════════
   D&B Formals — Custom Styles
   ═══════════════════════════════════════════ */

/* ── Base & Typography ── */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: #800020;
    color: #FDF8F0;
}

/* ── Hero Animations (below-the-fold safe) ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-eyebrow {
    animation: fadeUp 0.8s ease-out 0.2s both;
}

.hero-headline {
    animation: fadeUp 0.8s ease-out 0.4s both;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* ── Collection Cards ── */
.collection-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(128, 0, 32, 0.15);
}

/* ── Mobile Menu ── */
#mobile-nav.open {
    max-h: 500px;
}

.menu-line:last-child {
    transform-origin: center;
}

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

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.25rem;
}

/* ── Mobile Nav Links ── */
.mobile-nav-link {
    position: relative;
}

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

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

/* ── Header Scroll State ── */
#site-header.scrolled {
    box-shadow: 0 1px 20px rgba(128, 0, 32, 0.08);
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6b001a;
}

/* ── Select styling ── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23800020' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* ── Focus visible for accessibility ── */
:focus-visible {
    outline: 2px solid #800020;
    outline-offset: 2px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
