/* ==========================================================================
   Marsh Family Health — Dr. Elena Marsh, MD
   Brand: teal #3E8E8A · cream #F7F3EC · navy #1F3B4D
   Fonts: Lora (headings) · Inter (body)
   ========================================================================== */

:root {
  --teal: #3E8E8A;
  --teal-dark: #2F6F6C;
  --teal-deep: #25605D;
  --teal-soft: #E4F0EF;
  --cream: #F7F3EC;
  --cream-deep: #EFE8DC;
  --navy: #1F3B4D;
  --navy-soft: #45606F;
  --ink: #24303A;
  --muted: #5C6B76;
  --line: #E4DED3;
  --white: #FFFFFF;

  --font-heading: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(31, 59, 77, 0.06), 0 4px 12px rgba(31, 59, 77, 0.06);
  --shadow-md: 0 6px 20px rgba(31, 59, 77, 0.10), 0 2px 6px rgba(31, 59, 77, 0.06);
  --shadow-lg: 0 16px 40px rgba(31, 59, 77, 0.16), 0 4px 12px rgba(31, 59, 77, 0.08);

  --container: 1160px;
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-decoration: none; }
a:hover { color: var(--teal); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--navy); margin: 0; line-height: 1.2; }
p { margin: 0; }
svg { flex-shrink: 0; }

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 6px 16px rgba(62, 142, 138, 0.35);
}
.btn-primary:hover { background: var(--teal-dark); color: #fff; box-shadow: 0 8px 22px rgba(62, 142, 138, 0.42); }

.btn-secondary {
  background: var(--navy);
  color: #fff;
}
.btn-secondary:hover { background: var(--navy-soft); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--teal-deep);
  border-color: rgba(62, 142, 138, 0.45);
}
.btn-ghost:hover { background: var(--teal-soft); color: var(--teal-deep); border-color: var(--teal); }

/* ---------- Eyebrow / headings ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; }
.section-sub { color: var(--muted); margin-top: 14px; font-size: 17px; }

.section { padding: 96px 0; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 236, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 12px rgba(31, 59, 77, 0.06);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
}
.brand:hover { color: var(--navy); }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(62, 142, 138, 0.35);
}
.brand-mark svg { width: 22px; height: 22px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-heading); font-size: 18.5px; font-weight: 700; }
.brand-text small { font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }

.nav-links {
  display: flex;
  gap: 30px;
  margin-left: auto;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--navy-soft);
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-links a:hover { color: var(--teal-deep); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.btn-call { padding: 11px 20px; font-size: 14.5px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--white);
  cursor: pointer;
  padding: 0 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  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); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 72px 0 88px;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(62, 142, 138, 0.14), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(31, 59, 77, 0.07), transparent 60%),
    var(--cream);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 64px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-copy h1 .accent { color: var(--teal); font-style: italic; font-weight: 500; }

.tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--navy-soft);
  margin-top: 14px;
}

.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal-deep);
  background: rgba(62, 142, 138, 0.10);
  border: 1px solid rgba(62, 142, 138, 0.25);
  padding: 8px 14px;
  border-radius: 999px;
}
.badge svg { width: 15px; height: 15px; }

.hero-lead { color: var(--muted); font-size: 17px; margin-top: 24px; max-width: 56ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1.5px solid var(--line);
}
.hero-stats .stat dt {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
}
.hero-stats .stat dd {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- Portrait ---------- */
.hero-visual { position: relative; justify-self: center; }

.portrait-ring { position: absolute; inset: 0; pointer-events: none; }
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(62, 142, 138, 0.45);
}
.ring-1 { inset: -34px; animation: spin 40s linear infinite; }
.ring-2 { inset: -14px; border-style: solid; border-color: rgba(62, 142, 138, 0.22); }

@keyframes spin { to { transform: rotate(360deg); } }

.portrait {
  width: min(400px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--teal-soft);
  border: 10px solid var(--white);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  box-shadow: var(--shadow-md);
  animation: floaty 5.5s ease-in-out infinite;
}
.float-chip svg { width: 16px; height: 16px; color: var(--teal); }

.chip-top { top: 8%; right: -6%; }
.chip-bottom { bottom: 10%; left: -8%; animation-delay: 2.6s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ==========================================================================
   About
   ========================================================================== */
.about { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 64px;
  align-items: start;
}

.about-copy h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; margin-bottom: 22px; }
.about-copy > p { color: var(--muted); margin-bottom: 18px; font-size: 17px; }

.quote {
  margin: 30px 0 0;
  padding: 24px 28px;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 18px;
  color: var(--navy);
  line-height: 1.6;
}
.quote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal-deep);
}

.fact-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.fact-card h3 { font-size: 22px; font-weight: 600; margin-bottom: 20px; }

.fact-list { display: flex; flex-direction: column; gap: 18px; }
.fact-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 15.5px;
  color: var(--ink);
}
.fact-list svg {
  width: 20px;
  height: 20px;
  color: var(--teal);
  margin-top: 2px;
}

