/* ==========================================================
   Heritage Animal Hospital — homepage styles
   ========================================================== */

:root {
  --ink: #242424;          /* top bar, emergency, footer */
  --charcoal: #333333;     /* header, services, pharmacy */
  --tan: #c2a57b;          /* buttons, accents on dark */
  --gold-dark: #a8875a;    /* accents on light */
  --cream: #f4efe7;
  --beige: #eae1d3;
  --text: #2a2622;
  --muted: #6e675e;
  --on-dark: #e9e6e1;
  --on-dark-muted: #b4b0a9;
  --line-light: #d9d1c4;
  --line-dark: #4a4a4a;

  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1136px;
  --gutter: 24px;
  --section-y: clamp(80px, 10vw, 128px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
p { margin: 0 0 1em; }

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.gold { color: var(--tan); }
.gold-dark { color: var(--gold-dark); }

/* ---------- Type ---------- */

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.eyebrow--tan { color: var(--tan); }
.eyebrow--dark { color: rgba(36, 36, 36, 0.62); }

.h2 {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.005em;
  color: var(--text);
}
.h2--light { color: #f4f1ec; }
.h2--narrow { max-width: 540px; }

.rule {
  display: block;
  width: 52px;
  height: 1px;
  background: currentColor;
  color: var(--gold-dark);
  margin: 0 0 28px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tan);
  text-decoration: none;
}
.text-link::after {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  transition: width 0.2s ease;
}
.text-link:hover::after { width: 32px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--lg { min-height: 55px; padding: 0 34px; }

.btn--tan { background: var(--tan); color: var(--ink); }
.btn--tan:hover { background: #d1b68e; }

.btn--dark { background: var(--ink); color: #f4f1ec; }
.btn--dark:hover { background: #3a3a3a; }

.btn--ghost-light { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

.btn--outline-dark { border-color: rgba(36, 36, 36, 0.35); color: var(--ink); }
.btn--outline-dark:hover { border-color: var(--ink); background: rgba(36, 36, 36, 0.04); }

/* ---------- Top bar ---------- */

.topbar {
  background: var(--ink);
  color: var(--on-dark-muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 42px;
}
.topbar p { margin: 0; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar .dot { margin: 0 10px; opacity: 0.6; }

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

.header {
  position: relative;
  z-index: 10;
  background: var(--charcoal);
  color: var(--on-dark);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
}
.header__logo img { width: 178px; height: auto; }

.nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}
.nav__list {
  display: flex;
  gap: 38px;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  transform: translateX(28px);
}
.nav__list a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--on-dark);
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav__list a:hover { color: #fff; border-bottom-color: var(--tan); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  margin: 6px auto;
  background: #fff;
}

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

.hero {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 24, 24, 0.82) 0%, rgba(24, 24, 24, 0.62) 40%, rgba(24, 24, 24, 0.25) 75%, rgba(24, 24, 24, 0.15) 100%),
    linear-gradient(0deg, rgba(24, 24, 24, 0.45) 0%, rgba(24, 24, 24, 0) 35%);
}
.hero__content { position: relative; padding-block: 120px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 30px;
  padding: 9px 16px;
  border: 1px solid rgba(194, 165, 123, 0.55);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--on-dark);
}
.badge__dot { width: 5px; height: 5px; background: var(--tan); }

.hero__title {
  margin: 0 0 30px;
  max-width: 700px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 6.4vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #f7f4ef;
}
.hero__title em { font-style: italic; color: var(--tan); }

.hero__lead {
  max-width: 580px;
  margin-bottom: 44px;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__caption {
  position: absolute;
  right: max(var(--gutter), calc((100% - var(--container)) / 2));
  bottom: 22px;
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Quick facts ---------- */

.facts {
  background: var(--beige);
  border-bottom: 1px solid var(--line-light);
}
.facts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-block: 24px;
}
.fact {
  padding: 4px 16px;
  text-align: center;
}
.fact + .fact { border-left: 1px solid #cfc5b5; }
.fact__value {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
  color: var(--text);
}
.fact__label {
  margin: 0;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); }
.section--cream { background: var(--cream); }
.section--beige { background: var(--beige); }
.section--tan { background: var(--tan); }
.section--charcoal { background: var(--charcoal); color: var(--on-dark-muted); }

.section-head { margin-bottom: 56px; }
.section-head--center { text-align: center; }
.section-head .h2 { margin-bottom: 18px; }
.section-head__sub { margin: 0; font-size: 17px; color: var(--on-dark-muted); }

.section-sub { max-width: 600px; font-size: 17px; }

/* Welcome split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 88px);
  align-items: start;
}
.split__text p { line-height: 1.75; }
.split__text .intro {
  margin-bottom: 28px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: #4a443d;
}
.split__text .btn { margin-top: 24px; }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split__media { margin-top: 48px; }

/* ---------- Services ---------- */

.group-label {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 32px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--tan);
}
.group-label::after { content: ""; flex: 1; height: 1px; background: var(--line-dark); }
.cards + .group-label { margin-top: 72px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card {
  display: flex;
  flex-direction: column;
  background: #383838;
  border: 1px solid var(--line-dark);
}
.card__media { aspect-ratio: 3 / 2; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--placeholder {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 60%),
    #3a3a3a;
  border-bottom: 1px solid #424242;
}
.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 28px 28px 30px;
}
.card__title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
  color: #f4f1ec;
}
.card__body p:not(.eyebrow) { margin: 0; font-size: 14.5px; line-height: 1.7; }
.card__body .text-link { margin-top: auto; padding-top: 24px; align-self: flex-start; }

.card--callout {
  background: #3f3d39;
  border-color: rgba(194, 165, 123, 0.45);
}
.card--callout .card__body { padding-top: 44px; }
.card--callout .eyebrow { margin-bottom: 18px; }
.card--callout .text-link { margin-top: 12px; }

.card--highlight {
  background: #3f3c37;
  border-color: rgba(194, 165, 123, 0.75);
}
.card--highlight .card__media--placeholder { background: #423f39; }

/* ---------- Emergency ---------- */

.emergency {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--ink);
  color: var(--on-dark-muted);
}
.emergency__media { position: relative; min-height: 560px; }
.emergency__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 55%; }
.emergency__text {
  align-self: center;
  max-width: 580px;
  padding: 96px var(--gutter) 96px clamp(40px, 6vw, 96px);
}
.emergency__text p:not(.eyebrow) { font-size: 16px; line-height: 1.75; }
.emergency__phone {
  display: inline-block;
  margin-top: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #5a5650;
  font-family: var(--serif);
  font-size: clamp(34px, 3.6vw, 42px);
  line-height: 1.2;
  color: var(--tan);
  text-decoration: none;
}
.emergency__phone:hover { color: #d6bb93; }
.emergency__text p.emergency__note {
  margin-top: 22px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.6;
  color: #8f8b84;
}

/* ---------- Appointments ---------- */

.appointments__inner { text-align: center; max-width: 720px; }
.appointments .h2 { margin-bottom: 20px; }
.appointments__lead {
  max-width: 620px;
  margin: 0 auto 36px;
  font-size: 16px;
  line-height: 1.7;
  color: #3e372e;
}
.appointments__alt {
  margin: 26px 0 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(36, 36, 36, 0.7);
}
.appointments__alt a { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- First visit ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}
.step { padding-top: 32px; border-top: 1px solid #c9bfae; }
.step__num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--gold-dark);
}
.step__title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  color: var(--text);
}
.step p { margin: 0; font-size: 14.5px; line-height: 1.75; }

/* ---------- Team ---------- */

.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px 60px;
  margin-top: 56px;
}
.person__photo { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }
.person__photo--placeholder { background: var(--beige); }
.person__name {
  margin: 28px 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  color: var(--text);
}
.person__role {
  margin: 0 0 16px;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.person__bio { font-size: 15px; line-height: 1.7; }
.person__bio p { margin: 0 0 1em; }
.person__bio p:last-child { margin-bottom: 0; }

/* ---------- Pharmacy ---------- */

.pharmacy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--charcoal);
  color: var(--on-dark-muted);
}
.pharmacy__media { position: relative; min-height: 520px; }
.pharmacy__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 52%; }
.pharmacy__text {
  align-self: center;
  max-width: 540px;
  padding: 96px var(--gutter) 96px clamp(40px, 6vw, 96px);
}
.pharmacy__text p:not(.eyebrow) { line-height: 1.75; }
.pharmacy__text .btn { margin-top: 18px; }

