/* ========================================
   John B. Fontana, MD — Primary Care
   Bold Editorial Medical Website
======================================== */

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

:root {
    --forest: #2D5A3D;
    --forest-dark: #1E3F2A;
    --forest-light: #3D7A52;
    --cream: #F5F0E8;
    --cream-light: #FAF7F2;
    --cream-dark: #E8E0D0;
    --charcoal: #1A1A1A;
    --text: #2C2C2C;
    --text-light: #5A5A5A;
    --text-muted: #8A8A8A;
    --white: #FFFFFF;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
}

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

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--cream-light);
    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;
}

/* ---------- Header ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    transition: var(--transition);
    background: transparent;
}

.header.scrolled {
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    transition: var(--transition);
    z-index: 1001;
}

.header.scrolled .logo {
    color: var(--forest);
}

.logo-mark {
    display: flex;
    align-items: center;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-name {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.logo-tagline {
    font-size: 0.65rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.7;
}

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

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: var(--transition);
}

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

.nav-link:hover {
    color: var(--white);
}

.header.scrolled .nav-link {
    color: var(--text-light);
}

.header.scrolled .nav-link:hover {
    color: var(--forest);
}

.nav-cta {
    background: var(--white);
    color: var(--forest) !important;
    padding: 10px 20px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: var(--transition);
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background: var(--cream);
    transform: translateY(-1px);
}

.header.scrolled .nav-cta {
    background: var(--forest);
    color: var(--white) !important;
}

.header.scrolled .nav-cta:hover {
    background: var(--forest-dark);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
    transform-origin: center;
}

.header.scrolled .hamburger-line {
    background: var(--forest);
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 63, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav ul {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-link {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--cream);
    padding: 12px 24px;
    display: block;
    transition: var(--transition);
}

.mobile-nav-link:hover {
    color: var(--white);
}

.mobile-nav-cta {
    margin-top: 24px;
}

.mobile-nav-cta a {
    display: inline-block;
    background: var(--white);
    color: var(--forest) !important;
    padding: 16px 36px;
    border-radius: 100px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(30, 63, 42, 0.88) 0%,
        rgba(45, 90, 61, 0.75) 50%,
        rgba(26, 26, 26, 0.65) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 120px 0 80px;
    width: 100%;
}

.hero-accent-line {
    width: 60px;
    height: 3px;
    background: rgba(255,255,255,0.6);
    margin-bottom: 28px;
    border-radius: 2px;
}

.hero-eyebrow {
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2.75rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 24px;
    max-width: 800px;
    letter-spacing: -0.02em;
}

.hero-headline em {
    font-style: italic;
    font-weight: 400;
    opacity: 0.85;
}

.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: rgba(255,255,255,0.8);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 40px;
    font-weight: 300;
}

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

.hero-trust {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

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

.trust-icon {
    display: flex;
    color: rgba(255,255,255,0.5);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 100px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--white);
    color: var(--forest);
}

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

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

.btn-ghost:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
}

.btn-light {
    background: var(--white);
    color: var(--forest);
}

.btn-light:hover {
    background: var(--cream);
}

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

.btn-lg {
    padding: 18px 40px;
    font-size: 1.0625rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    z-index: 1;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-text {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.5; transform: scaleY(0.8); }
}

/* ---------- Section Labels ---------- */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--forest);
    margin-bottom: 16px;
}

.section-label-light {
    color: rgba(255,255,255,0.6);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--charcoal);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.section-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--forest);
}

.section-title-light {
    color: var(--white);
}

.section-title-light em {
    color: rgba(255,255,255,0.7);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 560px;
    line-height: 1.7;
}

/* ---------- Intro Section ---------- */
.intro {
    padding: 120px 0;
    background: var(--cream-light);
}

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

.intro-image-wrap {
    position: relative;
}

.intro-image-wrap img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 4px;
}

.intro-image-accent {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    border: 2px solid var(--forest);
    border-radius: 4px;
    z-index: -1;
}

.intro-content .lead {
    font-size: 1.125rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 20px;
}

.intro-content p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 16px;
}

.intro-values {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 40px;
}

.value-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.value-number {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--forest);
    line-height: 1;
    min-width: 36px;
}

