/* ============================================
   Valley Teas & Remedies — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 168, 83, 0.25);
    color: #0a1628;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 83, 0.4);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 83, 0.6);
}

/* ============================================
   Animations
   ============================================ */

/* Hero entrance animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 1s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-iteration-count: 1;
}

/* Scroll line animation */
@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        height: 48px;
        opacity: 1;
    }
    100% {
        height: 48px;
        opacity: 0;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Scroll reveal */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ============================================
   Navigation
   ============================================ */

#navbar {
    transition: background-color 0.5s ease, 
                backdrop-filter 0.5s ease,
                box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#navbar.transparent .nav-link,
#navbar.transparent a {
    color: rgba(255, 255, 255, 0.7);
}

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

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

/* Menu button animation */
.menu-line {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.3s ease,
                width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body.menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}

body.menu-open .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

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

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

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

/* ============================================
   Form Styles
   ============================================ */

select option {
    background: #0a1628;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}

/* ============================================
   Reduced Motion
   ============================================ */

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

/* ============================================
   Print Styles
   ============================================ */

@media print {
    #navbar, .animate-scroll-line {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