/* ---------- Visit ---------- */

.visit {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(40px, 6vw, 80px);
}
.map {
  aspect-ratio: 8 / 5;
  border: 1px solid var(--line-light);
  background: var(--beige);
}
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

.hours { margin: 0 0 44px; }
.hours div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-light);
  font-size: 14px;
}
.hours div:last-child { border-bottom: 0; }
.hours dt { font-weight: 400; color: var(--text); }
.hours dd { margin: 0; text-align: right; }

.contact {
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
  font-style: normal;
  font-size: 15px;
  line-height: 1.9;
}
.contact strong {
  margin-bottom: 4px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  color: var(--text);
}
.contact__gap { margin-top: 20px; }
.contact a { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: #a4a19c;
  font-size: 14px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.05fr;
  gap: 40px;
  padding-block: 64px 48px;
}
.footer__brand img { width: 196px; margin-bottom: 26px; }
.footer__brand p { max-width: 290px; line-height: 1.7; }
.footer__head {
  margin: 0 0 22px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--tan);
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 10px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__gap { margin-top: 18px; }
.footer__bottom {
  padding-block: 26px 30px;
  border-top: 1px solid #383838;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: #7c7974;
}
.footer__bottom p { margin: 0; }

/* ---------- Focus ---------- */

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

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 1080px) {
  .nav__list { gap: 26px; transform: none; }
  .header__logo img { width: 160px; }
}

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 12px var(--gutter) 28px;
    background: var(--charcoal);
    border-top: 1px solid var(--line-dark);
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: 0; margin: 0; }
  .nav__list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
  .nav__list a:hover { border-bottom-color: var(--line-dark); }

  .cards { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }

  .split, .visit { grid-template-columns: 1fr; }
  .split__media { margin-top: 0; max-width: 560px; }

  .emergency, .pharmacy { grid-template-columns: 1fr; }
  .emergency__media, .pharmacy__media { min-height: 0; aspect-ratio: 4 / 3; }
  .emergency__text, .pharmacy__text { max-width: none; padding: 72px var(--gutter); }
}

@media (max-width: 720px) {
  .topbar__inner { justify-content: center; text-align: center; padding-block: 10px; }
  .topbar__left { display: none; }

  .hero { min-height: 640px; }
  .hero__shade { background: linear-gradient(180deg, rgba(24, 24, 24, 0.7) 0%, rgba(24, 24, 24, 0.78) 100%); }
  .hero__content { padding-block: 88px 104px; }
  .hero__lead { font-size: 16px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__caption { left: var(--gutter); right: var(--gutter); font-size: 9px; }

  .facts__grid { grid-template-columns: 1fr; padding-block: 8px; }
  .fact { padding: 18px 0; }
  .fact + .fact { border-left: 0; border-top: 1px solid #cfc5b5; }
  .fact__value { font-size: 20px; }

  .cards, .steps { grid-template-columns: 1fr; }
  .steps { gap: 32px; }
  .team { grid-template-columns: 1fr; }
  .person { max-width: 420px; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
