/* Verkhomii Medical Center — home page
   Visual language comes from the clinic interior: walnut arch, backlit oval sign,
   terrazzo floor, white plaster and zamioculcas green. */

:root {
  /* Palette */
  --plaster: #F2F1EE;      /* page background, white plaster wall */
  --stone: #FFFFFF;        /* raised surfaces: form, list hover */
  --chip: #CFC9BE;         /* terrazzo chips: hairlines and borders */
  --ink: #2A2622;          /* text */
  --ink-muted: #5E5850;    /* secondary text, 6.3:1 on plaster */
  --walnut: #7B4A2D;       /* the arch, only as a surface */
  --walnut-dark: #5E3720;
  --leaf: #2F4B3B;         /* primary actions */
  --leaf-hover: #243B2E;
  --leaf-deep: #22362B;    /* booking band */
  --glow: #F5DDB4;         /* backlit-sign glow */
  --error: #A3352A;

  /* Type */
  --font-display: "Tenor Sans", "Commissioner", Georgia, serif;
  --font-body: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-body: 1.0625rem;                         /* 17px */
  --fs-small: 0.9375rem;                        /* 15px */
  --fs-h3: 1.5rem;
  --fs-h2: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem);
  --fs-hero: clamp(2.5rem, 1.4rem + 4.6vw, 4.5rem);

  /* Space */
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --section: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --radius-s: 10px;
  --radius-m: 20px;

  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 350;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
ul[role="list"], .main-nav ul, .footer-nav ul { list-style: none; margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: #fff;
  padding: .75rem 1rem; border-radius: var(--radius-s);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }

.h2, .h3, .hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.h2 { font-size: var(--fs-h2); line-height: 1.12; margin-bottom: 1.25rem; }
.h3 { font-size: var(--fs-h3); line-height: 1.2; margin-bottom: .75rem; }
.muted { color: var(--ink-muted); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 var(--fs-small)/1 var(--font-body);
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-lg { min-height: 56px; padding: 0 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--leaf); color: #fff; }
.btn-primary:hover { background: var(--leaf-hover); }
.btn-primary:active { background: var(--leaf-deep); }

.btn-secondary { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-secondary:hover { background: var(--ink); color: var(--plaster); }

.btn[aria-busy="true"] { opacity: .7; cursor: progress; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--plaster) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  /* Hairline always anchors the header; it firms up once content scrolls beneath */
  border-bottom: 1px solid color-mix(in srgb, var(--chip) 60%, transparent);
  transition: border-color .25s ease, background-color .25s ease;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--plaster) 94%, transparent);
  border-bottom-color: var(--chip);
}

.header-inner {
  display: flex; align-items: center; gap: 2rem;
  height: var(--header-h);
}

/* Wordmark echoes the backlit oval sign at reception */
.wordmark {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
  flex-shrink: 0;
}
.wordmark { --wordmark-size: .9375rem; }
.wordmark-oval {
  font-family: var(--font-display);
  font-size: var(--wordmark-size);
  letter-spacing: .28em;
  padding: .55rem .7rem .55rem 1rem;   /* trailing letter-spacing balanced */
  border: 1px solid currentColor;
  border-radius: 999px;
  line-height: 1;
}
.wordmark-sub {
  font-family: var(--font-display);   /* same face and size as VERKHOMII */
  font-size: var(--wordmark-size);
  line-height: 1;
  text-transform: uppercase;          /* cap height matches VERKHOMII */
  letter-spacing: .16em;
  color: var(--ink-muted);
}
.wordmark-light { color: var(--plaster); }
.wordmark-light .wordmark-sub { color: color-mix(in srgb, var(--plaster) 70%, transparent); }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 2.25rem; }
.main-nav a:not(.btn) {
  font-size: var(--fs-small);
  text-decoration: none;
  padding-block: .75rem;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - .55rem) / 0 1px no-repeat;
  transition: background-size .25s var(--ease-out);
}
.main-nav a:not(.btn):hover,
.main-nav a[aria-current="page"] { background-size: 100% 1px; }
.nav-cta-mobile { display: none; }

