/* Team page: member cards and the detail sheet that opens from the photo (on top of site.css / explorer.css) */
.tm-hero h1 { max-width: 16ch; }
.tm-wrap { margin-top: 40px; }

.tm-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 320px)); gap: 28px; justify-content: start; }

/* ---- card */
.tm-card {
  position: relative; display: block; width: 100%; text-align: left; cursor: pointer; padding: 14px 14px 18px;
  background: linear-gradient(180deg, rgba(185, 166, 255, .07), rgba(7, 8, 11, 0) 60%), var(--bg);
  border: 1px solid var(--line-2);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .45s;
}
.tm-card::before, .tm-card::after { content: ""; position: absolute; width: 16px; height: 16px; border: 0 solid var(--mint); opacity: .0; transition: opacity .3s, transform .45s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.tm-card::before { left: -1px; top: -1px; border-width: 2px 0 0 2px; transform: translate(6px, 6px); }
.tm-card::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; transform: translate(-6px, -6px); }
.tm-card:hover, .tm-card:focus-visible { transform: translateY(-6px); border-color: var(--lav); box-shadow: 0 28px 70px -28px rgba(185, 166, 255, .45); }
.tm-card:hover::before, .tm-card:hover::after, .tm-card:focus-visible::before, .tm-card:focus-visible::after { opacity: 1; transform: none; }
.tm-idx { display: block; margin: 0 0 12px; font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.tm-photo { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #07080b; border: 1px solid var(--line); }
.tm-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s cubic-bezier(.2, .8, .2, 1), filter .5s; }
.tm-card:hover .tm-photo img, .tm-card:focus-visible .tm-photo img { transform: scale(1.06); filter: brightness(1.08); }
.tm-photo::after {                                  /* a sweep of light that crosses the dots when the card is hovered */
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(159, 240, 226, .30) 50%, transparent 65%); background-size: 260% 100%; background-position: 130% 0;
}
.tm-card:hover .tm-photo::after, .tm-card:focus-visible .tm-photo::after { opacity: 1; animation: tmSweep 1.3s cubic-bezier(.3, .6, .2, 1) both; }
.tm-card.is-open .tm-photo img { visibility: hidden; }
.tm-name { display: block; margin: 18px 0 4px; font: 600 24px/1.15 var(--sans); letter-spacing: -.02em; }
.tm-role { display: block; font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mint); }
.tm-short { display: block; margin: 10px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.tm-more { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--lav); }
.tm-more i { display: inline-block; width: 18px; height: 1px; background: currentColor; position: relative; transition: width .35s cubic-bezier(.2, .8, .2, 1); }
.tm-more i::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border: solid currentColor; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.tm-card:hover .tm-more i, .tm-card:focus-visible .tm-more i { width: 34px; }

/* the open seat */
.tm-soon { display: grid; place-content: center; gap: 10px; min-height: 100%; padding: 28px; text-align: center; border: 1px dashed var(--line-2); color: var(--mute); }
.tm-soon .plus { width: 54px; height: 54px; margin: 0 auto 4px; border: 1px dashed var(--lav); border-radius: 50%; position: relative; opacity: .8; }
.tm-soon .plus::before, .tm-soon .plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--lav); transform: translate(-50%, -50%); }
.tm-soon .plus::before { width: 18px; height: 1px; } .tm-soon .plus::after { width: 1px; height: 18px; }
.tm-soon b { display: block; color: var(--ink); font: 600 17px var(--sans); }
.tm-soon span { font-size: 14px; line-height: 1.5; }
.tm-nojs { margin-top: 24px; padding: 20px; border: 1px solid var(--line-2); color: var(--ink-2); }
.tm-nojs h2 { color: var(--ink); font-size: 20px; margin-bottom: 6px; }

