/* The site's styles. The look follows the practice's old site (teal header, deep-teal
   title band, serif headings), cleaned up: readable type, AA contrast or better for all
   text in both themes, big tap targets, nothing that moves on its own but the home page's video. Light and dark
   follow the device until the visitor picks one with the small button in the header
   (site.js). The brand's bright teal (#0ba5be) is too light to carry white text, so text
   sits on the deeper teals and the bright one is kept for lines and decoration. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #ffffff;
  --band: #edf6f8;
  --text: #1b2a31;
  --muted: #43555e;
  --line: #5c727d; /* borders that mark a control: 3:1 or better */
  --rule: #d3e2e7; /* quiet dividers */
  --accent: #007389; /* links, buttons, teal headings: 5.5:1 on white */
  --accent-strong: #014656;
  --on-accent: #ffffff;
  --brand: #007d97; /* the header and footer bands; white text on it is 4.8:1 */
  --brand-strip: #00687e; /* the menu strip, between the two */
  --brand-deep: #013f4e; /* the title band under the header */
  --brand-bright: #0ba5be; /* decoration only */
  --on-brand: #ffffff;
  --star: #b78400; /* gold that still shows on white; the bright gold is for dark surfaces */
  --shadow: 0 1px 2px rgb(1 63 78 / 0.08), 0 8px 24px rgb(1 63 78 / 0.08);
  --radius: 0.75rem;
  --measure: 42rem;
  --page: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1a20;
    --surface: #11252d;
    --band: #0f2a33;
    --text: #edf4f6;
    --muted: #b8cad1;
    --line: #7f98a3;
    --rule: #25434e;
    --accent: #62d2e5;
    --accent-strong: #a3e6f1;
    --on-accent: #06222a;
    --brand: #00596d;
    --brand-strip: #004b5c;
    --brand-deep: #072c36;
    --star: #fdd314;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1a20;
  --surface: #11252d;
  --band: #0f2a33;
  --text: #edf4f6;
  --muted: #b8cad1;
  --line: #7f98a3;
  --rule: #25434e;
  --accent: #62d2e5;
  --accent-strong: #a3e6f1;
  --on-accent: #06222a;
  --brand: #00596d;
  --brand-strip: #004b5c;
  --brand-deep: #072c36;
  --star: #fdd314;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- base ---------- */

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

html { scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  /* "anywhere", not "break-word": a long email address must be able to wrap even inside
     a grid, or it pushes a narrow phone screen sideways. */
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.875rem); }
h2 {
  margin-top: 1.75em;
  color: var(--accent);
  font-size: clamp(1.625rem, 1.35rem + 1vw, 2.125rem);
}
h3 { margin-top: 1.5em; font-size: clamp(1.3125rem, 1.2rem + 0.4vw, 1.5rem); }
h4 { margin-top: 1.25em; font-size: 1.1875rem; }
p,
ul,
ol,
dl,
figure,
blockquote { margin: 0 0 1.1em; }
p { text-wrap: pretty; }
ul,
ol { padding-inline-start: 1.4em; }
li + li { margin-top: 0.35em; }
img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 0.15em; }
:where(a, button, input, select, textarea, summary, [tabindex="0"]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }

/* Hidden until a keyboard user tabs to it. */
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 30;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--text);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- layout ---------- */

/* Content lays itself out by the room it has, not the window's width: each band, each
   .wrap inside it, each text column and each side of a two-column layout is a container,
   and the grids below ask their nearest one how wide it is (@container). A card grid
   inside a narrow text column stacks while the same grid across a full band spreads out.
   The header and footer are whole-page layouts, so they still go by the window. */
.band,
.wrap,
.prose,
.split > *,
.with-aside > * { container-type: inline-size; }
.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* Text keeps a comfortable line length but stays on the same left edge as everything else. */
.prose > * { max-width: var(--measure); }
.prose > :last-child { margin-bottom: 0; }
.band { padding-block: clamp(2.75rem, 2rem + 4vw, 5rem); }
.band-tint { background: var(--band); }
.band:not(.band-tint, .band-deep) + .band:not(.band-tint, .band-deep) { padding-top: 0; }
.band h2:first-child,
.band .prose > h2:first-child,
.band .section-head h2 { margin-top: 0; }
.lead {
  color: var(--muted);
  font-size: clamp(1.2rem, 1.12rem + 0.35vw, 1.375rem);
}
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.center { text-align: center; }
.center > * { margin-inline: auto; }

