/* Firm First, the Team page ("Our People"). Loaded after styles.css, which carries the
   menu, the type, the button, the sign-off and the footer shared with the homepage.
   The opening asks the visitor who they are. The dot drawing regroups with the answer: a whole
   temple front, a row of columns, three under a beam. It never rests on the homepage's column. */

/* ---------- The opening ---------- */

.who { position: relative; padding: calc(var(--nav-h) + clamp(18px, 4svh, 44px)) var(--pad) 0; }

/* Phone: the drawing stands in a band under the question. The second copy lies exactly over the first. */
.who-art, .who-fig { position: relative; height: var(--who-band); margin: clamp(10px, 2.4svh, 22px) calc(var(--pad) * -1) 0; overflow: clip; pointer-events: none; --who-band: clamp(220px, 34svh, 300px); }
.who-art + .who-art { margin-top: calc(var(--who-band) * -1); }
.who-art > [data-dot-shapes-canvas] { position: absolute; left: -10vw; top: 50%; display: block; width: 120vw; height: calc(var(--who-band) * 1.3); margin-top: calc(var(--who-band) * -0.65); }
/* The still plates of the drawings, for a visitor who asks for reduced motion. */
.who-fig .plate { --art: min(120vw, calc(var(--who-band) * 1.3)); opacity: 0; }
.who-fig .plate.is-on { opacity: 1; }
html.live .who-fig { display: none; }
html:not(.live) .who-art { display: none; }
.who-copy { position: relative; z-index: 1; container-type: inline-size; max-width: 41rem; }

/* The question, with the chosen name set inline after "for" over one fine underline. The size follows
   the column, so the longest name always fits on the second line and the page never jumps. */
.who h1 {
  font-size: clamp(26px, 8.3cqw, 58px);
  line-height: 1.12; letter-spacing: -0.014em; text-wrap: nowrap;
}
.who-l { display: block; }
.who-word {
  display: inline-block; color: #fff;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.14em;
  text-decoration-color: rgba(238, 242, 250, 0.62);
}
html:not(.js) .who-word { display: none; }

/* The four choices, in one row under the question. Below desktop width they spread across the
   column, so all four always fit and no word is cut. */