.menu-toggle {
  display: none;
  width: 48px; height: 48px;
  margin-right: -12px;
  align-items: center; justify-content: center;
  background: none; border: 0; color: var(--ink);
  cursor: pointer; border-radius: 999px;
}
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded="true"] .i-open { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) var(--section); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: center;
}

.hero-title {
  font-size: var(--fs-hero);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
  max-width: 12ch;
}
.hero-lead {
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 34ch;
  margin-bottom: 2.25rem;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.hero-phone {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 48px;
  font-weight: 450;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.hero-phone:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-address {
  margin-top: 2.5rem;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

/* The arch: a walnut panel behind a photo window, as at reception */
.hero-media {
  position: relative;
  padding: 0 0 0 12%;
  isolation: isolate;
}
.arch-wood {
  position: absolute; z-index: -1;
  left: 0; top: 9%;
  width: 62%; height: 91%;
  border-radius: 999px 999px 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 9px),
    linear-gradient(100deg, var(--walnut-dark), var(--walnut) 45%, #8A5636 70%, var(--walnut-dark));
}
.arch-photo {
  aspect-ratio: 5 / 7;
  border-radius: 999px 999px 0 0;
  overflow: hidden;
  background: var(--chip);
}
.arch-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.arch-photo { position: relative; }

/* Hero background video: a quiet, blurred wash behind the whole hero; the arch keeps its static photo.
   The plaster scrim keeps the headline readable and fades into the page below. */
.hero { position: relative; isolation: isolate; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  overflow: hidden;
  background: var(--chip) url("../video/hero-wide.jpg") center / cover no-repeat;
}
.hero-bg-video {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(3px); transform: scale(1.03);
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-bg-video.is-playing { opacity: 1; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(242,241,238,.95) 0%, rgba(242,241,238,.88) 40%, rgba(242,241,238,.62) 70%, rgba(242,241,238,.55) 100%),
    linear-gradient(180deg, rgba(242,241,238,.6), transparent 25%, transparent 70%, var(--plaster));
}

/* Opening-hours badge, styled like the backlit oval sign */
.open-badge {
  position: absolute; left: 0; bottom: 8%;
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 0;
  padding: .85rem 1.35rem;
  border-radius: 999px;
  background: var(--stone);
  font-size: var(--fs-small);
  font-weight: 450;
  box-shadow: 0 0 0 1px rgba(42,38,34,.06), 0 10px 40px -6px color-mix(in srgb, var(--glow) 90%, transparent);
}
.open-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--chip);
}
.open-badge.is-open .open-dot { background: #3E8A5C; box-shadow: 0 0 0 4px rgba(62,138,92,.15); }

/* One orchestrated entrance: the arch photo rises, the wood follows, the sign lights up */
@media (prefers-reduced-motion: no-preference) {
  .js .arch-photo { animation: arch-rise 1.1s var(--ease-out) both; }
  .js .arch-wood { animation: wood-in 1.2s .15s var(--ease-out) both; }
  .js .open-badge { animation: sign-on .8s .85s ease-out both; }
  .js .hero-copy > * { animation: copy-in .8s var(--ease-out) both; }
  .js .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .js .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .js .hero-copy > :nth-child(4) { animation-delay: .24s; }
}
@keyframes arch-rise { from { clip-path: inset(100% 0 0 0 round 999px 999px 0 0); } to { clip-path: inset(0 0 0 0 round 999px 999px 0 0); } }
@keyframes wood-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes sign-on { from { opacity: 0; box-shadow: 0 0 0 1px rgba(42,38,34,.06), 0 10px 40px -6px transparent; } to { opacity: 1; } }
@keyframes copy-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- About ---------- */

.about { padding-top: 0; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: center;
}
.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;   /* keep the face in frame when the tall source is cropped */
  border-radius: var(--radius-m);
}
.about-copy { max-width: 36rem; }

/* Landscape about photo shown whole, so the image takes the wider column */
.about-wide .about-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.about-wide .about-media img { aspect-ratio: 3 / 2; object-position: 50% 50%; }

.about-copy p { color: var(--ink-muted); }
.about-copy p:first-of-type { color: var(--ink); font-size: 1.1875rem; }

/* ---------- Directions ---------- */

.directions { border-top: 1px solid var(--chip); }
.directions-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: start;
}
.directions-head { position: sticky; top: calc(var(--header-h) + 2rem); }
.directions-head .muted { max-width: 26ch; margin-bottom: 2rem; }

