:root {
  --void: #070605;
  --void-raised: #0e0b07;
  --void-panel: #15100a;
  --brass-50: #fcf7cf;
  --brass-100: #f0d085;
  --brass-200: #cca152;
  --brass-300: #b0853c;
  --brass-400: #8f682b;
  --brass-500: #6c4c1c;
  --brass-600: #3a2810;
  --ember: #ff7a1f;
  --ember-soft: #ffb454;
  --bone: #efe6d2;
  --bone-dim: #b3a78f;
  --bone-faint: #8c816b;
  --rule: rgba(204, 161, 82, 0.18);
  --rule-strong: rgba(240, 208, 133, 0.45);
  --brass-fill: linear-gradient(180deg, #fcf7cf 0%, #f0d085 24%, #cca152 50%, #8f682b 68%, #b0853c 84%, #e6c173 100%);
  --border-fill: linear-gradient(160deg, rgba(240, 208, 133, 0.6), rgba(108, 76, 28, 0.3) 42%, rgba(240, 208, 133, 0.28));
  --panel-fill: linear-gradient(180deg, #16110b 0%, #0b0806 100%);
  --display: "Saira", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(20px, 4.4vw, 72px);
  --max: 1320px;
  --header-h: 76px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .92 0 0 0 0 .78 0 0 0 1.4 -.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--void);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  scrollbar-color: var(--brass-500) var(--void);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--brass-200);
  color: #140e05;
}

img,
svg,
canvas {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--brass-100);
  outline-offset: 4px;
}

.visually-hidden,
.bot-field {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link {
  background: var(--brass-100);
  color: #140e05;
  font-family: var(--display);
  font-weight: 700;
  left: 16px;
  letter-spacing: 0.14em;
  padding: 10px 16px;
  position: fixed;
  text-transform: uppercase;
  top: -60px;
  transition: top 0.2s;
  z-index: 100;
}

.skip-link:focus {
  top: 16px;
}

/* ---------------------------------------------------------------- ambient */

.ambient {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

.torch {
  border-radius: 50%;
  height: 760px;
  left: 0;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  top: 0;
  transition: opacity 1.4s ease;
  width: 760px;
  will-change: transform;
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, 0.55) 42%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, 0.55) 42%, transparent 100%);
}

.js body:not(.is-booting) .torch {
  opacity: 1;
}

.torch-facets {
  background: url("assets/facets.svg") 0 0 / 560px 560px;
  height: 100vh;
  left: 0;
  opacity: 0.42;
  position: absolute;
  top: 0;
  width: 100vw;
  will-change: transform;
}

.grain {
  animation: grain 1.2s steps(6) infinite;
  background-image: var(--noise);
  inset: -60%;
  opacity: 0.055;
  position: absolute;
}

.vignette {
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.4));
  inset: 0;
  position: absolute;
}

.rush-canvas {
  height: 100%;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.3s;
  width: 100%;
  z-index: 55;
}

.rush-canvas.is-active {
  opacity: 1;
}

/* ---------------------------------------------------------------- header */

.site-header {
  align-items: center;
  border-bottom: 1px solid transparent;
  display: flex;
  gap: 24px;
  height: var(--header-h);
  justify-content: space-between;
  left: 0;
  padding: 0 var(--gutter);
  position: fixed;
  right: 0;
  top: 0;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  z-index: 40;
}

.site-header.is-scrolled {
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  background: rgba(7, 6, 5, 0.74);
  border-color: var(--rule);
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
}

.brand-mark {
  filter: drop-shadow(0 0 12px rgba(204, 161, 82, 0.28));
  height: 40px;
  object-fit: contain;
  transition: transform 0.5s var(--ease-out);
  width: 40px;
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.08);
}

.brand-name {
  color: var(--brass-100);
  font-family: var(--display);
  font-size: 14px;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-name span {
  color: var(--bone-faint);
  font-weight: 500;
  margin-left: 0.3em;
}

.site-nav {
  display: flex;
  gap: clamp(20px, 3vw, 44px);
}

.site-nav a {
  color: var(--bone-dim);
  font-family: var(--display);
  font-size: 12px;
  font-stretch: 118%;
  font-weight: 600;
  letter-spacing: 0.24em;
  padding: 8px 0;
  position: relative;
  text-transform: uppercase;
  transition: color 0.3s;
}

.site-nav a::after {
  background: var(--brass-100);
  bottom: 0;
  content: "";
  height: 5px;
  left: 50%;
  opacity: 0;
  position: absolute;
  transform: translate(-50%, 4px) rotate(45deg);
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
  width: 5px;
}

.site-nav a:hover {
  color: var(--brass-100);
}

.site-nav a:hover::after {
  opacity: 1;
  transform: translate(-50%, 0) rotate(45deg);
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.hud-button {
  --cut: 7px;
  align-items: center;
  background: rgba(20, 15, 9, 0.6);
  box-shadow: inset 0 0 0 1px var(--rule);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  color: var(--bone-dim);
  display: inline-flex;
  font-family: var(--display);
  font-size: 11px;
  font-stretch: 115%;
  font-weight: 600;
  gap: 9px;
  height: 38px;
  letter-spacing: 0.18em;
  padding: 0 14px;
  text-transform: uppercase;
  transition: color 0.3s, box-shadow 0.3s, background 0.3s;
  white-space: nowrap;
}

.hud-button:hover {
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  color: var(--brass-100);
}

.hud-button b {
  color: var(--brass-100);
  font-weight: 700;
}

.sfx-bars {
  align-items: flex-end;
  display: inline-flex;
  gap: 2px;
  height: 12px;
}

.sfx-bars i {
  background: currentColor;
  display: block;
  height: 3px;
  transition: height 0.2s;
  width: 2px;
}

.sfx-toggle[aria-pressed="true"] {
  color: var(--brass-100);
}

.sfx-toggle[aria-pressed="true"] .sfx-bars i {
  animation: eq 0.8s ease-in-out infinite alternate;
}

.sfx-toggle[aria-pressed="true"] .sfx-bars i:nth-child(2) {
  animation-delay: -0.3s;
}

.sfx-toggle[aria-pressed="true"] .sfx-bars i:nth-child(3) {
  animation-delay: -0.55s;
}

.sfx-toggle[aria-pressed="true"] .sfx-bars i:nth-child(4) {
  animation-delay: -0.15s;
}

.trophy-button svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.6;
  width: 16px;
}

.trophy-button.is-bumped {
  animation: bump 0.6s var(--ease-out);
}

/* ---------------------------------------------------------------- buttons */

.button {
  --cut: 12px;
  align-items: center;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  display: inline-flex;
  font-family: var(--display);
  font-size: 13px;
  font-stretch: 118%;
  font-weight: 700;
  height: 54px;
  isolation: isolate;
  justify-content: center;
  letter-spacing: 0.22em;
  overflow: hidden;
  padding: 0 30px;
  position: relative;
  text-transform: uppercase;
  transition: transform 0.3s var(--ease-out), filter 0.3s;
  white-space: nowrap;
}

.button > span {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.button::after {
  background: linear-gradient(100deg, transparent, rgba(255, 252, 235, 0.75), transparent);
  bottom: 0;
  content: "";
  left: -70%;
  position: absolute;
  top: 0;
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease-out);
  width: 45%;
  z-index: 1;
}

.button:hover::after,
.button:focus-visible::after {
  left: 130%;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 10px rgba(240, 208, 133, 0.7));
}

