/* Dela Gothic One (SIL Open Font License), hosted here. The file only holds
   the characters the team page uses: if you add new Japanese text, make a new
   subset that includes it. */
@font-face {
  font-family: 'Dela Gothic One';
  src: url('../fonts/DelaGothicOne-subset.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/*---------------------------------------
  TEAM PAGE: "CHARACTER SELECT"
-----------------------------------------*/

.team-page {
  --ink:      #0b1220;
  --ink-2:    #14223b;
  --gold:     #f1c111;
  --teal:     #057a8d;
  --red:      #e63946;
  --display:  'Bangers', 'Plain-Bold', sans-serif;
  --jp:       'Dela Gothic One', 'Plain-Bold', sans-serif;
}

.team {
  background: var(--ink);
  color: var(--white-color);
  overflow: hidden;
}

.team h1,
.team h2 {
  color: var(--white-color);
}

/* HERO */
.team-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 120px 0 110px;
  text-align: center;
  background: radial-gradient(circle at 50% 60%, #0e5566 0%, var(--ink) 72%);
}

.team-hero::before {
  content: "";
  position: absolute;
  inset: -60%;
  z-index: -3;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.07) 0deg 3deg, transparent 3deg 10deg);
  animation: team-spin 80s linear infinite;
}

.team-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(241,193,17,.32) 1.3px, transparent 1.8px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 55%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 55%, transparent);
}

.team-hero__kana {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  transform: translate(-50%, -50%);
  font-family: var(--jp);
  font-size: clamp(110px, 26vw, 360px);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,.09);
  pointer-events: none;
}

.team-hero__eyebrow {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .25em;
  color: var(--gold);
  margin: 0;
}

.team-hero h1 {
  font-family: var(--display);
  font-size: clamp(64px, 12vw, 150px);
  line-height: .95;
  letter-spacing: .02em;
  margin: 18px 0 28px;
  transform: rotate(-4deg);
  text-shadow: 4px 4px 0 var(--teal), 8px 8px 0 var(--ink), 0 0 50px rgba(5,122,141,.8);
  animation: team-pop .9s cubic-bezier(.2, 1.6, .4, 1) both;
}

.team-hero h1 strong {
  display: inline-block;
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--red), 8px 8px 0 var(--ink), 0 0 50px rgba(241,193,17,.6);
  animation: team-wobble 3s ease-in-out infinite;
}

.team-hero__lead {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 20px;
  color: rgba(255,255,255,.85);
}

.press-start {
  display: inline-block;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: .12em;
  color: var(--ink);
  background: var(--gold);
  padding: 10px 28px 6px;
  border: 3px solid var(--white-color);
  border-radius: 999px;
  box-shadow: 0 0 0 4px var(--ink), 0 0 30px rgba(241,193,17,.7);
  animation: team-blink 1.2s steps(2, jump-none) infinite;
}

.press-start:hover,
.press-start:focus {
  color: var(--ink);
  animation: none;
  transform: scale(1.06);
}

/* falling petals */
.petals span {
  position: absolute;
  top: -40px;
  z-index: -1;
  width: 14px;
  height: 10px;
  border-radius: 14px 0 14px 0;
  background: linear-gradient(135deg, #ffd1e3, #ff8fb8);
  opacity: .85;
  animation: team-fall 11s linear infinite;
}

.petals span:nth-child(1)  { left: 4%;  animation-delay: -1s;  animation-duration: 12s; }
.petals span:nth-child(2)  { left: 12%; animation-delay: -6s;  animation-duration: 9s; }
.petals span:nth-child(3)  { left: 20%; animation-delay: -3s;  animation-duration: 13s; transform: scale(.7); }
.petals span:nth-child(4)  { left: 28%; animation-delay: -9s;  animation-duration: 10s; }
.petals span:nth-child(5)  { left: 36%; animation-delay: -2s;  animation-duration: 14s; }
.petals span:nth-child(6)  { left: 44%; animation-delay: -7s;  animation-duration: 11s; }
.petals span:nth-child(7)  { left: 52%; animation-delay: -4s;  animation-duration: 12s; }
.petals span:nth-child(8)  { left: 60%; animation-delay: -10s; animation-duration: 9s; }
.petals span:nth-child(9)  { left: 68%; animation-delay: -5s;  animation-duration: 13s; }
.petals span:nth-child(10) { left: 76%; animation-delay: -8s;  animation-duration: 10s; }
.petals span:nth-child(11) { left: 84%; animation-delay: -1.5s; animation-duration: 12s; }
.petals span:nth-child(12) { left: 92%; animation-delay: -6.5s; animation-duration: 11s; }
.petals span:nth-child(13) { left: 48%; animation-delay: -11s; animation-duration: 15s; }
.petals span:nth-child(14) { left: 8%;  animation-delay: -12s; animation-duration: 14s; }

/* CHARACTER SELECT */
.team-select {
  position: relative;
  padding: 80px 0 110px;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}

.team-select__title {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: .04em;
  text-align: center;
  margin: 0;
}

.team-select__title span {
  display: block;
  font-family: var(--jp);
  font-size: 16px;
  letter-spacing: .4em;
  color: var(--gold);
  margin-bottom: 6px;
}

.roster,
.roster-hint {
  display: none;
}

.js .roster {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 40px auto 0;
}

.js .roster-hint {
  display: block;
  text-align: center;
  font-size: 14px;
  letter-spacing: .1em;
  color: rgba(255,255,255,.5);
  margin: 18px 0 0;
}

.roster button {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--c) radial-gradient(circle at 50% 30%, rgba(255,255,255,.35), transparent 65%);
  border: 3px solid rgba(255,255,255,.25);
  border-radius: 18px;
  filter: saturate(.45) brightness(.75);
  transition: transform .25s cubic-bezier(.2, 1.6, .4, 1), filter .2s, box-shadow .2s;
}

