/* === Custom Styles for BoxDrop Livingston === */

:root {
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-900: #064e3b;
    --cream-50: #fefdf8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

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

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(5, 150, 105, 0.1);
}

.nav-brand-text {
    transition: color 0.4s ease;
}

.nav-brand-sub {
    transition: color 0.4s ease;
}

#navbar:not(.scrolled) .nav-brand-text {
    color: #064e3b;
}

#navbar:not(.scrolled) .nav-brand-sub {
    color: rgba(6, 78, 59, 0.7);
}

#navbar.scrolled .nav-brand-text {
    color: #064e3b;
}

#navbar.scrolled .nav-brand-sub {
    color: rgba(5, 150, 105, 0.7);
}

.nav-link {
    position: relative;
}

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

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

#navbar:not(.scrolled) .nav-link {
    color: #064e3b;
}

/* === Hero === */
.hero-bg {
    will-change: transform;
}

.hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(6, 78, 59, 0.55) 0%,
        rgba(6, 78, 59, 0.45) 40%,
        rgba(6, 78, 59, 0.65) 100%
    );
}

/* Hero entrance animations */
.hero-badge {
    animation: fadeInDown 0.8s ease forwards;
    opacity: 0;
}

.hero h1 {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero p {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero > div > div:nth-child(3) > div {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.hero-scroll-indicator {
    animation: fadeIn 0.8s ease 1.2s forwards;
    opacity: 0;
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.35s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.45s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.55s; }

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

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

.mobile-nav-link {
    display: block;
}

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

/* === Button Hover Effects === */
a[href="#products"]:hover {
    transform: translateY(-1px);
}

/* === Selection === */
::selection {
    background: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

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

/* === Smooth Image Loading === */
img {
    background-color: #d1fae5;
}

/* === 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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* === Utility: Container === */
.max-w-7xl {
    max-width: 80rem;
}

/* === Custom scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #ecfdf5;
}

::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}