.button-primary {
  background: linear-gradient(180deg, #fff6d0 0%, #f0d085 22%, #cca152 56%, #a57a33 82%, #c99e4e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  color: #1b1307;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.45);
}

.button-primary:hover {
  filter: brightness(1.08) saturate(1.08);
}

.button-ghost {
  background: linear-gradient(180deg, rgba(240, 208, 133, 0.75), rgba(143, 104, 43, 0.55));
  color: var(--brass-100);
}

.button-ghost::before {
  background: linear-gradient(180deg, #16110b, #0b0806);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  content: "";
  inset: 1px;
  position: absolute;
  transition: background 0.3s;
  z-index: 0;
}

.button-ghost::after {
  background: linear-gradient(100deg, transparent, rgba(240, 208, 133, 0.28), transparent);
}

.button-ghost:hover::before {
  background: linear-gradient(180deg, #221a10, #110d08);
}

.button-small {
  --cut: 8px;
  font-size: 11px;
  height: 38px;
  letter-spacing: 0.18em;
  padding: 0 16px;
}

.button-icon {
  fill: currentColor;
  height: 11px;
  width: 11px;
}

.button[disabled] {
  cursor: progress;
  filter: saturate(0.6) brightness(0.8);
}

.text-link {
  align-items: center;
  color: var(--brass-100);
  display: inline-flex;
  font-family: var(--display);
  font-size: 12px;
  font-stretch: 115%;
  font-weight: 600;
  gap: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.3s, gap 0.3s var(--ease-out);
}

.text-link:hover {
  color: var(--brass-50);
  gap: 12px;
}

/* ---------------------------------------------------------------- level select */

.level-select {
  display: flex;
  flex-direction: column;
  gap: 24px;
  opacity: 0;
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.6s;
  z-index: 30;
}

.level-select::before {
  background: linear-gradient(180deg, transparent, var(--rule-strong) 12%, var(--rule-strong) 88%, transparent);
  bottom: -8px;
  content: "";
  left: 50%;
  position: absolute;
  top: -8px;
  width: 1px;
}

.level-select a {
  display: grid;
  height: 14px;
  place-items: center;
  position: relative;
  width: 14px;
}

.level-select a::before {
  background: var(--void);
  border: 1px solid var(--brass-300);
  content: "";
  height: 8px;
  transform: rotate(45deg);
  transition: all 0.4s var(--ease-out);
  width: 8px;
}

.level-select a.is-active::before {
  background: var(--brass-100);
  border-color: var(--brass-50);
  box-shadow: 0 0 14px rgba(240, 208, 133, 0.85);
  height: 11px;
  width: 11px;
}

.level-select span {
  color: var(--brass-100);
  font-family: var(--display);
  font-size: 11px;
  font-stretch: 118%;
  font-weight: 600;
  letter-spacing: 0.26em;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 28px;
  text-transform: uppercase;
  top: 50%;
  transform: translate(8px, -50%);
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
  white-space: nowrap;
}

.level-select a:hover span,
.level-select a:focus-visible span {
  opacity: 1;
  transform: translate(0, -50%);
}

body.is-live .level-select {
  opacity: 1;
}

/* ---------------------------------------------------------------- hero */

.hero {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  overflow: clip;
  padding: calc(var(--header-h) + 18px) var(--gutter) 92px;
  position: relative;
}

.hero-backdrop {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}

.hero-backdrop::after {
  background: radial-gradient(60% 40% at 50% 92%, rgba(255, 122, 31, 0.15), transparent 70%);
  content: "";
  inset: 0;
  position: absolute;
}

.embers {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.jackal-canvas {
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 1;
}

/* a lost WebGL context can paint as an opaque placeholder; get it out of the way */
body.no-gl .jackal-canvas {
  display: none;
}

.hero-stage {
  aspect-ratio: 1;
  flex: none;
  position: relative;
  width: min(54vh, 560px, 82vw);
  width: min(54svh, 560px, 82vw);
}

.stage-glow {
  animation: breathe 7s ease-in-out infinite;
  background: radial-gradient(closest-side, rgba(214, 166, 74, 0.26), rgba(204, 161, 82, 0.08) 55%, transparent);
  inset: -48%;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.sun-disk {
  height: 168%;
  left: -34%;
  opacity: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  top: -34%;
  transition: opacity 2.4s ease 0.4s;
  width: 168%;
  z-index: 0;
}

body:not(.is-booting) .sun-disk {
  opacity: 1;
}

.sun-spin,
.sun-counter,
.seal-ring {
  transform-box: view-box;
  transform-origin: center;
}

.sun-spin {
  animation: spin 160s linear infinite;
}

.sun-counter {
  animation: spin 220s linear infinite reverse;
}

.sun-line {
  fill: none;
  stroke: rgba(204, 161, 82, 0.2);
  stroke-width: 1;
}

.sun-line.faint {
  stroke: rgba(204, 161, 82, 0.1);
}

.sun-ticks {
  fill: none;
  stroke: rgba(204, 161, 82, 0.3);
  stroke-dasharray: 1.2 11.785;
  stroke-width: 9;
}

.sun-ticks-major {
  fill: none;
  stroke: rgba(240, 208, 133, 0.42);
  stroke-dasharray: 2.4 189.23;
  stroke-width: 22;
}

.sun-dash {
  fill: none;
  stroke: rgba(204, 161, 82, 0.2);
  stroke-dasharray: 36 14 4 14;
  stroke-width: 2;
}

.sun-text {
  fill: rgba(204, 161, 82, 0.42);
  font-family: var(--display);
  font-size: 14px;
  font-stretch: 125%;
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.hero-jackal {
  height: 100%;
  position: relative;
  width: 100%;
  z-index: 1;
}

.hero-stage::after {
  animation: sheen 7s ease-in-out 2.2s infinite;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 246, 214, 0.75) 50%, transparent 62%) -160% 0 / 260% 100% no-repeat;
  content: "";
  display: none;
  inset: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  position: absolute;
  z-index: 1;
  -webkit-mask: url("assets/jackal.webp") center / 100% 100% no-repeat;
  mask: url("assets/jackal.webp") center / 100% 100% no-repeat;
}

body.no-gl .hero-stage::after,
.no-js .hero-stage::after {
  display: block;
}

.stage-shock {
  aspect-ratio: 1;
  border: 2px solid rgba(252, 247, 207, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 34px rgba(255, 196, 110, 0.55), inset 0 0 34px rgba(255, 196, 110, 0.45);
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  width: 62%;
  z-index: 0;
}

.stage-shock.is-firing {
  animation: shock 1.2s var(--ease-out);
}

.hero-stage.is-booped .hero-jackal {
  animation: boop-squish 0.6s var(--ease-out);
}

.nose-button {
  border-radius: 50%;
  height: 9%;
  left: 50.1%;
  position: absolute;
  top: 79.8%;
  transform: translate(-50%, -50%);
  width: 11%;
  z-index: 3;
}

.nose-button:focus-visible {
  outline: 2px dashed var(--brass-100);
  outline-offset: 2px;
}

.boop-pop {
  color: var(--brass-50);
  font-family: var(--display);
  font-size: 22px;
  font-stretch: 110%;
  font-weight: 800;
  left: 50%;
  letter-spacing: 0.08em;
  pointer-events: none;
  position: absolute;
  text-shadow: 0 0 18px rgba(255, 180, 84, 0.9), 0 2px 0 #3a2810;
  top: 72%;
  transform: translate(-50%, 0);
  white-space: nowrap;
  z-index: 4;
  animation: boop-pop 1s var(--ease-out) forwards;
}

.hud {
  color: var(--bone-faint);
  display: flex;
  font-family: var(--display);
  font-size: 11px;
  font-stretch: 118%;
  font-weight: 600;
  justify-content: space-between;
  left: var(--gutter);
  letter-spacing: 0.26em;
  pointer-events: none;
  position: absolute;
  right: var(--gutter);
  text-transform: uppercase;
  z-index: 2;
}

.hud-top {
  top: calc(var(--header-h) + 12px);
}

.hud-bottom {
  align-items: flex-end;
  bottom: 28px;
}

.hud-item {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.hud-item b {
  color: var(--brass-200);
  font-weight: 600;
}

.hud-dot {
  animation: pulse 1.8s ease-in-out infinite;
  background: var(--ember-soft);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--ember);
  height: 6px;
  width: 6px;
}

.input-buffer {
  display: inline-flex;
  gap: 5px;
  letter-spacing: 0;
}

.input-buffer i {
  color: rgba(179, 167, 143, 0.35);
  font-style: normal;
  min-width: 11px;
  text-align: center;
  transition: color 0.2s, text-shadow 0.2s;
}

.input-buffer i.is-set {
  color: var(--brass-100);
  text-shadow: 0 0 10px rgba(240, 208, 133, 0.6);
}

.input-buffer.is-accepted i {
  animation: accepted 0.5s steps(2) 4;
  color: var(--ember-soft);
}

.hud-scroll i {
  background: linear-gradient(180deg, var(--brass-200), transparent);
  display: block;
  height: 36px;
  overflow: hidden;
  position: relative;
  width: 1px;
}

.hud-scroll i::after {
  animation: scroll-cue 2s var(--ease-in-out) infinite;
  background: var(--brass-50);
  content: "";
  height: 12px;
  left: 0;
  position: absolute;
  top: -12px;
  width: 1px;
}

.hero-copy {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin-top: clamp(0px, 0.6vh, 8px);
  position: relative;
  text-align: center;
  z-index: 2;
}

.wordmark {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.1vh, 12px);
  margin: 0;
  position: relative;
  width: min(600px, 86vw);
}

.wordmark-title {
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6));
  height: auto;
  width: 100%;
}

.wordmark-games {
  height: auto;
  width: 91%;
}

.wordmark::after {
  animation: sheen 8s ease-in-out 3.4s infinite;
  aspect-ratio: 1050 / 138;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 250, 225, 0.95) 50%, transparent 60%) -160% 0 / 260% 100% no-repeat;
  content: "";
  left: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  -webkit-mask: url("assets/wordmark-title.webp") center / 100% 100% no-repeat;
  mask: url("assets/wordmark-title.webp") center / 100% 100% no-repeat;
}