.directions-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2.5rem;
  border-top: 1px solid var(--chip);
}
.directions-list li { border-bottom: 1px solid var(--chip); }
.directions-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 72px;
  padding: 1rem .25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
  text-decoration: none;
  transition: color .2s ease;
}
.directions-list svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.4;
  color: var(--ink-muted);
  transition: transform .25s var(--ease-out), color .2s ease;
}
.directions-list a:hover { color: var(--leaf); }
.directions-list a:hover svg { transform: translateX(4px); color: var(--leaf); }

/* ---------- Booking ---------- */

.booking {
  background: var(--leaf-deep);
  color: var(--plaster);
  padding-block: var(--section);
}
.booking:focus { outline: none; }
.booking-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: start;
}
.booking-intro { position: sticky; top: calc(var(--header-h) + 2rem); max-width: 30rem; }
.booking-intro p { color: color-mix(in srgb, var(--plaster) 80%, transparent); }
.booking-alt { margin-top: 2rem; font-size: var(--fs-small); }
.booking-alt a { color: var(--plaster); font-weight: 500; text-underline-offset: 4px; white-space: nowrap; }
.booking :focus-visible { outline-color: var(--glow); }

.booking-panel {
  background: var(--plaster);
  color: var(--ink);
  border-radius: var(--radius-m);
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
}
.booking-panel :focus-visible { outline-color: var(--leaf); }

.booking-form { display: grid; gap: 1.5rem; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.5rem; }
.field > label:not(.consent), .field legend {
  display: block;
  padding: 0;
  margin-bottom: .5rem;
  font-size: var(--fs-small);
  font-weight: 500;
}

input[type="text"], input[type="tel"], input[type="date"], select {
  width: 100%;
  min-height: 52px;
  padding: .75rem 1rem;
  border: 1px solid var(--chip);
  border-radius: var(--radius-s);
  background: var(--stone);
  color: var(--ink);
  font: 400 1rem/1.4 var(--font-body);   /* 16px prevents iOS zoom */
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder { color: #8C857B; }
input:hover, select:hover { border-color: #ADA597; }
input:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf) 22%, transparent);
}
[aria-invalid="true"] { border-color: var(--error) !important; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 1.1rem; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--ink-muted); border-bottom: 1.5px solid var(--ink-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
select { padding-right: 2.75rem; cursor: pointer; }
select:invalid { color: #8C857B; }

.segmented { display: flex; gap: .5rem; }
.segmented label { flex: 1; position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: 0 .5rem;
  border: 1px solid var(--chip);
  border-radius: 999px;
  background: var(--stone);
  font-size: var(--fs-small);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.segmented label:hover span { border-color: #ADA597; }
.segmented input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--plaster); font-weight: 500; }
.segmented input:focus-visible + span { outline: 2px solid var(--leaf); outline-offset: 2px; }

.consent { display: flex; gap: .75rem; align-items: flex-start; font-size: var(--fs-small); color: var(--ink-muted); cursor: pointer; }
.consent input {
  flex-shrink: 0;
  width: 22px; height: 22px; margin: 1px 0 0;
  accent-color: var(--leaf);
  cursor: pointer;
}
.consent a { color: var(--ink); text-underline-offset: 3px; }

.field-error {
  display: flex; gap: .4rem; align-items: center;
  margin: .5rem 0 0;
  font-size: .875rem;
  color: var(--error);
}
.field-error::before {
  content: "!"; flex-shrink: 0;
  display: inline-grid; place-items: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--error); color: #fff;
  font-size: .6875rem; font-weight: 600;
}

.booking-success { text-align: left; padding-block: 1rem; }
.booking-success:focus { outline: none; }
.success-mark { color: var(--leaf); margin-bottom: 1.25rem; }
.booking-success p { color: var(--ink-muted); max-width: 34ch; margin-bottom: 2rem; }

/* ---------- Contacts ---------- */

.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: center;
}
.contact-list { margin: 2rem 0 2.5rem; display: grid; gap: 1.25rem; }
.contact-list div {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--chip);
}
.contact-list dt { color: var(--ink-muted); font-size: var(--fs-small); padding-top: .1rem; }
.contact-list dd { margin: 0; font-variant-numeric: tabular-nums; }
.contact-list a { text-underline-offset: 4px; text-decoration-color: var(--chip); }
.contact-list a:hover { text-decoration-color: currentColor; }
.contacts-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-m);
}

