/* ===== Custom Styles for The Produce Porch ===== */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDFBF7;
}
::-webkit-scrollbar-thumb {
    background: #d4a088;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9351a;
}

/* Selection Color */
::selection {
    background: #fce8de;
    color: #6d2014;
}

/* ===== Reveal Animations (Progressive Enhancement) ===== */
/* Default state: visible. JS adds .revealed class for animation. */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ===== Navbar Transition ===== */
#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-link {
    color: #44403c;
}

#navbar.scrolled .nav-link:hover {
    color: #c9351a;
}

#navbar.scrolled .font-serif {
    color: #1c1917;
}

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

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

/* ===== Hero Decorative Lines ===== */
@keyframes growDown {
    from { height: 0; opacity: 0; }
    to { height: 96px; opacity: 1; }
}

/* ===== Button Focus States ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c9351a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Image Loading Placeholder ===== */
img {
    background-color: #e7e5e4;
}

/* ===== Form Styles ===== */
input, textarea {
    border: 1px solid #d6d3d1;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    background: white;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #c9351a;
    box-shadow: 0 0 0 3px rgba(201, 53, 26, 0.1);
}

input::placeholder, textarea::placeholder {
    color: #a8a29e;
}

/* ===== Success Message ===== */
.success-message {
    animation: fadeInUp 0.5s ease forwards;
}

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

/* ===== Product Card Hover ===== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ===== Floating Card Shadow ===== */
.shadow-xl {
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
}

/* ===== Tablet ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    .font-serif.text-5xl {
        font-size: 3rem;
    }
}

/* ===== Small Mobile ===== */
@media (max-width: 360px) {
    .font-serif.text-4xl {
        font-size: 2rem;
    }
}
