/* ==========================================================================
   Sub pages: page hero, intro, Our Team
   ========================================================================== */

/* Loaded after styles.css and home-sections.css and built on their tokens.
   Measurements are from the 150dpi render of
   36Street_WebDesignsv2-extra-pages.pdf, page 3 (Our Team), where 1 image
   px is 1 CSS px at a 1350px viewport. Each clamp() reaches its PDF value
   at 1350px and holds it above; the vw factor is the PDF px value divided
   by 13.5, rounded up, as in styles.css. */

/* ==========================================================================
   Page hero (Our Team, Our Approach)
   ========================================================================== */

/* The photo fills the band from the nav bar (PDF y 212.2) to y 589.9,
   377.7px; the PDF places it 10.7px above that box and 2.4px below it,
   so it is cropped 82% from the top. Each sub page swaps the photo and
   the title; the mark, wave and strip are shared. */
.page-hero {
  position: relative;
  height: clamp(240px, 27.98vw, 377.7px);
  background: var(--navy);
  color: var(--white);
}

.page-hero__media {
  position: absolute;
  inset: 0;
  overflow: clip;
}

.page-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 82%;
}

/* The PDF's own wave artwork (white lines, its 50% strength baked into
   the alpha), 1350 x 168 at the hero's bottom (PDF y 422.3 to 589.9).
   Above 1350px it keeps its 168px height and stretches across, so it
   never climbs into the title. */
.page-hero__wave {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: min(12.45vw, 168px);
  background: url(../assets/team-hero-wave.png) center bottom / 100% 100% no-repeat;
  pointer-events: none;
}

/* Title at x 162.1, the mark's right edge at x 1179 (171 in from the
   right); the mark's top is 132.4px under the hero's top edge. */
.page-hero__inner {
  --inset-left: clamp(20px, 12vw, 162px);
  --inset-right: clamp(20px, 12.67vw, 171px);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-top: clamp(28px, 9.81vw, 132.4px);
}

/* PDF: Minion Pro Bold 75.73px white, baseline y 411.3, 199.1px under the
   hero's top edge. With a line height of 1 Minion's baseline sits 0.84em
   into the line box, so the 3.1px margin puts it there. */
.page-hero__title {
  margin: clamp(1px, 0.23vw, 3.1px) 0 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 5.61vw, 75.73px);
  font-weight: 700;
  line-height: 1;
}

/* "Celebrating 10+ YEARS": white on transparent, from the PDF's vector
   mark, 405.5 x 85.1 (x 773.5 to 1179, y 344.6 to 429.7). */
.page-hero__mark {
  flex-shrink: 0;
  width: clamp(150px, 30.04vw, 405.5px);
}

/* The light patterned strip under the photo, PDF y 590 to 659: the wave
   image's lower edge continuing over white. A 1225 x 69 tile repeated
   across; the intro's first line box starts 9px inside it (its text is
   painted above it, see .page-intro). */
.page-hero__strip {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 69px;
  background: url(../assets/team-strip-pattern.png) 0 0 / 1225px 69px repeat-x;
  pointer-events: none;
}

/* ==========================================================================
   Page intro
   ========================================================================== */

/* PDF: Open Sans 27.83px in the band slate on 39.44px baselines (the
   products body's size), x 162, first baseline y 680.2: its line box
   starts 59.8px under the photo. Positioned so it paints above the strip.
   Each page's text frame has its own width in the PDF; the measure is set
   per page so the lines break where the PDF's do. */
.page-intro {
  position: relative;
  padding-top: clamp(32px, 4.43vw, 59.8px);
}

.page-intro__inner {
  --inset-left: clamp(20px, 12vw, 162px);
}

.page-intro__text {
  max-width: var(--intro-measure, none);
  margin: 0;
  color: var(--slate-dark);
  font-size: clamp(19px, 2.07vw, 27.83px);
  line-height: 1.417;
}

/* Our Team: the first line ends at "Corp.", 976px, where "As" would fit
   in a 1015px frame. */
.page-intro--team {
  --intro-measure: 996px;
}

/* ==========================================================================
   Our Team: leadership grid
   ========================================================================== */

