/* styles/sections/team-roster.css
 * The team (About frames JqgFy 1440, b7Ira3 390, tMe5u 1920). Header: the h2 (.display-heading)
 * with the hiring line and an arrow link, beside it from D (bottom-aligned) and under it on M.
 * Roster: a list of people under a 1px ink rule. Each person is the portrait (cover crop of a 4:5
 * tile), then the name (Piazzolla 600), the role and the bio: 10 apart, the bio 16 (the frames'
 * 6px spacer and its two gaps).
 * - M (b7Ira3): portrait 116x145 beside the text, people in pairs, 28 apart and 28 from the
 *   pair's ink-20 rule.
 * - D (JqgFy): two people a row (portrait 200x250, 28 from the text), rows 40 padded and ruled at
 *   ink-20 across both columns. Under 1440 the portrait and text columns shrink together in the
 *   frame's 200:388 proportion, the portrait keeping its 4:5 crop.
 * - W (tMe5u): four people a row, 40 apart, 48 under the ink rule, portrait on top (390x480 at
 *   1920, filling its column), no row rules.
 * The ink rule and the M pair rules are inset shadows (inside the box, as Pencil draws them),
 * borders in forced colours; the D row rule is a pseudo element's border. */
@layer sections {
  .team-roster-section {
    padding-block: var(--section-2xl) var(--section-xs);
    background: var(--white);
    color: var(--ink);
  }

  .team-roster-section__inner {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    gap: var(--space-28);
  }

  .team-roster-section__head {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
  }

  .team-roster-section__hiring {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-20);
    margin: 0;
    padding-bottom: var(--space-8);
    font-size: 16px;
    line-height: 19px;
    color: var(--ink-2);
  }

  .team-roster {
    margin: 0;
    padding: 0;
    list-style: none;
    box-shadow: inset 0 1px var(--ink);
  }

  .team-roster__person {
    position: relative;
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    align-content: start;
    align-items: start;
    gap: 18px;
    padding-top: var(--space-28);
  }

  .team-roster__person:nth-child(even) {
    padding-bottom: var(--space-28);
    box-shadow: inset 0 -1px var(--ink-20);
  }

  .team-roster__portrait {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }

  .team-roster__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-10);
    padding-top: 2px;
  }

  .team-roster__name {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--t-h5-size);
    font-weight: 600;
    line-height: 21px;
    letter-spacing: -0.2px;
  }

  .team-roster__role {
    margin: 0;
    font-size: 14px;
    line-height: 17px;
    letter-spacing: 0.2px;
    color: var(--ink-2);
  }

  .team-roster__bio {
    margin: var(--space-16) 0 0;
    font-size: 15px;
    line-height: 23px;
    color: var(--ink-2);
  }

  @media (min-width: 900px) {
    .team-roster-section__inner {
      gap: var(--space-48);
    }

    .team-roster-section__head {
      flex-flow: row wrap;
      align-items: flex-end;
      justify-content: space-between;
      gap: var(--space-24);
    }

    .team-roster-section__hiring {
      flex-direction: row;
      align-items: center;
      padding-bottom: 0;
    }

    .team-roster {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      column-gap: var(--space-48);
    }

    .team-roster__person,
    .team-roster__person:nth-child(even) {
      grid-template-columns: minmax(0, 200fr) minmax(0, 388fr);
      gap: var(--space-28);
      padding-block: var(--space-40);
      box-shadow: none;
    }

    /* Each row's ink-20 rule, drawn by the first person across both columns */
    .team-roster__person:nth-child(odd)::after {
      content: "";
      position: absolute;
      inset-inline-start: 0;
      bottom: 0;
      width: calc(200% + var(--space-48));
      border-top: 1px solid var(--ink-20);
    }

    .team-roster__name {
      font-size: var(--t-h5-size);
      line-height: 25px;
      letter-spacing: -0.24px;
    }

    .team-roster__bio {
      font-size: 17px;
      line-height: 26px;
    }
  }

  @media (min-width: 1680px) {
    .team-roster {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      column-gap: var(--space-40);
      padding-top: var(--space-48);
    }

    .team-roster__person,
    .team-roster__person:nth-child(even) {
      grid-template-columns: minmax(0, 1fr);
      gap: var(--space-24);
      padding: 0;
    }

    .team-roster__person:nth-child(odd)::after {
      content: none;
    }

    .team-roster__portrait {
      aspect-ratio: 390 / 480;
    }

    .team-roster__name {
      line-height: 29px;
      letter-spacing: -0.28px;
    }
  }

  @media (forced-colors: active) {
    .team-roster {
      border-top: 1px solid;
    }
  }

  @media (forced-colors: active) and (width < 900px) {
    .team-roster__person:nth-child(even) {
      border-bottom: 1px solid;
    }
  }
}