.tagline {
  color: var(--bone-dim);
  font-family: var(--display);
  font-size: clamp(12px, 1.3vw, 15px);
  font-stretch: 125%;
  font-weight: 600;
  letter-spacing: 0.44em;
  margin: clamp(16px, 2.6vh, 28px) 0 0;
  padding-left: 0.44em;
  text-transform: uppercase;
}

.tagline span {
  color: var(--brass-100);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: clamp(18px, 3.2vh, 32px);
}

/* hero intro choreography */

.js:not(.boot-failsafe) body.is-booting .wordmark,
.js:not(.boot-failsafe) body.is-booting .tagline,
.js:not(.boot-failsafe) body.is-booting .hero-actions,
.js:not(.boot-failsafe) body.is-booting .site-header,
.js:not(.boot-failsafe) body.is-intro .wordmark,
.js:not(.boot-failsafe) body.is-intro .tagline,
.js:not(.boot-failsafe) body.is-intro .hero-actions,
.js:not(.boot-failsafe) body.is-intro .site-header {
  opacity: 0;
}

/* while the forge heats up, a faint mould of the jackal waits for the brass */
.js:not(.boot-failsafe) body.is-booting .hero-jackal {
  animation: mould 1.8s ease-in-out infinite;
  filter: brightness(0.55) sepia(0.5);
  opacity: 0.1;
}

.js body.has-gl .hero-jackal {
  filter: brightness(0.55) sepia(0.5);
  opacity: 0;
  transition: opacity 1.6s ease 0.2s;
}

body.no-gl .hero-jackal {
  animation: jackal-in 1.4s var(--ease-out) both;
}

body.is-live .wordmark {
  animation: reveal-wide 1.2s var(--ease-out) both;
}

body.is-live .tagline {
  animation: rise-in 0.9s var(--ease-out) 0.45s both;
}

body.is-live .hero-actions {
  animation: rise-in 0.9s var(--ease-out) 0.6s both;
}

body.is-live .hud {
  animation: flicker-in 0.9s steps(8) 0.85s both;
}

body.is-live .site-header {
  animation: drop-in 0.9s var(--ease-out) 0.3s both;
}

.boot-failsafe body.is-live .wordmark,
.boot-failsafe body.is-live .tagline,
.boot-failsafe body.is-live .hero-actions,
.boot-failsafe body.is-live .site-header {
  animation: none;
}

/* ---------------------------------------------------------------- sections */

.section {
  padding: clamp(96px, 16vh, 190px) var(--gutter);
  position: relative;
  z-index: 2;
}

