/* ============================================
   Buster's Produce — Custom Styles
   Clean minimalist · Plum + Amber palette
   ============================================ */

/* ---- Base / Reset ---- */
*, *::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 {
    background: #8a4d65;
    color: #faf8f5;
}

/* ---- Clip for hero diagonal ---- */
.clip-diagonal {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* ---- Scroll indicator animation ---- */
@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* ---- Hero reveal animations ---- */
@keyframes heroReveal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-reveal {
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

.hero-reveal:nth-child(1) { animation-delay: 0.1s; }
.hero-reveal:nth-child(2) { animation-delay: 0.25s; }
.hero-reveal:nth-child(3) { animation-delay: 0.4s; }
.hero-reveal:nth-child(4) { animation-delay: 0.55s; }

/* ---- Hero image animation ---- */
@keyframes heroImageIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-image-wrapper {
    animation: heroImageIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
    opacity: 0;
}

/* ---- Floating card animation ---- */
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-float {
    animation: heroFloat 4s ease-in-out infinite 1.2s;
}

/* ---- Scroll reveal ---- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

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

#navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(232, 226, 220, 1);
}

/* ---- Nav link underline hover ---- */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: #8a4d65;
    transition: width 0.3s ease;
    margin-top: 2px;
}

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

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

#mobile-menu.close {
    opacity: 0;
    pointer-events: none;
}

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

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #8a4d65;
    transition: width 0.3s ease;
}

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

/* ---- Hamburger animation ---- */
#menu-toggle.active #bar1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active #bar2 {
    opacity: 0;
}

#menu-toggle.active #bar3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* ---- Product card image hover ---- */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ---- Subtle image shimmer ---- */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ---- Vertical text for scroll indicator ---- */
.writing-vertical-rl {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* ---- Focus styles ---- */
input:focus,
textarea:focus {
    outline: none;
}

/* ---- Smooth image loading ---- */
img {
    display: block;
    max-width: 100%;
}

/* ---- Reduce motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ---- Print ---- */
@media print {
    #navbar,
    .scroll-indicator {
        display: none;
    }
}