.roster button:hover {
  filter: none;
  transform: translateY(-4px);
}

.roster button:focus-visible {
  outline: 3px solid var(--white-color);
  outline-offset: 3px;
}

.roster img {
  position: absolute;
  top: -4%;
  left: -15%;
  width: 130%;
  height: auto;
}

.roster span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 4px 2px 2px;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: .06em;
  color: var(--white-color);
  background: var(--ink);
}

.roster [aria-selected="true"] {
  filter: none;
  border-color: var(--gold);
  transform: translateY(-10px) scale(1.06);
  box-shadow: 0 0 0 4px var(--ink), 0 0 34px var(--gold);
}

.roster [aria-selected="true"]::before {
  content: "P1";
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 3px 7px 1px;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.1;
  color: var(--ink);
  background: var(--gold);
  border-radius: 6px;
  animation: team-blink 1s steps(2, jump-none) infinite;
}

.roster [aria-selected="true"] span {
  color: var(--ink);
  background: var(--gold);
}

.hero-stage {
  margin-top: 60px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
  margin-bottom: 90px;
}

.js .hero-panel {
  margin-bottom: 0;
}

.js .hero-panel:not(.is-active) {
  display: none;
}

/* portrait card */
.hero-art {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  perspective: 900px;
}

.hero-art__card {
  position: relative;
  aspect-ratio: 400 / 440;
  overflow: hidden;
  border: 4px solid var(--white-color);
  border-radius: 28px;
  background:
    repeating-conic-gradient(from 0deg at 50% 60%, rgba(255,255,255,.14) 0deg 6deg, transparent 6deg 18deg),
    radial-gradient(circle at 50% 55%, rgba(255,255,255,.5), transparent 60%),
    var(--c);
  box-shadow: 12px 12px 0 var(--c2), 0 40px 80px rgba(0,0,0,.55);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .2s ease-out;
}

.hero-art__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 45%, rgba(255,214,255,.25) 50%, transparent 62%);
  background-size: 250% 100%;
  background-position: var(--mx, 100%) 0;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-art__kanji {
  position: absolute;
  top: 18px;
  right: 14px;
  font-family: var(--jp);
  font-size: 84px;
  line-height: 1;
  writing-mode: vertical-rl;
  color: rgba(255,255,255,.22);
}

.hero-art__card img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 0 rgba(11,18,32,.25));
}

.hero-art__level {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 6px 14px 2px;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: .06em;
  color: var(--ink);
  background: var(--c2);
  border: 3px solid var(--ink);
  border-radius: 10px;
  transform: rotate(-6deg);
}

/* status window */
.hero-status {
  position: relative;
  padding: 36px;
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 2px solid rgba(255,255,255,.16);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 30px 60px rgba(0,0,0,.35);
}

.hero-status::before,
.hero-status::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border: 4px solid var(--c2);
}

.hero-status::before {
  top: -6px;
  left: -6px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 14px 0 0 0;
}

.hero-status::after {
  right: -6px;
  bottom: -6px;
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 14px 0;
}

.hero-jp {
  font-family: var(--jp);
  font-size: 15px;
  letter-spacing: .2em;
  color: var(--c2);
  margin: 0;
}

.team .hero-name {
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 76px);
  line-height: .95;
  letter-spacing: .03em;
  margin: 8px 0 6px;
  text-shadow: 4px 4px 0 var(--c);
}

.hero-role {
  font-family: var(--title-font-family);
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  margin: 0 0 18px;
}

