/* ========================================
   The Park View Market — Custom Styles
   ======================================== */

/* Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #166534;
    color: #fefce8;
}

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

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

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

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

.nav-link {
    position: relative;
}

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

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

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

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

#mobile-menu.open .mobile-nav-link {
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
}

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

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

/* Hamburger */
.menu-line {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-8px);
}

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

/* ========================================
   Section Labels
   ======================================== */
.section-label {
    letter-spacing: 0.2em;
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-tagline {
    animation: fadeUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-headline {
    animation: fadeUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-subtext {
    animation: fadeUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.hero-ctas {
    animation: fadeUp 0.8s ease 0.8s forwards;
    opacity: 0;
}

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

/* ========================================
   Scroll Reveal Animations
   ======================================== */
[data-reveal] {
    opacity: 1;
}

.reveal {
    opacity: 1;
}

.reveal.fade-up {
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Progressive enhancement: only animate if user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal.fade-up {
        opacity: 0;
        transform: translateY(32px);
    }
    
    .reveal.fade-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Images
   ======================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   Smooth Scroll Offset for Fixed Nav
   ======================================== */
section[id] {
    scroll-margin-top: 80px;
}

/* ========================================
   Focus Styles
   ======================================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ========================================
   Responsive Tweaks
   ======================================== */
@media (max-width: 768px) {
    section[id] {
        scroll-margin-top: 72px;
    }
    
    .font-serif {
        word-spacing: -0.02em;
    }
}

@media (min-width: 768px) {
    /* Subtle parallax feel on hero images */
    #atmosphere img {
        will-change: transform;
    }
}
