/* ============================================
   Groom S and H Grocery — Custom Styles
   ============================================ */

/* ---- Base & Typography ---- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(168, 230, 207, 0.3);
    color: #0A2342;
}

/* ---- Section Shared Styles ---- */
.section-label {
    display: block;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
}

.section-desc {
    font-size: 1.05rem;
}

/* ---- Hero Animations ---- */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation-name: fade-up;
    animation-duration: 0.9s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: forwards;
}

/* ---- Navbar ---- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(245, 249, 252, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(168, 230, 207, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #2D9B7A;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* ---- Mobile Menu ---- */
.mobile-link {
    position: relative;
}

/* ---- CTA Buttons ---- */
.cta-primary {
    box-shadow: 0 4px 20px rgba(168, 230, 207, 0.3);
}

.cta-primary:hover {
    box-shadow: 0 8px 30px rgba(168, 230, 207, 0.4);
    transform: translateY(-2px);
}

.cta-secondary:hover {
    transform: translateY(-2px);
}

/* ---- Product Cards ---- */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #A8E6CF, #2D9B7A);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-4px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- Mobile Menu Animation ---- */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

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

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* ---- Image Hover ---- */
.aspect-\[4\/5\] img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.aspect-\[4\/5\]:hover img {
    transform: scale(1.03);
}

/* ---- Form Focus States ---- */
input:focus,
textarea:focus {
    background: white;
}

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

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
}

@media (max-width: 640px) {
    #navbar {
        background: rgba(245, 249, 252, 0.98);
        backdrop-filter: blur(20px);
    }
}
