/* ═══════════════════════════════════════
   SJH Same Day Surgery — Custom Styles
   ═══════════════════════════════════════ */

/* ── Base ── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ── Nav ── */
#site-header {
    background: transparent;
}

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

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #E8674A;
    border-radius: 1px;
    transition: width 0.25s ease;
}

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

.mobile-link {
    border-radius: 0.75rem;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.mobile-link:hover {
    background: #FFF5F2;
}

/* ── Hero Badge ── */
.hero-badge {
    animation: badge-in 0.8s ease-out both;
}

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

/* ── Scroll Reveal (progressive enhancement) ── */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.is-hidden {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* Stagger children */
.grid .scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.grid .scroll-reveal:nth-child(2) { transition-delay: 80ms; }
.grid .scroll-reveal:nth-child(3) { transition-delay: 160ms; }
.grid .scroll-reveal:nth-child(4) { transition-delay: 240ms; }
.grid .scroll-reveal:nth-child(5) { transition-delay: 320ms; }
.grid .scroll-reveal:nth-child(6) { transition-delay: 400ms; }

/* ── Card hover ── */
.group:hover .card-icon {
    transform: scale(1.08);
}

.card-icon {
    transition: transform 0.3s ease;
}

/* ── Form ── */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(232, 103, 74, 0.12);
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-badge {
        animation: none;
    }
}

/* ── Focus visible ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #E8674A;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ── Selection ── */
::selection {
    background: rgba(232, 103, 74, 0.2);
    color: #1C1C24;
}