/* ---------- Direction page ---------- */

.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1.5rem;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}
.breadcrumbs a { text-decoration: none; text-underline-offset: 4px; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }

.direction-hero .hero-title { max-width: none; }
.direction-hero .arch-photo img { object-position: var(--hero-pos, 50% 40%); }
.direction-about-media img { object-position: var(--about-pos, 50% 60%); }

/* Services: same rhythm as the directions list, but plain items (no links, no prices), with who provides each */
.services { border-top: 1px solid var(--chip); }
.services-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2.5rem;
  border-top: 1px solid var(--chip);
}
.services-list li {
  display: flex; flex-direction: column; justify-content: center; gap: .3rem;
  min-height: 72px;
  padding: 1rem .25rem;
  border-bottom: 1px solid var(--chip);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
}
.services-list[aria-busy="true"] { min-height: 288px; }

/* Specialists */
.specialists { border-top: 1px solid var(--chip); }
.specialists .h2 { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.doctor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2.5rem, 2rem + 2vw, 4rem) clamp(1.25rem, .75rem + 2vw, 2.5rem);
}
.doctor-grid[aria-busy="true"] { min-height: 480px; }
.doctor-photo {
  aspect-ratio: 4 / 5;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--chip);
}
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.doctor-name { margin-bottom: .25rem; }
.doctor-role { margin-bottom: .75rem; font-size: var(--fs-small); font-weight: 450; color: var(--leaf); }
.doctor-bio { color: var(--ink-muted); max-width: 34ch; white-space: pre-line; }
.is-placeholder { color: var(--ink-muted); }
/* One doctor in the direction: photo left, text right, with a booking button */
.doctor-grid.is-solo { grid-template-columns: minmax(0, 1fr); }
.doctor-grid.is-solo .doctor-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 1rem + 3vw, 5rem);
  align-items: center;
}
.doctor-grid.is-solo .doctor-photo { margin-bottom: 0; max-width: 480px; }
.doctor-grid.is-solo .doctor-name { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); margin-bottom: .5rem; }
.doctor-grid.is-solo .doctor-role { font-size: 1rem; margin-bottom: 1.25rem; }
.doctor-grid.is-solo .doctor-bio { max-width: 52ch; font-size: 1.0625rem; }
.doctor-cta { margin-top: 2rem; }

/* CTA band: compact sibling of the booking band */
.cta-band {
  background: var(--leaf-deep);
  color: var(--plaster);
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem);
}
.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem 4rem;
  align-items: center;
}
.cta-band .h2 { margin: 0; max-width: 30ch; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.cta-phone {
  display: inline-flex; align-items: center; min-height: 48px;
  color: var(--plaster);
  font-weight: 450;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
}
.cta-phone:hover { text-decoration: underline; text-underline-offset: 4px; }
.cta-band :focus-visible { outline-color: var(--glow); }

.btn-light { background: var(--plaster); color: var(--ink); }
.btn-light:hover { background: var(--stone); }

/* ---------- Inner pages: prices, contacts, privacy ---------- */

.page-hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.page-title { max-width: none; }
.page-hero .hero-lead { margin-bottom: 0; }

/* Prices: sticky help column + accordion, on the directions grid */
.prices { padding-bottom: var(--section); }
.prices-aside .muted { margin-bottom: 1rem; }
.prices-aside-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }

