/* ============================================
   BOBA BABY — Custom Styles
   Warm, friendly, rounded, approachable
   ============================================ */

/* --- 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;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF6F0;
}
::-webkit-scrollbar-thumb {
    background: #D9522A;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C73D1C;
}

/* --- Selection --- */
::selection {
    background: #F9DDD3;
    color: #71271B;
}

/* --- Blob Animation --- */
@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.05); }
    50% { transform: translate(-10px, 20px) scale(0.95); }
    75% { transform: translate(15px, 10px) scale(1.02); }
}

.animate-blob {
    animation: blob 8s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* --- Float Animation --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

.animation-delay-1500 {
    animation-delay: 1.5s;
}

/* --- Scroll Dot --- */
@keyframes scroll-dot {
    0% { top: -12px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

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

/* --- Bounce Slow --- */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

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

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- 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;
    }
}

/* --- Nav Scroll State --- */
.nav-scrolled {
    background: rgba(254, 252, 247, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
}

/* --- Nav Links --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #D9522A;
    border-radius: 999px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

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

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

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

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

/* --- Touch device adjustments --- */
@media (hover: none) {
    .group:hover { transform: none; }
    .group:hover > div:first-child { transform: none; }
}