/* ---- the sheet */
html.tm-lock { overflow: hidden; }
.tm-dialog { border: 0; padding: 0; margin: 0; background: transparent; color: inherit; max-width: none; max-height: none; width: 100%; height: 100%; overflow: auto; }
.tm-dialog[open] { display: flex; padding: 28px 20px; }            /* auto margins on the sheet: centred when it fits, scrollable from its top when it does not */
.tm-dialog::backdrop { background: rgba(7, 8, 11, .80); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); animation: tmFade .4s both; }
.tm-dialog.out::backdrop { animation: tmFadeOut .34s both; }
.tm-sheet {
  position: relative; margin: auto; width: min(980px, 100%); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  border: 1px solid var(--line-2); overflow: hidden;
  background: radial-gradient(120% 90% at 0% 0%, rgba(185, 166, 255, .14), transparent 55%), radial-gradient(90% 80% at 100% 100%, rgba(159, 240, 226, .09), transparent 60%), var(--bg-2);
  box-shadow: 0 50px 140px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(185, 166, 255, .06);
}
.tm-dialog.in .tm-sheet { animation: tmSheet .6s cubic-bezier(.2, .9, .2, 1) both; }
.tm-dialog.out .tm-sheet { animation: tmSheetOut .34s cubic-bezier(.5, 0, .8, .4) both; }
.tm-sheet::before {                                  /* a field of dots behind the content, like the lattice of the films */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(185, 166, 255, .22) 1px, transparent 1.4px); background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(70% 70% at 22% 30%, #000, transparent); mask-image: radial-gradient(70% 70% at 22% 30%, #000, transparent);
}
.tm-close { position: absolute; right: 14px; top: 14px; z-index: 5; width: 40px; height: 40px; background: rgba(7, 8, 11, .6); border: 1px solid var(--line-2); cursor: pointer; transition: border-color .25s, transform .4s cubic-bezier(.2, .8, .2, 1); }
.tm-close span { position: absolute; left: 11px; top: 19px; width: 16px; height: 1.5px; background: var(--ink); }
.tm-close span:first-child { transform: rotate(45deg); } .tm-close span:last-child { transform: rotate(-45deg); }
.tm-close:hover, .tm-close:focus-visible { border-color: var(--lav); transform: rotate(90deg); }

