.team-hero {
  padding: 72px 0 86px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.team-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}

.team-heading-copy {
  max-width: 760px;
  padding-left: 25px;
  border-left: 5px solid var(--orange);
}

.team-eyebrow {
  margin: 0 0 13px;
  color: var(--orange-dark);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.team-heading h1 {
  margin: 0;
  font-size: 3.35rem;
  line-height: 1.03;
}

.team-heading-copy > p:last-child {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.team-heading-cta,
.team-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  color: #ffffff;
  background: var(--ink);
  border-radius: 6px;
  font-weight: 920;
  transition: background-color 150ms ease, transform 150ms ease;
}

.team-heading-cta:hover,
.team-cta-button:hover {
  background: #2a343e;
  transform: translateY(-2px);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  width: min(1160px, calc(100% - 48px));
  margin: 52px auto 0;
}

.team-card {
  min-width: 0;
}

.team-portrait {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e4e8eb;
  border: 1px solid #cfd6da;
  border-radius: 7px;
  box-shadow: 0 10px 26px rgba(13, 18, 24, 0.09);
}

.team-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card-copy {
  padding: 15px 4px 0;
}

.team-card-copy span {
  display: block;
  min-height: 33px;
  color: var(--orange-dark);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.4;
  text-transform: uppercase;
}

.team-card-copy h2 {
  margin: 3px 0 0;
  font-size: 1.18rem;
  line-height: 1.15;
}

.team-trust {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 90px;
  align-items: center;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 94px 0;
}

.team-story h2,
.account-manager h2,
.team-cta h2 {
  margin: 0;
  font-size: 2.35rem;
  line-height: 1.08;
}

.team-story > p:last-child,
.account-manager p {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.account-manager {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  padding-left: 38px;
  border-left: 4px solid var(--green);
}

.account-manager-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #ffffff;
  background: var(--green);
  border-radius: 6px;
}

.account-manager-icon svg {
  width: 27px;
  height: 27px;
}

.account-manager span {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-manager h2 {
  font-size: 1.75rem;
}

.team-cta {
  display: grid;
  justify-items: center;
  padding: 80px 24px 86px;
  color: var(--ink);
  background: var(--yellow);
  text-align: center;
}

.team-cta h2 {
  max-width: 800px;
}

.team-cta > p:not(.team-eyebrow) {
  max-width: 650px;
  margin: 18px auto 0;
  color: #3d454c;
  line-height: 1.65;
}

.team-cta-button {
  margin-top: 28px;
}

.team-cta small {
  margin-top: 13px;
  color: #5b4b16;
  font-size: 0.76rem;
}

.team-heading-cta:focus-visible,
.team-cta-button:focus-visible {
  outline: 3px solid rgba(36, 107, 254, 0.35);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .team-heading h1 {
    font-size: 2.9rem;
  }

  .team-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-width: 760px;
  }

  .team-card {
    grid-column: span 2;
  }

  .team-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .team-card:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .team-trust {
    grid-template-columns: 1fr;
    gap: 58px;
    max-width: 760px;
  }
}

@media (max-width: 700px) {
  .team-heading {
    grid-template-columns: 1fr;
    gap: 26px;
    align-items: start;
  }

  .team-heading-cta {
    width: fit-content;
  }
}

@media (max-width: 620px) {
  .team-hero {
    padding: 48px 0 68px;
  }

  .team-heading {
    width: calc(100% - 36px);
  }

  .team-heading-copy {
    padding-left: 18px;
  }

  .team-heading h1 {
    font-size: 2.32rem;
  }

  .team-heading-cta {
    width: 100%;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 14px;
    width: calc(100% - 36px);
    margin-top: 42px;
  }

  .team-card,
  .team-card:nth-child(4) {
    grid-column: auto;
  }

  .team-card:nth-child(5) {
    grid-column: 1 / -1;
    width: calc(50% - 7px);
    justify-self: center;
  }

  .team-card-copy span {
    min-height: 42px;
    font-size: 0.62rem;
  }

  .team-card-copy h2 {
    font-size: 1.03rem;
  }

  .team-trust {
    gap: 48px;
    width: calc(100% - 36px);
    padding: 72px 0;
  }

  .team-story h2,
  .team-cta h2 {
    font-size: 2rem;
  }

  .account-manager {
    grid-template-columns: 1fr;
    padding: 26px 0 0;
    border-top: 4px solid var(--green);
    border-left: 0;
  }

  .account-manager h2 {
    font-size: 1.65rem;
  }

  .team-cta {
    justify-items: stretch;
    padding: 68px 18px 72px;
    text-align: left;
  }

  .team-cta > p:not(.team-eyebrow) {
    margin-left: 0;
  }

  .team-cta-button {
    width: 100%;
  }

  .team-cta small {
    text-align: center;
  }
}
