/* ============================================
   Ms. Arlene's Kountry Kitchen - Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #2c5525;
    color: #fefdf8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ee;
}
::-webkit-scrollbar-thumb {
    background: #98c68f;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4a8a3e;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(44, 85, 37, 0.08);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

.nav-logo-sub {
    transition: color 0.4s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #1d3819;
}

#navbar:not(.scrolled) .nav-logo-sub {
    color: #376b2e;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #4a8a3e;
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 9999px;
}

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

/* Mobile Menu */
#mobile-menu {
    transition: opacity 0.5s ease, pointer-events 0.5s ease;
}

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

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

.mobile-menu-link {
    position: relative;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-badge {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

h1 {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

h1 p {
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-image-container {
    animation: fadeInRight 1s ease 0.4s forwards;
    opacity: 0;
}

/* ============================================
   Menu Cards
   ============================================ */
.menu-card {
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.menu-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   About Section
   ============================================ */
.about-image-container {
    animation: fadeInLeft 1s ease forwards;
    opacity: 0;
}

/* ============================================
   Contact Cards
   ============================================ */
.contact-card {
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Back to Top
   ============================================ */
#back-to-top {
    transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#back-to-top:hover {
    box-shadow: 0 8px 30px rgba(44, 85, 37, 0.4);
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scroll-line {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

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

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s 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;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .hero-badge {
        animation-delay: 0.1s;
    }
    
    h1 {
        animation-delay: 0.2s;
    }
    
    .hero-image-container {
        animation-delay: 0.3s;
    }
}

/* ============================================
   Focus Styles (Accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #98c68f;
    outline-offset: 3px;
    border-radius: 0.5rem;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #back-to-top,
    .animate-scroll-line {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
