/* =========================================================
   Tiplersville Family Medical Clinic
   ========================================================= */

:root {
    --green-900: #123a32;
    --green-800: #1e5b4f;
    --green-700: #266f60;
    --green-600: #2f8572;
    --green-50:  #eef5f2;
    --gold:      #c89a4a;
    --gold-soft: #f3e6cf;
    --ink:       #1b2320;
    --ink-soft:  #4a5752;
    --bg:        #fbfaf7;
    --card:      #ffffff;
    --line:      #e3e0d7;
    --shadow-sm: 0 1px 2px rgba(18, 58, 50, 0.06), 0 2px 6px rgba(18, 58, 50, 0.04);
    --shadow-md: 0 6px 20px rgba(18, 58, 50, 0.08), 0 2px 6px rgba(18, 58, 50, 0.04);
    --shadow-lg: 0 18px 40px rgba(18, 58, 50, 0.12);
    --radius: 14px;
    --radius-lg: 22px;
    --maxw: 1160px;
}

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--green-800); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--green-600); }

h1, h2, h3, h4 {
    font-family: "Fraunces", Georgia, serif;
    color: var(--green-900);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
    font-weight: 600;
}
h1 { font-size: clamp(2.2rem, 4.2vw + 0.6rem, 3.7rem); }
h2 { font-size: clamp(1.7rem, 2.4vw + 0.6rem, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }

.skip-link {
    position: absolute; top: -60px; left: 1rem;
    background: var(--green-800); color: #fff; padding: .6rem 1rem;
    border-radius: 8px; z-index: 100;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ====== Header ====== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(251, 250, 247, 0.92);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav-wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
}
.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--green-900); }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.05rem; }
.brand-sub  { font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.02em; }

.primary-nav { display: flex; align-items: center; gap: 1.6rem; }
.primary-nav a {
    color: var(--ink); font-weight: 500; font-size: 0.95rem;
    position: relative;
}
.primary-nav a:not(.nav-cta)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
    height: 2px; background: var(--green-700); transform: scaleX(0);
    transform-origin: left; transition: transform 0.25s ease;
}
.primary-nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta {
    background: var(--green-800); color: #fff !important;
    padding: 0.55rem 1rem; border-radius: 999px; font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--green-700); color: #fff; }

.nav-toggle {
    display: none; background: none; border: 0; width: 42px; height: 42px;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; cursor: pointer; border-radius: 8px;
}
.nav-toggle span {
    width: 22px; height: 2px; background: var(--green-900); border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ====== Buttons ====== */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem; justify-content: center;
    font-weight: 600; font-size: 0.98rem;
    padding: 0.85rem 1.4rem; border-radius: 999px;
    border: 1px solid transparent; cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--green-800); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-700); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--green-900); border-color: rgba(18,58,50,0.2); }
.btn-ghost:hover { background: var(--green-50); color: var(--green-900); }
.hero .btn-ghost {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.55);
    backdrop-filter: blur(4px);
}
.hero .btn-ghost:hover {
    background: #fff;
    color: var(--green-900);
    border-color: #fff;
}
.btn-outline { background: #fff; color: var(--green-800); border-color: var(--green-800); }
.btn-outline:hover { background: var(--green-50); color: var(--green-800); }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.05rem; }

/* ====== Hero ====== */
.hero {
    position: relative; overflow: hidden;
    color: #f7f4ec;
    isolation: isolate;
    padding: clamp(4rem, 9vw, 7rem) 0 clamp(4rem, 8vw, 6rem);
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img {
    width: 100%; height: 100%; object-fit: cover; object-position: center;
    filter: saturate(0.95) contrast(1.02);
}
.hero-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(115deg, rgba(18,58,50,0.92) 0%, rgba(18,58,50,0.75) 55%, rgba(18,58,50,0.45) 100%),
        radial-gradient(1200px 600px at 20% 30%, rgba(200,154,74,0.22), transparent 60%);
}
.hero-inner { position: relative; max-width: 760px; }
.eyebrow {
    display: inline-block; font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--gold-soft); background: rgba(255,255,255,0.08);
    padding: 0.35rem 0.9rem; border-radius: 999px;
    margin-bottom: 1.4rem; border: 1px solid rgba(255,255,255,0.18);
}
.hero h1 { color: #fff; }
.hero h1 span { color: var(--gold-soft); font-style: italic; font-weight: 500; }
.lede {
    font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.22rem);
    color: #eae4d5; max-width: 60ch; margin-bottom: 2rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2.4rem; }
.hero-facts {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 1.2rem 2.4rem;
    color: #eae4d5; font-size: 0.95rem;
}
.hero-facts li { position: relative; padding-left: 1.3rem; }
.hero-facts li::before {
    content: ""; position: absolute; left: 0; top: 0.55em;
    width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}
.hero-facts strong { color: #fff; font-weight: 600; }

/* ====== Sections ====== */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-eyebrow {
    display: inline-block; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--green-700); font-weight: 600; margin-bottom: 0.8rem;
}
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-sub { color: var(--ink-soft); font-size: 1.05rem; }
.grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

/* ====== About ====== */
.about { background: var(--bg); }
.about-copy p { color: var(--ink-soft); font-size: 1.02rem; }
.about-copy strong { color: var(--green-900); }
.about-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
    margin-top: 2rem;
}
.about-stats > div {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem 1.1rem; box-shadow: var(--shadow-sm);
}
.about-stats span {
    display: block; font-family: "Fraunces", Georgia, serif;
    font-size: 1.25rem; color: var(--green-800); font-weight: 600;
}
.about-stats p { font-size: 0.85rem; color: var(--ink-soft); margin: 0.3rem 0 0; }

