/*
 * Who it is for. Built from the shared patterns in site.css (.sec, .sec-alt, .sec-deep, .sec-head, .row,
 * .item, .cols, .list-ruled, .shot-stage, .shot-frame, .diagram, .soon). This file holds only what the
 * page adds: the hero with its index of roles, the Org Admin list, the picture widths and the role table.
 */

/* ---------- The hero: words on the left, the roles on this page as a way in on the right ---------- */
.who-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: var(--edge) var(--c5) var(--gap) minmax(0, 1fr) var(--edge);
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(46% 72% at 80% 42%, rgb(47 99 234 / 24%) 0%, rgb(47 99 234 / 0%) 72%),
    radial-gradient(34% 50% at 100% 0%, rgb(77 126 245 / 16%) 0%, rgb(77 126 245 / 0%) 70%),
    radial-gradient(32% 46% at 0% 100%, rgb(29 69 184 / 16%) 0%, rgb(29 69 184 / 0%) 70%),
    linear-gradient(180deg, var(--navy-950) 0%, #081129 100%);
  background-color: var(--navy-900);
}

/* The hero's fine measuring grid, fading out before it reaches the words. */
.who-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgb(160 190 255 / 6%) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgb(160 190 255 / 6%) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: radial-gradient(46% 70% at 78% 50%, #000 0%, transparent 80%);
  mask-image: radial-gradient(46% 70% at 78% 50%, #000 0%, transparent 80%);
  pointer-events: none;
}

/* A fine sapphire hairline where the hero meets the page. */
.who-hero::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgb(127 162 255 / 0%) 0%, rgb(127 162 255 / 45%) 30%, rgb(127 162 255 / 40%) 70%, rgb(127 162 255 / 0%) 100%);
  pointer-events: none;
}

.who-hero-copy {
  grid-column: 2;
  padding-block: clamp(56px, 6vw, 96px);
}

.who-hero-copy h1 {
  max-width: 14em;
  color: #f6f8ff;
  font-size: var(--t-h1);
  line-height: 1.1;
  letter-spacing: -0.024em;
}

.who-hero-copy .lead {
  max-width: 34em;
  margin-top: var(--s5);
  color: #b9c4da;
  line-height: 1.65;
}

.who-index {
  grid-column: 4;
  padding-block: var(--s7);
}

.who-index a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 16px;
  align-items: center;
  column-gap: var(--s4);
  min-height: 58px;
  border-bottom: 1px solid var(--hair-dark);
  color: #fff;
  text-decoration: none;
}

.who-index a:first-child {
  border-top: 1px solid var(--hair-dark);
}

.who-index-ic {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgb(47 99 234 / 16%);
  box-shadow: inset 0 0 0 1px rgb(126 162 255 / 24%);
  color: var(--sky);
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}

.who-index-ic .ic {
  width: 16px;
  height: 16px;
}

.who-index-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color 140ms var(--ease);
}

.who-index-note {
  color: var(--on-dark-2);
  font-size: var(--t-small);
}

.who-index .arr-d {
  color: var(--on-dark-2);
  transition: transform 140ms var(--ease), color 140ms var(--ease);
}

.who-index a:hover {
  color: #fff;
}

.who-index a:hover .who-index-name {
  color: var(--ice);
}

.who-index a:hover .who-index-ic {
  background: rgb(47 99 234 / 30%);
  color: #fff;
}

.who-index a:hover .arr-d {
  color: var(--ice);
  transform: translateY(2px);
}

.who-index a:focus-visible {
  outline-offset: -2px;
}

/* ---------- Sections ---------- */

/* Two columns that start together at the top, or meet in the middle when one is a short list beside a picture. */
.who-pair {
  align-items: start;
}

.who-mid {
  align-items: center;
}

/* The Org Admin's abilities: a glyph and a sentence on each line, split by hairlines. */
.who-points {
  margin-top: var(--s4);
  border-top: 1px solid var(--line-2);
}

.who-points li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: var(--s4);
  padding-block: 15px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: var(--t-body-sm);
  line-height: 1.55;
}

.who-points .ic {
  margin-top: 1px;
  color: var(--blue-600);
}

/* Pictures: the narrow crop keeps a readable size, the wide one keeps the whole library row. */
.who-narrow .shot-frame {
  max-width: 560px;
  margin-inline: auto;
}

.who-wide .shot-frame {
  max-width: 1120px;
  margin-inline: auto;
}

.who-figure {
  margin: 0;
}

.who-cap {
  margin-top: var(--s3);
  color: var(--muted);
  font-size: var(--t-micro);
  line-height: 1.5;
}

/* The ruled list on the deep band. */
.sec-deep .list-ruled > li {
  border-top-color: var(--hair-dark);
}

