/* ============================================
   Ms. Donna's Pies — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(6, 78, 59, 0.2);
    color: #043828;
}

/* ============================================
   Navigation
   ============================================ */
.nav-scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-scrolled.scrolled {
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

.nav-scrolled.scrolled .nav-logo {
    color: #043828;
}

/* ============================================
   Floating Cards (Hero)
   ============================================ */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

body.menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

body.menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
body.menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
body.menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
body.menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
body.menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   ============================================ */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* When JS is enabled and user prefers motion, apply the hidden state first */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(24px);
}

.js-enabled .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .js-enabled .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .floating-card {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Button & Link Focus States
   ============================================ */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(6, 78, 59, 0.6);
    outline-offset: 2px;
}

/* ============================================
   Responsive Tweaks
   ============================================ */
@media (max-width: 767px) {
    .floating-card {
        display: none;
    }
}