.tm-visual { position: relative; z-index: 1; display: grid; align-content: center; gap: 18px; padding: 48px 28px 40px 48px; }
.tm-frame { position: relative; aspect-ratio: 1; outline: 1px dotted rgba(185, 166, 255, .55); outline-offset: 14px; }
.tm-dialog.in .tm-frame { animation: tmOutline 1s cubic-bezier(.2, .9, .2, 1) both; }
.tm-big { display: block; width: 100%; height: 100%; object-fit: cover; background: #07080b; border: 1px solid var(--line-2); }
.tm-corner { position: absolute; width: 18px; height: 18px; border: 0 solid var(--mint); z-index: 2; pointer-events: none; }
.tm-corner.tl { left: -8px; top: -8px; border-width: 2px 0 0 2px; } .tm-corner.tr { right: -8px; top: -8px; border-width: 2px 2px 0 0; }
.tm-corner.bl { left: -8px; bottom: -8px; border-width: 0 0 2px 2px; } .tm-corner.br { right: -8px; bottom: -8px; border-width: 0 2px 2px 0; }
.tm-scan { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; background: linear-gradient(180deg, transparent 40%, rgba(159, 240, 226, .28) 50%, transparent 60%); background-size: 100% 300%; opacity: 0; }
.tm-dialog.in .tm-scan { animation: tmScan 1.4s .35s cubic-bezier(.4, .1, .2, 1) both; }
.tm-idx2 { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

.tm-info { position: relative; z-index: 1; padding: 52px 52px 48px 20px; align-self: center; }
.tm-info h2 { margin: 12px 0 0; font: 600 clamp(34px, 4.6vw, 52px)/1.02 var(--sans); letter-spacing: -.035em; }
.tm-about { margin-top: 20px; display: grid; gap: 12px; }
.tm-about p { color: var(--ink-2); font-size: 16.5px; line-height: 1.6; }
.tm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 24px 0 0; border: 1px solid var(--line-2); background: rgba(185, 166, 255, .04); }
.tm-stats:empty { display: none; }
.tm-stat { padding: 16px 16px 14px; border-right: 1px solid var(--line-2); }
.tm-stat:nth-of-type(3) { border-right: 0; }
.tm-stat b { display: block; font: 600 clamp(26px, 3.2vw, 36px)/1.05 var(--sans); letter-spacing: -.03em; background: var(--nacre); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.tm-stat span { display: block; margin-top: 6px; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.tm-stat-note { grid-column: 1 / -1; padding: 10px 16px 12px; border-top: 1px solid var(--line-2); color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.tm-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 26px 0 0; border-top: 1px solid var(--line-2); }
.tm-facts dt, .tm-facts dd { padding: 12px 0; border-bottom: 1px solid var(--line); }
.tm-facts dt { padding-right: 24px; font: 500 11px/1.9 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.tm-facts dd { color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.tm-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tm-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tm-link { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 11px 16px; border: 1px solid var(--mint); color: var(--mint); font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; background: rgba(159, 240, 226, .05); transition: background .3s, color .3s, transform .35s cubic-bezier(.2, .8, .2, 1); }
.tm-link i { width: 9px; height: 9px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(0deg) translate(0, 0); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.tm-link:hover, .tm-link:focus-visible { background: var(--mint); color: var(--accent-ink); transform: translateY(-2px); }
.tm-link:hover i, .tm-link:focus-visible i { transform: translate(2px, -2px); }
.tm-tags li { padding: 5px 11px; border: 1px solid var(--line-2); font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lav); background: rgba(185, 166, 255, .06); }

/* staggered reveal of the lines of the sheet */
.tm-dialog .rv, .tm-dialog .tm-about p, .tm-dialog .tm-stat, .tm-dialog .tm-stat-note, .tm-dialog .tm-facts dt, .tm-dialog .tm-facts dd, .tm-dialog .tm-tags li, .tm-dialog .tm-link { opacity: 0; }
.tm-dialog.in .rv, .tm-dialog.in .tm-about p, .tm-dialog.in .tm-stat, .tm-dialog.in .tm-stat-note, .tm-dialog.in .tm-facts dt, .tm-dialog.in .tm-facts dd, .tm-dialog.in .tm-tags li, .tm-dialog.in .tm-link {
  animation: tmUp .7s cubic-bezier(.2, .9, .2, 1) both; animation-delay: calc(var(--i, 0) * 80ms + 280ms);
}

@keyframes tmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tmFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes tmSheet { from { opacity: 0; transform: translateY(26px) scale(.965); } to { opacity: 1; transform: none; } }
@keyframes tmSheetOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes tmUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes tmSweep { from { background-position: 130% 0; } to { background-position: -30% 0; } }
@keyframes tmScan { 0% { opacity: 1; background-position: 0 100%; } 100% { opacity: 0; background-position: 0 0; } }
@keyframes tmOutline { from { outline-offset: 46px; outline-color: rgba(185, 166, 255, 0); } to { outline-offset: 14px; outline-color: rgba(185, 166, 255, .55); } }

@media (max-width: 800px) {
  .tm-sheet { grid-template-columns: 1fr; }
  .tm-visual { padding: 36px 36px 8px; }
  .tm-frame { max-width: 360px; margin: 0 auto; width: 100%; }
  .tm-info { padding: 20px 28px 36px; }
  .tm-idx2 { text-align: center; }
  .tm-dialog[open] { padding: 16px 12px; }
}
@media (max-width: 480px) {
  .tm-stat { padding: 12px 10px 10px; }
  .tm-stat span { font-size: 9px; letter-spacing: .1em; }
  .tm-facts { grid-template-columns: 1fr; }
  .tm-facts dt { border-bottom: 0; padding-bottom: 0; }
  .tm-facts dd { padding-top: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-card, .tm-card::before, .tm-card::after, .tm-photo img, .tm-more i { transition: none; }
  .tm-dialog.in .tm-sheet, .tm-dialog.out .tm-sheet, .tm-dialog.in .tm-frame, .tm-dialog.in .tm-scan, .tm-dialog.in .rv, .tm-dialog.in .tm-about p, .tm-dialog.in .tm-stat, .tm-dialog.in .tm-stat-note, .tm-dialog.in .tm-facts dt, .tm-dialog.in .tm-facts dd, .tm-dialog.in .tm-tags li, .tm-dialog.in .tm-link,
  .tm-dialog::backdrop, .tm-card:hover .tm-photo::after { animation: none; }
  .tm-dialog .rv, .tm-dialog .tm-about p, .tm-dialog .tm-stat, .tm-dialog .tm-stat-note, .tm-dialog .tm-facts dt, .tm-dialog .tm-facts dd, .tm-dialog .tm-tags li, .tm-dialog .tm-link { opacity: 1; }
}
