/* ===== Custom Styles for Starbucks San Mateo ===== */

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

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

/* ===== Scroll Reveal Animations ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS is active and motion is preferred, add the hidden initial state */
@media (prefers-reduced-motion: no-preference) {
    html.animate-on-scroll .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

    html.animate-on-scroll .reveal.delay-1 { transition-delay: 0.1s; }
    html.animate-on-scroll .reveal.delay-2 { transition-delay: 0.2s; }
    html.animate-on-scroll .reveal.delay-3 { transition-delay: 0.3s; }
}

/* ===== Floating Animation ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.03); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
    animation-delay: 2s;
}

/* ===== Navbar Scroll Effect ===== */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(2, 44, 34, 0.3);
}

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

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

.mobile-nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.mobile-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

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

/* ===== Selection ===== */
::selection {
    background-color: #065f46;
    color: #ffffff;
}

/* ===== Smooth image loading ===== */
img {
    background-color: #e5e7eb;
}

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

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

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

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

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.15;
    }

    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
