@font-face {
  font-family: "Young Serif";
  src: url("../fonts/young-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f5f1e8;
  --oat: #e9e1d1;
  --white: #fffdf8;
  --ink: #1f2430;
  --ink-2: #535a66;
  --line: #d9cfbd;
  --field-line: #8c8270; /* 3.7:1 on white: form borders must be visible */
  --act: #b44a27;
  --act-hover: #9c3e1f;
  --act-light: #f08a63;
  --act-light-hover: #f6a281;
  --on-ink: #f5f1e8;
  --on-ink-2: #c9ccd3;

  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --gutter: max(clamp(20px, 4.5vw, 64px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --max: 1220px;
  --section: clamp(80px, 10vw, 140px);
  --radius: 6px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-color: #c3b59d var(--paper);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--act);
  accent-color: var(--act);
}
::selection { background: #f3c9b6; color: var(--ink); }

img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a, button, input, label, select, textarea { touch-action: manipulation; }
a[href^="tel:"] { white-space: nowrap; }
a { color: inherit; text-decoration-color: var(--act); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
/* On the ink surfaces the ring turns light persimmon. */
:is(.ribbon, .urgent, .foot, .dock) :focus-visible { outline-color: var(--act-light); }

[hidden] { display: none !important; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.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 { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; background: var(--ink); color: var(--on-ink); border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* Type */
.title {
  font: 400 clamp(2rem, 1.45rem + 2vw, 3.1rem)/1.08 var(--display);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.lede { margin-top: 18px; max-width: 58ch; color: var(--ink-2); font-size: 1.1875rem; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.005em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px;
  border: 0; border-radius: 10px;
  background: var(--act); color: #fff;
  font: 700 1.0625rem/1 var(--body);
  text-decoration: none; cursor: pointer;
  user-select: none; -webkit-user-select: none;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 120ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--small { min-height: 44px; padding: 0 18px; font-size: 1rem; }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--call { background: var(--act-light); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--act-hover); }
  .btn--line:hover { background: rgb(31 36 48 / 0.06); }
  .btn--call:hover { background: var(--act-light-hover); }
}

/* Concept ribbon and header */
.ribbon {
  padding: 9px var(--gutter);
  background: var(--ink); color: var(--on-ink-2);
  font-size: 0.875rem; line-height: 1.4; text-align: center;
}
.ribbon a { color: var(--on-ink); text-decoration-color: var(--act-light); }

.top {
  position: sticky; top: 0; z-index: 20;
  background: rgb(245 241 232 / 0.94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__bar { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.logo { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.logo__name { font: 400 1.5rem/1 var(--display); letter-spacing: -0.01em; }
.logo__sub { font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); }
.nav { display: flex; gap: 26px; margin-left: auto; font-weight: 600; font-size: 1rem; }
.nav a { text-decoration: none; padding: 8px 0; }
.top__actions { display: flex; align-items: center; gap: 18px; }
.top__phone { font-weight: 700; font-size: 1rem; text-decoration: none; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover, .top__phone:hover { text-decoration: underline; }
}
@media (max-width: 979px) { .nav { display: none; } .top__actions { margin-left: auto; } }
@media (max-width: 619px) {
  .top__phone { display: none; }
  .logo__sub { display: none; }
}

/* Hero */
.hero { padding: clamp(28px, 4vw, 56px) 0 clamp(64px, 8vw, 112px); }
.hero__grid { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__title {
  font: 400 clamp(2.6rem, 1.55rem + 3.6vw, 4.6rem)/1.03 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 13ch;
}
.hero__lede { margin-top: 22px; max-width: 44ch; font-size: clamp(1.1875rem, 1.1rem + 0.3vw, 1.3125rem); color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; font-weight: 600; font-size: 1rem; }
.hero__facts li { display: inline-flex; align-items: center; gap: 10px; }
.hero__facts li::before {
  content: ""; width: 6px; height: 11px; margin-top: -3px;
  border: solid var(--act); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.hero__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 42%; border-radius: var(--radius); }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
  .hero__photo img { aspect-ratio: 4 / 5; max-height: min(76svh, 760px); }
}

/* Urgent */
.urgent { background: var(--ink); color: var(--on-ink); padding: clamp(56px, 7vw, 96px) 0; }
.urgent__grid { display: grid; gap: 36px clamp(40px, 6vw, 96px); }
.urgent__title { font: 400 clamp(1.9rem, 1.4rem + 1.7vw, 2.6rem)/1.1 var(--display); letter-spacing: -0.01em; text-wrap: balance; max-width: 16ch; }
.urgent__grid > div:first-child p { margin: 16px 0 26px; max-width: 40ch; color: var(--on-ink-2); }
.urgent__lead { font-weight: 700; }
.urgent__list { margin-top: 12px; }
.urgent__list li { position: relative; padding: 11px 0 11px 22px; border-top: 1px solid rgb(245 241 232 / 0.16); }
.urgent__list li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 7px; height: 7px; border-radius: 50%; background: var(--act-light); }
.urgent__note { margin-top: 18px; color: var(--on-ink-2); }
.urgent a:not(.btn), .visit__small a { font-weight: 700; white-space: nowrap; }
.urgent a:not(.btn) { color: var(--on-ink); text-decoration-color: var(--act-light); }
@media (min-width: 900px) { .urgent__grid { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }

/* Services */
.services { padding: var(--section) 0; }
.services__grid { display: grid; gap: 48px clamp(40px, 6vw, 88px); }
.menu { margin-top: 36px; border-bottom: 1px solid var(--line); }
.menu li {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 20px;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.menu__name { font-weight: 700; font-size: 1.1875rem; }
.menu__desc { color: var(--ink-2); font-size: 1.0625rem; }
.services__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 48% 50%; border-radius: var(--radius); }
.services__photo figcaption, .spread figcaption { margin-top: 12px; color: var(--ink-2); font-size: 1rem; max-width: 44ch; }
@media (min-width: 900px) {
  .services__grid { grid-template-columns: 1.3fr 0.7fr; align-items: start; }
  .services__photo { position: sticky; top: 112px; margin-top: 8px; }
  .menu li { grid-template-columns: minmax(170px, 0.8fr) 1.8fr; align-items: baseline; }
}

/* First visit */
.first { background: var(--oat); padding: var(--section) 0; }
.first__grid { display: grid; gap: 48px clamp(40px, 6vw, 96px); }
.first__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.steps { margin-top: 36px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; gap: 4px 12px; padding: 20px 0; border-top: 1px solid #cfc3ad; }
.steps li::before { content: counter(step); grid-row: span 2; font: 400 2rem/1 var(--display); color: var(--act); }
.steps p { color: var(--ink-2); max-width: 52ch; }
.bring { margin-top: 28px; padding: 24px; background: var(--paper); border-radius: 10px; }
.bring ul { margin-top: 12px; display: grid; gap: 8px 28px; }
.bring li { position: relative; padding-left: 20px; font-size: 1.0625rem; }
.bring li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 1.5px; background: var(--act); }
@media (min-width: 900px) {
  .first__grid { grid-template-columns: 0.85fr 1.15fr; align-items: center; }
  .bring ul { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 899px) { .first__photo img { aspect-ratio: 4 / 3; object-position: 50% 35%; } }

/* The clinic */
.clinic { padding: var(--section) 0 calc(var(--section) * 0.6); }
.clinic__intro { max-width: 760px; }
.spread { display: grid; gap: 36px 24px; margin-top: 48px; }
.spread img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 760px) {
  .spread { grid-template-columns: repeat(3, 1fr); }
  .spread__main { grid-column: 1 / -1; }
  .spread__main img { aspect-ratio: 16 / 7; object-position: 45% 62%; }
}

/* Vets */
.vets { padding: calc(var(--section) * 0.6) 0; }
.vets__grid { display: grid; gap: 48px clamp(32px, 5vw, 72px); margin-top: 40px; }
.vet__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.vet:nth-child(2) .vet__photo img { object-position: 50% 38%; }
.vet h3 { margin-top: 22px; font: 400 1.75rem/1.15 var(--display); letter-spacing: -0.01em; }
.vet p { margin-top: 10px; color: var(--ink-2); max-width: 52ch; }
@media (min-width: 760px) { .vets__grid { grid-template-columns: 1fr 1fr; } }

/* Reviews */
.reviews { padding: calc(var(--section) * 0.6) 0 var(--section); }
.reviews__note { margin-top: 10px; color: var(--ink-2); font-size: 1rem; }
.reviews__grid { display: grid; gap: 32px clamp(28px, 4vw, 56px); margin-top: 40px; }
.quote { padding-top: 22px; border-top: 2px solid var(--ink); }
.quote p { font: 400 1.3125rem/1.45 var(--display); text-wrap: pretty; }
.quote footer { margin-top: 14px; color: var(--ink-2); font-size: 1rem; font-weight: 600; }
@media (min-width: 900px) { .reviews__grid { grid-template-columns: repeat(3, 1fr); } }

/* Booking */
.book { background: var(--oat); padding: var(--section) 0; }
.book__grid { display: grid; gap: 40px clamp(40px, 6vw, 88px); }
.book__urgent { margin-top: 22px; padding-top: 18px; border-top: 1px solid #cfc3ad; font-weight: 600; max-width: 40ch; }
.book__urgent a { color: var(--act-hover); }
@media (min-width: 900px) { .book__grid { grid-template-columns: 0.75fr 1.25fr; align-items: start; } .book__intro { position: sticky; top: 112px; } }

.booking {
  background: var(--white);
  border-radius: 12px;
  padding: clamp(22px, 3.5vw, 40px);
  box-shadow: 0 1px 2px rgb(31 36 48 / 0.06), 0 12px 32px -16px rgb(31 36 48 / 0.22);
}
.booking__progress { color: var(--ink-2); font-size: 1rem; font-weight: 600; }
.booking__progress:empty { display: none; }
.booking__step { border: 0; padding: 0; min-width: 0; }
.booking__step + .booking__step { margin-top: 36px; }
.booking legend { padding: 0; font: 400 1.75rem/1.15 var(--display); letter-spacing: -0.01em; outline: none; }
.booking__progress + .booking__step legend { margin-top: 6px; }
.booking__sub { margin: 26px 0 0; font-weight: 700; }

.choices { display: grid; gap: 10px; margin-top: 16px; }
.choices--2 { grid-template-columns: 1fr 1fr; }
@media (min-width: 560px) { .choices:not(.choices--2) { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: flex; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  flex: 1; display: flex; align-items: center; min-height: 60px; padding: 14px 18px;
  border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--field-line);
  font-weight: 700; line-height: 1.3;
  user-select: none; -webkit-user-select: none;
  transition: box-shadow 140ms ease, background-color 140ms ease, transform 120ms var(--ease-out);
}
.choice:active span { transform: scale(0.98); }
.choice input:checked + span { background: #fbeee7; box-shadow: inset 0 0 0 2px var(--act); }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .choice:hover span { box-shadow: inset 0 0 0 1.5px var(--ink-2); } .choice:hover input:checked + span { box-shadow: inset 0 0 0 2px var(--act); } }

.booking__warn { margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: #fbeee7; color: #6e2c15; font-size: 1rem; }
.booking__warn a { color: inherit; font-weight: 700; }

.slots { display: grid; gap: 20px; margin-top: 16px; }
.slots:empty { display: none; }
.slots__day h3 { margin: 0 0 10px; font-size: 1rem; font-weight: 700; line-height: 1.4; }
.slots__day h3 span { color: var(--ink-2); font-weight: 400; }
.slots__times { display: flex; flex-wrap: wrap; gap: 8px; }
.slots__times .choice span { min-height: 48px; padding: 10px 16px; font-variant-numeric: tabular-nums; }
.js .slots:not(:empty) ~ .slots__fallback { display: none; }

.fields { display: grid; gap: 18px; margin-top: 16px; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
.field { display: grid; gap: 7px; font-weight: 700; font-size: 1rem; }
.field em { font-style: normal; font-weight: 400; color: var(--ink-2); }
.slots__fallback { margin-top: 16px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border: 0; border-radius: 8px; background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--field-line);
  font: 400 1.0625rem/1.4 var(--body); color: var(--ink);
  transition: box-shadow 140ms ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--act); }

.booking__status { margin-top: 22px; font-weight: 600; }
.booking__status:empty { display: none; }
.booking__status.is-error { color: var(--act); }
.booking__status.is-done { margin-top: 0; padding: 18px 20px; border-radius: 10px; background: var(--paper); box-shadow: inset 0 2px 0 var(--act); color: var(--ink); font-weight: 400; }
.booking__status.is-done .btn { margin-top: 16px; }
.booking__status.is-done strong { display: block; margin-bottom: 4px; font: 400 1.375rem/1.2 var(--display); }
.booking__nav { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; }
.booking__nav .btn { min-width: 132px; }
.booking__back { margin-right: auto; }

/* JS turns the form into one step at a time. */
.js .booking.is-stepped .booking__step:not(.is-current) { display: none; }
.js .booking.is-stepped .booking__step + .booking__step { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .booking__step.is-entering { animation: step-in 300ms var(--ease-out) both; }
  .booking[data-dir="back"] .booking__step.is-entering { animation-name: step-back; }
}
@keyframes step-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-18px); } }

/* Hours and location */
.visit { padding: var(--section) 0; }
.visit__grid { display: grid; gap: 36px clamp(32px, 5vw, 72px); }
.visit h3 { margin-bottom: 14px; }
.visit p + p { margin-top: 12px; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.hours div:last-child { border-bottom: 1px solid var(--line); }
.hours dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.visit__small { margin-top: 14px; color: var(--ink-2); font-size: 1rem; }
.link { font-weight: 700; }
@media (min-width: 900px) { .visit__grid { grid-template-columns: 0.9fr 1fr 1fr; } }

/* Footer */
.foot { background: var(--ink); color: var(--on-ink-2); padding: 56px 0 calc(32px + env(safe-area-inset-bottom, 0px)); font-size: 1rem; }
.foot__grid { display: grid; gap: 28px 48px; }
.foot p + p { margin-top: 6px; }
.foot a { color: var(--on-ink); text-decoration-color: var(--act-light); }
.logo--foot { color: var(--on-ink); margin-bottom: 8px; }
.logo--foot .logo__sub { display: inline; color: var(--on-ink-2); }
.foot__credit { padding-top: 22px; border-top: 1px solid rgb(245 241 232 / 0.16); }
@media (min-width: 760px) { .foot__grid { grid-template-columns: 1fr auto; } .foot__credit { grid-column: 1 / -1; } }

/* Phone dock */
.dock { display: none; }
@media (max-width: 619px) {
  .dock {
    position: fixed; z-index: 25; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgb(31 36 48 / 0.96);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 -8px 24px -12px rgb(0 0 0 / 0.4);
    transition: transform 280ms var(--ease-out), visibility 0s linear 0s;
  }
  .dock.is-hidden { transform: translateY(110%); visibility: hidden; transition: transform 280ms var(--ease-out), visibility 0s linear 280ms; }
  .dock a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 52px; border-radius: 10px;
    font-weight: 700; text-decoration: none;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
    transition: transform 120ms var(--ease-out);
  }
  .dock a:active { transform: scale(0.97); }
  .dock__call { color: var(--on-ink); box-shadow: inset 0 0 0 1.5px rgb(245 241 232 / 0.35); }
  .dock__book { background: var(--act-light); color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .dock, .dock.is-hidden { transition: visibility 0s; }
}

/* Motion: the hero photo opens once on load; other photos settle in as they scroll into view. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__photo img { animation: open 1100ms var(--ease-out) 120ms both; }
  .js .hero__copy > * { animation: rise 700ms var(--ease-out) both; }
  .js .hero__copy > :nth-child(2) { animation-delay: 60ms; }
  .js .hero__copy > :nth-child(3) { animation-delay: 120ms; }
  .js .hero__copy > :nth-child(4) { animation-delay: 180ms; }
  .js [data-reveal] { transition: opacity 700ms ease, transform 900ms var(--ease-out); }
  .js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(16px); }
}
@keyframes open { from { clip-path: inset(100% 0 0 0 round var(--radius)); } to { clip-path: inset(0 0 0 0 round var(--radius)); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
