/* ============================================
   Dr. David E. Harman — Medical Practice Website
   Clean Minimalist · Emerald & Cream
   ============================================ */

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

:root {
    --emerald-950: #042f23;
    --emerald-900: #064e3b;
    --emerald-800: #065f46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --cream: #faf8f5;
    --cream-dark: #f2efe9;
    --cream-mid: #e8e4dc;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --white: #ffffff;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.7;
    color: var(--stone-800);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

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

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--emerald-800);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    z-index: 200;
    font-size: 0.875rem;
    transition: top var(--transition);
}
.skip-link:focus {
    top: 16px;
}

/* ---------- HEADER / NAV ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--stone-200);
    transition: box-shadow var(--transition);
}
.site-header.scrolled {
    box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--emerald-800);
    letter-spacing: -0.01em;
}
.logo-mark {
    display: flex;
    align-items: center;
    color: var(--emerald-700);
}

.logo-footer {
    color: var(--white);
}

/* Nav */
.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--stone-600);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    letter-spacing: 0.01em;
}
.nav-link:hover {
    color: var(--emerald-700);
    background: rgba(6, 95, 70, 0.06);
}

.btn-nav {
    margin-left: 8px;
    background: var(--emerald-800);
    color: var(--white) !important;
    border-radius: var(--radius-md);
    padding: 8px 20px;
    font-weight: 500;
}
.btn-nav:hover {
    background: var(--emerald-700);
    color: var(--white) !important;
    background: rgba(6, 95, 70, 0.06) !important;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--stone-700);
    transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--emerald-900);
    overflow: hidden;
    padding: 120px 24px 80px;
}
.hero-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
}
.hero-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 24px;
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 100px;
}
.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.hero-title em {
    font-style: italic;
    color: rgba(255,255,255,0.85);
}
.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 300;
}
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}
.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.hero-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.meta-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}
.meta-value {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    font-weight: 400;
}
.hero-meta-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.15);
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.35);
}
.hero-scroll-indicator span {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.35), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(0.5); opacity: 1; }
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.01em;
}
.btn-primary {
    background: var(--emerald-700);
    color: var(--white);
    border-color: var(--emerald-700);
}
.btn-primary:hover {
    background: var(--emerald-600);
    border-color: var(--emerald-600);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(6, 95, 70, 0.25);
}
.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.3);
}
.btn-ghost:hover {
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.08);
}
.btn-lg {
    padding: 18px 36px;
    font-size: 1rem;
}
.btn-full {
    width: 100%;
    justify-content: center;
}

/* ---------- SECTIONS ---------- */
.section {
    padding: 100px 0;
}
.section-light {
    background: var(--white);
}
.section-dark {
    background: var(--emerald-900);
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}
.section-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--emerald-700);
    margin-bottom: 16px;
}
.section-eyebrow-light {
    color: rgba(255,255,255,0.5);
}
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--stone-900);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.section-title-light {
    color: var(--white);
}
.section-subtitle {
    font-size: 1.05rem;
    color: var(--stone-500);
    line-height: 1.8;
    font-weight: 300;
}

/* ---------- SERVICES GRID ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}
.service-card {
    background: var(--white);
    padding: 40px 32px;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.service-card:hover {
    border-color: var(--emerald-200, #a7f3d0);
    box-shadow: 0 8px 32px rgba(6, 95, 70, 0.08);
    transform: translateY(-2px);
}
.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-700);
    margin-bottom: 20px;
}
.service-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--stone-800);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.service-desc {
    font-size: 0.9rem;
    color: var(--stone-500);
    line-height: 1.7;
    font-weight: 300;
}

/* ---------- ABOUT ---------- */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.about-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.about-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}
.about-image-accent {
    position: absolute;
    bottom: -16px;
    right: -16px;
    width: 120px;
    height: 120px;
    background: var(--emerald-800);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.1;
}
.about-content-col {
    padding: 16px 0;
}
.about-body {
    font-size: 1rem;
    color: var(--stone-600);
    line-height: 1.85;
    margin-bottom: 20px;
    font-weight: 300;
}
.about-values {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.value-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.value-number {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--emerald-600);
    line-height: 1;
    opacity: 0.6;
    flex-shrink: 0;
    margin-top: 2px;
}
.value-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--stone-800);
    margin-bottom: 4px;
}
.value-desc {
    font-size: 0.9rem;
    color: var(--stone-500);
    line-height: 1.6;
    font-weight: 300;
}

