/* ============================================
   Dr. Larry S. Sasaki — Custom Styles
   Charcoal + Coral | Warm & Approachable
   ============================================ */

/* --- Scroll Behavior --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* --- Navbar Transitions --- */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-serif {
    color: #1f2937 !important;
}

#navbar.scrolled a:not([class*="bg-"]) {
    color: #4b5563 !important;
}

#navbar.scrolled a:not([class*="bg-"]):hover {
    color: #FF6B57 !important;
}

/* --- Service Cards --- */
.service-card {
    transform: translateY(0);
}

/* --- About Image --- */
.about-image img {
    transition: transform 0.6s ease;
}

.about-image:hover img {
    transform: scale(1.02);
}

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

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

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

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .service-card {
        transition: none;
    }
    
    .about-image img {
        transition: none;
    }
}

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

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

/* --- Utility: stagger children --- */
.stagger-children > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.3s; }

.stagger-children.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .stagger-children > * {
        opacity: 1;
        transform: none;
        transition: none;
        transition-delay: 0s !important;
    }
}