.value-item h4 {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.value-item p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

/* ---------- Services Section ---------- */
.services {
    padding: 120px 0;
    background: var(--white);
}

.services .section-header {
    text-align: center;
    margin-bottom: 64px;
}

.services .section-subtitle {
    margin: 0 auto;
}

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

.service-card {
    padding: 40px 32px;
    border-radius: 4px;
    background: var(--cream-light);
    transition: var(--transition);
    border: 1px solid transparent;
}

.service-card:hover {
    background: var(--white);
    border-color: var(--cream-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--forest);
    color: var(--white);
    margin-bottom: 24px;
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 12px;
}

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

/* ---------- Philosophy Section ---------- */
.philosophy {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.philosophy-bg {
    position: absolute;
    inset: 0;
}

.philosophy-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.philosophy-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 63, 42, 0.92) 0%, rgba(45, 90, 61, 0.85) 100%);
}

.philosophy-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.philosophy-text {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.8;
    margin-bottom: 48px;
}

.philosophy-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.7);
}

.stat-divider {
    color: rgba(255,255,255,0.3);
}

/* ---------- Patients Section ---------- */
.patients {
    padding: 120px 0;
    background: var(--cream);
}

.patients-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.info-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 40px;
}

.accordion-item {
    border-bottom: 1px solid var(--cream-dark);
}

.accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-serif);
    font-size: 1.1875rem;
    font-weight: 600;
    color: var(--charcoal);
    transition: var(--transition);
}

.accordion-toggle:hover {
    color: var(--forest);
}

.accordion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cream-dark);
    color: var(--forest);
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 16px;
}

.accordion-toggle[aria-expanded="true"] .accordion-icon {
    background: var(--forest);
    color: var(--white);
    transform: rotate(45deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-body.open {
    max-height: 200px;
}

.accordion-body p {
    padding: 0 0 24px;
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.7;
}

.patients-visual {
    position: relative;
    padding-top: 40px;
}

.visual-card {
    position: absolute;
    top: 0;
    left: -40px;
    width: 280px;
    background: var(--forest);
    border-radius: 4px;
    overflow: hidden;
    z-index: 2;
    box-shadow: var(--shadow-lg);
}

.visual-card-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--forest-light), var(--forest));
}

.visual-card-content {
    padding: 32px;
    text-align: center;
}

.visual-card-content svg {
    color: rgba(255,255,255,0.6);
    margin-bottom: 16px;
}

.visual-card-text {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.5;
}

.patients-visual img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 4px;
}

/* ---------- CTA / Contact Section ---------- */
.cta {
    padding: 120px 0;
    background: var(--cream-light);
}

.cta-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.cta-text {
    font-size: 1.0625rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 40px;
}

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

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

.detail-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--cream);
    color: var(--forest);
    flex-shrink: 0;
}

.detail-item strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.detail-item p, .detail-item a {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.6;
}

.detail-item a:hover {
    color: var(--forest);
}

/* Contact Form */
.cta-form-wrap {
    background: var(--white);
    border-radius: 4px;
    padding: 48px;
    box-shadow: var(--shadow-md);
}

.form-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 32px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--cream-dark);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--cream-light);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--forest);
    background: var(--white);
}

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

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

.form-success {
    display: none;
    text-align: center;
    padding: 48px 24px;
}

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

.success-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--forest);
    color: var(--white);
    margin: 0 auto 24px;
}

.form-success h4 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.form-success p {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--charcoal);
    color: rgba(255,255,255,0.6);
    padding: 80px 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    padding-bottom: 60px;
}

.logo-light {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    max-width: 320px;
}

.footer-links {
    display: flex;
    gap: 64px;
}

.footer-col h4 {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}

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

.footer-col a {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--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-disclaimer {
    font-size: 0.75rem !important;
    max-width: 400px;
    text-align: right;
}

/* ---------- Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    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; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .intro-layout,
    .patients-layout,
    .cta-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    .intro-image-wrap img,
    .patients-visual img {
        height: 400px;
    }

    .patients-visual {
        padding-top: 0;
    }

    .visual-card {
        position: relative;
        left: 0;
        width: 100%;
        margin-bottom: 24px;
    }

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

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-headline {
        font-size: clamp(2.25rem, 8vw, 3.5rem);
    }

    .hero-trust {
        flex-direction: column;
        gap: 16px;
    }

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

    .cta-form-wrap {
        padding: 32px 24px;
    }

    .footer-links {
        gap: 40px;
    }

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

    .footer-disclaimer {
        text-align: center;
    }

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

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

    .hero-actions {
        flex-direction: column;
    }

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

    .footer-links {
        flex-direction: column;
        gap: 32px;
    }
}
