/* ============================================
   CHEWALEH ASSOCIATED PHYSICIANS
   Bold Editorial Style — Burgundy & Blush
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --burgundy-900: #4a0010;
    --burgundy-800: #5c0014;
    --burgundy-700: #700018;
    --burgundy-600: #800020;
    --burgundy-500: #940028;
    --burgundy-400: #a81038;
    --burgundy-300: #c4204a;
    --burgundy-200: #e04068;
    --burgundy-100: #f0a0b8;
    --burgundy-50: #f8d0dc;

    --blush-50: #fef6f6;
    --blush-100: #fde8e8;
    --blush-200: #fbd4d6;
    --blush-300: #f8b0b8;
    --blush-400: #f48894;
    --blush-500: #ec6074;

    --cream: #fdfcfc;
    --warm-white: #faf7f6;
    --sand: #f5efec;
    --stone-100: #e8e0dc;
    --stone-200: #d4c8c2;
    --stone-400: #9e8e86;
    --stone-600: #6b5852;
    --stone-800: #3d2e28;
    --stone-900: #1e1512;

    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --shadow-sm: 0 1px 3px rgba(74, 0, 16, 0.06), 0 1px 2px rgba(74, 0, 16, 0.04);
    --shadow-md: 0 4px 16px rgba(74, 0, 16, 0.08), 0 2px 6px rgba(74, 0, 16, 0.04);
    --shadow-lg: 0 12px 40px rgba(74, 0, 16, 0.12), 0 4px 12px rgba(74, 0, 16, 0.06);
    --shadow-xl: 0 24px 60px rgba(74, 0, 16, 0.16);

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

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--stone-800);
    background: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.15;
    color: var(--stone-900);
}

em {
    font-style: italic;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 252, 252, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(128, 0, 32, 0.08);
    transition: box-shadow 0.3s ease;
}

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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--burgundy-700);
}

.nav-logo-icon {
    color: var(--burgundy-600);
}

.nav-logo:hover .nav-logo-icon {
    color: var(--burgundy-500);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--stone-600);
    transition: color 0.2s ease;
    letter-spacing: 0.01em;
}

.nav-links a:hover {
    color: var(--burgundy-600);
}

.nav-cta {
    background: var(--burgundy-600);
    color: white !important;
    padding: 10px 22px;
    border-radius: 100px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
    background: var(--burgundy-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--stone-800);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        var(--burgundy-800) 0%, 
        var(--burgundy-600) 25%, 
        var(--burgundy-500) 50%, 
        var(--burgundy-300) 75%, 
        var(--blush-300) 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(ellipse 600px 600px at 20% 80%, rgba(240, 160, 184, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 400px 400px at 80% 20%, rgba(148, 0, 40, 0.4) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 820px;
}

.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 28px;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.hero-headline {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    color: white;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-headline em {
    color: var(--blush-200);
}

.hero-subheadline {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 56px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: white;
    color: var(--burgundy-700);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: var(--blush-50);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.hero-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
}

.trust-item svg {
    opacity: 0.7;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: float 2.5s ease-in-out infinite;
}

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

/* --- Section Shared --- */
section {
    padding: 100px 0;
}

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

.section-eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--burgundy-500);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: var(--stone-900);
}

.section-title em {
    color: var(--burgundy-600);
}

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

/* --- Services Section --- */
.services {
    background: var(--warm-white);
}

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

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    border: 1px solid var(--stone-100);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--burgundy-600), var(--burgundy-300));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--burgundy-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--burgundy-600);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--burgundy-600);
    color: white;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--stone-900);
}

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

/* --- About Section --- */
.about {
    background: var(--cream);
}

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

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius-xl);
    width: 100%;
    height: 700px;
    object-fit: cover;
    box-shadow: var(--shadow-xl);
}

.about-image-accent {
    position: absolute;
    bottom: -24px;
    right: -24px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--burgundy-400), var(--burgundy-200));
    border-radius: var(--radius-xl);
    z-index: -1;
    opacity: 0.3;
}