/* A deep-teal band; everything on it is light. */
.band-deep {
  --text: #ffffff;
  --muted: #d5e9ee;
  --accent: #8fe1ef;
  --rule: rgb(255 255 255 / 0.22);
  background: var(--brand-deep);
  color: var(--text);
}
.band-deep h2 { color: #ffffff; }
/* The deep band with the palm skyline showing faintly through it (the reviews). */
.band-palms {
  background:
    linear-gradient(rgb(1 47 59 / 0.8), rgb(1 47 59 / 0.86)),
    url("/images/palms.webp") center 70% / cover no-repeat,
    var(--brand-deep);
}

.section-head {
  max-width: 46rem;
  margin: 0 auto clamp(1.5rem, 1rem + 2vw, 2.5rem);
  text-align: center;
}
.section-head h2::after,
.page-title h1::after {
  content: "";
  display: block;
  inline-size: 4rem;
  block-size: 3px;
  margin: 0.9rem auto 0;
  border-radius: 2px;
  background: var(--brand-bright);
}
.section-head p:last-child { margin-bottom: 0; }

/* Text beside a picture. One column in a narrow band; side by side in a wide one, where
   .split-flip puts the picture second. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}
@container (min-width: 52rem) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .split-flip > :first-child { order: 2; }
}
.split h2:first-child,
.split .eyebrow + h2 { margin-top: 0; }
.photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--band);
}
.photo img { inline-size: 100%; }
.photo-frame {
  padding: 0.5rem;
  border: 1px solid var(--rule);
  background: var(--surface);
}
.photo-frame img { border-radius: calc(var(--radius) - 0.35rem); }
figcaption {
  padding: 0.6rem 0.25rem 0.1rem;
  color: var(--muted);
  font-size: 1rem;
}

.service-photo { margin: 0 0 1.5rem; }
@container (min-width: 40rem) {
  .service-photo {
    float: inline-end;
    inline-size: min(46%, 21rem);
    margin: 0.35rem 0 1rem 2rem;
  }
}

/* A page's words with a contact card beside them (below them on phones). */
.with-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: start;
}
@container (min-width: 60rem) {
  .with-aside { grid-template-columns: minmax(0, 1fr) 21rem; }
  .with-aside > aside {
    position: sticky;
    top: 1.5rem;
  }
}
/* On a short screen the card scrolls with the page instead of staying put. */
@media (max-height: 44em) {
  .with-aside > aside { position: static; }
}
.aside-card {
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-top: 4px solid var(--brand-bright);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.aside-card h2 {
  margin-top: 0;
  color: var(--text);
  font-size: 1.375rem;
}
.aside-card .actions { margin-top: 1rem; }
.aside-card .button { flex: 1 1 100%; }
.aside-card > :last-child { margin-bottom: 0; }
.aside-person {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.aside-person img {
  flex: none;
  inline-size: 4.5rem;
  block-size: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
}
.aside-person p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-block-size: 3rem;
  padding: 0.5rem 1.35rem;
  border: 2px solid var(--accent);
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}
.button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  text-decoration: underline;
}
.button-quiet {
  background: transparent;
  color: var(--accent);
}
.button-quiet:hover {
  background: transparent;
  color: var(--accent-strong);
}
/* On the teal and photo bands: a white button, and a clear one with a white edge. */
.button-light {
  border-color: #ffffff;
  background: #ffffff;
  color: #014656;
}
.button-light:hover {
  border-color: #dff3f7;
  background: #dff3f7;
  color: #014656;
}
.button-clear {
  border-color: #ffffff;
  background: rgb(1 63 78 / 0.35);
  color: #ffffff;
}
.button-clear:hover {
  border-color: #ffffff;
  background: rgb(1 63 78 / 0.7);
  color: #ffffff;
}
.button svg {
  flex: none;
  inline-size: 1.15em;
  block-size: 1.15em;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.center .actions,
.actions.center,
.section-head .actions { justify-content: center; }
.actions.center > * { margin-inline: 0; }
.more-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  font-weight: 700;
}
.more-link::after {
  content: "→";
  content: "→" / "";
  margin-inline-start: 0.4em;
}

