@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/figtree.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Syne;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/syne-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #121820;
  --foam: #f4f7f8;
  --concrete: #8ea0ab;
  --chili: #e23b22;
  --lantern: #f0b429;
  --river: #2f8f98;
  --display: Syne, "Avenir Next", sans-serif;
  --font: Figtree, "Avenir Next", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 120%, #243140 0%, transparent 55%),
    var(--ink);
  color: var(--foam);
  font-family: var(--font);
  font-size: 1.05rem;
}

body[data-guide] {
  background:
    radial-gradient(ellipse at 50% 18%, var(--wash) 0%, transparent 64%),
    var(--ground);
}

body[data-guide="xia"] { --wash: #e23b22; --ground: #2a0d0b; }
body[data-guide="rue"] { --wash: #f26aa8; --ground: #2a1020; }
body[data-guide="wu"] { --wash: #3b78f0; --ground: #0c1830; }

:focus-visible {
  outline: 2px solid var(--lantern);
  outline-offset: 3px;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #2a3644;
}

.wordmark {
  color: var(--foam);
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.bar p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lantern);
}

main {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.stage { min-height: 11rem; }

body:not(.home) .stage {
  position: relative;
  min-height: 20rem;
}

body:not(.home) .stage:has(h1.is-prompt) {
  min-height: 0;
}

body:not(.home) .stage:has(h1.is-prompt) + .roster {
  margin-top: 2rem;
}

.stage-face {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: 44%;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  image-rendering: pixelated;
}

.stage-face[hidden] { display: none; }

body:not(.home) .stage > :not(.stage-face) {
  position: relative;
  z-index: 1;
}

.ninja {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.45em;
  letter-spacing: 0;
  text-transform: none;
}

.fighter .ninja {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.15em;
  letter-spacing: 0;
  text-transform: none;
}

.soon .ninja { font-size: 1.25rem; }

.stage-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.1rem;
}

.tours {
  margin: 0;
  color: var(--foam);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fighter .tours {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.soon {
  margin: auto 0 0;
  color: var(--concrete);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stage h1 {
  margin: 0.2rem 0 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4.2rem, 12vw, 8rem);
  line-height: 0.82;
  letter-spacing: -0.055em;
}

.stage h1.is-prompt {
  max-width: 11ch;
  margin-inline: auto;
  text-align: center;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.9;
}

.line {
  max-width: 28rem;
  margin: 0;
  color: var(--concrete);
  font-family: var(--mono);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

body[data-guide] .line {
  max-width: calc(100% - 46%);
  line-height: 1.35;
}

.stamp[hidden] { display: none; }

.stamp {
  display: inline-block;
  margin: 1rem 0 0;
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--lantern);
  color: var(--lantern);
  font-family: var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.roster:focus-visible { outline: none; }

.roster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}

.fighter {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.2rem;
  min-height: 13.5rem;
  padding: 0.9rem 7.2rem 0.9rem 0.9rem;
  overflow: hidden;
  border: 1px solid #31404e;
  background: #1a2430;
  color: var(--foam);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.fighter > :not(.face) {
  position: relative;
  z-index: 1;
}

.fighter strong {
  margin-top: 0.35rem;
  color: var(--accent);
  font-family: var(--display);
  font-size: 1.9rem;
  letter-spacing: -0.04em;
  text-shadow:
    0 0 2px var(--accent),
    0 0 10px var(--accent),
    0 0 22px var(--accent);
}

.fighter span {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.face {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  height: 96%;
  width: auto;
  max-width: 48%;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  image-rendering: pixelated;
}

.mark {
  display: block;
  width: 5.2rem;
  height: auto;
  filter: drop-shadow(0 0 6px var(--accent));
}

.mark.is-wide { width: 7rem; }

.mark path,
.mark ellipse,
.mark circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark .eye { stroke-width: 4; }

.fighter.is-on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .fighter:hover {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 3px var(--accent);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .fighter:hover { transform: translateY(-4px); }
}

.fighter.is-dim { opacity: 0.35; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
}

.lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.7rem 1.4rem;
  border: 0;
  background: var(--chili);
  color: white;
  font: 600 1.05rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
}

.lock:disabled {
  background: #31404e;
  color: var(--concrete);
  cursor: default;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--foam);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.arrow {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 2px solid var(--lantern);
  background: #1a2430;
}

.arrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.22rem;
  border-left: 2px solid var(--lantern);
  border-bottom: 2px solid var(--lantern);
  transform: rotate(45deg);
}

.back:hover .arrow { background: var(--lantern); }
.back:hover .arrow::before { border-color: var(--ink); }

.home {
  display: flex;
  flex-direction: column;
}

.home .bar { justify-content: center; }

.home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home .kicker { color: var(--chili); }

.home .stage { min-height: 0; text-align: center; }

.home .line { margin-inline: auto; }

.home .actions { justify-content: center; }

.home .stage h1 { font-size: clamp(3rem, 12vw, 7rem); }

@media (max-width: 700px) {
  .bar { align-items: flex-start; }
  .bar p { max-width: 9.5rem; font-size: 0.68rem; letter-spacing: 0.05em; line-height: 1.35; text-align: right; }
  .stage h1 { font-size: clamp(2.7rem, 14vw, 4.2rem); }
  .home .stage h1 { font-size: clamp(2.8rem, 13vw, 4.4rem); }
  .roster { grid-template-columns: 1fr; }
  body:not(.home) .stage { min-height: 15rem; }
  .stage-face { max-width: 48%; }
  body[data-guide] .line { max-width: calc(100% - 52%); }
  .fighter { min-height: 11.5rem; padding-right: 8.2rem; }
  .mark { width: 5.2rem; }
  .mark.is-wide { width: 7.4rem; }
  .lock { width: 100%; }
  .actions { align-items: stretch; }
  .back { align-self: flex-start; }
}

@media (prefers-reduced-motion: no-preference) {
  .fighter { transition: opacity 160ms linear, box-shadow 120ms linear, border-color 120ms linear, transform 120ms linear; }
}
