/* === Custom Styles for Clifford Butterman, MD === */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background-color: rgba(78, 205, 196, 0.25);
    color: #0A2342;
}

/* === Navbar transitions === */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

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

#navbar.scrolled .nav-link {
    color: rgba(10, 35, 66, 0.7) !important;
}

#navbar.scrolled .nav-link:hover {
    color: #0A2342 !important;
}

#navbar.scrolled #nav-brand-name {
    color: #0A2342 !important;
}

/* === Service card hover animation === */
.service-card {
    transform: translateY(0);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(10, 35, 66, 0.08);
}

/* === Scroll reveal animations === */
/* Default state: visible (progressive enhancement - content shows even without JS) */
.reveal {
    opacity: 1;
    transform: none;
}

/* Animated state only when JS adds the class */
.reveal-animate {
    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-animate.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-animate {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

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

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

/* === Pulse animation for status dot === */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

.animate-pulse {
    animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* === Button focus styles === */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #4ECDC4;
    outline-offset: 2px;
}

/* === Image loading placeholder === */
img {
    background-color: #F7F5F2;
}

/* === Form input autofill === */
input:-webkit-autofill,
textarea:-webkit-autofill {
    box-shadow: 0 0 0 32px white inset !important;
    -webkit-text-fill-color: #0A2342 !important;
    transition: background-color 0s, color 0s;
}

/* === Subtle parallax on hero decorative elements === */
@media (prefers-reduced-motion: no-preference) {
    .hero-float-1 {
        animation: float-slow 8s ease-in-out infinite;
    }
    .hero-float-2 {
        animation: float-slow 10s ease-in-out infinite reverse;
    }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* === Tablet adjustments === */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

/* === Print styles === */
@media print {
    #navbar,
    #mobile-menu-btn,
    .reveal-animate {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
