/* ========================================
   Black Market Bakery — Custom Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(161, 24, 54, 0.15);
    color: #3d0714;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #c52648;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a11836;
}

/* ========================================
   Scroll Reveal Animations
   Progressive enhancement — content is
   visible by default, JS adds the animation
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
}

/* JS-enhanced reveal states */
.reveal-hidden {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 252, 251, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(161, 24, 54, 0.08);
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Menu toggle animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

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

/* ========================================
   Form Styles
   ======================================== */
input::placeholder,
textarea::placeholder {
    color: rgba(253, 163, 181, 0.4);
}

input:focus,
textarea:focus {
    outline: none;
}

/* ========================================
   Smooth anchor offset for fixed nav
   ======================================== */
section[id] {
    scroll-margin-top: 80px;
}

/* ========================================
   Reduced motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-hidden,
    .reveal-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
