.staff {
  --team-ink: #11322a;
  --team-cream: #f4f7ee;
  --team-muted: #dfece3;
  --team-rule: #466c61;
  --team-accent: #9ef0c6;
  padding-block: clamp(2.25rem, 4.6vw, 4.75rem);
  background: linear-gradient(180deg, var(--cream) 0%, #e4f1e8 16%, #e4f1e8 84%, var(--cream) 100%);
  color: var(--team-ink);
}

.staff__header {
  position: relative;
  z-index: 1;
  padding: clamp(1.25rem, 2.5vw, 2.15rem) var(--team-inset) 0;
}

.staff__header h2 {
  font-size: clamp(1.8rem, 3.7vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
}

.staff__header p {
  margin-top: .45rem;
  color: var(--team-muted);
  font-size: clamp(.9rem, 1.4vw, 1.05rem);
}

.staff__panel {
  --team-inset: clamp(1.2rem, 3.7vw, 3.5rem);
}

.staff__slides {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 2px solid #163441;
  border-radius: 6px;
  background: #0f2030;
  box-shadow: 0 5px 0 #16344128, 0 18px 42px #0f24211f;
  color: var(--team-cream);
}

.staff__scenery, .staff__slides::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.staff__scenery {
  object-fit: cover;
  object-position: center 76%;
}

.staff__slides::before {
  z-index: 0;
  content: "";
  background:
    linear-gradient(90deg, #06101b99 4%, #07121d55 42%, transparent 72%),
    linear-gradient(0deg, #0b1622cc, transparent 23%);
}

.staff__profiles {
  position: relative;
  z-index: 1;
}

.staff__slide {
  display: grid;
  grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
  align-items: center;
}

.staff__panel:not([data-staff-carousel]) .staff__slide + .staff__slide {
  border-top: 1px solid var(--team-rule);
}

[data-staff-carousel] .staff__profiles {
  display: grid;
}

[data-staff-carousel] .staff__slide {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

[data-staff-carousel] .staff__slide[data-staff-state="current"] {
  z-index: 2;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

[data-staff-carousel] .staff__slide[data-staff-state="outgoing"] {
  z-index: 1;
  visibility: visible;
  pointer-events: none;
}

.staff__bio {
  display: grid;
  min-width: 0;
  align-content: center;
  justify-items: start;
  gap: .7rem;
  padding: 1rem var(--team-inset);
}

.staff__bio h3 {
  font-size: clamp(2.05rem, 5.05vw, 4.45rem);
  font-weight: 800;
  line-height: .94;
  overflow-wrap: anywhere;
}

.staff__bio p {
  max-width: 32ch;
  color: var(--team-muted);
  font-size: clamp(.96rem, 1.45vw, 1.12rem);
}

.staff__bio .staff__role {
  color: var(--team-accent);
  font-weight: 700;
}

.staff__stage {
  display: grid;
  place-items: center;
  min-width: 0;
}

.staff__character, .staff__art-status {
  grid-area: 1 / 1;
}

.staff__character {
  width: min(92%, clamp(10rem, 23vw, 14.8rem));
  height: auto;
  aspect-ratio: 21 / 34;
  visibility: hidden;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  filter: drop-shadow(0 2px 2px #060f1acc) drop-shadow(0 0 2px #c0dfed91);
}

[data-staff-art-state="ready"] .staff__character {
  visibility: inherit;
}

.staff__art-status {
  max-width: calc(100% - 1rem);
  padding: .5rem .9rem;
  border-radius: 3px;
  background: var(--team-ink);
  color: var(--team-cream);
  text-align: center;
  font-size: .84rem;
}

.staff__art-status:empty {
  display: none;
}

.staff__youtube {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  color: var(--team-cream);
  font-weight: 700;
  text-underline-offset: .25em;
}

.staff__youtube:hover {
  color: var(--team-accent);
}

.staff__youtube:focus-visible {
  outline-color: var(--team-accent);
}

.staff__pagination {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-inline-start: 56%;
  padding-bottom: .55rem;
}

.staff__dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.staff__dot::before {
  content: "";
  width: .62rem;
  height: .62rem;
  border: 1px solid var(--team-accent);
  border-radius: 50%;
  background: #172c39;
  transition: background-color 160ms ease, transform 160ms ease;
}

.staff__dot:hover::before {
  background: #578789;
  transform: scale(1.12);
}

.staff__dot[aria-pressed="true"]::before {
  background: var(--team-accent);
  box-shadow: 0 0 0 3px #bce8e638;
}

.staff__dot:focus-visible {
  outline-color: var(--team-accent);
  outline-offset: -4px;
}

@media (prefers-reduced-motion: no-preference) {
  [data-staff-direction="forward"] [data-staff-state="current"] .staff__bio {
    animation: staff-in-forward 420ms cubic-bezier(.2, .75, .25, 1) both;
  }

  [data-staff-direction="forward"] [data-staff-state="current"] .staff__stage {
    animation: staff-in-forward 500ms cubic-bezier(.2, .75, .25, 1) 40ms both;
  }

  [data-staff-direction="forward"] [data-staff-state="outgoing"] {
    animation: staff-out-forward 230ms ease-in both;
  }

  [data-staff-direction="backward"] [data-staff-state="current"] .staff__bio {
    animation: staff-in-backward 420ms cubic-bezier(.2, .75, .25, 1) both;
  }

  [data-staff-direction="backward"] [data-staff-state="current"] .staff__stage {
    animation: staff-in-backward 500ms cubic-bezier(.2, .75, .25, 1) 40ms both;
  }

  [data-staff-direction="backward"] [data-staff-state="outgoing"] {
    animation: staff-out-backward 230ms ease-in both;
  }
}

@keyframes staff-in-forward {
  from { opacity: 0; transform: translate3d(24px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes staff-out-forward {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(-14px, 0, 0); }
}

@keyframes staff-in-backward {
  from { opacity: 0; transform: translate3d(-24px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes staff-out-backward {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(14px, 0, 0); }
}

@media (min-width: 641px) {
  [data-staff-carousel] .staff__header {
    position: absolute;
    inset: 0 44% auto 0;
  }

  [data-staff-carousel] .staff__bio {
    padding-block: clamp(6.4rem, 9vw, 8.5rem) 1.2rem;
  }

  [data-staff-carousel] .staff__stage {
    padding-top: 2rem;
  }
}

.staff__panel:not([data-staff-ready]) .staff__stage {
  display: none;
}

.staff__panel:not([data-staff-ready]) .staff__slide {
  display: block;
  min-height: auto;
}

@media (max-width: 640px) {
  .staff__panel { --team-inset: 1rem; }

  .staff__slide {
    grid-template-columns: minmax(0, 61fr) minmax(0, 39fr);
  }

  .staff__scenery { object-position: 76% 68%; }

  .staff__slides::before {
    background:
      linear-gradient(90deg, #071522f0 0%, #071522b5 54%, transparent 86%),
      linear-gradient(0deg, #0b1622cc, transparent 22%);
  }

  .staff__bio {
    padding: 1rem .25rem .55rem var(--team-inset);
    gap: .4rem;
  }

  .staff__bio h3 {
    font-size: clamp(1.45rem, 6.6vw, 2.05rem);
  }

  .staff__bio p, .staff__youtube {
    font-size: .875rem;
    line-height: 1.42;
  }

  .staff__character {
    width: min(100%, 10rem);
  }

  .staff__stage { padding-top: 1rem; }

  .staff__pagination {
    justify-content: flex-end;
    margin-inline-start: 0;
    padding-right: max(0px, calc((39% - 132px) / 2));
    padding-bottom: .45rem;
  }
}