.section-inner {
  margin: 0 auto;
  max-width: var(--max);
  position: relative;
}

.section-index {
  align-items: center;
  color: var(--brass-200);
  display: flex;
  font-family: var(--display);
  font-size: 12px;
  font-stretch: 125%;
  font-weight: 600;
  gap: 14px;
  letter-spacing: 0.34em;
  line-height: 1;
  margin: 0 0 30px;
  text-transform: uppercase;
}

.section-index span {
  color: var(--bone-faint);
}

.section-index::before {
  background: var(--brass-200);
  box-shadow: 0 0 12px rgba(240, 208, 133, 0.6);
  content: "";
  flex: none;
  height: 7px;
  transform: rotate(45deg);
  width: 7px;
}

.section-index::after {
  background: linear-gradient(90deg, var(--rule-strong), transparent);
  content: "";
  flex: 0 0 72px;
  height: 1px;
}

.section-title {
  color: var(--bone);
  font-family: var(--display);
  font-size: clamp(46px, 7.2vw, 112px);
  font-stretch: 87.5%;
  font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 0.9;
  margin: 0;
  text-transform: uppercase;
}

.section-title span {
  background: var(--brass-fill);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  filter: drop-shadow(0 4px 22px rgba(204, 161, 82, 0.18));
}

.section-lede {
  color: var(--bone-dim);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.6;
  margin: 28px 0 0;
  max-width: 540px;
}

.js-ready [data-reveal] {
  opacity: 0;
  transition: opacity 0.9s var(--ease-out), translate 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 110ms);
  translate: 0 36px;
}

.js-ready [data-reveal].is-in {
  opacity: 1;
  translate: 0 0;
}

/* chamfered frame used by the stat card, rune cards, dossier and dialog */

.stat-card,
.rune-card,
.dossier-card,
.trophy-panel {
  --cut: 22px;
  background: var(--border-fill);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  padding: 1px;
}

.stat-card-inner,
.rune-card-inner,
.dossier-card-inner,
.trophy-inner {
  background: var(--panel-fill);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  height: 100%;
  position: relative;
}

/* ---------------------------------------------------------------- 01 pack */

.pack-grid {
  align-items: center;
  display: grid;
  gap: clamp(48px, 7vw, 120px);
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 420px);
}

.manifesto {
  font-family: var(--display);
  font-size: clamp(30px, 3.8vw, 58px);
  font-stretch: 90%;
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  text-transform: uppercase;
}

.manifesto em {
  font-style: normal;
}

.js-ready .manifesto .word {
  color: rgba(239, 230, 210, 0.12);
  transition: color 0.5s var(--ease-out), text-shadow 0.6s var(--ease-out);
}

.js-ready .manifesto .word.is-lit {
  color: var(--bone);
}

.manifesto em,
.js-ready .manifesto em .word.is-lit {
  color: var(--brass-100);
  text-shadow: 0 0 28px rgba(240, 208, 133, 0.35);
}

.stat-card-inner {
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(204, 161, 82, 0.13), transparent 60%),
    var(--panel-fill);
  padding: 28px 28px 30px;
}

.stat-card-head {
  color: var(--bone-faint);
  display: flex;
  font-family: var(--display);
  font-size: 11px;
  font-stretch: 120%;
  font-weight: 600;
  justify-content: space-between;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.stat-level b {
  color: var(--brass-100);
  font-size: 13px;
}

.stat-name {
  background: var(--brass-fill);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--display);
  font-size: 36px;
  font-stretch: 88%;
  font-weight: 800;
  line-height: 1;
  margin: 14px 0 18px;
  text-transform: uppercase;
}

.stat-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
}

.stat-meta div {
  align-items: baseline;
  border-bottom: 1px dashed var(--rule);
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
}

.stat-meta dt,
.stat-bars span,
.stat-xp-label {
  color: var(--bone-faint);
  font-family: var(--display);
  font-size: 11px;
  font-stretch: 118%;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.stat-meta dd {
  color: var(--bone);
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}

.stat-bars {
  display: grid;
  gap: 13px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stat-bars li {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 76px 1fr 22px;
}

.stat-bars b {
  color: var(--brass-100);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.stat-bar {
  background: repeating-linear-gradient(90deg, rgba(204, 161, 82, 0.13) 0 calc(10% - 3px), transparent calc(10% - 3px) 10%);
  display: block;
  height: 10px;
  position: relative;
}

.stat-bar::after {
  background: repeating-linear-gradient(90deg, var(--brass-100) 0 calc(10% - 3px), transparent calc(10% - 3px) 10%);
  clip-path: inset(0 100% 0 0);
  content: "";
  filter: drop-shadow(0 0 6px rgba(240, 208, 133, 0.6));
  inset: 0;
  position: absolute;
  transition: clip-path 1.4s var(--ease-out) 0.3s;
}

.stat-bars li:nth-child(2) .stat-bar::after {
  transition-delay: 0.42s;
}

.stat-bars li:nth-child(3) .stat-bar::after {
  transition-delay: 0.54s;
}

.stat-card.is-in .stat-bar::after,
.no-js .stat-bar::after {
  clip-path: inset(0 calc(100% - var(--v) * 10%) 0 0);
}

.stat-xp {
  margin-top: 26px;
}

.stat-xp-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.xp-bar {
  background: rgba(204, 161, 82, 0.12);
  display: block;
  height: 4px;
  overflow: hidden;
  position: relative;
}

.xp-bar::before {
  background: linear-gradient(90deg, var(--brass-400), var(--brass-100));
  content: "";
  inset: 0 64% 0 0;
  position: absolute;
}

.xp-bar::after {
  animation: xp-shimmer 2.6s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(255, 250, 225, 0.9), transparent);
  content: "";
  inset: 0 64% 0 0;
  position: absolute;
}

/* ---------------------------------------------------------------- 02 code */

.section-head {
  max-width: 900px;
}

.rune-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(52px, 8vh, 88px);
}

.rune-card {
  --cut: 26px;
  --mx: 50%;
  --my: 0%;
  --rx: 0deg;
  --ry: 0deg;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: opacity 0.9s var(--ease-out), translate 1.1s var(--ease-out), transform 0.6s var(--ease-out), background 0.4s;
  transition-delay: calc(var(--i, 0) * 110ms), calc(var(--i, 0) * 110ms), 0s, 0s;
}

.rune-card:hover {
  background: linear-gradient(170deg, rgba(252, 247, 207, 0.9), rgba(204, 161, 82, 0.45) 45%, rgba(143, 104, 43, 0.35));
}

.rune-card-inner {
  background:
    radial-gradient(380px circle at var(--mx) var(--my), rgba(240, 208, 133, 0.13), transparent 60%),
    var(--panel-fill);
  display: flex;
  flex-direction: column;
  min-height: 380px;
  overflow: hidden;
  padding: 34px 30px 38px;
}

.rune-card-inner::after {
  background: linear-gradient(105deg, transparent 40%, rgba(255, 246, 214, 0.1) 50%, transparent 60%) 200% 0 / 250% 100% no-repeat;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transition: background-position 1s var(--ease-out);
}

.rune-card:hover .rune-card-inner::after {
  background-position: -60% 0;
}

.rune-numeral {
  -webkit-text-stroke: 1px rgba(204, 161, 82, 0.4);
  color: transparent;
  font-family: var(--display);
  font-size: 68px;
  font-stretch: 80%;
  font-weight: 800;
  line-height: 1;
  position: absolute;
  right: 24px;
  top: 18px;
  transition: color 0.4s, -webkit-text-stroke-color 0.4s;
}

.rune-card:hover .rune-numeral {
  color: rgba(204, 161, 82, 0.08);
}

.rune-icon {
  display: grid;
  flex: none;
  height: 76px;
  margin-bottom: 40px;
  place-items: center;
  position: relative;
  width: 76px;
}

.rune-icon::before {
  border: 1px solid var(--rule-strong);
  content: "";
  inset: 13px;
  position: absolute;
  transform: rotate(45deg);
  transition: transform 0.8s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
}

.rune-card:hover .rune-icon::before {
  border-color: var(--brass-100);
  box-shadow: 0 0 22px rgba(240, 208, 133, 0.3), inset 0 0 14px rgba(240, 208, 133, 0.2);
  transform: rotate(225deg);
}

.rune-icon svg {
  fill: none;
  filter: drop-shadow(0 0 8px rgba(240, 208, 133, 0.35));
  height: 38px;
  position: relative;
  stroke: var(--brass-100);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  width: 38px;
}

.rune-icon circle {
  fill: var(--brass-100);
  stroke: none;
}

.rune-card h3 {
  align-items: flex-end;
  color: var(--brass-100);
  display: flex;
  font-family: var(--display);
  font-size: 26px;
  font-stretch: 88%;
  font-weight: 800;
  line-height: 1;
  margin: auto 0 14px;
  min-height: 2em;
  text-transform: uppercase;
}

.rune-card p {
  color: var(--bone-dim);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  min-height: 6.4em;
}

/* ---------------------------------------------------------------- 03 forge */

.forge {
  overflow: hidden;
  overflow: clip;
}

.forge-grid {
  align-items: center;
  display: grid;
  gap: clamp(40px, 6vw, 110px);
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.1fr);
}