.sec-deep .list-ruled > li > .ic {
  color: var(--sky);
}

.sec-deep .list-ruled h3 {
  color: #fff;
}

.sec-deep .list-ruled p {
  color: var(--on-dark-3);
}

/* The sharing drawing keeps a sensible width in its column. */
.page-who .share {
  max-width: 620px;
  margin-inline: auto;
}

/* ---------- The role table: open on the page, a firm rule under the roles and hairlines between rows ---------- */
.rt {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-body-sm);
}

.rt th,
.rt td {
  padding: 13px var(--s4);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.rt th:first-child {
  padding-left: 0;
  text-align: left;
}

.rt thead th {
  width: 15%;
  padding-block: 0 14px;
  border-bottom: 1px solid var(--navy-800);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: var(--t-body-sm);
  font-weight: 600;
  line-height: 1.25;
  vertical-align: bottom;
}

.rt thead th:first-child {
  width: auto;
}

/* Each role keeps the glyph it has in the hero and in its section. */
.rt-role {
  display: inline-grid;
  justify-items: center;
  gap: 8px;
}

.rt-role .ic {
  width: 18px;
  height: 18px;
  color: var(--blue-600);
}

.rt tbody th {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
}

.rt .rt-group th {
  padding: 30px 0 10px;
  border-bottom: 1px solid var(--line-2);
  color: var(--blue-700);
  font-family: var(--font-head);
  font-size: var(--t-small);
  font-weight: 600;
}

.rt tbody tr:first-child th {
  padding-top: 22px;
}

.rt tbody tr:not(.rt-group) > * {
  transition: background-color 120ms var(--ease);
}

.rt tbody tr:not(.rt-group):hover > * {
  background: var(--band-ice);
}

.rt tbody tr:last-child > * {
  border-bottom-color: var(--line-2);
}

.rt .soon {
  top: -1px;
  height: 20px;
  margin-left: 6px;
  padding: 0 7px;
  font-size: 0.75rem;
}

.rt-yes::before,
.rt-no::before {
  content: '';
  display: inline-block;
  vertical-align: middle;
}

.rt-yes::before {
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3.5 9.5l3.5 3.5 7.5-8' fill='none' stroke='%232f63ea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rt-no::before {
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: #c3ccdc;
}

.rt-own {
  color: var(--blue-700);
  font-size: var(--t-small);
  font-weight: 600;
  white-space: nowrap;
}

.rt-who {
  display: none;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--t-small);
  font-weight: 400;
}

@media (prefers-reduced-motion: reduce) {
  .who-index-ic,
  .who-index-name,
  .who-index .arr-d,
  .rt tbody tr > * {
    transition: none;
  }

  .who-index a:hover .arr-d {
    transform: none;
  }
}

/* ---------- Smaller screens ---------- */

/* Between 992 and 1179 the two columns are equal and narrow, so the wide failures list takes its tighter crop. */
@media (min-width: 992px) and (max-width: 1179px) {
  .who-tight .shot {
    --w: var(--mw, var(--cw));
    --h: var(--mh, var(--ch));
    --x: var(--mx, var(--cx, 0));
    --y: var(--my, var(--cy, 0));
  }
}

@media (max-width: 991px) {
  .who-hero {
    grid-template-columns: var(--edge) minmax(0, 1fr) var(--edge);
  }

  .who-hero-copy {
    padding-block: var(--s7) var(--s6);
  }

  .who-index {
    grid-column: 2;
    padding-block: 0 var(--s7);
  }

  .who-hero::before {
    -webkit-mask-image: radial-gradient(70% 60% at 70% 70%, #000 0%, transparent 80%);
    mask-image: radial-gradient(70% 60% at 70% 70%, #000 0%, transparent 80%);
  }
}

/* A phone reads the table as a list: each ability with the roles that have it. */
@media (max-width: 767px) {
  .rt thead,
  .rt td {
    display: none;
  }

  .rt,
  .rt tbody,
  .rt tr,
  .rt tbody th {
    display: block;
  }

  .rt tbody th {
    padding: 13px 0;
  }

  .rt .rt-group th {
    padding: 28px 0 10px;
  }

  .rt tbody tr:first-child th {
    padding-top: 0;
  }

  .rt-who {
    display: block;
  }
}

@media (max-width: 600px) {
  .who-index a {
    grid-template-columns: 30px minmax(0, 1fr) 16px;
    grid-template-areas:
      'ic name arrow'
      'ic note arrow';
    row-gap: 1px;
    padding-block: 12px;
  }

  .who-index-ic {
    grid-area: ic;
  }

  .who-index-name {
    grid-area: name;
  }

  .who-index-note {
    grid-area: note;
  }

  .who-index .arr-d {
    grid-area: arrow;
  }

  .who-points li {
    padding-block: 13px;
  }
}