.hero-role span {
  color: var(--c2);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.hero-tags li {
  padding: 4px 12px;
  font-size: 13px;
  color: var(--white-color);
  background: color-mix(in srgb, var(--c) 35%, transparent);
  border: 1px solid var(--c);
  border-radius: 999px;
}

.hero-bio {
  color: rgba(255,255,255,.82);
  margin-bottom: 24px;
}

.hero-stats {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
}

.hero-stats li {
  display: grid;
  grid-template-columns: 170px 1fr 44px;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.85);
}

.hero-stats i {
  position: relative;
  display: block;
  height: 12px;
  background: rgba(255,255,255,.1);
  transform: skewX(-20deg);
}

.hero-stats i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: calc(var(--v) * 1%);
  background: linear-gradient(90deg, var(--c), var(--c2));
  box-shadow: 0 0 14px var(--c2);
  transform-origin: left;
}

.is-active .hero-stats i::after {
  animation: team-grow 1.1s cubic-bezier(.2, .9, .3, 1) both;
}

.is-active .hero-stats li:nth-child(2) i::after { animation-delay: .1s; }
.is-active .hero-stats li:nth-child(3) i::after { animation-delay: .2s; }
.is-active .hero-stats li:nth-child(4) i::after { animation-delay: .3s; }

.hero-stats b {
  font-family: var(--display);
  font-size: 22px;
  font-weight: normal;
  color: var(--c2);
  text-align: right;
}

.hero-move {
  padding: 14px 18px;
  margin-bottom: 26px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), transparent);
  border-left: 6px solid var(--c2);
  border-radius: 0 12px 12px 0;
}

.hero-move small {
  display: block;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c2);
}

.hero-move strong {
  display: block;
  font-family: var(--display);
  font-size: 30px;
  font-weight: normal;
  letter-spacing: .04em;
}

.hero-move p {
  margin: 2px 0 0;
  font-size: 15px;
  color: rgba(255,255,255,.8);
}

.hero-quote {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 14px 22px;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: .03em;
  line-height: 1.2;
  color: var(--ink);
  background: var(--white-color);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 5px 5px 0 var(--c);
  transform: rotate(-1.5deg);
}

.hero-quote::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 34px;
  border: 10px solid transparent;
  border-bottom: 14px solid var(--white-color);
  border-top: 0;
}

/* entrance animation when a hero is selected */
.is-active .hero-art__card {
  animation: team-slam .65s cubic-bezier(.2, 1.4, .4, 1) both;
}

.is-active .hero-status > * {
  animation: team-rise .5s ease-out both;
}

.is-active .hero-status > :nth-child(2) { animation-delay: .05s; }
.is-active .hero-status > :nth-child(3) { animation-delay: .1s; }
.is-active .hero-status > :nth-child(4) { animation-delay: .15s; }
.is-active .hero-status > :nth-child(5) { animation-delay: .2s; }
.is-active .hero-status > :nth-child(6) { animation-delay: .25s; }
.is-active .hero-status > :nth-child(7) { animation-delay: .3s; }
.is-active .hero-status > :nth-child(8) { animation-delay: .35s; }

/* PARTY COMBO */
.team-combo {
  position: relative;
  padding: 100px 0 110px;
  color: var(--ink);
  background:
    radial-gradient(rgba(11,18,32,.14) 1.4px, transparent 1.9px) 0 0 / 16px 16px,
    var(--gold);
  clip-path: polygon(0 40px, 100% 0, 100% calc(100% - 40px), 0 100%);
}

.team-combo h2 {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 84px);
  letter-spacing: .03em;
  text-align: center;
  color: var(--ink);
  margin: 0;
}

.team-combo h2 strong {
  color: var(--red);
  text-shadow: 3px 3px 0 var(--ink);
}

.team-combo__lead {
  text-align: center;
  font-size: 18px;
  color: var(--ink);
  margin: 6px 0 50px;
}

