/* ===== Custom Styles for Dairy Twist ===== */

/* 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 */
::selection {
    background: rgba(74, 222, 128, 0.3);
    color: #f0fdf4;
}

/* ===== Navbar ===== */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background: rgba(10, 26, 46, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.1);
}

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

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

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

/* ===== Menu Tabs ===== */
.menu-tab {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #9fb3c8;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
}

.menu-tab:hover {
    border-color: rgba(74, 222, 128, 0.4);
    color: #86efac;
    background: rgba(74, 222, 128, 0.05);
}

.menu-tab.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #0a1a2e;
}

/* ===== Menu Panels ===== */
.menu-panel {
    animation: fadeSlideIn 0.4s ease forwards;
}

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

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #334e68;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #486581;
}

/* ===== Focus styles ===== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* ===== Subtle pattern overlay for hero ===== */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(74, 222, 128, 0.03) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

#hero > .relative {
    z-index: 2;
}

/* ===== Button ripple effect ===== */
button, a {
    position: relative;
    overflow: visible;
}

/* ===== Image hover container ===== */
.rounded-2xl.overflow-hidden {
    will-change: transform;
}

/* ===== Mobile menu button animation ===== */
.menu-line {
    display: block;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}
