/* Layout: the business card scaled up. Its royal blue on its own white stock,
   one calm column with soft rounded panels, and a single line that settles
   from noise into a pure tone. */
:root {
  --paper: #FBFCFF;        /* the card stock */
  --mist: #EEF2FC;         /* quiet tint for panels */
  --sky: #D9E2F8;          /* rules, frames, deeper tint */
  --royal: #2946B4;        /* the card's blue: brand and every action */
  --royal-deep: #1C3288;   /* pressed states and the utility bar */
  --ink: #131C40;          /* text, tinted toward the blue */
  --ink-soft: #49547B;     /* secondary text */
  --on-royal: #FFFFFF;
  --on-royal-soft: #D3DCF7;
  --alert: #A8261C;

  --font-display: "Alegreya Sans", "Gill Sans", "Trebuchet MS", sans-serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --text-sm: 0.9rem;
  --text-base: 1.0625rem;
  --text-md: 1.25rem;
  --text-lg: 1.55rem;
  --text-xl: clamp(1.95rem, 2.2vw + 1.25rem, 2.9rem);
  --text-display: clamp(2.7rem, 5.2vw + 1rem, 5rem);

  --r-panel: 28px;
  --r-field: 12px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  accent-color: var(--royal);
  caret-color: var(--royal);
  -webkit-tap-highlight-color: rgba(41, 70, 180, 0.15);
}
::selection { background: var(--royal); color: var(--on-royal); }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }
a { color: var(--royal); text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--royal-deep); }
:focus-visible { outline: 3px solid var(--royal); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; text-wrap: balance; }
h1 { font-size: var(--text-display); line-height: 1.02; letter-spacing: -0.015em; }
h2 { font-size: var(--text-xl); line-height: 1.08; letter-spacing: -0.01em; }
h3 { font-size: var(--text-lg); line-height: 1.15; font-weight: 700; }
p { text-wrap: pretty; }
.lead { font-size: var(--text-md); line-height: 1.5; color: var(--ink-soft); max-width: 34em; }
.soft { color: var(--ink-soft); }
.measure { max-width: 38em; }
.nowrap { white-space: nowrap; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.gap { height: clamp(28px, 4vw, 52px); }
.stack-lg { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); }

/* Facts we are still waiting on from Bill are marked, never invented. */
.tbc {
  display: inline-block; padding: 2px 10px; border: 1.5px dashed var(--royal);
  border-radius: 999px; font-size: var(--text-sm); color: var(--royal); background: var(--paper);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border-radius: 999px; border: 2px solid var(--royal);
  background: var(--royal); color: var(--on-royal);
  font: 700 1.05rem/1.1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { background: var(--royal-deep); border-color: var(--royal-deep); color: var(--on-royal); }
.btn:active { transform: translateY(1px); }
.btn--quiet { background: transparent; color: var(--royal); }
.btn--quiet:hover { background: var(--mist); border-color: var(--royal); color: var(--royal-deep); }
.btn svg { width: 20px; height: 20px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- utility bar and header ---------- */
.util { background: var(--royal-deep); color: var(--on-royal-soft); font-size: var(--text-sm); }
.util .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-block: 9px; }
.util a { color: var(--on-royal); font-weight: 700; text-decoration: none; }
.util a:hover { text-decoration: underline; }
.util :focus-visible { outline-color: var(--on-royal); }

.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding-block: 18px; }
.brand { display: block; flex: none; }
.brand img { height: 56px; width: auto; }