.price-accordion { border-top: 1px solid var(--chip); }
.price-accordion[aria-busy="true"] { min-height: 792px; }   /* 11 closed rows, avoids layout shift */
.price-group { border-bottom: 1px solid var(--chip); }
.price-group summary {
  display: flex; align-items: center; gap: 1rem;
  min-height: 72px;
  padding: 1rem .25rem;
  cursor: pointer;
  list-style: none;
}
.price-group summary::-webkit-details-marker { display: none; }
.price-group-name {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
  transition: color .2s ease;
}
.price-group-count { font-size: var(--fs-small); color: var(--ink-muted); white-space: nowrap; }
/* Plus that turns into a minus */
.price-group-icon {
  position: relative; flex-shrink: 0;
  width: 32px; height: 32px;
  border: 1px solid var(--chip);
  border-radius: 50%;
  transition: border-color .2s ease, background-color .2s ease;
}
.price-group-icon::before, .price-group-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform .25s var(--ease-out);
}
.price-group-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.price-group[open] .price-group-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.price-group summary:hover .price-group-name { color: var(--leaf); }
.price-group summary:hover .price-group-icon { border-color: var(--leaf); color: var(--leaf); }
.price-group[open] .price-group-icon { background: var(--ink); border-color: var(--ink); color: var(--plaster); }

.price-group-body { padding: 0 .25rem 1.75rem; }
.price-rows li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  padding: .85rem 0;
  border-top: 1px dashed color-mix(in srgb, var(--chip) 80%, transparent);
}
.price-name { min-width: 0; }
.price {
  flex-shrink: 0;
  font-weight: 450;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-ask { font-weight: 350; color: var(--ink-muted); }
.price-group-link {
  display: inline-flex; align-items: center; min-height: 44px;
  margin-top: .75rem;
  font-size: var(--fs-small);
  color: var(--leaf);
  text-underline-offset: 4px;
}
@media (prefers-reduced-motion: no-preference) {
  .price-group[open] .price-group-body { animation: copy-in .35s var(--ease-out); }
}

/* Contacts: home hero layout with the contact list in place of the lead */
.contacts-hero .contact-list { margin: 0 0 2.5rem; }
.contacts-hero .hero-title { margin-bottom: 2rem; }
.map-section { border-top: 1px solid var(--chip); }
.map-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  margin-bottom: 2rem;
}
.map-head .h2 { margin: 0; }
.map-frame {
  aspect-ratio: 16 / 7;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--chip);
}
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; filter: grayscale(.35) contrast(.95); }

/* Privacy: long-form text */
.privacy { padding-top: 0; }
.prose { max-width: 44rem; }
.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h3);
  line-height: 1.25;
  margin: 2.75rem 0 .75rem;
}
.prose p, .prose li { color: var(--ink-muted); }
.prose ul { margin: 0 0 1em; padding-left: 1.25rem; }
.prose li { margin-bottom: .35rem; }
.prose a { color: var(--ink); text-underline-offset: 3px; }
.prose-meta { font-size: var(--fs-small); }
.draft-note {
  padding: 1rem 1.25rem;
  border: 1px dashed var(--walnut);
  border-radius: var(--radius-s);
  background: color-mix(in srgb, var(--glow) 35%, transparent);
  color: var(--ink) !important;
  font-size: var(--fs-small);
}

/* ---------- Footer (terrazzo) ---------- */