.about-content .section-eyebrow {
    text-align: left;
}

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

.about-content > p {
    font-size: 1.0625rem;
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--stone-100);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--burgundy-600);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--stone-400);
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* --- Patients Section --- */
.patients {
    background: linear-gradient(135deg, var(--burgundy-800) 0%, var(--burgundy-600) 50%, var(--burgundy-400) 100%);
    color: white;
}

.patients .section-eyebrow {
    color: var(--blush-200);
}

.patients .section-title {
    color: white;
}

.patients .section-title em {
    color: var(--blush-200);
}

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

.patient-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.patient-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.patient-card-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    line-height: 1;
    margin-bottom: 20px;
}

.patient-card h3 {
    font-size: 1.1875rem;
    color: white;
    margin-bottom: 12px;
}

.patient-card p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.patient-card a {
    color: var(--blush-200);
    border-bottom: 1px solid rgba(248, 176, 184, 0.3);
    transition: color 0.2s, border-color 0.2s;
}

.patient-card a:hover {
    color: white;
    border-color: white;
}

/* --- Contact Section --- */
.contact {
    background: var(--warm-white);
}

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

.contact-intro {
    font-size: 1.0625rem;
    color: var(--stone-600);
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

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

.contact-detail strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    color: var(--stone-900);
    margin-bottom: 4px;
}

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

.contact-detail a {
    color: var(--burgundy-600);
    transition: color 0.2s;
}

.contact-detail a:hover {
    color: var(--burgundy-400);
}

.contact-form-wrapper {
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--stone-100);
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 28px;
    color: var(--stone-900);
}

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

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--stone-800);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--stone-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--stone-900);
    background: var(--cream);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--burgundy-400);
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
    background: white;
}

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

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

.form-success {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-sm);
    color: #065f46;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-top: 16px;
}

.form-success.show {
    display: flex;
}

.form-success svg {
    flex-shrink: 0;
    color: #10b981;
}

/* --- Map Section --- */
.map-section {
    border-top: 1px solid var(--stone-100);
}

.map-container {
    height: 400px;
    filter: saturate(0.6) contrast(1.1);
    transition: filter 0.3s ease;
}

.map-container:hover {
    filter: saturate(1) contrast(1);
}

/* --- Footer --- */
.footer {
    background: var(--stone-900);
    color: rgba(255, 255, 255, 0.65);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 56px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.05rem;
    color: white;
    margin-bottom: 16px;
}

.footer-logo:hover {
    color: var(--blush-200);
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.65);
    padding: 6px 0;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-links span {
    display: block;
    font-size: 0.9375rem;
    padding: 6px 0;
}

.footer-contact p {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 4px;
}

.footer-contact a {
    color: var(--blush-200);
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.35);
}

.footer-legal {
    max-width: 480px;
    text-align: right;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .patients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(253, 252, 252, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 32px 24px;
        gap: 20px;
        border-bottom: 1px solid var(--stone-100);
        transform: translateY(-120%);
        opacity: 0;
        transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
        pointer-events: none;
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    .nav-cta {
        text-align: center;
    }
    .hero {
        padding: 100px 20px 60px;
    }
    .hero-headline {
        font-size: clamp(1.8rem, 8vw, 2.8rem);
    }
    .hero-trust {
        gap: 16px;
    }
    .services {
        padding: 72px 0;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .about {
        padding: 72px 0;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-image img {
        height: 400px;
    }
    .about-content .section-eyebrow,
    .about-content .section-title {
        text-align: center;
    }
    .about-content > p {
        text-align: center;
    }
    .about-stats {
        text-align: center;
    }
    .patients {
        padding: 72px 0;
    }
    .patients-grid {
        grid-template-columns: 1fr;
    }
    .contact {
        padding: 72px 0;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .contact-form-wrapper {
        padding: 32px 24px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-legal {
        text-align: center;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .hero-trust {
        flex-direction: column;
        gap: 12px;
    }
    .about-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
