/* ============================================
   HOMETOWN NUTRITION — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
}

/* Selection Color */
::selection {
    background-color: #8ec064;
    color: #1e300f;
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
    background: rgba(254, 253, 248, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(142, 192, 100, 0.15);
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    box-shadow: 0 4px 30px rgba(30, 48, 15, 0.08);
}

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

/* ============================================
   CARD HOVER EFFECTS
   ============================================ */
.card-hover {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

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

/* ============================================
   FLOATING CARDS (Hero)
   ============================================ */
.floating-card-1 {
    animation: float1 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float2 5s ease-in-out infinite;
}

.floating-card-3 {
    animation: float3 3.5s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

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

/* ============================================
   SCROLL REVEAL ANIMATIONS
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.from-bottom {
        transform: translateY(30px);
    }
    
    .reveal.from-left {
        transform: translateX(-30px);
    }
    
    .reveal.from-right {
        transform: translateX(30px);
    }
    
    .reveal.scale-in {
        transform: scale(0.95);
    }
    
    /* JS will add .revealed to trigger animation */
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
}

/* Without JS / reduced motion: everything stays visible */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal.from-bottom, .reveal.from-left, .reveal.from-right, .reveal.scale-in {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   GEOMETRIC DECORATIVE SHAPES
   ============================================ */
.geo-circle {
    border-radius: 50%;
}

.geo-square {
    border-radius: 12px;
}

.geo-diamond {
    transform: rotate(45deg);
    border-radius: 8px;
}

/* ============================================
   BUTTONS
   ============================================ */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 3px solid #8ec064;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   FORM STYLES
   ============================================ */
input::placeholder, textarea::placeholder {
    color: #a8c490;
}

input:focus, textarea:focus {
    background-color: #fefdf8;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 640px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        display: none;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .floating-card-3 {
        display: none;
    }
}

/* ============================================
   SUBTLE PATTERN OVERLAY (optional texture)
   ============================================ */
.bg-pattern {
    background-image: radial-gradient(circle, rgba(142, 192, 100, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    nav, #contactForm, button, .floating-card-1, .floating-card-2, .floating-card-3 {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black;
    }
}
