/* Lead team: portraits stay visible; long biographies open in a native dialog. */
/* Leave room for the new team link in the existing desktop navigation. */
@media (min-width: 1281px) {
  .marketing-nav { gap: 0.25rem; }
}
.team-section {
  border-top: 1px solid var(--line);
}
.team-intro {
  max-width: 52rem;
  margin: 0 auto 3.5rem;
  text-align: center;
}
.team-intro h2 {
  margin: 0.9rem 0 1.4rem;
  font-size: clamp(2.15rem, 4vw, 3.8rem);
  line-height: 1.09;
}
.team-intro > p:last-child { color: var(--muted); }
.team-grid {
  --team-gap: clamp(1rem, 2vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2.5rem var(--team-gap);
}
.team-card {
  flex: 0 1 calc((100% - 4 * var(--team-gap)) / 5);
  min-width: 0;
}
.team-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  list-style: none;
  color: var(--forest-deep);
  text-align: center;
  cursor: pointer;
  border-radius: 0.75rem;
  -webkit-tap-highlight-color: transparent;
}
.team-person::-webkit-details-marker { display: none; }
.team-person::marker { content: ""; }
.team-portrait {
  position: relative;
  display: block;
  width: 100%;
  max-width: 15rem;
  aspect-ratio: 1;
  margin-bottom: 1.4rem;
  border: 1px solid #a1b6a7;
  border-radius: 50%;
  background: #fff;
  transition: border-color 180ms ease, transform 180ms ease;
}
.team-portrait img {
  position: absolute;
  inset: 5px;
  display: block;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 50%;
}
.team-name {
  font-family: "Montserrat", "Avenir Next", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 700;
  line-height: 1.35;
}
.team-role {
  max-width: 13rem;
  min-height: 3em;
  margin: 0.55rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.team-read {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--leaf);
  text-underline-offset: 0.25rem;
}
.team-person:hover .team-read,
.team-person:focus-visible .team-read { text-decoration: underline; }
.team-person:hover .team-portrait { border-color: var(--forest); transform: translateY(-3px); }
.team-person:focus-visible,
.team-dialog-close:focus-visible { outline: 3px solid var(--leaf); outline-offset: 5px; }
.team-biography { padding-top: 1rem; font-size: 0.95rem; }
.team-biography p + p, .team-dialog-bio p + p { margin-top: 1.1rem; }
.team-dialog {
  width: min(56rem, calc(100% - 2rem));
  max-height: min(90vh, 56rem);
  max-height: min(90dvh, 56rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: #fbfcfa;
  color: var(--ink);
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
}
.team-dialog::backdrop { background: rgba(9, 32, 23, 0.7); }
.team-dialog-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1rem 0.25rem;
  background: #fbfcfa;
}
.team-dialog-close {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: white;
  color: var(--forest);
  cursor: pointer;
}
.team-dialog-close span { font-size: 1.5rem; line-height: 1; }
.team-dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
  align-items: start;
  gap: 2.5rem;
  padding: 1.25rem 2.75rem 3rem;
}
.team-dialog-person { text-align: left; }
.team-dialog-photo {
  display: block;
  width: min(100%, 13rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 50%;
  margin-bottom: 1.75rem;
}
.team-dialog-person .marketing-eyebrow { font-size: 0.65rem; }
.team-dialog-person h2 { margin-top: 0.75rem; font-size: 1.8rem; line-height: 1.2; letter-spacing: -0.035em; }
.team-dialog-person h2:focus { outline: none; }
.team-dialog-person .team-dialog-role { margin-top: 0.75rem; color: var(--muted); font-size: 0.9rem; }
.team-dialog-bio { font-size: 1rem; }
.team-dialog-bio p { line-height: 1.8; }
body.team-dialog-open { overflow: hidden; }
@media (max-width: 1000px) {
  .team-card { flex-basis: calc((100% - 2 * var(--team-gap)) / 3); }
}
@media (max-width: 640px) {
  .team-intro { margin-bottom: 2.25rem; }
  .team-intro h2 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .team-card { flex-basis: calc((100% - var(--team-gap)) / 2); }
  .team-role { font-size: 0.8rem; }
  .team-portrait { margin-bottom: 1rem; }
  .team-portrait img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
  .team-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); border-radius: 0.9rem; }
  .team-dialog-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 0.5rem 1.3rem 2rem; }
  .team-dialog-person { text-align: center; }
  .team-dialog-photo { width: 8rem; margin: 0 auto 1.25rem; }
  .team-dialog-person h2 { font-size: 1.65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .team-portrait { transition: none; }
  .team-person:hover .team-portrait { transform: none; }
}
/* Progressive fallback: an expanded biography gets a comfortable reading width. */
.team-card[open] { flex-basis: 100%; max-width: 46rem; }
.team-card[open] .team-person { max-width: 15rem; margin: 0 auto; }
