/* ===== Custom Styles for Arkansas River Coffee ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0d14;
}
::-webkit-scrollbar-thumb {
    background: #4a2038;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6b2f52;
}

/* ===== Navbar ===== */
#navbar {
    transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}
#navbar.scrolled {
    background: rgba(26, 13, 20, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(217, 119, 6, 0.1);
}

/* Nav links */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f59e0b;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.menu-line {
    transition: all 0.3s ease;
}
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    margin-left: 0;
    transform: rotate(-45deg) translate(4px, -4px);
}
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 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; }

/* ===== Hero Animations ===== */
.hero-anim {
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.hero-anim.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero parallax */
#hero-img {
    transition: transform 0.1s linear;
}

/* ===== Reveal Animations ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-up {
    transform: translateY(40px);
}
.reveal-left {
    transform: translateX(-40px);
}
.reveal-right {
    transform: translateX(40px);
}
.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===== Menu Cards ===== */
.menu-card {
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.menu-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.menu-card:not(.visible) {
    transform: translateY(30px);
}

/* ===== Image hover effects ===== */
.overflow-hidden {
    position: relative;
}
.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 13, 20, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.overflow-hidden:hover::after {
    opacity: 1;
}

/* ===== Button ripple effect ===== */
a[class*="group-hover:shadow"] {
    position: relative;
    overflow: hidden;
}
a[class*="group-hover:shadow"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}
a[class*="group-hover:shadow"]:active::before {
    width: 200px;
    height: 200px;
}

/* ===== Selection ===== */
::selection {
    background: rgba(217, 119, 6, 0.3);
    color: #fcecf2;
}

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

/* ===== Loading animation ===== */
body {
    animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
