:root {
  --paper: #fafaf0;
  --ink: #26231f;
  --muted: #70695f;
  --line: #e2e2d8;
  --nav-text: rgba(255, 255, 255, 0.9);
  --blue: #678da8;
  --blue-dark: #435f75;
  --blue-soft: #e7eef2;
  --focus: #678da8;
  --content-padding: 24px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Quicksand", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20000;
  padding: 12px 16px;
  color: #fff;
  background: #000;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

.content-shell {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--content-padding);
}
.site-footer a {
  text-transform: uppercase;
  letter-spacing: 0.071em;
}

/* Page heading */
.specialists-section {
  min-height: 70vh;
  padding-block: 40px 64px;
  background: var(--paper);
}

.page-heading {
  margin-bottom: 40px;
  text-align: center;
}

.page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Muli", "Quicksand", sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.4;
}

.heading-rule {
  width: 50px;
  height: 2px;
  margin: 24px auto 0;
  display: block;
  background: var(--line);
}

/* Specialist grid */
.specialists-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px 24px;
  align-items: start;
}

.cms-specialists-empty {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed rgba(35, 64, 84, 0.25);
  border-radius: 18px;
  padding: 38px 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.booking-tile,
.profile-card {
  min-width: 0;
  align-self: start;
}

.booking-tile {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.booking-button {
  width: min(100%, 316px);
  min-height: 56px;
  padding: 12px 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.071em;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.booking-button:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.profile-card__image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e9e8dc;
}

.profile-external-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, transparent 42%, rgba(24, 29, 34, 0.86));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.profile-external-link span {
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(30, 34, 38, 0.56);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.profile-card:hover .profile-external-link,
.profile-external-link:focus-visible {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .profile-external-link {
    opacity: 1;
    transform: none;
  }
}

.motion-ready .profile-card {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready .profile-card.reveal-from-top {
  transform: translateY(-34px);
}

.motion-ready .profile-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.profile-card__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--image-position, 50% 30%);
  transition: transform 500ms ease;
}

.profile-card:hover .profile-card__image {
  transform: scale(1.012);
}

.profile-card__body {
  padding-top: 24px;
}

.profile-card h2 {
  margin: 0 0 24px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.profile-role {
  margin: -14px 0 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.specialty-heading {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.specialty-heading::before {
  margin-right: 6px;
  color: var(--blue);
  content: "◆";
  font-size: 8px;
  vertical-align: 2px;
}

.specialty-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  list-style: none;
}

.specialty-list li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.specialty-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: #393936;
  content: "✓";
  font-weight: 700;
}

.profile-summary {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.profile-details {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.profile-details > summary {
  width: fit-content;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  line-height: 1.3;
  list-style: none;
}

.profile-details > summary::-webkit-details-marker {
  display: none;
}

.profile-details > summary::before {
  width: 14px;
  color: var(--ink);
  content: "+";
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  text-align: center;
}

.profile-details[open] > summary::before {
  content: "−";
}

.profile-details .label-less,
.profile-details[open] .label-more {
  display: none;
}

.profile-details[open] .label-less {
  display: inline;
}

.profile-details__content {
  padding-top: 12px;
}

.profile-details__content p {
  margin: 0 0 12px;
  line-height: 1.55;
}

.profile-details__content h3 {
  margin: 20px 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.profile-details__content h3:first-child {
  margin-top: 0;
}

.profile-details__content ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.profile-details__content li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.profile-details__content strong {
  color: #343432;
}

.noscript-message {
  grid-column: 1 / -1;
  padding: 20px;
  border: 1px solid var(--line);
  text-align: center;
}

/* Footer */
.site-footer {
  padding-block: 40px;
  color: rgba(255, 255, 255, 0.72);
  background: #303b44;
}

.footer-shell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  font-size: 14px;
}

.footer-shell p {
  margin: 0;
}

.site-footer a {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 180ms ease;
}

.site-footer a:hover {
  opacity: 0.58;
}

.footer-rule {
  width: 100%;
  height: 1px;
  display: block;
  background: rgba(255, 255, 255, 0.18);
}

.footer-booking {
  align-self: flex-start;
}

@media (min-width: 768px) {
  .specialists-section {
    padding-block: 56px 72px;
  }

  .page-heading h1 {
    font-size: 38px;
  }

  .specialists-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 52px 48px;
  }

  .profile-card h2 {
    font-size: 30px;
  }

  .footer-shell {
    align-items: center;
    text-align: center;
  }

  .footer-booking {
    align-self: center;
  }
}

@media (min-width: 1024px) {
  .content-shell {
    width: 984px;
  }

  .specialists-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .booking-tile {
    padding-top: 0;
  }

  .profile-card h2 {
    font-size: 30px;
  }
}

@media (min-width: 1280px) {
  .content-shell {
    width: 1160px;
  }

  .page-heading h1 {
    font-size: 44px;
  }

  .profile-card h2 {
    font-size: 32px;
  }
}

@media (min-width: 1536px) {
  .content-shell {
    width: 1280px;
  }

  .page-heading h1 {
    font-size: 48px;
  }

  .profile-card h2 {
    font-size: 36px;
  }

  .specialty-heading,
  .specialty-list li,
  .profile-summary,
  .profile-details,
  .profile-details__content h3 {
    font-size: 14px;
  }

  .footer-shell {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .booking-tile,
  .site-footer,
  .profile-details > summary {
    display: none !important;
  }

  .specialists-section {
    padding: 0;
  }

  .specialists-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .profile-details__content {
    display: block !important;
  }
}