.combo-chain {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 26px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.combo-chain li {
  position: relative;
  padding: 18px 12px 16px;
  text-align: center;
  background: var(--white-color);
  border: 4px solid var(--ink);
  border-radius: 20px;
  box-shadow: 7px 7px 0 var(--ink);
  transform: rotate(-2deg);
  transition: transform .25s cubic-bezier(.2, 1.6, .4, 1);
}

.combo-chain li:nth-child(even) {
  transform: rotate(2deg) translateY(12px);
}

.combo-chain li:hover {
  transform: rotate(0) scale(1.06);
}

.combo-chain li + li::before {
  content: "\203A";
  position: absolute;
  top: 50%;
  left: -26px;
  width: 26px;
  font-family: var(--display);
  font-size: 48px;
  line-height: 0;
  text-align: center;
  color: var(--red);
}

.combo-hit {
  display: block;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: .08em;
  color: var(--red);
}

.combo-chain img {
  display: block;
  width: 96px;
  height: 96px;
  margin: 8px auto 10px;
  object-fit: cover;
  object-position: 50% 20%;
  background: var(--c);
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.combo-chain strong {
  display: block;
  font-family: var(--display);
  font-size: 30px;
  font-weight: normal;
  letter-spacing: .04em;
  line-height: 1;
}

.combo-chain small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #4a5363;
}

.combo-finish {
  margin: 60px 0 0;
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1;
  letter-spacing: .04em;
  text-align: center;
  color: var(--white-color);
  text-shadow: 3px 3px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 8px 8px 0 var(--red);
  transform: rotate(-3deg);
}

.combo-finish span {
  display: inline-block;
  color: var(--red);
  text-shadow: 3px 3px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 8px 8px 0 var(--white-color);
  animation: team-shake 2.4s ease-in-out infinite;
}

/* CTA */
.team-cta {
  padding: 110px 0 120px;
  text-align: center;
  background: radial-gradient(circle at 50% 100%, #0e5566 0%, var(--ink) 65%);
}

.insert-coin {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .3em;
  color: var(--gold);
  animation: team-blink 1.2s steps(2, jump-none) infinite;
}

.team-cta h2 {
  max-width: 760px;
  margin: 10px auto 40px;
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: .03em;
}

.team-cta h2 strong {
  color: var(--gold);
}

.btn-start {
  display: inline-block;
  padding: 14px 40px 10px;
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: .08em;
  color: var(--ink);
  background: var(--gold);
  border: 4px solid var(--white-color);
  border-radius: 16px;
  box-shadow: 8px 8px 0 var(--red);
  transition: transform .15s, box-shadow .15s;
}

.btn-start:hover,
.btn-start:focus {
  color: var(--ink);
  transform: translate(4px, 4px);
  box-shadow: 4px 4px 0 var(--red);
}

/* KEYFRAMES */
@keyframes team-spin   { to { transform: rotate(360deg); } }
@keyframes team-blink  { 50% { opacity: .35; } }
@keyframes team-pop    { from { opacity: 0; transform: rotate(-4deg) scale(.4); } }
@keyframes team-wobble { 50% { transform: rotate(3deg) scale(1.05); } }
@keyframes team-grow   { from { transform: scaleX(0); } }
@keyframes team-rise   { from { opacity: 0; transform: translateY(16px); } }
@keyframes team-slam {
  0%   { opacity: 0; transform: scale(1.3) rotate(-6deg); }
  60%  { opacity: 1; transform: scale(.96) rotate(1deg); }
  100% { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
}
@keyframes team-shake {
  0%, 80%, 100% { transform: none; }
  84% { transform: translate(-4px, 2px) rotate(-2deg); }
  88% { transform: translate(4px, -2px) rotate(2deg); }
  92% { transform: translate(-3px, 1px); }
  96% { transform: translate(3px, -1px); }
}
@keyframes team-fall {
  from { transform: translate(0, 0) rotate(0); }
  to   { transform: translate(120px, 900px) rotate(720deg); }
}

@media (prefers-reduced-motion: reduce) {
  .team *,
  .team *::before,
  .team *::after,
  .team-hero::before {
    animation: none !important;
    transition: none !important;
  }

  .petals {
    display: none;
  }
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .hero-panel {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-art {
    max-width: 380px;
  }

  .combo-chain {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 40px;
  }

  .combo-chain li:nth-child(4)::before {
    display: none;
  }
}

@media (max-width: 575px) {
  .team-hero {
    padding: 80px 0 80px;
  }

  .js .roster {
    gap: 8px;
  }

  .roster span {
    font-size: 13px;
  }

  .roster [aria-selected="true"]::before {
    font-size: 11px;
    top: 4px;
    left: 4px;
  }

  .hero-status {
    padding: 26px 20px;
  }

  .hero-stats li {
    grid-template-columns: 1fr 40px;
    gap: 4px 10px;
  }

  .hero-stats i {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .combo-chain {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .combo-finish span {
    display: block;
    margin-top: 8px;
  }

  .combo-chain li,
  .combo-chain li:nth-child(even) {
    display: grid;
    grid-template-columns: 72px 1fr;
    column-gap: 16px;
    align-items: center;
    text-align: left;
    transform: rotate(-1deg);
  }

  .combo-chain li:nth-child(even) {
    transform: rotate(1deg);
  }

  .combo-chain li::before {
    display: none;
  }

  .combo-chain img {
    grid-row: 1 / 4;
    width: 72px;
    height: 72px;
    margin: 0;
  }

  .combo-hit,
  .combo-chain strong,
  .combo-chain small {
    grid-column: 2;
  }
}
