/* ==========================================================================
   Christine Joy, M.D. — site stylesheet
   Calm, warm, boutique-clinical palette. Mobile-first, plain CSS, no framework.
   ========================================================================== */

:root {
  /* Palette — warm neutrals + dusty plum & deep teal accent, avoids harsh clinical blue/white */
  --color-bg: #faf7f1;
  --color-bg-alt: #f1ece1;
  --color-surface: #ffffff;
  --color-text: #332f29;
  --color-text-muted: #514c42;
  --color-border: #e3dbca;

  --color-primary: #6f5686;      /* dusty plum/wisteria */
  --color-primary-dark: #4a3760;
  --color-primary-tint: #efe9f3;

  --color-accent: #b5824f;       /* warm gold, sparing use (placeholder flags, notices) */
  --color-tertiary: #2f6b6b;     /* deep teal accent, sparing use (eyebrow labels) */
  --color-botanical: #d3c5aa;    /* hero line drawings: deeper shade of the --color-bg-alt tan */

  --color-focus: #2c5f8a;        /* accessible focus ring, distinct from palette */

  --font-heading: "Lora", Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: "Pontano Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-width: 68rem;
  --max-width-header: 78rem;
  --radius: 4px;
  --shadow-soft: 0 4px 18px rgba(51, 47, 41, 0.06);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
section[id] { scroll-margin-top: 6.5rem; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 1.125rem;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
a { color: var(--color-primary-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--color-tertiary); }
img { max-width: 100%; display: block; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0.6em 1em;
  border-radius: var(--radius);
  transition: transform 0.15s ease;
  z-index: 200;
}
.skip-link:focus { transform: translateY(1rem); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 2.25rem 0; }
section:not(.hero) { background: var(--color-bg-alt); padding-top: 4.25rem; }

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.section-tight { padding: 1.5rem 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--color-tertiary);
  font-weight: 600;
  margin-bottom: 0.6em;
  display: block;
}

.lede {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 42rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8em 1.6em;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}
.btn-outline:hover { background: var(--color-primary-tint); color: var(--color-primary-dark); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 241, 0.94);
  backdrop-filter: saturate(160%) blur(6px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  max-width: var(--max-width-header);
}
.site-title {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-title:hover { opacity: 0.85; }
.site-logo {
  height: 110px;
  width: auto;
  display: block;
  max-width: 100%;
}
.site-title-text {
  margin-left: -1.3rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--color-text);
  white-space: nowrap;
}

@media (min-width: 960px) {
  .site-logo { height: 135px; }
  .site-title-text { font-size: 1.6rem; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.hamburger::before, .hamburger::after { content: ""; position: absolute; left: 0; }
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger::after { transform: translateY(-6px) rotate(-45deg); }

.primary-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: none;
}
.primary-nav.is-open { display: block; }
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.primary-nav a {
  display: block;
  padding: 0.7em 0.4em;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
}
.primary-nav a:not(.nav-cta)[aria-current="page"] { color: var(--color-tertiary); font-weight: 700; }
.primary-nav a:not(.nav-cta):hover { color: var(--color-tertiary); }
.primary-nav .nav-cta {
  margin-top: 0.5rem;
  border: none;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
}
.primary-nav .nav-cta:hover { background: var(--color-primary-dark); }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .primary-nav {
    position: static;
    background: transparent;
    border: none;
    display: block;
  }
  .primary-nav ul {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 1.6rem;
  }
  .primary-nav a { padding: 0.3em 0.1em; border-bottom: none; }
  .primary-nav a:not(.nav-cta)[aria-current="page"] {
    border-bottom: 2px solid var(--color-tertiary);
  }
  .primary-nav .nav-cta { margin-top: 0; padding: 0.55em 1.3em; }
  .hero { min-height: calc(100vh - 226px); }
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 190px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 0;
}
/* Full container width so hero text lines up on the left edge, like the grid heroes */
.hero > .container { width: 100%; }
.hero-grid {
  display: grid;
  gap: 2.25rem;
  align-items: center;
}
@media (min-width: 800px) {
  .hero-grid { grid-template-columns: 1.3fr 1fr; gap: 3rem; }
}
/* Text beside a photo, outside the hero (About: Education & Training) */
.media-grid {
  display: grid;
  gap: 2.25rem;
  align-items: center;
}
@media (min-width: 800px) {
  .media-grid { grid-template-columns: 1.3fr 1fr; gap: 3rem; }
}
.media-grid .headshot-photo.headshot-photo-sm { max-width: 300px; }
@media (min-width: 800px) {
  .media-grid .headshot-photo { margin: 0 4rem 0 auto; }
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.4rem;
}
/* ---------- Photo placeholder ---------- */
.photo-placeholder {
  aspect-ratio: 4 / 5;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 1.5rem;
}
.photo-placeholder svg { width: 48px; height: 48px; color: var(--color-tertiary); opacity: 0.7; }
.photo-placeholder .placeholder-label {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
.photo-placeholder.photo-placeholder-sm { aspect-ratio: 1 / 1; max-width: 220px; }

.headshot-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  max-width: 440px;
  max-height: 70vh;
  margin: 0 auto;
}
@media (min-width: 800px) {
  .headshot-photo { margin: 0 0 0 auto; }
}
.headshot-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* Zoom + shift so her head sits centered in the circle crop */
.headshot-photo img.headshot-img-home { object-position: center 40%; transform: translate(-1.2%, -3%) scale(1.15); }
.headshot-photo img.headshot-img-about { object-position: center 15%; transform: translate(3.5%, -5%) scale(1.15); }
.headshot-photo.headshot-photo-sm { aspect-ratio: 1 / 1; max-width: 220px; max-height: none; border-radius: 50%; }

.map-embed {
  aspect-ratio: 16 / 7;
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
@media (min-width: 700px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-tertiary);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}
.card h3 { margin-bottom: 0.5em; }
.card a.card-link { font-weight: 600; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.9); }
.cta-banner .btn-outline { border-color: #fff; color: #fff; }
.cta-banner .btn-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ---------- Placeholder flags ---------- */
.placeholder-flag {
  background: #fff6e5;
  border: 1px dashed var(--color-accent);
  color: #6b4c1f;
  padding: 0.15em 0.5em;
  border-radius: var(--radius);
  font-size: 0.92em;
  font-weight: 600;
}

.notice-box {
  background: var(--color-primary-tint);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
}

/* ---------- Lists / definition-style content ---------- */
.info-list { list-style: none; padding: 0; }
.info-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
}
.info-list li:last-child { border-bottom: none; }
.info-list-plain li { border-bottom: none; }
.info-list-bullets { list-style: disc; padding-left: 1.3em; }
.info-list-bullets li { border-bottom: none; padding: 0.3rem 0; }
.info-list-bullets li::marker { color: var(--color-tertiary); }
.info-sublist {
  list-style: disc;
  padding-left: 1.3em;
  margin-top: 0.5em;
  color: var(--color-text-muted);
}
.info-sublist li {
  padding: 0.2rem 0;
  border-bottom: none;
}
.info-sublist li::marker { color: var(--color-tertiary); }