.forge-seal {
  aspect-ratio: 1;
  margin: 0 auto;
  max-width: 540px;
  position: relative;
  width: 100%;
}

.forge-seal svg {
  height: 100%;
  overflow: visible;
  width: 100%;
}

.forge-seal::before {
  background: radial-gradient(closest-side, rgba(204, 161, 82, 0.14), transparent);
  content: "";
  inset: -12%;
  position: absolute;
}

.seal-outer {
  transform: rotate(var(--seal-a, 0deg));
}

.seal-glyphs {
  transform: rotate(var(--seal-b, 0deg));
}

.seal-inner {
  transform: rotate(var(--seal-c, 0deg));
}

.forge-seal.is-cracking .seal-outer {
  transition: transform 1.1s var(--ease-in-out);
  transform: rotate(calc(var(--seal-a, 0deg) + 360deg));
}

.forge-seal.is-cracking .seal-glyphs {
  transition: transform 1.1s var(--ease-in-out);
  transform: rotate(calc(var(--seal-b, 0deg) - 270deg));
}

.seal-line {
  fill: none;
  stroke: rgba(204, 161, 82, 0.42);
  stroke-width: 1.2;
}

.seal-line.faint {
  stroke: rgba(204, 161, 82, 0.18);
}

.seal-ticks {
  fill: none;
  stroke: rgba(240, 208, 133, 0.42);
  stroke-dasharray: 1.2 10.424;
  stroke-width: 10;
}

.seal-ticks-major {
  fill: none;
  stroke: rgba(240, 208, 133, 0.72);
  stroke-dasharray: 2.4 109.65;
  stroke-width: 18;
}

.seal-text {
  fill: rgba(240, 208, 133, 0.55);
  font-family: var(--display);
  font-size: 12.5px;
  font-stretch: 125%;
  font-weight: 600;
  letter-spacing: 3.2px;
  text-transform: uppercase;
}

.seal-notch {
  fill: var(--brass-100);
  filter: drop-shadow(0 0 6px rgba(240, 208, 133, 0.8));
}

.seal-glyph {
  fill: none;
  stroke: var(--brass-200);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: stroke 0.4s, filter 0.4s;
}

.seal-glyph.is-lit {
  filter: drop-shadow(0 0 6px rgba(255, 180, 84, 0.9));
  stroke: var(--brass-50);
}

