/* Rail Rider Brewing Company — Custom Styles */

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

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0d1f3e;
}
::-webkit-scrollbar-thumb {
    background: #d4a017;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e4b540;
}

/* Selection */
::selection {
    background: #d4a017;
    color: #0d1f3e;
}

/* Hero Animations */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-anim[data-delay="200"] {
    animation-delay: 0.2s;
}
.hero-anim[data-delay="400"] {
    animation-delay: 0.4s;
}
.hero-anim[data-delay="600"] {
    animation-delay: 0.6s;
}
.hero-anim[data-delay="800"] {
    animation-delay: 0.8s;
}
.hero-anim[data-delay="1000"] {
    animation-delay: 1s;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal[data-delay="100"] {
    transition-delay: 0.1s;
}
.reveal[data-delay="200"] {
    transition-delay: 0.2s;
}
.reveal[data-delay="300"] {
    transition-delay: 0.3s;
}

/* Scroll reveal hidden state (progressive enhancement) */
.reveal-hidden {
    opacity: 0;
    transform: translateY(40px);
}

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

/* Navbar transitions */
.nav-scrolled {
    background: rgba(8, 19, 38, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-scrolled #nav-logo-text {
    color: #ffffff !important;
}

.nav-light #nav-logo-text {
    color: rgba(255, 255, 255, 0.9);
}

.nav-dark #nav-logo-text {
    color: #0d1f3e;
}

/* Mobile menu transitions */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Mobile menu links stagger */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), 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.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Image hover effects */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth focus outlines */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #d4a017;
    outline-offset: 2px;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' 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 0 center;
    padding-right: 2rem;
}

/* 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-hidden,
    .reveal-visible {
        opacity: 1;
        transform: none;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    section {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Print styles */
@media print {
    nav,
    #contact-form,
    .hero-anim {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
    }
}
