/* ==========================================================================
   Practitioners
   --------------------------------------------------------------------------
   Round portraits (initials on a gold tint when there is no photo), name,
   role, and a "Book with ..." link. Centred cards, five across at full width
   so a typical service team sits on one row.
   ========================================================================== */

.people__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-5) var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
}

.person {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-5) var(--sp-4);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.person__photo {
  inline-size: 6.5rem;
  block-size: 6.5rem;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-block-end: var(--sp-4);
  background: var(--color-surface-calm);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 4px var(--color-surface), 0 0 0 5px var(--color-accent-gold);
}

/* The photo is pinned to all four edges of the circle (1 Dec 2026). With only
   width/height 100% inside a centring grid, Safari sized the photo from its
   own proportions and centred it, leaving a cream band at the top of the
   circle; Chrome stretched it. Pinning it fills the circle in every browser. */
.person__photo { position: relative; }
.person__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.person__name a { color: inherit; text-decoration: none; }
.person__name a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.person__initials {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semi);
  color: var(--color-heading);
  letter-spacing: 0.04em;
}

.person__name { font-size: var(--fs-h6); color: var(--color-heading); margin: 0 0 var(--sp-1); }
.person__role { font-size: var(--fs-sm); color: var(--color-text-muted); margin: 0; line-height: var(--lh-snug); flex: 1; }

.person__book {
  white-space: nowrap;   /* keeps the arrow with the name: "Book with Rebecca" wrapped at 1130px */
  margin-block-start: var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--color-link-accent);
  text-decoration: none;
}
.person__book::after { content: " \2192"; }

/* In place of the booking link while their team profile has a Status note,
   e.g. "On maternity leave". Same spot and size as the link, but plain
   muted text so it does not read as something to click. */
.person__away {
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--color-text-muted);
}
.person__book:hover { color: var(--color-link-accent-hover); text-decoration: underline; }

/* Phones: one person per row, portrait on the left and name, role and
   booking link beside it. Two across was tried first and the "Book with
   Tashelle" links wrapped onto two lines in some cards and not others, so
   the cards ended up different heights. Rows keep every link on one line. */
@media (max-width: 39.99rem) {
  .people__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
  .person {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--sp-4);
    align-items: center;
    text-align: start;
    padding: var(--sp-3) var(--sp-4);
  }
  .person__photo { grid-row: 1 / span 3; inline-size: 4rem; block-size: 4rem; margin: 0; }
  .person__initials { font-size: var(--fs-h6); }
  .person__name { margin: 0; }
  .person__role { font-size: var(--fs-xs); }
  .person__book,
  .person__away { margin-block-start: var(--sp-1); }
}

/* More than five people (19 Nov 2026): one row that scrolls sideways, five
   cards showing at full width, with arrow buttons underneath. Phones keep
   the stacked list above, where everyone is already visible. */
@media (min-width: 40rem) {
  .people__grid--scroll {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-block: var(--sp-1) var(--sp-2);   /* room for the card shadow */
  }
  .people__grid--scroll::-webkit-scrollbar { display: none; }
  .people__grid--scroll:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
  .people__grid--scroll > .person {
    flex: 0 0 max(12rem, calc((100% - 4 * var(--sp-4)) / 5));
    scroll-snap-align: start;
  }
}
.people__controls { display: none; }
@media (min-width: 40rem) {
  .people__controls { display: flex; justify-content: flex-end; gap: var(--sp-3); margin-block-start: var(--sp-4); }
}

.people__btn {
  display: grid; place-items: center;
  inline-size: 44px; block-size: 44px;
  padding: 0;
  border: 1px solid var(--color-btn-secondary-border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-btn-secondary-fg);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}
.people__btn:hover { background: var(--color-btn-primary-bg); color: var(--color-btn-primary-fg); }
.people__btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.people__arrow--back { transform: scaleX(-1); }
