/* ============================================
   All Seasons Forming Supplies — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #7B2D3B;
    color: #F5E6D3;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-display,
#navbar.scrolled span:first-of-type {
    color: #111118 !important;
}

#navbar.scrolled .menu-line {
    background-color: #111118;
}

#navbar.scrolled a:not(.bg-burgundy-700) {
    color: #374151;
}

#navbar.scrolled a:not(.bg-burgundy-700):hover {
    color: #7B2D3B;
}

#navbar.scrolled .mobile-link {
    color: #111118;
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* ============================================
   Scroll Reveal Animations
   (Progressive Enhancement — content is visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }

    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal[data-reveal="left"] {
        transform: translateX(-30px);
    }

    .reveal[data-reveal="right"] {
        transform: translateX(30px);
    }

    .reveal[data-reveal="scale"] {
        transform: scale(0.95);
    }

    .reveal.visible {
        opacity: 1;
        transform: none;
    }

    /* Stagger children */
    .stagger-children .reveal[data-reveal] {
        transition-delay: calc(var(--index, 0) * 0.1s);
    }
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    border-color: #7B2D3B !important;
    outline: none;
    box-shadow: 0 0 0 4px rgba(123, 45, 59, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

/* ============================================
   Smooth Image Loading
   ============================================ */
img {
    image-rendering: auto;
    will-change: transform;
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #7B2D3B;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5e1f2a;
}

/* ============================================
   Focus Visible for Accessibility
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #mobile-menu,
    .reveal[data-reveal] {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
