/* =============================================================================
   TRUST: TEAM — "Who You'll Work With"
   Block: acf/trust-team (template-parts/blocks/trust_team)

   Self-contained. Tokens live on .tr-team, not :root, and every class is
   prefixed `tr-team__`, so the block cannot leak into the rest of the theme.
   Figma: 1rem = 8px, so the spacing numbers below are the design's own values.
   ============================================================================= */

.tr-team {
  --tr-brand: #f15f62;
  --tr-primary: #fda26b;
  --tr-title: #1e1e1e;
  --tr-text: #2a2a2a;
  --tr-card-bg: #f8f7f5;
  --tr-section-bg: #ffffff;

  --tr-font-titles: "Unbounded", -apple-system, BlinkMacSystemFont, sans-serif;
  --tr-font-text: "SF Pro Display", "SF Pro", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --tr-gradient: linear-gradient(90deg, var(--tr-brand) 0%, var(--tr-primary) 100%);

  /* Photo overhang: the avatar sits this far above its card. */
  --tr-photo: 96px;
  --tr-photo-visible: 32px;

  position: relative;
  width: 100%;
  margin: 0;
  padding: 128px 64px;
  background: var(--tr-section-bg);
  font-family: var(--tr-font-text);
  color: var(--tr-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The root is in the reset too: it carries the section padding, and without
   border-box a 100%-wide section overflows the viewport by that padding. */
.tr-team,
.tr-team *,
.tr-team *::before,
.tr-team *::after {
  box-sizing: border-box;
}

.tr-team__inner {
  display: flex;
  flex-direction: column;
  gap: 96px;
  max-width: 1408px;
  margin-inline: auto;
}

/* -----------------------------------------------------------------------------
   Heading
   -------------------------------------------------------------------------- */
.tr-team__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.tr-team__eyebrow {
  margin: 0;
  font-family: var(--tr-font-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  background-image: var(--tr-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tr-team__title {
  margin: 0;
  font-family: var(--tr-font-titles);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--tr-title);
}

.tr-team__lead {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  color: var(--tr-text);
}

/* -----------------------------------------------------------------------------
   Grid of role cards
   -------------------------------------------------------------------------- */
.tr-team__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 16px;
  /* The avatar of the next row hangs into this gap, leaving 32px of clearance
     above each card. */
  row-gap: 64px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tr-team__card {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: 240px;
  padding: 32px;
  background: var(--tr-card-bg);
  /* The avatar has to be able to break out of the top edge. */
  overflow: visible;
}

.tr-team__photo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: var(--tr-photo-visible);
}

.tr-team__photo img {
  display: block;
  width: var(--tr-photo);
  height: var(--tr-photo);
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
}

.tr-team__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.tr-team__name {
  margin: 0;
  font-family: var(--tr-font-titles);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--tr-title);
}

.tr-team__text {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.375;
  color: var(--tr-text);
}

/* -----------------------------------------------------------------------------
   Tablet — the 3-up grid stops fitting long role names well before 1024px.
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .tr-team {
    padding-inline: 32px;
  }
}

@media (max-width: 1024px) {
  .tr-team {
    padding-block: 96px;
  }

  .tr-team__inner {
    gap: 64px;
  }

  .tr-team__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tr-team__title {
    font-size: 32px;
  }
}

/* -----------------------------------------------------------------------------
   Mobile — Figma 360
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .tr-team {
    padding: 64px 16px;
  }

  .tr-team__inner {
    gap: 64px;
  }

  .tr-team__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tr-team__title {
    font-size: 24px;
  }
}
