/* ============================================
   Stevens Family Services — Custom Styles
   Classic & Elegant | Deep Navy + Warm Gold
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 168, 76, 0.25);
    color: #1a2744;
}

/* ---- Skip Link ---- */
.skip-link:focus {
    z-index: 9999;
}

/* ---- Navigation ---- */
.nav-header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #c9a84c;
    transition: width 0.3s ease;
}

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

/* Mobile menu */
.menu-line {
    display: block;
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 6 !important;
}

.mobile-nav-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* ---- Hero Section ---- */
.hero {
    position: relative;
}

.hero-bg-pattern {
    background-image:
        radial-gradient(circle at 20% 80%, rgba(201, 168, 76, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 168, 76, 0.06) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-accent-line {
    animation: heroAccentLine 0.8s ease-out both;
}

@keyframes heroAccentLine {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 4rem;
        opacity: 1;
    }
}

.hero-subtitle {
    animation: heroFadeUp 0.8s ease-out 0.1s both;
}

.hero-text h1 {
    animation: heroFadeUp 0.8s ease-out 0.2s both;
}

.hero-description {
    animation: heroFadeUp 0.8s ease-out 0.3s both;
}

.hero-ctas {
    animation: heroFadeUp 0.8s ease-out 0.4s both;
}

.hero-trust {
    animation: heroFadeUp 0.8s ease-out 0.5s both;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-image-wrapper {
    animation: heroImageIn 1s ease-out 0.3s both;
}

@keyframes heroImageIn {
    from {
        opacity: 0;
        transform: translateX(32px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-img {
    transition: transform 0.6s ease;
}

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

.hero-image-overlay {
    pointer-events: none;
}

.hero-floating-card {
    animation: heroFloat 3s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-cta-arrow {
    transition: transform 0.3s ease;
}

.cta-primary:hover .hero-cta-arrow {
    transform: translateX(4px);
}

.hero-scroll-indicator {
    animation: heroScrollBounce 2s ease-in-out infinite;
}

@keyframes heroScrollBounce {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
    50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* ---- Section Shared ---- */
.section {
    position: relative;
}

.section-accent-line {
    transition: width 0.6s ease;
}

.section-subtitle {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.section-title {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.section-description {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ---- Services ---- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

.service-icon {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.05);
}

/* ---- About ---- */
.about-image-wrapper {
    transition: transform 0.4s ease;
}

.about-image-frame {
    transition: transform 0.4s ease;
}

.about-image-wrapper:hover .about-image-frame {
    transform: translate(8px, -8px);
}

.about-image-accent {
    transition: transform 0.4s ease;
}

.about-image-wrapper:hover .about-image-accent {
    transform: translate(-4px, 4px);
}

.about-value {
    transition: transform 0.3s ease;
}

.about-value:hover {
    transform: translateY(-2px);
}

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

.about-value:hover .about-value-icon {
    transform: scale(1.1);
}

/* ---- Patient Info ---- */
.info-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.info-card:hover {
    transform: translateX(4px);
}

.info-card:hover .info-card-number {
    background: #c9a84c;
}

/* ---- Contact ---- */
.contact-item {
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(4px);
}

.contact-icon {
    transition: background-color 0.3s ease;
}

.contact-item:hover .contact-icon {
    background: rgba(201, 168, 76, 0.2);
}

/* ---- Form ---- */
.form-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    border-color: #c9a84c;
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-submit {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-submit:active {
    transform: scale(0.98);
}

.form-success {
    animation: formSuccessIn 0.4s ease-out;
}

@keyframes formSuccessIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Footer ---- */
.footer-link {
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c9a84c;
    transition: width 0.3s ease;
}

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

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

.reveal.revealed {
    opacity: 1;
    transform: none;
}

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

/* ---- Responsive adjustments ---- */
@media (max-width: 1023px) {
    .hero {
        padding-top: 6rem;
    }

    .hero-image-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-floating-card {
        display: none;
    }
}

@media (max-width: 639px) {
    .hero-text h1 {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ---- Utility: visually hidden ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: auto;
    height: auto;
    padding: 0.75rem 1.5rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: #1a2744;
    color: #c9a84c;
    border-radius: 0.5rem;
    z-index: 9999;
}