/* Careers "Who you'll work with" (frames L5uFc 1440, Q6mD0I 390, X8D0R8 1920), on its own
 * .team-section block so the About rules above and these never touch each other's markup.
 * The section intro (heading only) over a roster of four people under a --line rule. M: one
 * person per row, the 120x150 portrait beside the text, 16 apart. D and W: four columns 32
 * apart, the portrait on top at the frame's crop (296x370 at 1440, 396x460 at 1920; the 1920
 * crop is its own Pencil export). Between 900 and the 1440 frame's 1216px of four columns the
 * roster runs two up, so no column drops under the portrait's legible width; a portrait never
 * draws wider than the frame does (296 on D, 396 on W), so the 2x export is never stretched.
 * Portraits are Pencil exports, never re-cropped. */
@layer sections {
  .team-section {
    padding-block: 96px;
  }

  .team-section__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-32);
  }

  .team-section__intro {
    --intro-heading-size: 36px;
    --intro-heading-lh: round(nearest, 1.05em, 1px);
    --intro-heading-ls: -0.02em;
  }

  .team-section__roster {
    display: grid;
    gap: 28px;
    margin: 0;
    padding: 28px 0 0;
    list-style: none;
    box-shadow: inset 0 1px var(--line);
  }

  .team-section__person {
    display: flex;
    gap: var(--space-16);
    align-items: flex-start;
  }

  .team-section__portrait {
    flex: none;
    display: block;
    width: 120px;
  }

  .team-section__portrait img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 296 / 370;
    object-fit: cover;
  }

  .team-section__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-10);
    min-width: 0;
  }

  .team-section__name {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: round(nearest, 1.05em, 1px);
    letter-spacing: -0.24px;
    text-wrap: wrap;
  }

  .team-section__role {
    margin: 0;
    font-size: 14px;
    line-height: round(nearest, 1.2em, 1px);
    letter-spacing: 0.2px;
    color: var(--ink-2);
  }

  /* The frames' 6px spacer between role and bio, plus the column gap on each side. */
  .team-section__bio {
    margin: 16px 0 0;
    font-size: 17px;
    line-height: round(nearest, 1.55em, 1px);
    color: var(--ink-2);
  }

  @media (min-width: 900px) {
    .team-section {
      padding-block: 128px;
    }

    .team-section__inner {
      gap: var(--space-48);
    }

    .team-section__intro {
      --intro-heading-size: 56px;
    }

    /* Four up from the 1440 frame's 1216px of columns, two up below it. */
    .team-section__roster {
      grid-template-columns: repeat(auto-fit, minmax(clamp((100% - 96px) / 4, (1216px - 100%) * 999, (100% - 32px) / 2), 1fr));
      gap: var(--space-32);
      padding-top: 40px;
    }

    .team-section__person {
      flex-direction: column;
      gap: var(--space-20);
    }

    .team-section__portrait {
      width: 100%;
      max-width: 296px;
    }
  }

  @media (min-width: 1680px) {
    .team-section {
      padding-block: 160px;
    }

    .team-section__intro {
      --intro-heading-size: 72px;
    }

    .team-section__portrait {
      max-width: 396px;
    }

    .team-section__portrait img {
      aspect-ratio: 396 / 460;
    }
  }

  @media (forced-colors: active) {
    .team-section__roster {
      border-top: 1px solid;
    }
  }
}
