/* ==========================================================================
   Module: team — Leadership grid + Talk-to-our-team + Careers CTA.
   Reproduces design_files/Team.dc.html. Tokens only; no hardcoded hex.
   ========================================================================== */

.m-team__intro { max-width: 56ch; margin-bottom: clamp(40px, 6vh, 72px); }
.m-team__heading { margin-bottom: clamp(18px, 2.5vh, 26px); }
.m-team__lead { color: var(--body); }

/* ---------- Featured leader ---------- */
.m-team__featured {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 72px);
  padding-bottom: clamp(48px, 7vh, 84px);
  border-bottom: 1px solid var(--bd-light-2);
  margin-bottom: clamp(48px, 7vh, 84px);
}
.m-team__featured-plate { flex: 1 1 340px; max-width: 480px; }
.m-team__featured-body {
  flex: 1 1 420px;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Portrait plates locked to a 4:5 ratio (README §5.3). */
.m-team__plate { aspect-ratio: 4 / 5; min-height: 0; border: 1px solid var(--bd-light-2); }
.m-team__plate--lead { width: 100%; }

.m-team__role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mono-muted);
  margin-bottom: 8px;
}
.m-team__role--accent { color: var(--accent); margin-bottom: 16px; }

.m-team__name { font-weight: 500; line-height: 1.05; margin: 0; }
.m-team__name { font-size: clamp(1.45rem, 2vw, 1.9rem); margin-top: 8px; }
.m-team__name--lead {
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  letter-spacing: -.014em;
  line-height: 1.02;
  margin: 0 0 20px;
}

.m-team__bio {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--body);
  max-width: 56ch;
  margin-bottom: clamp(22px, 3vh, 30px);
}
.m-team__bio p { margin: 0 0 1em; }
.m-team__bio p:last-child { margin-bottom: 0; }

.m-team__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.m-team__chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--bd-light-3);
  padding: 9px 14px;
}

/* ---------- Member grid ---------- */
.m-team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 3vw, 44px);
}
.m-team__member { display: flex; flex-direction: column; }
.m-team__member .m-team__name { margin-top: 8px; }
.m-team__member .m-team__role { margin-top: 20px; margin-bottom: 0; }

/* ---------- Operational creed card ---------- */
.m-team__creed-plate {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--dark-2);
  border: 1px solid var(--bd-light-2);
  display: flex;
  align-items: flex-end;
  padding: clamp(20px, 2vw, 30px);
}
.m-team__creed-plate::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 12px),
    radial-gradient(120% 100% at 70% 10%, rgba(60, 84, 78, .34), rgba(8, 14, 14, 0) 60%);
}
.m-team__creed-text {
  position: relative;
  font-weight: 600;
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  line-height: 1.12;
  color: var(--light);
}

/* ---------- (02) Talk to our team ---------- */
.m-team__talk-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 72px);
  align-items: flex-start;
}
.m-team__talk-intro { flex: 0 1 320px; min-width: 200px; }
.m-team__talk-intro p {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-strong-2);
}
.m-team__inline-link { color: var(--accent); transition: color var(--t-fast); }
.m-team__inline-link:hover { text-decoration: underline; }

.m-team__contacts {
  flex: 1 1 560px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 2.5vw, 32px);
}
.m-team__contact {
  display: flex;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--bd-light-2);
  background: var(--cream);
  padding: 18px;
  transition: border-color var(--t-base);
}
.m-team__contact:hover { border-color: var(--accent); }
.m-team__contact-plate { flex: 0 0 auto; width: 96px; }
.m-team__contact--no-photo { padding: 22px 24px; border-left: 3px solid var(--accent); }
.m-team__plate--mini { width: 96px; aspect-ratio: 4 / 5; }
.m-team__name--contact { font-size: clamp(1.25rem, 1.7vw, 1.55rem); margin: 0 0 8px; }
.m-team__phone {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
  transition: color var(--t-fast);
}
.m-team__phone:hover { color: var(--accent); }
.m-team__email { display: block; margin-top: 4px; overflow-wrap: anywhere; }

