/* ============================================
   Hoppy Dawg Brewing — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: #ff702e;
    color: #0f1114;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f1114;
}
::-webkit-scrollbar-thumb {
    background: #4a4d55;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff702e;
}

/* --- Hero Orbs Animation --- */
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -40px) scale(1.05); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 30px) scale(1.08); }
}
@keyframes float3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-48%, -52%) scale(1.03); }
}

.orb-1 { animation: float1 12s ease-in-out infinite; }
.orb-2 { animation: float2 15s ease-in-out infinite; }
.orb-3 { animation: float3 18s ease-in-out infinite; }

/* --- Hero Entrance --- */
.hero-elem {
    opacity: 1;
    transform: translateY(0);
    animation: heroIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.25s; }
.hero-elem:nth-child(3) { animation-delay: 0.4s; }
.hero-elem:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal-left {
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal-right {
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-up, .reveal-left, .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

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

#navbar.scrolled {
    background: rgba(15, 17, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu .menu-line.active:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu .menu-line.active:nth-child(2) {
    opacity: 0;
}
#mobile-menu .menu-line.active:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* --- Buttons --- */
a:focus-visible, button:focus-visible {
    outline: 2px solid #ff702e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Map Invert Fix for Light Mode --- */
@media (prefers-color-scheme: light) {
    iframe[src*="google.com/maps"] {
        filter: none;
    }
}

/* --- Smooth image loading --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