.nav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-left: auto; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px;
  color: var(--ink); font-weight: 600; text-decoration: none;
  transition: background-color 160ms var(--ease);
}
.nav a:hover { background: var(--mist); color: var(--royal-deep); }
.nav a[aria-current="page"] { background: var(--mist); color: var(--royal); }
.site-head .btn { min-height: 48px; padding: 0 20px; font-size: 1rem; }
@media (max-width: 1140px) { .site-head .btn { display: none; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(28px, 5vw, 64px) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.hero h1 { color: var(--royal); }

.photo {
  position: relative; overflow: hidden; background: var(--mist);
  border-radius: var(--r-panel) var(--r-panel) 104px var(--r-panel);
  aspect-ratio: 4 / 5; max-width: 100%; display: flex; align-items: flex-end;
}
.photo--wide { aspect-ratio: 16 / 10; border-radius: var(--r-panel); }
.photo--left { border-radius: 104px var(--r-panel) var(--r-panel) var(--r-panel); }
.photo img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.photo .watermark { position: absolute; right: -10%; top: 6%; width: 82%; height: auto; opacity: 0.13; }
.photo figcaption {
  position: relative; margin: 18px; padding: 8px 14px; border-radius: 999px;
  background: var(--paper); color: var(--ink-soft); font-size: var(--text-sm); font-weight: 600;
}

/* The one authored moment: noise on the left settles into a pure tone. */
.tone { margin-top: clamp(28px, 5vw, 56px); }
.tone svg { width: 100%; height: clamp(64px, 9vw, 104px); overflow: visible; }
.tone path { fill: none; stroke: var(--royal); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tone-line { animation: settle 2200ms var(--ease) both; }
@keyframes settle { from { clip-path: inset(-20% 100% -20% 0); } to { clip-path: inset(-20% 0 -20% 0); } }
.tone-notes { display: flex; justify-content: space-between; gap: 16px; font-size: var(--text-sm); color: var(--ink-soft); }
.tone-notes span:last-child { text-align: right; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid var(--sky); margin-top: clamp(24px, 4vw, 40px); }
.facts li { padding: 22px 28px 22px 0; }
.facts li + li { padding-left: 28px; border-left: 1.5px solid var(--sky); }
.facts strong { display: block; font-family: var(--font-display); font-size: var(--text-md); font-weight: 700; line-height: 1.2; }
.facts span { color: var(--ink-soft); font-size: var(--text-sm); }

/* ---------- services index (home) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.split > * { min-width: 0; }
.service-list { border-top: 1.5px solid var(--sky); }
.service-list a {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); gap: 6px 28px; align-items: baseline;
  padding: 20px 16px; margin-inline: -16px; border-radius: 16px; position: relative;
  color: var(--ink); text-decoration: none;
  transition: background-color 160ms var(--ease);
}
.service-list li { border-bottom: 1.5px solid var(--sky); }
.service-list a:hover { background: var(--mist); }
.service-list strong { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; line-height: 1.15; color: var(--royal); }
.service-list span { color: var(--ink-soft); }

/* ---------- independent panel ---------- */
.panel { background: var(--mist); border-radius: var(--r-panel); padding: clamp(24px, 5vw, 64px); }
.panel-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.panel-grid > * { min-width: 0; }
.panel .photo { background: var(--sky); }
.panel .tbc, .closing .tbc { background: transparent; }

/* ---------- first visit, on the card's blue ---------- */
.visit { background: var(--royal); color: var(--on-royal); }
.visit :focus-visible { outline-color: var(--on-royal); }
.visit-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.visit-grid > * { min-width: 0; }
.visit .lead { color: var(--on-royal-soft); }
.steps { counter-reset: step; border-top: 1.5px solid rgba(255, 255, 255, 0.28); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 4px 12px; padding: 20px 0; border-bottom: 1.5px solid rgba(255, 255, 255, 0.28); }
.steps li::before { content: counter(step); grid-row: span 2; font: 800 2.3rem/1 var(--font-display); color: var(--on-royal-soft); }
.steps h3 { font-size: var(--text-md); }
.steps p { color: var(--on-royal-soft); }

.audiogram { background: var(--paper); color: var(--ink); border-radius: var(--r-panel); padding: clamp(16px, 3vw, 28px); box-shadow: 0 18px 40px -18px rgba(9, 18, 60, 0.55); }
.audiogram svg { width: 100%; height: auto; }
.audiogram figcaption { margin-top: 12px; font-size: var(--text-sm); color: var(--ink-soft); }
.ag-grid { stroke: var(--sky); stroke-width: 1; }
.ag-axis { fill: var(--ink-soft); font: 500 12px var(--font-body); }
.ag-title { fill: var(--ink); font: 700 12.5px var(--font-body); }
.ag-normal { fill: var(--mist); }
.ag-note { fill: var(--royal); font: 600 12px var(--font-body); }
.ag-right { fill: none; stroke: var(--ink); stroke-width: 2; }
.ag-left { fill: none; stroke: var(--royal); stroke-width: 2; }
.ag-right-o { fill: var(--paper); stroke: var(--ink); stroke-width: 2.2; }
.ag-left-x { stroke: var(--royal); stroke-width: 2.6; stroke-linecap: round; }

/* ---------- clinics ---------- */
.clinics { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: stretch; }
.clinics > * { min-width: 0; }
.clinic-main { background: var(--mist); border-radius: var(--r-panel); padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.clinic-main h3 { font-size: var(--text-xl); font-weight: 800; }
.clinic-tag { font-weight: 700; color: var(--royal); }
.clinic-visiting { display: flex; flex-direction: column; border-top: 1.5px solid var(--sky); }
.clinic-visiting li { padding: 22px 0; border-bottom: 1.5px solid var(--sky); display: flex; flex-direction: column; gap: 6px; flex: 1; justify-content: center; }
address { font-style: normal; }
.phone-big { font: 800 clamp(2rem, 4vw + 1rem, 3.4rem)/1 var(--font-display); color: var(--royal); text-decoration: none; font-variant-numeric: tabular-nums; }
.phone-big:hover { text-decoration: underline; text-decoration-thickness: 3px; }

/* ---------- two notes, ruled ---------- */
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--sky); border-bottom: 1.5px solid var(--sky); }
.notes > div { padding: clamp(24px, 4vw, 44px) 0; display: flex; flex-direction: column; gap: 12px; }
.notes > div + div { padding-left: clamp(24px, 4vw, 56px); border-left: 1.5px solid var(--sky); }
.notes > div:first-child { padding-right: clamp(24px, 4vw, 56px); }

/* ---------- closing ---------- */
.closing { background: var(--mist); }
.closing blockquote { font: 700 clamp(1.6rem, 2.4vw + 1rem, 2.7rem)/1.14 var(--font-display); color: var(--royal); max-width: 22em; text-wrap: balance; }

/* ---------- inner page heads ---------- */
.page-head { padding-block: clamp(36px, 6vw, 72px) clamp(28px, 4vw, 48px); }
.page-head h1 { color: var(--royal); font-size: clamp(2.4rem, 4vw + 1rem, 4.1rem); max-width: 16em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--mist); color: var(--royal); font-weight: 600; text-decoration: none; transition: background-color 160ms var(--ease); }
.chips a:hover { background: var(--sky); color: var(--royal-deep); }

/* ---------- services page ---------- */
.service { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 12px clamp(24px, 5vw, 72px); padding-block: clamp(28px, 4vw, 44px); border-top: 1.5px solid var(--sky); scroll-margin-top: 16px; }
.service > * { min-width: 0; }
.service h2 { color: var(--royal); font-size: clamp(1.6rem, 1.4vw + 1.1rem, 2.2rem); }
.service .for { color: var(--ink-soft); font-weight: 600; margin-top: 8px; }
.service:last-of-type { border-bottom: 1.5px solid var(--sky); }

/* ---------- about page ---------- */
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid var(--sky); }
.three li { padding: 26px 28px 8px 0; display: flex; flex-direction: column; gap: 8px; }
.three li + li { padding-left: 28px; border-left: 1.5px solid var(--sky); }
.quals { font-weight: 600; }
.pull { font: 700 var(--text-lg)/1.25 var(--font-display); color: var(--royal); padding: 22px 26px; background: var(--paper); border-radius: 20px; }
.pull cite { display: block; margin-top: 10px; font: 500 var(--text-sm)/1.4 var(--font-body); color: var(--ink-soft); }
.timeline li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 4px 20px; padding: 18px 0; border-top: 1.5px solid var(--sky); }
.timeline li:last-child { border-bottom: 1.5px solid var(--sky); }
.timeline time, .timeline .when { font: 800 var(--text-md)/1.3 var(--font-display); color: var(--royal); font-variant-numeric: tabular-nums; }
.plain-list li { padding: 12px 0 12px 26px; border-top: 1.5px solid var(--sky); position: relative; }
.plain-list li::before { content: ""; position: absolute; left: 2px; top: 1.35em; width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid var(--royal); }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 72px); align-items: start; }
.cols-2 > * { min-width: 0; }

