/* ===== Custom Styles for Maui Juice Company ===== */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollDot {
    0% {
        top: 0;
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

@keyframes pulseSlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.15;
    }
}

@keyframes pulseSlower {
    0%, 100% {
        transform: scale(1);
        opacity: 0.08;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.12;
    }
}

@keyframes bounceSlow {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-8px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulseSlow 6s ease-in-out infinite;
}

.animate-pulse-slower {
    animation: pulseSlower 8s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounceSlow 2s ease-in-out infinite;
}

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

.reveal.revealed {
    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; }

/* ===== Navigation ===== */
.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-logo-sub {
    transition: color 0.3s ease;
}

/* Light nav on hero (dark bg) */
nav.scrolled .nav-logo-text {
    color: #0A1628;
}

nav.scrolled .nav-logo-sub {
    color: #677fb2;
}

/* Dark nav on light sections */
nav.light .nav-logo-text {
    color: #0A1628;
}

nav.light .nav-logo-sub {
    color: #677fb2;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu button active state */
#menuBtn.active #bar1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuBtn.active #bar2 {
    opacity: 0;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a67a09;
}

/* ===== Selection ===== */
::selection {
    background: #C8960C;
    color: #0A1628;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C8960C;
    outline-offset: 2px;
}

/* ===== Image Optimization ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== Print Styles ===== */
@media print {
    nav, #contact, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

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

/* ===== Tablet ===== */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 3rem;
    }
    
    #hero h1 span {
        font-size: inherit;
    }
    
    .font-serif.text-5xl {
        font-size: 2.25rem;
    }
}

/* ===== Small Mobile ===== */
@media (max-width: 360px) {
    #hero h1 {
        font-size: 2.25rem;
    }
    
    .px-6 {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