/* The card's light ground is the PDF's #627148 (the FMV Operating Lease
   green) at 10% over white; it renders #EFF1EC. */
.leadership {
  --leader-card: #EFF1EC;
}

/* Title and copy at x 162; the cards start 3.2px further in, at x 165.2,
   and end at x 1208.2 (141.8 from the right). The bottom padding is the
   PDF's 152.5px from the last card to the open panel, and to the footer
   while every panel is closed. */
.leadership__inner {
  --inset-left: clamp(20px, 12vw, 162px);
  --inset-right: clamp(20px, 10.51vw, 141.8px);
  padding-bottom: clamp(64px, 11.3vw, 152.5px);
}

/* PDF: Minion Pro Bold 41.67px navy, baseline y 877.4; its line box
   starts 35px under the intro's last one. */
.leadership__title {
  margin: clamp(24px, 2.6vw, 35px) 0 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(30px, 3.09vw, 41.67px);
  font-weight: 700;
  line-height: 1;
}

/* Two columns of 509.5px, 24px apart; rows 240.5px tall, 22.1px apart
   (PDF card tops y 921.0, 1183.6, 1446.2). */
.leaders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.64vw, 22.1px) clamp(12px, 1.78vw, 24px);
  margin: clamp(24px, 2.74vw, 36.9px) 0 0 clamp(0px, 0.24vw, 3.2px);
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .leaders {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .leader {
    grid-column: span 2;
  }

  .leader:nth-child(odd of .leader):not(:has(~ .leader)) {
    grid-column: 2 / span 2;
  }
}

/* Headshot left (200px of the card's 509.5), name, title and button on
   the light ground. The card is at least the photo's height, 240.5px,
   and grows if its text needs more. */
.leader {
  display: grid;
  grid-template-columns: 39.25% minmax(0, 1fr);
  background: var(--leader-card);
  color: var(--navy);
  cursor: pointer;
}

.leader:has(.leader__toggle[aria-expanded="true"]) {
  background-color: var(--navy);
  color: var(--white);
}

.leader:has(.leader__toggle[aria-expanded="true"]) .leader__role {
  color: #c1d9ed;
}

@media (prefers-reduced-motion: no-preference) {
  .leader,
  .leader__role {
    transition: background-color 240ms ease, color 240ms ease;
  }
}

.leader__photo {
  width: 100%;
  height: 100%;
  aspect-ratio: 200 / 240.5;
  object-fit: cover;
}

/* PDF: text at x +20.7 from the photo, the name's line box 23.8px under
   the card top. The button sits 43.3px under the title's last line box
   (Kiran, Eric), but that gap gives way, down to 8px, when the text is
   long, so the button stays 10.2px above the card's bottom as in the
   PDF's Christopher Szopa card (its two-line name and title leave 11.9px).
   The gap is a spacer (::before, ordered after the title) that grows to
   its maximum before the ::after takes the rest; both have a zero basis,
   so neither makes the card taller than its photo. */