/* ---------- Table (fee schedule) ---------- */
.fee-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.fee-table caption { text-align: left; margin-bottom: 0.75rem; color: var(--color-text-muted); font-size: 0.9rem; }
.fee-table th, .fee-table td {
  text-align: left;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
}
.fee-table thead th {
  background: var(--color-bg-alt);
  font-family: var(--font-heading);
  font-weight: 600;
}
.fee-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Forms ---------- */
.form-field {
  margin-bottom: 1.25rem;
}
.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4em;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.7em 0.85em;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-primary);
}
.form-field .hint { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.3em; }
.form-note-required { font-size: 0.85rem; color: var(--color-text-muted); margin-top: -0.5rem; margin-bottom: 1.5rem; }

/* ---------- Steps list (New Patients) ---------- */
.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  border-bottom: none;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--radius);
  background: var(--color-tertiary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg);
  margin-top: 2rem;
  padding: 2rem 0 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-align: center;
}
.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 600px) {
  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.6rem;
  }
}
.footer-links a:not(.btn) {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}
.footer-links a:not(.btn):hover { color: var(--color-tertiary); }
.emergency-disclaimer {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.25rem;
  line-height: 1.55;
}
.footer-meta p { margin: 0.3em 0; }
.footer-meta p:first-child { font-size: 0.75rem; }
.footer-nav-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0 0 1.25rem;
}
.footer-nav-list a { color: var(--color-text-muted); }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack-sm > * + * { margin-top: 0.75rem; }

/* ---------- Hero botanical line drawings ---------- */
.hero[class*="hero-art-"] { position: relative; isolation: isolate; overflow: hidden; }
.hero[class*="hero-art-"]::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: -1.5rem;
  height: 55%;
  aspect-ratio: 9 / 10;
  background: var(--color-botanical);
  -webkit-mask: var(--hero-art) no-repeat right bottom / contain;
  mask: var(--hero-art) no-repeat right bottom / contain;
  opacity: 0.6;
  pointer-events: none;
}
@media (min-width: 800px) {
  .hero[class*="hero-art-"]::before { height: 48%; opacity: 1; right: 1rem; }
}
@media (min-width: 1360px) {
  .hero[class*="hero-art-"]::before { height: 92%; opacity: 1; right: max(1rem, calc((100vw - var(--max-width)) / 2 - 12rem)); }
}
.hero[class*="hero-art-"] h1 { max-width: 15em; }
.hero-art-lavender   { --hero-art: url("../images/botanicals/lavender.svg"); }
.hero-art-eucalyptus { --hero-art: url("../images/botanicals/eucalyptus.svg"); }
.hero-art-olive      { --hero-art: url("../images/botanicals/olive.svg"); }
.hero-art-fern       { --hero-art: url("../images/botanicals/fern.svg"); }
.hero-art-oat-grass  { --hero-art: url("../images/botanicals/oat-grass.svg"); }
.hero-art-ginkgo     { --hero-art: url("../images/botanicals/ginkgo.svg"); }