.seal-core-glow {
  animation: breathe 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.seal-keyhole {
  fill: rgba(240, 208, 133, 0.1);
  filter: drop-shadow(0 0 10px rgba(255, 180, 84, 0.55));
  stroke: var(--brass-100);
  stroke-width: 1.5;
  transition: fill 0.4s;
}

.forge-seal.is-denied .seal-keyhole {
  animation: denied-flash 0.9s steps(2) 1;
}

.dossier .section-head {
  margin-bottom: 36px;
}

.dossier-card {
  --cut: 26px;
}

.dossier-card-inner {
  background:
    repeating-linear-gradient(0deg, rgba(255, 246, 214, 0.014) 0 1px, transparent 1px 3px),
    radial-gradient(90% 60% at 100% 0%, rgba(204, 161, 82, 0.1), transparent 60%),
    var(--panel-fill);
  overflow: hidden;
  padding: 34px clamp(24px, 3vw, 40px) 30px;
}

.dossier-card.is-denied {
  animation: denied-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.dossier-stamp {
  border: 2px solid rgba(255, 122, 31, 0.8);
  color: rgba(255, 138, 51, 0.92);
  font-family: var(--display);
  font-size: 15px;
  font-stretch: 118%;
  font-weight: 800;
  letter-spacing: 0.32em;
  padding: 6px 10px 6px 16px;
  position: absolute;
  right: 26px;
  text-transform: uppercase;
  top: 28px;
  transform: rotate(-9deg);
  -webkit-mask: var(--noise) 0 0 / 160px;
  mask: var(--noise) 0 0 / 160px;
}

.dossier-kicker {
  color: var(--bone-faint);
  font-family: var(--display);
  font-size: 12px;
  font-stretch: 120%;
  font-weight: 600;
  letter-spacing: 0.34em;
  margin: 0;
  text-transform: uppercase;
}

.dossier-codename {
  color: var(--bone);
  font-family: var(--display);
  font-size: clamp(24px, 2.5vw, 34px);
  font-stretch: 92%;
  font-weight: 800;
  line-height: 1.1;
  margin: 10px 0 26px;
  text-transform: uppercase;
}

.redacted {
  background: repeating-linear-gradient(135deg, #cca152 0 7px, #b0853c 7px 14px);
  border-radius: 2px;
  box-shadow: 0 0 18px rgba(204, 161, 82, 0.25);
  color: transparent;
  display: inline-block;
  letter-spacing: 0.04em;
  line-height: 1;
  min-width: 8ch;
  padding: 0.1em 0.18em;
}

.redacted.is-scrambling,
.redacted.is-denied {
  background: none;
  box-shadow: none;
  color: var(--brass-200);
}

.redacted.is-denied {
  color: var(--ember);
  text-shadow: 0 0 16px rgba(255, 122, 31, 0.6);
}

.dossier-specs {
  display: grid;
  gap: 0 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.dossier-specs div {
  align-items: center;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 13px 0;
}

.dossier-specs dt {
  color: var(--bone-faint);
  font-family: var(--display);
  font-size: 11px;
  font-stretch: 118%;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.dossier-specs dd {
  align-items: center;
  color: var(--brass-100);
  display: inline-flex;
  font-family: var(--display);
  font-size: 13px;
  font-stretch: 110%;
  font-weight: 600;
  gap: 8px;
  letter-spacing: 0.12em;
  margin: 0;
  text-align: right;
  text-transform: uppercase;
}

.status-dot {
  animation: pulse 1.6s ease-in-out infinite;
  background: var(--ember);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--ember);
  display: inline-block;
  flex: none;
  height: 7px;
  width: 7px;
}

.dossier-note {
  color: var(--bone-dim);
  margin: 22px 0 26px;
  max-width: 520px;
}

.dossier-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
}

.dossier-output {
  color: var(--ember-soft);
  font-family: var(--display);
  font-size: 12px;
  font-stretch: 115%;
  font-weight: 600;
  letter-spacing: 0.2em;
  margin: 18px 0 0;
  min-height: 1.6em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- 04 join */

.join {
  padding-bottom: clamp(130px, 22vh, 240px);
  text-align: center;
}

/* the forge glow spills under the footer so the page ends on embers, not an edge */
.join-fire {
  background:
    radial-gradient(55% 48% at 50% 80%, rgba(255, 122, 31, 0.22), rgba(204, 161, 82, 0.07) 50%, transparent 76%);
  bottom: -220px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}

.join-inner {
  align-items: center;
  display: flex;
  flex-direction: column;
  max-width: 860px;
}

.join .section-index::after {
  display: none;
}

.join-title {
  font-size: clamp(54px, 9.4vw, 148px);
}

.join .section-lede {
  margin-left: auto;
  margin-right: auto;
}

.join-form {
  --cut: 16px;
  background: linear-gradient(90deg, rgba(240, 208, 133, 0.7), rgba(143, 104, 43, 0.45));
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  margin-top: 46px;
  padding: 1px;
  transition: background 0.3s, filter 0.3s;
  width: min(640px, 100%);
}

.join-form:focus-within {
  background: linear-gradient(90deg, var(--brass-50), var(--brass-200));
  filter: drop-shadow(0 0 22px rgba(240, 208, 133, 0.22));
}

.join-frame {
  align-items: stretch;
  background: rgba(10, 8, 6, 0.94);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  display: flex;
  padding: 6px;
}

.join-field {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px 0 20px;
  text-align: left;
}

.join-label {
  color: var(--bone-faint);
  font-family: var(--display);
  font-size: 10px;
  font-stretch: 120%;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.join-field input {
  background: transparent;
  border: 0;
  color: var(--bone);
  font-family: var(--display);
  font-size: 18px;
  font-stretch: 105%;
  font-weight: 500;
  letter-spacing: 0.04em;
  min-width: 0;
  outline: none;
  padding: 2px 0 0;
  width: 100%;
}

.join-field input::placeholder {
  color: rgba(179, 167, 143, 0.4);
}

.join-form .button {
  --cut: 11px;
  height: 58px;
}

.join-form.is-sent {
  display: none;
}

.join-status {
  color: var(--bone-dim);
  font-family: var(--display);
  font-size: 13px;
  font-stretch: 112%;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin: 20px 0 0;
  min-height: 1.6em;
  text-transform: uppercase;
}

.join-status.is-success {
  background: var(--brass-fill);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(16px, 2vw, 22px);
  margin-top: 46px;
}

.join-status.is-error {
  color: var(--ember-soft);
}

.join-alt {
  color: var(--bone-faint);
  font-size: 15px;
  margin: 34px 0 0;
}

.join-alt .text-link {
  margin-left: 8px;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  overflow: hidden;
  padding: clamp(56px, 9vh, 96px) var(--gutter) 34px;
  position: relative;
  z-index: 2;
}

.site-footer::before {
  background: linear-gradient(90deg, transparent, var(--rule-strong), transparent);
  content: "";
  height: 1px;
  left: 12%;
  position: absolute;
  right: 12%;
  top: 0;
}

.footer-wordmark {
  height: auto;
  margin: 0 auto;
  max-width: 1180px;
  opacity: 0.14;
  width: 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 25%, transparent 105%);
  mask-image: linear-gradient(180deg, #000 25%, transparent 105%);
}

.footer-row {
  align-items: center;
  color: var(--bone-faint);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--display);
  font-size: 11px;
  font-stretch: 115%;
  font-weight: 600;
  gap: 18px 32px;
  justify-content: space-between;
  letter-spacing: 0.2em;
  margin: 40px auto 0;
  max-width: var(--max);
  text-transform: uppercase;
}

.footer-row p {
  margin: 0;
}

.footer-row .text-link {
  font-size: 11px;
}

.footer-trophies {
  color: var(--bone-dim);
  letter-spacing: inherit;
  text-transform: uppercase;
  transition: color 0.3s;
}

.footer-trophies:hover {
  color: var(--brass-100);
}

.footer-trophies span {
  color: var(--brass-100);
  margin-left: 6px;
}

.konami-hint {
  letter-spacing: 0.34em;
  opacity: 0.45;
}

.thanks {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px var(--gutter);
  position: relative;
  text-align: center;
  z-index: 2;
}

.thanks-mark {
  filter: drop-shadow(0 0 40px rgba(204, 161, 82, 0.3));
  height: auto;
  margin-bottom: 28px;
  width: min(220px, 50vw);
}

.thanks .section-index {
  justify-content: center;
}

.thanks .section-index::after {
  display: none;
}

.thanks .section-lede {
  margin: 24px auto 36px;
}

/* ---------------------------------------------------------------- trophy room */

.trophy-room {
  background: transparent;
  border: 0;
  color: var(--bone);
  max-height: min(92vh, 900px);
  max-width: min(780px, calc(100vw - 24px));
  overflow: visible;
  padding: 0;
  width: 100%;
}

.trophy-room::backdrop {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: rgba(4, 3, 2, 0.8);
}

.trophy-room[open] {
  animation: dialog-in 0.5s var(--ease-out);
}

.trophy-panel {
  --cut: 28px;
  max-height: min(92vh, 900px);
}

.trophy-inner {
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(204, 161, 82, 0.12), transparent 70%),
    var(--panel-fill);
  max-height: calc(min(92vh, 900px) - 2px);
  overflow-y: auto;
  padding: clamp(24px, 4vw, 40px);
}

.trophy-head {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding-right: 44px;
}

.trophy-head .section-index {
  margin-bottom: 14px;
}

.trophy-head .section-index span {
  color: var(--brass-200);
}

.trophy-head h2 {
  background: var(--brass-fill);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 56px);
  font-stretch: 88%;
  font-weight: 800;
  line-height: 0.9;
  margin: 0;
  text-transform: uppercase;
}

.trophy-progress {
  color: var(--bone-faint);
  font-family: var(--display);
  font-size: 12px;
  font-stretch: 118%;
  font-weight: 600;
  letter-spacing: 0.24em;
  margin: 0;
  text-transform: uppercase;
}

.trophy-progress b {
  color: var(--brass-100);
  font-size: 18px;
  margin-right: 6px;
}

.trophy-close {
  color: var(--bone-dim);
  height: 40px;
  position: absolute;
  right: clamp(16px, 3vw, 28px);
  top: clamp(16px, 3vw, 28px);
  transition: color 0.3s, transform 0.4s var(--ease-out);
  width: 40px;
}

.trophy-close:hover {
  color: var(--brass-100);
  transform: rotate(90deg);
}

.trophy-close svg {
  fill: none;
  height: 22px;
  margin: auto;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
  width: 22px;
}

.trophy-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 28px 0;
  padding: 0;
}

.trophy {
  align-items: center;
  background: rgba(255, 246, 214, 0.015);
  box-shadow: inset 0 0 0 1px var(--rule);
  display: grid;
  gap: 16px;
  grid-template-columns: 46px minmax(0, 1fr);
  padding: 14px 16px;
}

.trophy.is-unlocked {
  background: linear-gradient(90deg, rgba(204, 161, 82, 0.12), rgba(204, 161, 82, 0.02));
  box-shadow: inset 0 0 0 1px var(--rule-strong);
}

.trophy-badge {
  display: grid;
  height: 46px;
  place-items: center;
  position: relative;
  width: 46px;
}

.trophy-badge::before {
  background: rgba(204, 161, 82, 0.06);
  border: 1px solid var(--rule-strong);
  content: "";
  inset: 8px;
  position: absolute;
  transform: rotate(45deg);
}

.trophy.is-unlocked .trophy-badge::before {
  background: radial-gradient(circle at 35% 30%, #fff6d0, #f0d085 35%, #b0853c 75%, #6c4c1c);
  border-color: var(--brass-50);
  box-shadow: 0 0 16px rgba(240, 208, 133, 0.45);
}

.trophy-badge svg {
  fill: none;
  height: 16px;
  position: relative;
  stroke: var(--bone-faint);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 16px;
}

.trophy.is-unlocked .trophy-badge svg {
  stroke: #2a1c08;
}

.trophy-name {
  color: var(--brass-100);
  display: block;
  font-family: var(--display);
  font-size: 14px;
  font-stretch: 108%;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.trophy:not(.is-unlocked) .trophy-name {
  color: var(--bone-faint);
}

.trophy-desc {
  color: var(--bone-dim);
  display: block;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 3px;
}

.trophy:not(.is-unlocked) .trophy-desc {
  color: var(--bone-faint);
  font-style: italic;
}

.code-pad {
  align-items: center;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  justify-content: space-between;
  padding-top: 24px;
}

.code-pad p {
  color: var(--bone-dim);
  font-size: 15px;
  margin: 0;
  max-width: 320px;
}

.code-pad-controls {
  align-items: center;
  display: flex;
  gap: 30px;
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  grid-template-rows: repeat(3, 42px);
}

.dpad button {
  background: linear-gradient(180deg, #2a2014, #140f09);
  box-shadow: inset 0 0 0 1px var(--rule-strong), inset 0 1px 0 rgba(255, 240, 200, 0.12);
  color: var(--brass-200);
  font-size: 11px;
  transition: background 0.1s, color 0.1s;
}

.dpad [data-pad="up"] {
  border-radius: 6px 6px 0 0;
  grid-area: 1 / 2;
}

.dpad [data-pad="left"] {
  border-radius: 6px 0 0 6px;
  grid-area: 2 / 1;
}

.dpad [data-pad="right"] {
  border-radius: 0 6px 6px 0;
  grid-area: 2 / 3;
}

.dpad [data-pad="down"] {
  border-radius: 0 0 6px 6px;
  grid-area: 3 / 2;
}

.dpad button:active,
.dpad button.is-pressed {
  background: var(--brass-200);
  color: #1b1307;
}

.face-buttons {
  display: flex;
  gap: 14px;
}

.face-buttons button {
  background: radial-gradient(circle at 35% 30%, #fbe7a6, #cca152 50%, #6c4c1c);
  border-radius: 50%;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.5);
  color: #1b1307;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  height: 54px;
  transition: transform 0.1s, box-shadow 0.1s;
  width: 54px;
}

.face-buttons button:nth-child(2) {
  transform: translateY(-14px);
}

.face-buttons button:active,
.face-buttons button.is-pressed {
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35), 0 0 22px rgba(255, 180, 84, 0.7);
  filter: brightness(1.15);
}

/* ---------------------------------------------------------------- toasts */

.toasts {
  align-items: flex-end;
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 24px);
  pointer-events: none;
  position: fixed;
  right: var(--gutter);
  width: max-content;
  z-index: 70;
}

.toast {
  align-items: center;
  animation: toast-in 0.9s var(--ease-out) both;
  background: linear-gradient(180deg, rgba(30, 23, 13, 0.97), rgba(11, 8, 5, 0.97));
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), inset 0 0 0 1px var(--rule-strong), inset 0 1px 0 rgba(255, 240, 200, 0.1);
  display: flex;
  gap: 14px;
  min-width: min(320px, calc(100vw - 24px));
  padding: 7px 26px 7px 7px;
}

.toast.is-leaving {
  animation: toast-out 0.55s var(--ease-in-out) both;
}

.toast-badge {
  background: radial-gradient(circle at 35% 30%, #fff6d0, #f0d085 32%, #b0853c 72%, #6c4c1c);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(240, 208, 133, 0.55), inset 0 -3px 6px rgba(0, 0, 0, 0.3);
  display: grid;
  flex: none;
  height: 46px;
  place-items: center;
  width: 46px;
}

.toast-badge svg {
  fill: none;
  height: 22px;
  stroke: #2a1c08;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 22px;
}

.toast-kicker {
  color: var(--bone-faint);
  display: block;
  font-family: var(--display);
  font-size: 10px;
  font-stretch: 120%;
  font-weight: 600;
  letter-spacing: 0.3em;
  line-height: 1.4;
  text-transform: uppercase;
}

.toast-title {
  color: var(--brass-100);
  display: block;
  font-family: var(--display);
  font-size: 16px;
  font-stretch: 105%;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.toast.is-platinum .toast-title {
  background: var(--brass-fill);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------- gold rush */

.shake-root.is-shaking {
  animation: shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

body.is-gold-rush .vignette {
  animation: rush-glow 2.8s ease-out;
}

/* ---------------------------------------------------------------- keyframes */

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-2%, -4%); }
  80% { transform: translate(4%, 2%); }
  100% { transform: translate(0, 0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes eq {
  from { height: 3px; }
  to { height: 12px; }
}

@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.14); }
  100% { transform: scale(1); }
}

@keyframes sheen {
  0%, 62% { background-position: -160% 0; }
  88%, 100% { background-position: 260% 0; }
}

@keyframes shock {
  0% { border-width: 6px; opacity: 0.9; transform: translate(-50%, -50%) scale(0.35); }
  100% { border-width: 1px; opacity: 0; transform: translate(-50%, -50%) scale(2.6); }
}

@keyframes boop-pop {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.6); }
  25% { opacity: 1; transform: translate(-50%, -18px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -70px) scale(1); }
}