.site-footer {
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill-opacity='.09'%3E%3Cpath fill='%23F2F1EE' d='M18 22l7-3 3 6-6 3z'/%3E%3Cpath fill='%23C9A27E' d='M74 40l9 1-2 7-8-2z'/%3E%3Cpath fill='%23F2F1EE' d='M140 18l5 4-4 4-5-3z'/%3E%3Cpath fill='%23F2F1EE' d='M190 66l8 2-3 8-6-4z'/%3E%3Cpath fill='%23C9A27E' d='M40 104l6-2 2 6-6 2z'/%3E%3Cpath fill='%23F2F1EE' d='M108 92l10 3-4 7-8-3z'/%3E%3Cpath fill='%23F2F1EE' d='M166 136l5-1 1 5-5 1z'/%3E%3Cpath fill='%23C9A27E' d='M22 172l9 2-3 6-7-3z'/%3E%3Cpath fill='%23F2F1EE' d='M88 160l4 4-4 3-3-4z'/%3E%3Cpath fill='%23F2F1EE' d='M132 196l8-1 1 6-8 1z'/%3E%3Cpath fill='%23C9A27E' d='M200 182l5 3-3 5-4-3z'/%3E%3Cpath fill='%23F2F1EE' d='M60 70l3 2-2 3-3-2z'/%3E%3C/g%3E%3C/svg%3E");
  color: color-mix(in srgb, var(--plaster) 75%, transparent);
  padding-block: 4rem 3rem;
  font-size: var(--fs-small);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.footer-brand p { margin-top: 1.25rem; }
.footer-nav ul { display: grid; gap: .25rem; }
.site-footer a { color: var(--plaster); text-decoration: none; }
.footer-nav a, .footer-legal a { display: inline-flex; min-height: 40px; align-items: center; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer :focus-visible { outline-color: var(--glow); }
.footer-legal p { margin-top: .75rem; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .header-cta { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; }

  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    margin: 0;
    padding: 1rem var(--gutter) 2rem;
    background: var(--plaster);
    border-bottom: 1px solid var(--chip);
    box-shadow: 0 24px 40px -24px rgba(42,38,34,.25);
    transform: translateY(-8px);
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .25s var(--ease-out), visibility 0s .25s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a:not(.btn) {
    display: flex; align-items: center;
    min-height: 56px;
    font-family: var(--font-display);
    font-size: 1.375rem;
    border-bottom: 1px solid var(--chip);
    background: none;
  }
  .nav-cta-mobile { display: flex; width: 100%; margin-top: 1.5rem; min-height: 56px; }

  .hero-grid, .about-grid, .directions-grid, .booking-grid, .contacts-grid, .cta-inner { grid-template-columns: minmax(0, 1fr); }
  .doctor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-media { max-width: 520px; width: 100%; justify-self: center; }
  .hero-bg::after {
    background: linear-gradient(180deg, rgba(242,241,238,.93) 0%, rgba(242,241,238,.84) 55%, var(--plaster) 100%);
  }
  .directions-head, .booking-intro { position: static; }
  /* Stacked: text first, so the hero image and this one never sit back to back */
  .about-media { max-width: 520px; order: 1; }
  .about-wide .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-wide .about-media { max-width: none; }
  .prices-aside { order: 1; }   /* prices first, help below */
  .footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .wordmark { --wordmark-size: .8125rem; gap: .5rem; }
  .header-inner { gap: 1rem; }
  .wordmark-sub { letter-spacing: .1em; }
  .wordmark-oval { letter-spacing: .24em; padding: .5rem .55rem .5rem .8rem; }
  .hero { padding-top: 1.5rem; }
  .hero-title { margin-bottom: 1.25rem; }
  .hero-lead { margin-bottom: 1.75rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-address { margin-top: 1.25rem; }
  .hero-media { padding-left: 10%; }
  .open-badge { bottom: 6%; padding: .7rem 1.1rem; }
  .directions-list { grid-template-columns: minmax(0, 1fr); }
  .directions-list a { min-height: 64px; font-size: 1.1875rem; }
  .services-list { grid-template-columns: minmax(0, 1fr); }
  .services-list li { min-height: 64px; font-size: 1.1875rem; }
  .doctor-grid { grid-template-columns: minmax(0, 1fr); }
  .doctor-photo { max-width: 420px; }
  .doctor-grid.is-solo .doctor-card { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .doctor-grid.is-solo .doctor-photo { max-width: 420px; }
  .doctor-cta { width: 100%; margin-top: 1.5rem; }
  .cta-actions .btn { flex: 1 1 100%; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .contact-list div { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .price-group summary { min-height: 64px; gap: .75rem; }
  .price-group-name { font-size: 1.1875rem; }
  .price-group-count { display: none; }
  .price-rows li { gap: 1rem; }
  .prices-aside-actions .btn { flex: 1 1 100%; }
  .map-head .btn { width: 100%; }
  .map-frame { aspect-ratio: 4 / 5; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}

@media (max-width: 360px) {
  .wordmark { --wordmark-size: .75rem; gap: .4rem; }
  .wordmark-oval { letter-spacing: .2em; padding: .45rem .45rem .45rem .7rem; }
  .wordmark-sub { letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