/* ---------- header ----------
   Two tiers. The top one holds the logo, the call and text buttons and the light/dark
   button; the menu sits under it. Phones: the logo with the light/dark and Menu buttons,
   call and text side by side below, and the menu opening under those. From 64em the menu
   is its own darker strip across the page, so it never has to wrap around the logo.
   Without scripts the Menu button is hidden and the whole menu simply shows. */

.site-header {
  position: relative;
  z-index: 20;
  background: var(--brand);
  color: var(--on-brand);
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "logo theme menu"
    "contact contact contact";
  gap: 0.5rem;
  align-items: center;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.5rem var(--gutter);
}
.site-logo {
  grid-area: logo;
  display: flex;
  align-items: center;
  min-block-size: 2.75rem;
  inline-size: min(100%, 11rem);
}
.site-logo img { inline-size: 100%; }
.site-header .theme-toggle { grid-area: theme; }
.menu-button { grid-area: menu; }
.header-contact {
  grid-area: contact;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.header-contact a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-block-size: 2.75rem;
  padding: 0.1rem 0.5rem;
  border: 1.5px solid rgb(255 255 255 / 0.75);
  border-radius: 0.5rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}
.header-contact a:hover {
  background: rgb(255 255 255 / 0.14);
  text-decoration: underline;
}
.header-contact span { white-space: nowrap; }
@media (max-width: 22.49em) {
  .header-contact a {
    padding-inline: 0.2rem;
    font-size: 0.9375rem;
  }
}
.header-contact small {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-header :where(a, button):focus-visible { outline-color: #ffffff; }

.menu-button,
.site-header .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-inline-size: 2.75rem;
  block-size: 2.75rem;
  padding: 0 0.75rem;
  border: 1.5px solid rgb(255 255 255 / 0.75);
  border-radius: 0.5rem;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
}
.menu-button:hover,
.site-header .theme-toggle:hover {
  border-color: #ffffff;
  background: rgb(255 255 255 / 0.14);
  color: #ffffff;
}
.menu-button { display: none; }
.js .menu-button { display: inline-flex; }
.menu-button svg {
  inline-size: 1.25rem;
  block-size: 1.25rem;
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav li { margin: 0; }
.main-nav .nav-list {
  display: grid;
  gap: 0.15rem;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.35rem var(--gutter) 0.75rem;
  border-top: 1px solid rgb(255 255 255 / 0.3);
}
.js .nav-list:not(.is-open) { display: none; }
.main-nav a,
.submenu-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  inline-size: 100%;
  min-block-size: 2.875rem;
  padding: 0.35rem 0.75rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.main-nav a:hover,
.submenu-button:hover {
  background: rgb(255 255 255 / 0.14);
  text-decoration: underline;
}
.main-nav a[aria-current="page"] {
  box-shadow: inset 3px 0 0 #ffffff;
  background: rgb(255 255 255 / 0.14);
}
.submenu-button svg {
  flex: none;
  inline-size: 0.9rem;
  block-size: 0.9rem;
  transition: rotate 160ms ease;
}
.submenu-button[aria-expanded="true"] svg { rotate: 180deg; }
.main-nav .submenu { padding-inline-start: 1rem; }
.submenu a { font-weight: 500; }
.js .submenu:not(.is-open) { display: none; }
@media (prefers-reduced-motion: reduce) {
  .submenu-button svg { transition: none; }
}

@media (min-width: 40em) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    grid-template-areas: "logo contact theme menu";
  }
  .site-logo { inline-size: min(100%, 11.5rem); }
  .header-contact { grid-template-columns: auto auto; }
  .header-contact a { padding-inline: 0.9rem; }
}