@keyframes boop-squish {
  0% { transform: scale(1); }
  25% { transform: scale(0.95, 0.92); }
  55% { transform: scale(1.03, 1.04); }
  100% { transform: scale(1); }
}

@keyframes accepted {
  50% { color: var(--brass-50); }
}

@keyframes scroll-cue {
  0% { top: -12px; }
  100% { top: 36px; }
}

@keyframes mould {
  0%, 100% { opacity: 0.06; }
  50% { opacity: 0.14; }
}

@keyframes jackal-in {
  0% { filter: brightness(2.4) blur(6px); opacity: 0; transform: scale(0.9); }
  60% { filter: brightness(1.2) blur(0); opacity: 1; }
  100% { filter: none; opacity: 1; transform: scale(1); }
}

@keyframes reveal-wide {
  0% { clip-path: inset(0 50% 0 50%); filter: brightness(2.2); opacity: 1; }
  100% { clip-path: inset(0 0 0 0); filter: brightness(1); opacity: 1; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: none; }
}

@keyframes flicker-in {
  0% { opacity: 0; }
  20% { opacity: 0.8; }
  30% { opacity: 0.1; }
  50% { opacity: 1; }
  60% { opacity: 0.3; }
  100% { opacity: 1; }
}

@keyframes xp-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes denied-shake {
  10%, 90% { translate: -2px 0; }
  20%, 80% { translate: 5px 0; }
  30%, 50%, 70% { translate: -8px 0; }
  40%, 60% { translate: 8px 0; }
}

