/* ========================================
   Mercy Family Medicine — Custom Styles
   Plum + Amber | Confident Corporate
======================================== */

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

:root {
    --plum-50:  #f5f0f7;
    --plum-100: #ebe0ef;
    --plum-200: #d4bfd9;
    --plum-300: #b894be;
    --plum-400: #9c6a9f;
    --plum-500: #7d4782;
    --plum-600: #4A235A;
    --plum-700: #3d1d4b;
    --plum-800: #2e1638;
    --plum-900: #1f0f25;
    --plum-950: #0f0810;

    --amber-50:  #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;

    --neutral-50:  #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    --neutral-950: #0a0a0a;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    --shadow-sm: 0 1px 2px rgba(74, 35, 90, 0.06);
    --shadow-md: 0 4px 16px rgba(74, 35, 90, 0.10);
    --shadow-lg: 0 12px 40px rgba(74, 35, 90, 0.14);
    --shadow-xl: 0 24px 60px rgba(74, 35, 90, 0.18);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--neutral-800);
    background: var(--neutral-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-align: center;
}

.btn-primary {
    background: var(--plum-600);
    color: #ffffff;
    border-color: var(--plum-600);
}

.btn-primary:hover {
    background: var(--plum-700);
    border-color: var(--plum-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--plum-600);
    border-color: var(--plum-600);
}

.btn-outline:hover {
    background: var(--plum-600);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-light {
    background: #ffffff;
    color: var(--plum-600);
    border-color: #ffffff;
}

.btn-light:hover {
    background: var(--amber-100);
    border-color: var(--amber-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--neutral-200);
    transition: all var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--plum-600);
}

.nav-logo-icon {
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--neutral-600);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--plum-600);
    background: var(--plum-50);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--plum-600);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero ---------- */
.hero {
    padding-top: 72px;
    background: linear-gradient(135deg, var(--plum-950) 0%, var(--plum-800) 50%, var(--plum-700) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(245, 158, 11, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(157, 106, 159, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 80px 0;
}

.hero-content {
    color: #ffffff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 197, 24, 0.15);
    border: 1px solid rgba(245, 197, 24, 0.3);
    color: var(--amber-300);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--amber-400);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-headline em {
    color: var(--amber-400);
    font-style: normal;
}

.hero-subheadline {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--plum-200);
    margin-bottom: 40px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 56px;
}

.hero-actions .btn-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.hero-actions .btn-outline:hover {
    background: #ffffff;
    color: var(--plum-600);
    border-color: #ffffff;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--amber-400);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--plum-300);
    letter-spacing: 0.02em;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
}

.hero-image {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-image-wrapper img {
    width: 100%;
    height: 700px;
    object-fit: cover;
}

.hero-image-accent {
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 200px;
    height: 200px;
    background: var(--amber-400);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.3;
}

.hero-image-card {
    position: absolute;
    bottom: 32px;
    left: -40px;
    background: #ffffff;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--neutral-800);
}

/* ---------- Section Shared ---------- */
.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--plum-600);
    background: var(--plum-50);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--neutral-900);
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-title.light {
    color: #ffffff;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--neutral-500);
    line-height: 1.7;
}

/* ---------- Services ---------- */
.services {
    padding: 100px 0;
    background: var(--neutral-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: #ffffff;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--plum-600), var(--amber-500));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.service-card:hover {
    border-color: var(--plum-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--plum-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--plum-600);
    margin-bottom: 20px;
    transition: all var(--transition);
}

.service-card:hover .service-icon {
    background: var(--plum-600);
    color: #ffffff;
}

.service-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--neutral-500);
    line-height: 1.7;
}

/* ---------- About ---------- */
.about {
    padding: 100px 0;
    background: #ffffff;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image-section {
    position: relative;
}

.about-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.about-image-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.about-image-grid img:first-child {
    height: 320px;
    grid-row: span 2;
}

.about-experience-badge {
    position: absolute;
    bottom: -24px;
    right: -24px;
    background: var(--plum-600);
    color: #ffffff;
    padding: 24px 28px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
}

.exp-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--amber-400);
    line-height: 1;
}

.exp-text {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--plum-200);
}

.about-content .section-tag {
    margin-bottom: 16px;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.about-lead {
    font-size: 1.0625rem;
    color: var(--neutral-600);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-content p {
    font-size: 0.9375rem;
    color: var(--neutral-500);
    line-height: 1.75;
    margin-bottom: 12px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-700);
}

/* ---------- Insurance CTA ---------- */
.insurance {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--plum-700) 0%, var(--plum-900) 100%);
    position: relative;
    overflow: hidden;
}

.insurance::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.insurance-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.insurance-content .section-title {
    margin-bottom: 20px;
}

.insurance-text {
    font-size: 1.0625rem;
    color: var(--plum-200);
    line-height: 1.75;
    margin-bottom: 36px;
}

/* ---------- Contact ---------- */
.contact {
    padding: 100px 0;
    background: var(--neutral-50);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #ffffff;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    transition: all var(--transition);
}

.contact-card:hover {
    border-color: var(--plum-200);
    box-shadow: var(--shadow-md);
}

.contact-card-icon {
    width: 48px;
    height: 48px;
    background: var(--plum-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-card h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--plum-600);
    margin-bottom: 4px;
}

.contact-card p {
    font-size: 0.9375rem;
    color: var(--neutral-600);
    line-height: 1.6;
}

.contact-card a {
    color: var(--plum-600);
    font-weight: 600;
    transition: color var(--transition);
}

.contact-card a:hover {
    color: var(--amber-600);
}

.contact-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* ---------- Contact Form ---------- */
.contact-form-wrapper {
    background: #ffffff;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.contact-form h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 8px;
}

.form-note {
    font-size: 0.875rem;
    color: var(--neutral-500);
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--neutral-800);
    background: var(--neutral-50);
    border: 1.5px solid var(--neutral-200);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--plum-500);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(74, 35, 90, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--neutral-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.form-success h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--neutral-900);
    margin: 16px 0 8px;
}

.form-success p {
    color: var(--neutral-500);
    font-size: 0.9375rem;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--plum-950);
    color: var(--plum-200);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--plum-300);
    margin-top: 16px;
    max-width: 320px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.0625rem;
    color: #ffffff;
}

.footer-logo-icon {
    flex-shrink: 0;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--amber-400);
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--plum-300);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-contact p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--plum-300);
}

.footer-contact a {
    color: var(--amber-400);
    font-weight: 500;
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--plum-400);
}

.footer-bottom a {
    color: var(--amber-400);
    font-size: 0.8125rem;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-container {
        gap: 40px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-container {
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(250, 250, 250, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 24px;
        gap: 8px;
        border-bottom: 1px solid var(--neutral-200);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition);
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        padding: 48px 0;
        gap: 48px;
    }

    .hero-image {
        order: -1;
    }

    .hero-image-wrapper img {
        height: 400px;
    }

    .hero-image-card {
        left: 16px;
        bottom: 16px;
    }

    .hero-image-accent {
        display: none;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat-divider {
        display: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .about-image-section {
        order: -1;
    }

    .about-experience-badge {
        right: 16px;
        bottom: -16px;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form-wrapper {
        padding: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-headline {
        font-size: 1.875rem;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

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