@media (min-width: 64em) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "logo contact theme";
    gap: 0.75rem;
    padding-block: 0.4rem;
  }
  .site-logo { inline-size: 11.5rem; }
  .header-contact a {
    flex-direction: row;
    gap: 0.5rem;
    padding-inline: 1rem;
  }
  .js .menu-button { display: none; }
  .main-nav { background: var(--brand-strip); }
  .main-nav .nav-list,
  .js .main-nav .nav-list:not(.is-open) {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.25rem;
    /* The first link's words line up under the logo's left edge. */
    padding: 0 calc(var(--gutter) - 0.9rem);
    border: 0;
  }
  .nav-list > li { position: relative; }
  .nav-list > li > a,
  .submenu-button {
    inline-size: auto;
    min-block-size: 2.75rem;
    padding-inline: 0.9rem;
    border-radius: 0;
    font-size: 0.9375rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .nav-list > li > a[aria-current="page"] { box-shadow: inset 0 -3px 0 #ffffff; }
  .main-nav .submenu {
    position: absolute;
    inset-block-start: 100%;
    inset-inline-start: 0;
    z-index: 5;
    min-inline-size: 17rem;
    padding: 0.4rem;
    border-radius: 0 0 0.6rem 0.6rem;
    background: var(--brand-deep);
    box-shadow: 0 12px 28px rgb(0 0 0 / 0.28);
  }
  .submenu a { border-radius: 0.4rem; }
  /* Without scripts the dropdowns open when the pointer or the keyboard reaches them. */
  html:not(.js) .nav-list > li:not(:hover, :focus-within) > .submenu { display: none; }
}

/* The light/dark button: a small icon, the same as aggrologix.com's, with its label
   spoken by screen readers and shown on hover. It needs site.js, so it stays hidden
   until the script is there to run it. 44px square: subtle, but easy to tap. */
.theme-toggle {
  flex: none;
  inline-size: 2.75rem;
  padding: 0;
  visibility: hidden;
}
.site-header .theme-toggle { padding: 0; }
.js .theme-toggle { visibility: visible; }
.theme-toggle svg {
  inline-size: 1.375rem;
  block-size: 1.375rem;
  transition: rotate 480ms ease;
}
/* The half-filled disc turns over in dark mode (the same conditions as the colors). */
:root[data-theme="dark"] .theme-toggle svg { rotate: 180deg; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle svg { rotate: 180deg; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg { transition: none; }
}

/* ---------- the home page's opening picture ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-block-size: clamp(22rem, 62vh, 40rem);
  background: var(--brand-deep);
  color: #ffffff;
  isolation: isolate;
}
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 40% 50%;
}
/* The video fades in over the still picture once it is playing. */
.hero-video {
  opacity: 0;
  transition: opacity 600ms ease;
}
.hero-video.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-video { transition: none; }
}
.hero-pause {
  position: absolute;
  inset-block-end: 1rem;
  inset-inline-end: max(1rem, calc((100% - var(--page)) / 2 + var(--gutter)));
  display: grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  padding: 0;
  border: 1.5px solid rgb(255 255 255 / 0.85);
  border-radius: 50%;
  background: rgb(1 47 59 / 0.6);
  color: #ffffff;
  cursor: pointer;
}
.hero-pause:hover { background: rgb(1 47 59 / 0.85); }
.hero-pause:focus-visible { outline-color: #ffffff; }
.hero-pause svg {
  inline-size: 1.1rem;
  block-size: 1.1rem;
}
.hero-pause .icon-play,
.hero-pause.is-paused .icon-pause { display: none; }
.hero-pause.is-paused .icon-play { display: block; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgb(1 47 59 / 0.92) 0%, rgb(1 47 59 / 0.7) 38%, rgb(1 47 59 / 0.15) 75%, rgb(1 47 59 / 0) 100%);
}
.hero-inner {
  inline-size: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding: clamp(6rem, 18vh, 11rem) var(--gutter) clamp(2rem, 1.5rem + 3vw, 3.5rem);
}
.hero .eyebrow {
  color: #ffffff;
  text-shadow: 0 1px 6px rgb(1 47 59 / 0.9);
}
.hero h1 {
  max-width: 18ch;
  margin-bottom: 0.35em;
  font-size: clamp(2.375rem, 1.5rem + 4.2vw, 4.25rem);
  text-shadow: 0 2px 14px rgb(1 47 59 / 0.75);
}
.hero .lead {
  max-width: 36rem;
  color: #ffffff;
  text-shadow: 0 1px 8px rgb(1 47 59 / 0.9);
}

/* ---------- the title band on every other page ---------- */

.page-title {
  padding-block: clamp(1.75rem, 1.25rem + 2.5vw, 3rem);
  background: var(--brand-deep);
  color: #ffffff;
  text-align: center;
}
.page-title .eyebrow {
  color: #a9e6f1;
  margin-bottom: 0.4rem;
}
.page-title .eyebrow a { color: inherit; }
.page-title h1 {
  max-width: 24ch;
  margin: 0 auto;
}
.page-title .lead {
  max-width: 40rem;
  margin: 1rem auto 0;
  color: #d5e9ee;
}

/* ---------- cards ---------- */

/* Card grids get a set number of columns for the room they have, so a row never ends with
   one card on its own: four go one, two, then four across; three go one, then three. */
.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cards > li { margin: 0; }
@container (min-width: 34rem) {
  .cards-4,
  .cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 46rem) {
  .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (min-width: 62rem) {
  .cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h3 { font-size: 1.375rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card .more-link { margin-top: auto; }
.card-top { border-top: 4px solid var(--brand-bright); }
/* A card that opens with a picture, edge to edge across its top. */
.card-photo { overflow: hidden; }
.card.card-photo > img {
  inline-size: calc(100% + 3rem);
  max-width: none;
  margin: -1.5rem -1.5rem 1.25rem;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 25%;
  background: var(--band);
}

/* A group of links to service pages, under a heading. */
.link-groups {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@container (min-width: 34rem) {
  .link-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 62rem) {
  .link-groups-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* An odd group left over at the end takes the full row. */
.link-groups:not(.link-groups-4) > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.link-groups > li { margin: 0; }
.link-group {
  block-size: 100%;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-top: 4px solid var(--brand-bright);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.link-group h2,
.link-group h3 {
  margin: 0 0 0.6rem;
  color: var(--text);
  font-size: 1.375rem;
}
.link-group p { color: var(--muted); font-size: 1.0625rem; }
.link-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.link-group li { margin: 0; border-top: 1px solid var(--rule); }
.link-group li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-block-size: 2.875rem;
  padding-block: 0.4rem;
  font-weight: 600;
  text-decoration: none;
}
.link-group li a::after {
  content: "›";
  content: "›" / "";
  font-size: 1.4em;
  line-height: 1;
}
.link-group li a:hover { text-decoration: underline; }

.checklist {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
}
.checklist li {
  position: relative;
  margin: 0;
  padding-inline-start: 2.1rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 0.25rem;
  inline-size: 1.05rem;
  block-size: 0.55rem;
  border-bottom: 3px solid var(--brand-bright);
  border-left: 3px solid var(--brand-bright);
  transform: rotate(-45deg);
}

.steps {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  min-block-size: 2.75rem;
  margin: 0;
  padding-inline-start: 4rem;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  content: counter(step) / "";
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.steps h3 { margin: 0.2rem 0 0.25rem; }
.steps p { margin: 0; }

/* Facts in two columns: hours, contact details. */
.facts {
  display: grid;
  gap: 0;
  margin: 0;
}
.facts > div {
  display: grid;
  grid-template-columns: minmax(7rem, 2fr) 3fr;
  gap: 0.25rem 1rem;
  padding-block: 0.55rem;
  border-top: 1px solid var(--rule);
}
.facts > div:first-child { border-top: 0; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.note {
  color: var(--muted);
  font-size: 1rem;
}

/* A highlighted note inside a page. */
.callout {
  display: grid;
  gap: 1rem 2rem;
  align-items: center;
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  border: 1px solid var(--rule);
  border-left: 6px solid var(--brand-bright);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
@container (min-width: 44rem) {
  .callout { grid-template-columns: minmax(0, 1fr) auto; }
}
.callout h2,
.callout h3 { margin: 0 0 0.35rem; color: var(--text); }
.callout p { margin: 0; color: var(--muted); }
.callout .actions { margin: 0; }

/* ---------- what patients say ----------
   A row the visitor moves through themselves, by swipe, scroll or keyboard; nothing
   slides on its own. */

.quotes {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(86%, 24rem);
  gap: 1.25rem;
  margin: 0;
  padding: 0.5rem 0.25rem 1.25rem;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgb(255 255 255 / 0.5) transparent;
}
@container (min-width: 62rem) {
  .quotes { grid-auto-columns: calc((100% - 2.5rem) / 3); }
}
.quotes > li {
  margin: 0;
  scroll-snap-align: start;
}
.quote {
  display: flex;
  flex-direction: column;
  block-size: 100%;
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.band-deep .quote {
  background: rgb(255 255 255 / 0.07);
  box-shadow: none;
}
.prose > .quote { margin-block: 1.5rem; }
.quote blockquote { margin: 0 0 1rem; }
.quote blockquote p { margin: 0; }
.quote figcaption {
  margin-top: auto;
  padding: 0;
  color: inherit;
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 600;
}
.stars {
  display: flex;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
  color: var(--star);
}
.band-deep .stars { color: #fdd314; }
.stars svg {
  inline-size: 1.25rem;
  block-size: 1.25rem;
}
/* The same cards as a wrapping grid, not a row (the reviews page). */
.quotes-grid {
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  overflow: visible;
}
@container (min-width: 40rem) {
  .quotes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.quotes-grid > li:only-child { grid-column: 1 / -1; }

/* ---------- people ---------- */

/* The team: a card per person with their name and role. Rows share the room equally and a
   short last row sits centered, so no one is left stranded on a line of their own. */
.team-list {
  --across: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.team-list > li {
  flex: 0 0 calc((100% - (var(--across) - 1) * 1rem) / var(--across));
  margin: 0;
}
@container (min-width: 30rem) {
  .team-list { --across: 2; }
}
@container (min-width: 52rem) {
  .team-list { --across: 3; }
}
@container (min-width: 68rem) {
  .team-list { --across: 4; }
}
.team-card {
  border-top: 4px solid var(--brand-bright);
  text-align: center;
}
.team-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
}
.team-card .role {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}
.team-card .more-link { align-self: center; margin-top: 0.75rem; }

.people {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.person {
  display: grid;
  gap: 1.25rem 2rem;
  margin: 0;
  padding-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  border-top: 1px solid var(--rule);
}
.person:first-child {
  padding-top: 0;
  border-top: 0;
}
@container (min-width: 40rem) {
  .person-photo { grid-template-columns: 14rem minmax(0, 1fr); }
}
.person h2 { margin: 0 0 0.15rem; }
.person .role {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-weight: 700;
}
.person .photo { align-self: start; max-inline-size: 18rem; }

/* ---------- photo galleries ---------- */

.gallery {
  --across: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Each photo takes an equal share of a row; a short last row sits centered, so a photo
   left over never looks stranded. */
.gallery > li {
  flex: 0 0 calc((100% - (var(--across) - 1) * 1.25rem) / var(--across));
  margin: 0;
}
@container (min-width: 34rem) {
  .gallery { --across: 2; }
}
@container (min-width: 62rem) {
  .gallery-4 { --across: 4; }
}

/* ---------- articles ---------- */

.article-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@container (min-width: 40rem) {
  .article-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 62rem) {
  .article-list-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-list-3 > li:nth-child(n + 4) { display: none; }
}
/* The home page holds every article it may show and shows the first four; site.js moves
   a fresh four to the front on each visit. */
.article-shuffle > li:nth-child(n + 5) { display: none; }
.article-list > li { margin: 0; }
.article-card {
  display: flex;
  flex-direction: column;
  block-size: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* The pictures come in every shape, many with their title lettered across the top, so
   the card shows the upper part of each. */
.article-card img {
  inline-size: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 12%;
  background: var(--band);
}
.article-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1.5rem;
}
/* The article's topic, where a date would otherwise sit. */
.article-card .article-topic {
  margin: 0;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.article-card h2,
.article-card h3 {
  margin: 0.35rem 0 0.5rem;
  color: var(--text);
  font-size: 1.3125rem;
}
.article-card h2 a,
.article-card h3 a { color: inherit; text-decoration: none; }
.article-card h2 a:hover,
.article-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.article-card p {
  color: var(--muted);
  font-size: 1.0625rem;
}
.article-card .more-link { margin-top: auto; }

/* The blog page: a row of topics to jump to, then every article under its topic, three
   across where there's room. */
.topic-band { padding-block: clamp(1.25rem, 1rem + 1vw, 2rem); }
.topic-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topic-nav li { margin: 0; }
.topic-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  padding: 0.25rem 1rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.topic-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: underline;
}
:where(h2[id]) { scroll-margin-top: 1.5rem; }
@container (min-width: 62rem) {
  .article-list-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Under its own topic heading a card has no need to name the topic again. */
.article-list-wide .article-topic { display: none; }

/* Related reading at the foot of a service page's text. */
.related-reading {
  clear: both;
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule);
  border-left: 6px solid var(--brand-bright);
  border-radius: var(--radius);
  background: var(--band);
}
.related-reading h2 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 1.25rem;
}
.related-reading ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.related-reading li { margin: 0; }
.related-reading a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  padding-block: 0.25rem;
  font-weight: 600;
}

/* One article. Its picture sits beside the opening words on wide screens. */
.article {
  max-width: 48rem;
  margin-inline: auto;
}
.article > h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); }
.article > h3,
.article > h4 { color: var(--text); }
.article-photo {
  margin: 0 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--band);
}
.article-photo img { inline-size: 100%; }
@container (min-width: 40rem) {
  .article-photo {
    float: inline-end;
    inline-size: min(45%, 20rem);
    margin: 0.35rem 0 1rem 2rem;
  }
}
.article-foot {
  clear: both;
  max-width: 48rem;
  margin: clamp(2rem, 1.5rem + 2vw, 3rem) auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

/* ---------- the closing call to action ---------- */

.cta { text-align: center; }
.cta h2 {
  max-width: 28ch;
  margin-inline: auto;
}
.cta p {
  max-width: 38rem;
  margin-inline: auto;
}
.cta .actions { justify-content: center; }

/* ---------- footer ---------- */

.site-footer {
  --accent: #ffffff;
  --rule: rgb(255 255 255 / 0.25);
  background: var(--brand);
  color: #ffffff;
}
.site-footer a { color: #ffffff; }
.site-footer :where(a, button):focus-visible { outline-color: #ffffff; }
.footer-inner {
  display: grid;
  gap: 2rem;
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2.5rem, 2rem + 2vw, 3.5rem) var(--gutter) 1.5rem;
}
@media (min-width: 46em) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 72em) {
  .footer-inner { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; }
}
.footer-inner p { margin: 0 0 0.5em; }
.footer-logo {
  display: block;
  inline-size: min(100%, 15rem);
  margin-bottom: 1rem;
}
.footer-logo img { inline-size: 100%; }
.footer-inner h2 {
  margin: 0 0 0.6rem;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer-inner ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-inner li { margin: 0; }
.footer-inner li a,
.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
  padding-block: 0.25rem;
}
.footer-contact p { margin: 0; }
.hours {
  margin: 0;
  font-size: 1.0625rem;
}
.hours div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1rem;
  padding-block: 0.3rem;
  border-top: 1px solid var(--rule);
}
.hours div:first-child { border-top: 0; }
.hours dt { font-weight: 700; }
.hours dd { margin: 0; }
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.3);
  font-size: 1rem;
}
.footer-bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}
.footer-bottom p { margin: 0; }

/* A blank still to fill in, on previews only: the build never publishes one. */
.todo { border-bottom: 2px dotted currentColor; }

@media print {
  .site-header .theme-toggle,
  .menu-button,
  .main-nav,
  .cta .actions { display: none; }
}