/* ---------- Closing Careers CTA ---------- */
.m-team__careers {
  background: var(--dark-2);
  color: var(--light-body);
  padding: clamp(60px, 9vh, 110px) var(--pad-x);
  border-top: 1px solid var(--bd-dark-16);
}
.m-team__careers-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.m-team__careers-eyebrow { margin-bottom: 14px; }
.m-team__careers-title { color: var(--light); max-width: 20ch; }

@media (max-width: 640px) {
  .m-team__contact { flex-direction: column; align-items: flex-start; }
  .m-team__contact-plate { width: 80px; }
}

/* ---------- Layout: by department (rows) ---------- */
.m-team--departments .m-team__intro { margin-bottom: clamp(36px, 5vh, 56px); }

.m-team__dept { padding-top: clamp(28px, 4vh, 40px); margin-bottom: clamp(40px, 6vh, 64px); border-top: 1px solid var(--ink); }
.m-team__dept:last-child { margin-bottom: 0; }
.m-team__dept-head {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin-bottom: clamp(22px, 3vh, 32px);
}
.m-team__dept-index { font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; color: var(--accent); }
.m-team__dept-title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.1; margin: 0; color: var(--ink); }
.m-team__dept-count {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--mono-muted);
}

/* One horizontal row per department: regular-size portraits (~220–280px),
   as many as fit, wrapping on narrow screens. */
.m-team__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(20px, 2.4vw, 36px);
}
.m-team__person { display: flex; flex-direction: column; }
.m-team__person-plate { width: 100%; max-width: 300px; }
.m-team__plate--person { aspect-ratio: 4 / 5; min-height: 0; }
.m-team__person .m-team__role { margin-top: 16px; margin-bottom: 0; }

/* Rows of 1–2 people: wide cards (portrait beside the text) that share the row
   equally, so a small department fills the width without giant photos. */
.m-team__row--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.m-team__row--wide .m-team__person {
  flex-direction: row;
  align-items: flex-start;
  gap: clamp(20px, 2.2vw, 32px);
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid var(--bd-light-2);
}
.m-team__row--wide .m-team__person-plate { flex: 0 0 clamp(150px, 15vw, 230px); max-width: none; }
.m-team__row--wide .m-team__person-body { flex: 1 1 auto; min-width: 0; align-self: center; }
.m-team__row--wide .m-team__person .m-team__role { margin-top: 0; }
.m-team__row--wide .m-team__blurb { font-size: .98rem; max-width: 52ch; }
.m-team__name--person { font-size: clamp(1.2rem, 1.5vw, 1.4rem); margin-top: 6px; }
.m-team__blurb {
  margin-top: 10px;
  font-family: var(--font-sans); font-size: .92rem; line-height: 1.55; color: var(--card-desc);
}
.m-team__blurb p { margin: 0 0 .7em; }
.m-team__blurb p:last-child { margin-bottom: 0; }
.m-team__person .m-team__phone { margin-top: 10px; }
.m-team__person .m-team__phone + .m-team__email { margin-top: 4px; }

@media (max-width: 480px) {
  .m-team__row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .m-team__row--wide { grid-template-columns: 1fr; }
  .m-team__row--wide .m-team__person { flex-direction: column; }
  .m-team__row--wide .m-team__person-plate { flex-basis: auto; width: 60%; }
  .m-team__person-plate { max-width: none; }
}

/* When Team is the first module on a page there is no page-hero above it, so
   clear the fixed header the same way page-hero does instead of butting the
   section head up against the nav. */
#main > .m-team:first-child .m-team__leadership { padding-top: clamp(128px, 18vh, 210px); }

/* Department layout intro spans the page: hero-size heading left, lead right. */
.m-team--departments .m-team__intro {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(28px, 5vw, 96px);
}
.m-team--departments .m-team__heading {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.014em;
  max-width: none;
  margin-bottom: 0;
}
.m-team--departments .m-team__lead {
  font-weight: 300;
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  line-height: 1.45;
  max-width: none;
  margin-bottom: 6px;
}
@media (max-width: 860px) {
  .m-team--departments .m-team__intro { grid-template-columns: 1fr; gap: 20px; }
}
