/* ============================================
   The Market Deli & Grocery — 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: #14532d;
    color: #fdf9f0;
}

/* ============================================
   Navigation
   ============================================ */
.nav-fixed {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

.nav-fixed.scrolled {
    background-color: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(20, 83, 45, 0.08);
}

.nav-link {
    position: relative;
}

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

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

.nav-fixed.scrolled .nav-link {
    color: #14532d;
}

.nav-fixed.scrolled .nav-subtext {
    color: #15803d;
}

.nav-fixed.scrolled .nav-text {
    color: #14532d;
}

/* Mobile Menu */
.mobile-menu {
    animation: slideDown 0.4s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu.open {
    display: block;
}

.mobile-menu.closed {
    display: none;
}

.mobile-link {
    display: block;
}

/* Hamburger animation */
#menuBtn.active .hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

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

#menuBtn.active .hamburger-line:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #22c55e 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: float1 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #16a34a 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: float2 16s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #86efac 0%, transparent 70%);
    top: 40%;
    left: 20%;
    animation: float3 14s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(1.05); }
    66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.08); }
    66% { transform: translate(-20px, 20px) scale(0.92); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.1); }
}

.hero-eyebrow {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.3s;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.5s;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.7s;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.9s;
}

.hero-scroll {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 1.1s;
}

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

.hero-title span:first-child {
    display: block;
}

/* Scroll line animation */
.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   Section Components
   ============================================ */
.section-label {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #15803d;
    font-weight: 500;
}

.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 600;
    line-height: 1.15;
    color: #14532d;
}

/* ============================================
   Specialty Cards
   ============================================ */
.specialty-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.specialty-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* ============================================
   Utility
   ============================================ */
@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-up, .reveal-left, .reveal-right, .specialty-card {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Mobile Adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-orb {
        filter: blur(60px);
        opacity: 0.2;
    }
    
    .orb-1 {
        width: 300px;
        height: 300px;
    }
    
    .orb-2 {
        width: 200px;
        height: 200px;
    }
    
    .orb-3 {
        width: 150px;
        height: 150px;
    }
}