.who-tabs {
  display: flex; justify-content: space-between; gap: 6px 10px;
  margin: clamp(18px, 3svh, 28px) 0 clamp(18px, 3svh, 26px); border-bottom: 1px solid var(--line);
}
.who-tab {
  position: relative; display: inline-flex; align-items: center; flex: none;
  min-height: 46px; margin: 0; padding: 0; border: 0; border-radius: 2px;
  background: none; color: var(--muted);
  font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: 0.004em; text-align: left;
  cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: color 180ms var(--ease-out);
}
.who-tab[aria-selected="true"] { color: #fff; }
.who-tab:active { color: #fff; }
@media (hover: hover) and (pointer: fine) { .who-tab:hover { color: var(--text); } }

/* The four answers share one cell, so the page does not jump when the answer changes. */
.who-answers { display: grid; margin-bottom: clamp(22px, 3.6svh, 34px); }
.who-a { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 220ms var(--ease-out), visibility 0s linear 220ms; }
.who-a.is-on { opacity: 1; visibility: visible; transition: opacity 220ms var(--ease-out), visibility 0s linear; }
.who-a p { margin: 0; max-width: 33rem; font-size: clamp(16.5px, 1.25vw, 18px); line-height: 1.6; color: var(--soft); text-wrap: pretty; }
.who-name { display: none; }

/* With scripts off there is nothing to choose, so all four answers are set out under their names. */
html:not(.js) .who-tabs { display: none; }
html:not(.js) .who-answers { gap: 22px; }
html:not(.js) .who-a { grid-area: auto; opacity: 1; visibility: visible; }
html:not(.js) .who-name { display: block; margin: 0 0 6px; font-size: clamp(24px, 2.6vw, 34px); }

/* Phone: the question first and the drawing under it. Only the chosen answer takes room, so the button sits 32px under it. */
@media (max-width: 759px) {
  .who { display: flex; flex-direction: column; }
  .who-copy { order: 1; }
  .who-art, .who-fig { order: 2; }
  html.js .who-a { display: none; }
  html.js .who-a.is-on { display: block; }
  html.js .who-answers { margin-bottom: 32px; }
}

/* From tablet width the opening is one row on the page's twelve columns: the question in the left six,
   the drawing standing in the right half. */
@media (min-width: 760px) {
  .who { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; min-height: clamp(460px, 64svh, 620px); padding-bottom: clamp(20px, 4svh, 44px); overflow: clip; }
  .who-copy { grid-column: 1 / span 6; max-width: none; padding-right: 8%; }
  .who-art, .who-fig {
    position: absolute; top: 0; bottom: 0; right: calc(var(--pad) - var(--edge)); left: auto;
    width: min(52vw, 800px); height: auto; margin: 0; overflow: visible;
  }
  .who-art + .who-art { margin-top: 0; }
  .who-art > [data-dot-shapes-canvas] { inset: 0; left: 0; top: 0; width: 100%; height: 100%; margin: 0; }
  .who-fig .plate { left: 0; top: 0; width: 100%; height: 100%; transform: none; object-fit: contain; }
}
@media (min-width: 1000px) {
  .who { min-height: clamp(560px, 78svh, 740px); padding-top: calc(var(--nav-h) + clamp(28px, 6svh, 64px)); }
  .who-tabs { justify-content: flex-start; gap: 6px 34px; }
  .who-tab { font-size: 15.5px; }
}

/* ---------- Meet the Team ---------- */

.team { position: relative; padding: var(--gap) var(--pad) 0; }
/* The heading, with its sentence directly under it. */
.team-intro { margin-bottom: clamp(30px, 5svh, 52px); }
.team-intro h2 { margin-bottom: clamp(10px, 1.6svh, 16px); }
.team-intro p { margin: 0; max-width: 44ch; font-size: clamp(16.5px, 1.36vw, 19.5px); line-height: 1.55; color: var(--soft); text-wrap: balance; }

/* One grid. Every portrait stands on the page's own ground, with no plate behind it. */
.team-grid { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; }
.person { margin: 0; }
.frame {
  position: relative; aspect-ratio: 1 / 1.06; overflow: hidden;
  /* Each figure dissolves into the ground at its foot and at the two sides, so no crop edge shows. */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 66%, rgba(0, 0, 0, 0) 96%), linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 7%, #000 93%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 66%, rgba(0, 0, 0, 0) 96%), linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 7%, #000 93%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
/* The portraits come from different shoots. Each is set from its own measure (--z a zoom, --ty a shift,
   both from the top) so that all ten faces are one size and every eye line sits at 36 percent of the frame's height. */
.frame img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; margin: 0 auto;
  object-fit: cover; object-position: 50% 0;
  transform-origin: 50% 0; transform: translate3d(0, var(--ty, 0%), 0) scale(var(--z, 1));
  /* One grade for all ten (the filter is defined in team.html): less colour, a slight cool shift. */
  filter: url(#tone);
}
.frame img[alt="Raj Gollamudi"] { --z: 1.56; --ty: -2.3%; }
.frame img[alt="Marc Yi"] { --z: 1.18; --ty: -0.2%; }
.frame img[alt="Connie Paiement"] { --z: 1.02; --ty: -0.9%; }
.frame img[alt="Ankang Ni"] { --z: 1.29; --ty: -8.6%; }
.frame img[alt="John Button"] { --z: 1.21; --ty: -0.3%; }
.frame img[alt="Ethan Davila"] { --z: 1.04; --ty: 6.7%; }
.frame img[alt="Spencer Bernstein"] { --z: 0.83; --ty: 3.1%; }
.frame img[alt="Issa Hawatmeh"] { --z: 1.15; --ty: 0%; }
.frame img[alt="Pam Milliren"] { --z: 1.07; --ty: -4.5%; }
.frame img[alt="Kim Bowe"] { --z: 1.01; --ty: 1.5%; }
.person figcaption { display: grid; gap: 3px; padding-top: 13px; border-top: 1px solid var(--line); }
.p-name { font-family: var(--serif); font-size: clamp(18px, 1.5vw, 21.5px); line-height: 1.22; letter-spacing: -0.004em; color: #fff; }
.p-title { font-size: 14.5px; line-height: 1.4; color: var(--muted); }

@media (min-width: 760px) {
  .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 46px 24px; }
  /* The two Managing Partners take two columns each. Their frame is exactly as tall as the others and their
     portrait exactly as wide, so the eye line and the head height are the same in every row. */
  .person-lead { grid-column: span 2; }
  .person-lead .frame { aspect-ratio: auto; height: 0; padding-bottom: calc((100% - 24px) * 0.53); }
  .person-lead .frame img { width: calc((100% - 24px) / 2); }
}

/* For a check only (team.html?lines=1): lines at 32, 36 and 38 percent of each frame. */
html.cap-lines .frame { -webkit-mask-image: none; mask-image: none; outline: 1px solid rgba(255, 255, 0, 0.5); }
html.cap-lines .frame::after {
  content: ""; position: absolute; left: 0; right: 0; top: 32%; height: 6%; pointer-events: none;
  border-top: 1px solid #ff0; border-bottom: 1px solid #ff0;
  background: linear-gradient(#f00, #f00) 0 66.6% / 100% 1px no-repeat;
}
/* Capture switch (team.html?show=team). Not part of the design. */
html.cap-team .who, html.cap-team .nav { display: none; }
html.cap-team .team { padding-top: 56px; }
