:root {
  --ink: #111111;
  --muted: #626262;
  --line: #dedede;
  --paper: #f7f7f7;
  --panel: #ffffff;
  --mist: #efefef;
  --sage: #444444;
  --sage-dark: #1d1d1d;
  --forest: #111111;
  --clay: #111111;
  --clay-soft: #eeeeee;
  --gold: #9b6834;
  --accent: #9b6834;
  --accent-dark: #7c4f25;
  --accent-soft: rgba(155, 104, 52, 0.16);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.12);
  --nav-width: 292px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

body::selection {
  background: var(--accent);
  color: white;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 30;
  transform: translateY(-160%);
  border-radius: 4px;
  background: var(--ink);
  color: white;
  padding: 0.65rem 0.8rem;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.side-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--nav-width);
  border-right: 1px solid var(--line);
  background: rgba(247, 247, 247, 0.98);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.35rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 48px;
  text-decoration: none;
}

.brand-image {
  align-items: flex-start;
  border-radius: 8px;
  background: transparent;
  min-height: auto;
}

.brand-logo {
  width: 100%;
  max-height: 78px;
  object-fit: contain;
  object-position: left center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--sage-dark);
  color: white;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.84rem;
}

.section-links {
  display: grid;
  gap: 0.25rem;
  margin-top: 3rem;
}

.nav-link {
  position: relative;
  border-radius: 7px;
  color: var(--muted);
  padding: 0.82rem 0.85rem;
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  background: white;
  color: var(--ink);
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 50%;
  width: 4px;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(-50%);
}

.nav-contact {
  display: grid;
  gap: 0.25rem;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-contact a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

main {
  margin-left: var(--nav-width);
}

.section-block {
  scroll-margin-top: 1rem;
  min-height: auto;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 4rem clamp(2rem, 6vw, 6rem);
  overflow: hidden;
  background: var(--ink);
  min-height: 88vh;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.28) 58%, rgba(0, 0, 0, 0.08)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.48), transparent 44%);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  color: white;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.45rem, 5vw, 4.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4.4vw, 4.25rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.5rem;
  font-size: 1.08rem;
  line-height: 1.25;
}

.hero-content p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.16rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 7px;
  padding: 0.8rem 1.1rem;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 30px rgba(155, 104, 52, 0.22);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.button.emergency {
  background: var(--accent-dark);
  color: white;
}

.button.quiet {
  border: 1px solid #bfbfbf;
  background: white;
  color: var(--ink);
}

.content-section,
.split-section,
.emergency-section {
  padding: clamp(3rem, 6vw, 5.25rem) clamp(2rem, 6vw, 6rem);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 2rem;
}

.section-subtitle {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 650;
  line-height: 1.25;
}

.section-heading p:not(.eyebrow),
.split-section > div > p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.cabinet-copy {
  display: grid;
  gap: 0.85rem;
  max-width: 780px;
  color: var(--muted);
  font-size: 1.02rem;
}

.cabinet-copy p {
  margin-bottom: 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.team-grid-large {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.team-card,
.access-grid article,
.info-list article,
.emergency-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 32px rgba(31, 42, 43, 0.06);
}

.team-card {
  overflow: hidden;
}

.practitioner-card {
  grid-column: auto;
}

.team-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--mist);
}

.team-card img.team-portrait {
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 3;
  object-position: center 28%;
}

.portrait-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f4f4f4, #dddddd);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 600;
}

.team-card div {
  padding: 1.1rem;
}

.team-card p {
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-weight: 800;
}

.team-card span {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  background: var(--paper);
}

.split-section.reverse {
  grid-template-columns: minmax(300px, 1fr) minmax(0, 0.95fr);
  background: var(--paper);
}

.image-panel {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.image-panel img {
  width: 100%;
  min-height: 520px;
  object-fit: cover;
}

.cabinet-main-image {
  align-self: center;
  transform: translateY(-1rem);
}

.visit-image-panel {
  justify-self: center;
  width: min(100%, 580px);
}

.visit-image-panel img {
  min-height: 0;
  max-height: 560px;
  object-fit: cover;
}

.specialty-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

.specialty-list span {
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 0.55rem 0.8rem;
  font-weight: 750;
}

.access-grid,
.emergency-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.access-grid article,
.emergency-grid article {
  padding: 1.3rem;
}

.access-grid p,
.emergency-grid p,
.info-list p {
  color: var(--muted);
}

.access-grid a:not(.text-link) {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.text-link {
  color: var(--ink);
  font-weight: 850;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.info-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.info-list article {
  padding: 1.15rem;
}

.info-list article.patient-alert {
  border-color: #c73d32;
  background: #fff7f6;
}

.patient-alert h3,
.patient-alert p {
  color: #b32920;
}

.appointment-section {
  background: var(--paper);
}

.compact {
  margin-bottom: 1.2rem;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 920px;
}

.contact-form-simple {
  max-width: 780px;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 800;
}

.contact-form .full {
  grid-column: 1 / -1;
}

.privacy-note {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-status {
  min-height: 1.4rem;
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
}

.form-status.success {
  color: #246b3d;
}

.form-status.error {
  color: #b42318;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.46);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  width: min(100%, 430px);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

.modal-card h2 {
  margin: 0 0 0.7rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.05;
}

.modal-card p {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 0.85rem 0.9rem;
  outline: 0;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.emergency-section {
  background: var(--paper);
  color: var(--ink);
}

.emergency-section .eyebrow {
  color: var(--muted);
}

.emergency-section .section-heading p {
  color: var(--muted);
}

.emergency-grid article {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: 0 10px 32px rgba(31, 42, 43, 0.06);
}

.emergency-grid p {
  color: var(--muted);
}

.emergency-grid .button {
  margin-top: 0.45rem;
}

@media (max-width: 1080px) {
  :root {
    --nav-width: 238px;
  }

  .side-nav {
    padding-inline: 1rem;
  }

  .team-grid,
  .access-grid,
  .emergency-grid {
    grid-template-columns: 1fr 1fr;
  }

  .team-grid-large {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .side-nav {
    inset: 0 0 auto 0;
    width: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1rem;
  }

  .brand {
    min-height: 42px;
  }

  .brand-image {
    max-width: 230px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .section-links {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 0.2rem;
    margin-top: 0.7rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .nav-link {
    padding: 0.58rem 0.72rem;
    white-space: nowrap;
  }

  .nav-link.active::before,
  .nav-contact {
    display: none;
  }

  main {
    margin-left: 0;
  }

  .section-block {
    scroll-margin-top: 112px;
    min-height: auto;
  }

  .hero {
    min-height: 82vh;
    padding-top: 9rem;
  }

  .split-section,
  .split-section.reverse,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .practitioner-card {
    grid-column: auto;
  }

  .image-panel img {
    min-height: 360px;
  }

  .cabinet-main-image {
    transform: none;
  }
}

@media (max-width: 620px) {
  .hero,
  .content-section,
  .split-section,
  .emergency-section {
    padding-inline: 1.1rem;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .team-grid,
  .access-grid,
  .emergency-grid {
    grid-template-columns: 1fr;
  }

  .practitioner-card {
    grid-template-columns: 1fr;
  }

  .team-card img.team-portrait {
    min-height: auto;
    aspect-ratio: 4 / 3;
  }
}
