/* ═══════════════════════════════════════════════════
   Dr. Marc Menkowitz — Shrewsbury, NJ
   Custom styles & animations
   ═══════════════════════════════════════════════════ */

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Default: always visible (no JS) */
.reveal {
    opacity: 1;
    transform: none;
}

/* ── Hero badge pulse ── */
@keyframes subtle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.hero-badge span:first-child {
    animation: subtle-pulse 3s ease-in-out infinite;
}

/* ── Smooth focus outlines ── */
*:focus-visible {
    outline: 2px solid #115e59;
    outline-offset: 2px;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fafaf9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ── Mobile menu transitions ── */
#mobile-menu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
}
#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* ── Navigation link hover underline ── */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ── Mobile menu lines animation ── */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}
#menu-btn.active .menu-line:first-child {
    transform: translateY(5px) rotate(45deg);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: translateY(-5px) rotate(-45deg);
}

/* ── Service card image hover ── */
.service-card:hover .service-card-img {
    transform: scale(1.05);
}
.service-card-img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Selection color ── */
::selection {
    background: #115e59;
    color: #f5f5f4;
}