/* ---------- PATIENT INFO ---------- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.info-block {
    background: var(--white);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: all var(--transition);
}
.info-block:hover {
    border-color: var(--emerald-200, #a7f3d0);
    box-shadow: 0 4px 20px rgba(6, 95, 70, 0.06);
}
.info-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.info-block-icon {
    color: var(--emerald-700);
    flex-shrink: 0;
}
.info-block-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--stone-800);
}
.info-block-body {
    font-size: 0.9rem;
    color: var(--stone-500);
    line-height: 1.7;
    font-weight: 300;
}

/* ---------- LOCATION ---------- */
.location-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}
.location-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.location-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
}
.location-icon {
    color: var(--emerald-700);
    flex-shrink: 0;
    margin-top: 2px;
}
.location-address {
    font-style: normal;
    font-size: 1rem;
    color: var(--stone-700);
    line-height: 1.6;
    font-weight: 400;
}
.location-phone {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.phone-link {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--emerald-700);
    transition: color var(--transition);
}
.phone-link:hover {
    color: var(--emerald-600);
}
.phone-label {
    font-size: 0.8rem;
    color: var(--stone-400);
    font-weight: 300;
}
.location-hours {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.location-hours p {
    font-size: 0.9rem;
    color: var(--stone-600);
    font-weight: 400;
}
.hours-time {
    font-size: 1rem !important;
    color: var(--emerald-700) !important;
    font-weight: 500 !important;
}
.location-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--stone-200);
}
.map-link {
    position: relative;
    display: block;
}
.map-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.map-link:hover img {
    transform: scale(1.03);
}
.map-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--stone-700);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: all var(--transition);
}
.map-link:hover .map-overlay {
    background: var(--emerald-800);
    color: var(--white);
}

/* ---------- CONTACT CTA ---------- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}
.contact-content {
    padding: 16px 0;
}
.contact-body {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    margin-bottom: 32px;
    font-weight: 300;
}
.contact-cta {
    margin-bottom: 40px;
}
.contact-divider {
    width: 48px;
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin-bottom: 32px;
}
.contact-address p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
    font-weight: 300;
    line-height: 1.7;
}
.contact-hours {
    font-size: 0.85rem !important;
    color: rgba(255,255,255,0.45) !important;
    margin-top: 4px;
}

/* Contact Form */
.contact-form-col {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
}
.form-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--stone-800);
    margin-bottom: 6px;
}
.form-subtitle {
    font-size: 0.875rem;
    color: var(--stone-400);
    margin-bottom: 28px;
    font-weight: 300;
}
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--stone-600);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--stone-800);
    background: var(--stone-50);
    border: 1.5px solid var(--stone-200);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus,
.form-textarea:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--stone-400);
}
.form-textarea {
    resize: vertical;
    min-height: 100px;
}
.form-success {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(6, 95, 70, 0.06);
    border: 1px solid rgba(6, 95, 70, 0.15);
    border-radius: var(--radius-md);
    color: var(--emerald-700);
    font-size: 0.9rem;
    font-weight: 400;
}
.form-success svg {
    flex-shrink: 0;
    color: var(--emerald-600);
}

/* ---------- FOOTER ---------- */
.site-footer {
    background: var(--emerald-950);
    padding: 64px 0 0;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
    margin-top: 12px;
    font-weight: 300;
    max-width: 280px;
}
.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-links a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.55);
    font-weight: 300;
    transition: color var(--transition);
}
.footer-links a:hover {
    color: var(--white);
}
.footer-phone {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--white);
    transition: color var(--transition);
}
.footer-phone:hover {
    color: var(--emerald-400);
}
.footer-address {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    margin-top: 6px;
    font-weight: 300;
}
.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.8rem;
    color: rgba(255,255,255,0.3);
    font-weight: 300;
}
.footer-notice {
    font-size: 0.75rem !important;
    color: rgba(255,255,255,0.2) !important;
    max-width: 400px;
    text-align: right;
}

/* ---------- SCROLL REVEAL (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Default visible state for reduced-motion or no-JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-layout {
        gap: 40px;
    }
    .contact-layout {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    .section {
        padding: 72px 0;
    }

    /* Mobile nav */
    .nav-toggle {
        display: flex;
    }
    .nav {
        position: fixed;
        inset: 0;
        background: rgba(250, 248, 245, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 105;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition);
    }
    .nav.open {
        opacity: 1;
        pointer-events: all;
    }
    .nav-list {
        flex-direction: column;
        gap: 8px;
    }
    .nav-link {
        font-size: 1.1rem;
        padding: 12px 24px;
    }
    .btn-nav {
        margin-left: 0;
        margin-top: 8px;
    }

    /* Hero */
    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .hero-meta {
        flex-direction: column;
        gap: 16px;
    }
    .hero-meta-divider {
        display: none;
    }

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

    /* About */
    .about-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .about-image-col {
        order: -1;
    }

    /* Patient Info */
    .info-grid {
        grid-template-columns: 1fr;
    }

    /* Location */
    .location-layout {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .contact-form-col {
        padding: 28px;
    }

    /* Footer */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-notice {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.9rem;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .service-card {
        padding: 28px 24px;
    }
}