/* ---------- contact page ---------- */
.clinic-cards { display: grid; grid-template-columns: 1.3fr 1fr 1fr; border-top: 1.5px solid var(--sky); border-bottom: 1.5px solid var(--sky); }
.clinic-cards li { padding: 28px 28px 28px 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.clinic-cards li + li { padding-left: 28px; border-left: 1.5px solid var(--sky); }
.clinic-cards h2 { font-size: var(--text-lg); font-weight: 800; }
.clinic-cards li:first-child h2 { font-size: var(--text-xl); }
.form { background: var(--mist); border-radius: var(--r-panel); padding: clamp(20px, 4vw, 40px); display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field small { font-weight: 400; color: var(--ink-soft); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
input, select, textarea {
  font: 400 1rem/1.4 var(--font-body); color: var(--ink); background: var(--paper);
  border: 1.5px solid #8E9AC4; border-radius: var(--r-field); padding: 12px 14px; min-height: 50px; width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--royal); outline-offset: 1px; border-color: var(--royal); }
.field [aria-invalid="true"] { border-color: var(--alert); }
.error { color: var(--alert); font-weight: 600; font-size: var(--text-sm); }
.sent { background: var(--paper); border: 2px solid var(--royal); border-radius: 20px; padding: 20px 22px; }
.sent strong { font-family: var(--font-display); font-size: var(--text-md); color: var(--royal); display: block; }

/* ---------- footer ---------- */
.site-foot { border-top: 1.5px solid var(--sky); padding-block: clamp(40px, 6vw, 72px) 32px; font-size: var(--text-sm); }
.foot-grid { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; gap: 36px clamp(28px, 5vw, 72px); align-items: start; }
.foot-grid > * { min-width: 0; }
.foot-logo { display: flex; flex-direction: column; gap: 16px; }
.foot-logo img { width: 250px; height: auto; }
.foot-logo p { color: var(--ink-soft); }
.site-foot h2 { font: 700 1rem/1.3 var(--font-body); letter-spacing: 0; margin-bottom: 10px; }
.site-foot li { padding: 3px 0; color: var(--ink-soft); }
.site-foot li strong { color: var(--ink); }
.small-print { margin-top: 36px; padding-top: 20px; border-top: 1.5px solid var(--sky); display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; color: var(--ink-soft); }

.proto { background: var(--ink); color: var(--on-royal-soft); font-size: var(--text-sm); }
.proto .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding-block: 14px; }
.proto :focus-visible { outline-color: var(--on-royal); }

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  .hero-grid, .split, .panel-grid, .visit-grid, .clinics, .cols-2, .service, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .photo { aspect-ratio: 16 / 11; border-radius: var(--r-panel) var(--r-panel) 72px var(--r-panel); }
  .panel .photo { aspect-ratio: 16 / 11; max-width: 420px; }
  .clinic-cards { grid-template-columns: minmax(0, 1fr); }
  .clinic-cards li, .clinic-cards li + li { padding: 24px 0; border-left: 0; }
  .clinic-cards li + li { border-top: 1.5px solid var(--sky); }
  .nav { margin-left: 0; width: 100%; order: 3; margin-inline: -10px; }
}
@media (max-width: 640px) {
  .brand img { height: 46px; }
  .site-head .btn { display: none; }
  .util .wrap > span:first-child { display: none; }
  .util .wrap { justify-content: center; }
  .nav { gap: 2px; margin-inline: -8px; }
  .nav a { padding: 0 8px; font-size: 0.94rem; }
  .facts, .three, .notes, .field-row { grid-template-columns: minmax(0, 1fr); }
  .facts li, .facts li + li { padding: 16px 0; border-left: 0; }
  .facts li + li { border-top: 1.5px solid var(--sky); }
  .three li, .three li + li { padding: 20px 0 8px; border-left: 0; }
  .three li + li { border-top: 1.5px solid var(--sky); }
  .notes > div, .notes > div + div, .notes > div:first-child { padding: 24px 0; border-left: 0; }
  .notes > div + div { border-top: 1.5px solid var(--sky); }
  .service-list a { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; }
  .tone-notes span:first-child { display: none; }
  .tone-notes { justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tone-line { animation: none; }
  .btn, .nav a, .chips a, .service-list a { transition: none; }
}
