/* ===== Custom Styles for McKenzie Cranberry ===== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-display {
    font-family: 'Playfair Display', Georgia, serif;
}

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

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(4, 72, 58, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.3s ease;
}

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

/* ===== Hero Animations ===== */
.hero-shape {
    animation: float 6s ease-in-out infinite;
}

.shape-circle-1 { animation-delay: 0s; animation-duration: 7s; }
.shape-circle-2 { animation-delay: -2s; animation-duration: 9s; }
.shape-circle-3 { animation-delay: -4s; animation-duration: 5s; }
.shape-circle-4 { animation-delay: -1s; animation-duration: 8s; }
.shape-triangle { animation-delay: -3s; animation-duration: 6s; }
.shape-triangle-2 { animation-delay: -5s; animation-duration: 7s; }
.shape-cross { animation-delay: -2s; animation-duration: 8s; }
.shape-cross-2 { animation-delay: -6s; animation-duration: 5s; }
.shape-dots { animation-delay: -1s; animation-duration: 6s; }
.shape-dots-2 { animation-delay: -3s; animation-duration: 7s; }
.shape-ring { animation-delay: -4s; animation-duration: 10s; }
.shape-ring-2 { animation-delay: -7s; animation-duration: 8s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(8px) rotate(-1deg); }
}

.hero-badge {
    animation: fadeSlideDown 0.8s ease-out both;
}

.hero-title {
    animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    animation: fadeSlideUp 0.8s ease-out 0.4s both;
}

.hero-ctas {
    animation: fadeSlideUp 0.8s ease-out 0.6s both;
}

.hero-trust {
    animation: fadeSlideUp 0.8s ease-out 0.8s both;
}

.hero-scroll {
    animation: fadeSlideUp 0.8s ease-out 1s both;
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ===== Marquee ===== */
.marquee-track {
    animation: marquee 25s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Product Cards ===== */
.product-card {
    opacity: 1;
}

.product-card .group:hover img {
    transform: scale(1.05);
}

.product-card .group:hover {
    transform: translateY(-4px);
}

.product-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

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

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

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

/* Reduced 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;
    }
    
    .marquee-track {
        animation: none;
    }
}

/* ===== Back to Top ===== */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(4, 72, 58, 0.08);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-title br {
        display: none;
    }
    
    .hero-title span {
        display: inline;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 5rem;
    }
}

/* ===== Focus styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Selection ===== */
::selection {
    background-color: #059669;
    color: white;
}