@keyframes denied-flash {
  50% { fill: rgba(255, 122, 31, 0.6); stroke: var(--ember); }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-in {
  0% { clip-path: inset(0 calc(100% - 60px) 0 0 round 999px); opacity: 0; transform: translateY(30px) scale(0.8); }
  35% { clip-path: inset(0 calc(100% - 60px) 0 0 round 999px); opacity: 1; transform: none; }
  100% { clip-path: inset(0 0 0 0 round 999px); opacity: 1; transform: none; }
}

@keyframes toast-out {
  0% { clip-path: inset(0 0 0 0 round 999px); opacity: 1; }
  60% { clip-path: inset(0 calc(100% - 60px) 0 0 round 999px); opacity: 1; transform: none; }
  100% { clip-path: inset(0 calc(100% - 60px) 0 0 round 999px); opacity: 0; transform: translateY(20px) scale(0.8); }
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 1px, 0); }
  20%, 80% { transform: translate3d(4px, -2px, 0); }
  30%, 50%, 70% { transform: translate3d(-8px, 3px, 0); }
  40%, 60% { transform: translate3d(8px, -3px, 0); }
}

@keyframes rush-glow {
  0% { background-color: rgba(255, 180, 84, 0.22); }
  100% { background-color: transparent; }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .site-nav,
  .level-select {
    display: none;
  }

  .rune-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rune-card-inner {
    min-height: 330px;
  }

  .pack-grid,
  .forge-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    max-width: 460px;
    width: 100%;
  }

  .forge-seal {
    max-width: 380px;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  body {
    font-size: 16px;
  }

  .brand-name {
    font-size: 12px;
    letter-spacing: 0.16em;
  }

  .brand-name span,
  .header-actions .button-small,
  .sfx-toggle > span:last-child {
    display: none;
  }

  .hud-button {
    padding: 0 12px;
  }

  .hero {
    padding-bottom: 84px;
  }

  .hud-top .hud-item:last-child,
  .hud-bottom .hud-scroll {
    display: none;
  }

  .hud-bottom {
    justify-content: center;
  }

  .tagline {
    letter-spacing: 0.3em;
    padding-left: 0.3em;
  }

  .hero-actions {
    flex-direction: column;
    width: min(340px, 100%);
  }

  .hero-actions .button {
    width: 100%;
  }

  .rune-grid {
    grid-template-columns: 1fr;
  }

  .rune-card-inner {
    min-height: 0;
  }

  .rune-card h3,
  .rune-card p {
    min-height: 0;
  }

  .dossier-specs,
  .trophy-list {
    grid-template-columns: 1fr;
  }

  .dossier-stamp {
    font-size: 12px;
    right: 18px;
    top: 20px;
  }

  .join-frame {
    flex-direction: column;
    gap: 6px;
  }

  .join-field {
    padding: 12px 14px 10px;
  }

  .join-form .button {
    width: 100%;
  }

  .footer-row {
    flex-direction: column;
    text-align: center;
  }

  .code-pad {
    justify-content: center;
    text-align: center;
  }

  .toasts {
    align-items: center;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

@media (max-height: 640px) and (min-width: 721px) {
  .hero-stage {
    width: min(46vh, 560px, 82vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  .grain,
  .hero-stage::after,
  .wordmark::after {
    display: none !important;
  }
}