.leader__body {
  --gap-max: clamp(16px, 3.21vw, 43.3px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(12px, 1.76vw, 23.8px) 0 clamp(8px, 0.76vw, 10.2px) clamp(12px, 1.54vw, 20.7px);
}

.leader__body::before,
.leader__body::after {
  content: '';
  flex: 1 1 0;
}

.leader__body::before {
  order: 1;
  flex-grow: 1000;
  max-height: calc(var(--gap-max) - 8px);
}

.leader__body::after {
  order: 2;
}

/* PDF: Open Sans Bold 35.66px navy; two-line names on 33.8px baselines. */
.leader__name {
  margin: 0;
  font-size: clamp(20px, 2.65vw, 35.66px);
  font-weight: 700;
  line-height: 0.948;
}

/* PDF: Open Sans 28.53px navy on 33.8px baselines, the first 41.7px under
   the name's. */
.leader__role {
  margin: clamp(4px, 0.8vw, 10.7px) 0 0;
  font-size: clamp(16px, 2.12vw, 28.53px);
  line-height: 1.185;
}

/* "Read bio": PDF pill 219.1 x 48.9 in the band slate with a white
   stroke, RF Rufo 28.53px; Korolev Condensed Light at 0.89 of that. */
.leader__toggle {
  --btn-fill: var(--slate-dark);
  order: 2;
  min-width: clamp(132px, 16.23vw, 219.1px);
  margin-top: 8px;
  padding-block: clamp(5px, 0.59vw, 7.95px);
  font-size: clamp(18px, 1.89vw, 25.4px);
  line-height: clamp(24px, 2.23vw, 30px);
  cursor: pointer;
}

/* Keep the selected card's button and focus ring legible on navy. */
.leader__toggle[aria-expanded="true"] {
  --btn-fill: var(--blue);
}

.leader__toggle[aria-expanded="true"]:focus-visible {
  outline-color: var(--white);
}

/* On the light card a white ring would not show. */
.leader__toggle:focus-visible {
  outline-color: var(--slate-dark);
}

/* ==========================================================================
   Our Team: bio panels (js/bios.js)
   ========================================================================== */

.leader-bio {
  grid-column: 1 / -1;
  min-width: 0;
}

.leader-bio .bio__panel {
  margin-bottom: 0;
  border-radius: var(--radius-block);
}

.leader-bio .bio__body {
  --inset-left: clamp(16px, 3.5vw, 48px);
  --inset-right: var(--inset-left);
}

/* One panel opens at a time, directly after its card row. Closed panels are zero
   height and visibility: hidden, so nothing inside can be reached; the
   height animates over 300ms with grid-template-rows 0fr to 1fr, and
   visibility switches at the end of a close and the start of an open. */
.bio {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 300ms ease, visibility 0s linear 300ms;
}

.bio.is-open {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 300ms ease, visibility 0s linear 0s;
}

/* Under reduced motion a panel opens and closes without the animation. */
@media (prefers-reduced-motion: reduce) {
  .bio,
  .bio.is-open {
    transition: none;
  }
}

.bio__clip {
  min-height: 0;
  overflow: hidden;
}

/* Focus moves to the panel when it opens; a keyboard user sees a ring
   just inside its edge (an outside ring would be clipped). */
.bio:focus {
  outline: none;
}

.bio:focus-visible .bio__panel {
  outline: 2px solid var(--white);
  outline-offset: -6px;
}

/* PDF: a navy rounded rectangle across the page (x 0 to 1350), 34px
   corners, with the footer's wave texture at the PDF's own scale
   (1355px wide, repeated down; wider screens scale it up to the full
   width, as the footer's cover does). The PDF draws no footer on this page;
   the white below the panel separates it from the site footer, as the
   case studies section's bottom padding does on the home page. */
.bio__panel {
  margin-bottom: clamp(48px, 8vw, 107.9px);
  border-radius: var(--radius-header);
  background: var(--navy) url(../assets/texture-footer.png) center top / max(1355px, 100%) auto repeat-y;
  color: var(--white);
}

/* Photo at x 162, 199.5 x 241, 48.3px under the panel top; text column at
   x 399; phone and email right-aligned on x 1235.5. Bottom: 100px under
   the last line box (PDF 104.3 for Mark Horan, 96.2 for Eric McGriff). */
.bio__body {
  --inset-left: clamp(20px, 12vw, 162px);
  --inset-right: clamp(20px, 8.49vw, 114.5px);
  display: grid;
  grid-template-columns: clamp(120px, 14.78vw, 199.5px) minmax(0, 1fr) auto;
  column-gap: clamp(20px, 2.78vw, 37.5px);
  padding-top: clamp(28px, 3.58vw, 48.3px);
  padding-bottom: clamp(48px, 7.41vw, 100px);
}

.bio__photo {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  width: 100%;
  aspect-ratio: 199.5 / 241;
  border-radius: var(--radius-block);
  object-fit: cover;
}

/* PDF: the name's line box 24px under the photo's top (baseline y 1942.2).
   The minimum height holds the text's first line box at the PDF's 213.4px
   under the panel top whether the title takes one line or two. */
.bio__header {
  grid-column: 2;
  grid-row: 1;
  min-height: clamp(80px, 8.31vw, 112.1px);
  margin-top: clamp(12px, 1.78vw, 24px);
}

/* PDF: Open Sans Bold 35.66px white. */
.bio__name {
  margin: 0;
  font-size: clamp(20px, 2.65vw, 35.66px);
  font-weight: 700;
  line-height: 0.948;
}

/* PDF: Open Sans 28.53px white on 33.8px baselines, 41.8px under the
   name's. */
.bio__role {
  margin: clamp(4px, 0.8vw, 10.7px) 0 0;
  font-size: clamp(16px, 2.12vw, 28.53px);
  line-height: 1.185;
}

/* PDF: Open Sans 28.53px white on 41.7px baselines, the phone's level
   with the name's. */
.bio__contact {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: clamp(10px, 1.6vw, 21.6px) 0 0;
  font-size: clamp(16px, 2.12vw, 28.53px);
  line-height: 1.462;
}

.bio__contact a {
  text-decoration: none;
}

.bio__contact a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* PDF: Open Sans 22.92px white on 33.77px baselines, 29px under the
   header, paragraphs 8px apart. The 832.5px measure breaks the lines
   where the PDF does. */
.bio__text {
  grid-column: 2 / 4;
  grid-row: 2;
  max-width: 832.5px;
  margin-top: clamp(16px, 2.15vw, 29px);
  font-size: clamp(16px, 1.7vw, 22.92px);
  line-height: 1.473;
}

.bio__text p {
  margin: 0;
}

.bio__text p + p {
  margin-top: 0.35em;
}

/* ==========================================================================
   Our Approach
   ========================================================================== */

/* Measurements from the 150dpi render of
   36Street_WebDesignsv2-extra-pages-3.pdf (1350px wide). The page hero
   and intro are the shared ones above; the case studies are
   .case-card--wide in home-sections.css. */

/* The intro's frame is wider here: line 2 ends at "molestias", 1030.5px,
   and "quidem" must not fit after line 4's "harum" (1045.5px). */
.page-intro--approach {
  --intro-measure: 1038px;
}

.page-intro--approach .page-intro__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* "Discuss your financing need now": PDF pill x 165.1 to 621.0, y 901.9 to
   961.0 (455.9 x 59.1 with its 1.93px white stroke), 55px under the
   intro's last line box; RF Rufo 33.06px, so the .btn--condensed size.
   The dotted line and arrowhead run in from the page edge as on the home
   page's products button, but the PDF draws them 6.15px below the pill's
   center (y 937.6 against 931.45); that offset is kept. */
.approach__cta {
  position: relative;
  min-width: min(455.9px, 100%);
  margin: clamp(32px, 4.08vw, 55px) 0 0 clamp(0px, 0.23vw, 3.1px);
  padding-block: 10px;
  border: 2px solid var(--white);
}

.approach__cta::before,
.approach__cta::after {
  content: '';
  position: absolute;
  top: calc(50% + 6.15px);
}

/* PDF: 4.2px round dots every 8.5px, the last centered on x 125.5, half
   under the arrowhead's notch. Offsets are from the padding box, 2px
   inside the border. */
.approach__cta {
  --dots-offset: 37.35px;
}

.approach__cta::before {
  right: calc(100% + var(--dots-offset));
  width: 50vw;
  height: 5px;
  margin-top: -2.5px;
  --arrow-mask: radial-gradient(circle, #000 1.8px, transparent 2.3px) right center / 8.5px 5px repeat-x;
  background: radial-gradient(circle, var(--slate-dark) 1.8px, transparent 2.3px) right center / 8.5px 5px repeat-x;
}

/* PDF: the notched arrowhead, 22.3 x 16.3, tip at x 149.1, 16px short of
   the pill. */
.approach__cta::after {
  right: calc(100% + 18px);
  width: 22.3px;
  height: 16.3px;
  margin-top: -8.15px;
  background: var(--slate-dark);
  clip-path: polygon(0 0, 100% 50%, 0 100%, 13.3% 50%);
}

/* The section ends where the PDF page does, 156.4px under the second
   card (y 3738 to 3894.4); the site footer follows. */
.approach-cases {
  padding-bottom: clamp(64px, 11.59vw, 156.4px);
}

.approach-cases__inner {
  --inset-left: clamp(20px, 12vw, 162px);
}

/* PDF: Minion Pro Bold 41.67px navy, baseline y 1078.4; its line box
   starts 82.4px under the button and ends 41.7px above the first photo.
   The PDF sets it at x 159.1, 3px left of every other left edge on the
   page; it sits on the shared 162px edge here. */
.approach-cases__title {
  margin: clamp(48px, 6.11vw, 82.4px) 0 clamp(24px, 3.09vw, 41.7px);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(30px, 3.09vw, 41.67px);
  font-weight: 700;
  line-height: 1;
}

/* PDF: 23.5px of white between the first card's block and the second
   card's photo. */
.case-card--wide + .case-card--wide {
  margin-top: clamp(16px, 1.75vw, 23.5px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Mobile: the page inset drops to 20px as on the home page. The hero
   stacks the title over the mark and grows to fit them; the leadership
   grid becomes one column; a bio panel puts the headshot beside the name
   and title, then the phone and email, then the text, all at full width.
   On Our Approach the button goes right with the dotted line run in from
   the copy's left edge, as the home page's buttons do on phones. */
@media (max-width: 759.98px) {
  .page-hero__inner,
  .page-intro__inner,
  .leadership__inner,
  .approach-cases__inner,
  .bio__body {
    --inset-left: var(--inset);
    --inset-right: var(--inset);
  }

  .page-hero {
    height: auto;
    min-height: 240px;
  }

  .page-hero__inner {
    flex-direction: column;
    gap: 16px;
    padding-block: 40px 64px;
  }

  .page-hero__title {
    margin: 0;
    font-size: 40px;
  }

  .page-hero__mark {
    width: 220px;
  }

  .page-intro {
    padding-top: 40px;
  }

  .page-intro__text {
    font-size: 19px;
  }

  .leadership__title {
    margin-top: 32px;
    font-size: 28px;
  }

  .leaders {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: 24px 0 0;
  }

  .leader {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .leader__body {
    --gap-max: 24px;
    padding: 16px 12px 12px 16px;
  }

  .leader__name {
    font-size: 22px;
  }

  .leader__role {
    margin-top: 6px;
    font-size: 17px;
  }

  /* A 44px tap target: the 24px line, 9px padding and the border. */
  .leader__toggle {
    min-width: 132px;
    padding-block: 8.5px;
    font-size: 20px;
    line-height: 24px;
  }

  .bio__panel {
    margin-bottom: 48px;
    border-radius: var(--radius-block);
  }

  .bio__body {
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 16px;
    padding-block: 24px 40px;
  }

  .bio__photo {
    grid-row: 1;
    border-radius: 12px;
  }

  .bio__header {
    align-self: center;
    min-height: 0;
    margin-top: 0;
  }

  .bio__name {
    font-size: 22px;
  }

  .bio__role {
    margin-top: 6px;
    font-size: 17px;
  }

  /* Each link is a 44px tap target. */
  .bio__contact {
    grid-column: 1 / -1;
    grid-row: 2;
    align-items: flex-start;
    margin-top: 12px;
    font-size: 18px;
    line-height: 24px;
  }

  .bio__contact a {
    padding-block: 10px;
  }

  .bio__text {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.5;
  }

  .page-intro--approach .page-intro__inner {
    container-type: inline-size;
  }

  /* The label is long, so the button is set tighter than the home page's
     phone buttons (18px, 24px padding) to leave room for a few dots. */
  .approach__cta {
    align-self: flex-end;
    min-width: 0;
    margin: 40px 0 0;
    padding-inline: 24px;
    font-size: 18px;
  }

  /* The button sits flush right in .page-intro__inner (the container), so
     the line runs from the copy's left edge: 100cqw less the button's
     padding box (100%), its 2px left border and the offset. */
  .approach__cta::before {
    width: calc(100cqw - 100% - 2px - var(--dots-offset));
  }

  .approach-cases__title {
    margin: 48px 0 24px;
    font-size: 28px;
  }
}

/* Narrow phones: no room is left beside the button for the line, so the
   button takes the full width without it. */
@media (max-width: 374.98px) {
  .approach__cta {
    align-self: stretch;
  }

  .approach__cta::before,
  .approach__cta::after {
    content: none;
  }
}