.about-media {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 3;
}
.about-media img { object-position: center; }
.about-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(18,58,50,0.1));
    pointer-events: none;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }

/* ====== Services ====== */
.services { background: linear-gradient(180deg, #fff 0%, var(--green-50) 100%); }
.service-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}
.service-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1.8rem 1.6rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(30, 91, 79, 0.25);
}
.service-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: inline-grid; place-items: center;
    background: var(--green-50); color: var(--green-800);
    margin-bottom: 1.1rem;
}
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { margin-bottom: 0.4rem; }
.service-card p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

.services-note {
    margin-top: 2.6rem; text-align: center; color: var(--ink-soft);
    font-size: 0.98rem;
}

/* ====== Visit ====== */
.visit { background: #fff; }
.info-cards {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.6rem;
}
.info-card {
    background: var(--green-50); border-radius: var(--radius); padding: 1.2rem 1.3rem;
    border: 1px solid rgba(30,91,79,0.1);
}
.info-card h3 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--green-800); }
.info-card ul { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); }
.info-card ul li { margin-bottom: 0.25rem; }
.info-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.hours-card {
    background: var(--green-900);
    color: #efe8d8;
    border-radius: var(--radius-lg);
    padding: 2rem 1.8rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.hours-card::before {
    content: ""; position: absolute; top: -60px; right: -60px;
    width: 180px; height: 180px; border-radius: 50%;
    background: radial-gradient(circle at center, rgba(200,154,74,0.35), transparent 65%);
}
.hours-card h3 { color: #fff; font-size: 1.5rem; margin-bottom: 1.2rem; }
.hours-list { margin: 0 0 1.2rem; display: flex; flex-direction: column; gap: 0.55rem; }
.hours-list > div {
    display: flex; justify-content: space-between; gap: 1rem;
    padding-bottom: 0.55rem; border-bottom: 1px dashed rgba(255,255,255,0.15);
}
.hours-list > div:last-child { border-bottom: 0; }
.hours-list dt { font-weight: 600; color: #fff; }
.hours-list dd { margin: 0; color: #d9d2be; }
.hours-note { font-size: 0.85rem; color: #c9c2ae; margin-bottom: 1.4rem; }
.hours-card .btn { margin-bottom: 0.6rem; }

/* ====== Contact ====== */
.contact { background: var(--green-50); }
.contact-list { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; color: var(--ink); }
.contact-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: #fff; color: var(--green-800);
    display: inline-grid; place-items: center; flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-list strong { color: var(--green-900); }

.map-wrap {
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3;
    border: 6px solid #fff;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ====== CTA Band ====== */
.cta-band {
    background: linear-gradient(105deg, var(--green-900), var(--green-700));
    color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.cta-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 2rem;
    flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 0.3rem; }
.cta-band p { margin: 0; color: #e4dfd0; }

/* ====== Footer ====== */
.site-footer {
    background: #0f2b25; color: #cfd8d3;
    padding: 3.5rem 0 1.5rem;
    margin-top: 0;
}
.footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
    padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: #c7cec8; }
.footer-blurb { color: #aab5ae; max-width: 40ch; font-size: 0.95rem; }
.site-footer h4 {
    color: #fff; font-family: "Inter", sans-serif; font-weight: 600;
    font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
    margin-bottom: 0.9rem;
}
.site-footer p, .site-footer a { color: #cfd8d3; font-size: 0.95rem; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }

.sub-footer {
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding-top: 1.4rem; color: #97a29c; font-size: 0.85rem;
}
.sub-footer p { margin: 0; }
.disclaimer { color: #97a29c; }

/* ====== Responsive ====== */
@media (max-width: 960px) {
    .grid-2 { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .nav-toggle { display: inline-flex; }
    .primary-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--line);
        padding: 0.5rem 1.2rem 1.2rem; box-shadow: var(--shadow-md);
        display: none;
    }
    .primary-nav.open { display: flex; }
    .primary-nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
    .primary-nav a:last-child { border-bottom: 0; }
    .nav-cta { text-align: center; margin-top: 0.6rem; }

    .about-stats { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: 1fr; }
    .info-cards { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
    .cta-inner { text-align: center; justify-content: center; }

    .hero { padding: 4.5rem 0 4rem; }
    .hero-facts { gap: 0.6rem 1.6rem; }
}

/* ====== Reveal-on-scroll ====== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