.about-side .btn { margin-top: 22px; }

/* ==========================================================================
   Credentials
   ========================================================================== */
.credentials { background: var(--navy); position: relative; overflow: hidden; }
.credentials::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 142, 138, 0.25), transparent 65%);
  top: -220px; right: -140px;
  pointer-events: none;
}

.credentials .eyebrow { color: #7FC4C0; }
.credentials .section-head h2 { color: #fff; }

.credential-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  counter-reset: cred;
}

.credential {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.credential:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(127, 196, 192, 0.5);
  transform: translateY(-3px);
}

.credential-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(62, 142, 138, 0.22);
  color: #7FC4C0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.credential-icon svg { width: 24px; height: 24px; }

.credential h3 { color: #fff; font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.credential p { color: rgba(255, 255, 255, 0.72); font-size: 15px; }

/* ==========================================================================
   Services
   ========================================================================== */
.services { background: var(--cream); }

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

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(62, 142, 138, 0.45);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 26px; height: 26px; }

.service-card h3 { font-size: 18.5px; font-weight: 600; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 15px; }

.service-card-cta {
  background: var(--teal);
  border-color: var(--teal);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.service-card-cta h3 { color: #fff; }
.service-card-cta p { color: rgba(255, 255, 255, 0.85); }
.service-card-cta .btn {
  margin-top: 20px;
  background: #fff;
  color: var(--teal-deep);
}
.service-card-cta .btn:hover { background: var(--cream); color: var(--teal-deep); }

/* ==========================================================================
   Insurance
   ========================================================================== */
.insurance { padding: 96px 0; background: var(--cream); }

.insurance-band {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 44px 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}

.insurance-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-deep);
  display: grid;
  place-items: center;
}
.insurance-icon svg { width: 32px; height: 32px; }

.insurance-copy h2 { font-size: 26px; font-weight: 600; margin-bottom: 8px; }
.insurance-copy p { color: var(--muted); font-size: 15.5px; }

.insurance-points { display: flex; flex-direction: column; gap: 10px; }
.insurance-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
}
.insurance-points svg { width: 18px; height: 18px; color: var(--teal); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { background: var(--white); padding-top: 96px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
}

.contact-card, .visit-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.contact-card h3, .visit-card h3 { font-size: 22px; font-weight: 600; margin-bottom: 26px; }

.contact-list { display: flex; flex-direction: column; gap: 24px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 22px; height: 22px; }

.contact-list small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.contact-list a, .contact-list p { font-size: 15.5px; color: var(--ink); font-weight: 500; line-height: 1.55; }
.contact-list a:hover { color: var(--teal); }

.map-placeholder {
  border-radius: var(--radius-md);
  background:
    linear-gradient(rgba(62, 142, 138, 0.06), rgba(62, 142, 138, 0.06)),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(31, 59, 77, 0.08) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(31, 59, 77, 0.08) 40px),
    var(--cream);
  border: 1.5px dashed rgba(62, 142, 138, 0.5);
  padding: 44px 28px;
  text-align: center;
  color: var(--navy-soft);
}
.map-placeholder svg { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--teal); }
.map-placeholder p { font-size: 15px; line-height: 1.7; }

.visit-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr 0.9fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .brand { color: #fff; }
.footer-brand .brand-text small { color: rgba(255, 255, 255, 0.6); }
.footer-brand > p { margin-top: 20px; font-size: 15px; line-height: 1.7; }

.site-footer h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.site-footer ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a { color: rgba(255, 255, 255, 0.78); font-size: 15px; }
.site-footer ul a:hover { color: #7FC4C0; }
.site-footer li { font-size: 15px; line-height: 1.6; }
.site-footer li span { display: inline-block; min-width: 84px; color: #7FC4C0; font-weight: 600; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.55);
}
.fictional-note { font-style: italic; }

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
/* Reveal-on-scroll is opt-in: content is visible by default and only
   hidden once JS proves it can manage the animation. */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal, html.js .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .ring, .float-chip { animation: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { order: -1; }
  .portrait { width: min(340px, 78vw); margin-inline: auto; }
  .chip-top { right: 2%; }
  .chip-bottom { left: 2%; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .insurance-band { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 24px;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--line);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { display: block; padding: 14px 4px; font-size: 16px; }
  .nav-links a::after { display: none; }

  .nav-toggle { display: flex; }
  .btn-call span { display: none; }
  .btn-call { width: 44px; height: 44px; padding: 0; border-radius: 12px; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 64px; }
  .hero-stats { grid-template-columns: 1fr; gap: 14px; }
  .credential-list, .service-grid { grid-template-columns: 1fr; }
  .insurance-band { padding: 32px 24px; }
  .contact-card, .visit-card { padding: 26px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .container { width: calc(100% - 40px); }
}
