@font-face {
  font-family: "EvilVampire";
  src: url("../assets/fonts/EvilVampire.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("../assets/fonts/Caveat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("../assets/fonts/Caveat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CenturyBody";
  src: url("../assets/fonts/Century-Normal.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050308;
  --bg-elev: #0e0618;
  --pink: #ff2aa8;
  --pink-soft: #ff6ec7;
  --cyan: #00e5e0;
  --cyan-deep: #00a8b8;
  --bone: #f4efe6;
  --muted: #a89bb8;
  --glow-pink: 0 0 24px rgba(255, 42, 168, 0.55);
  --glow-cyan: 0 0 24px rgba(0, 229, 224, 0.45);
  --frame: rgba(255, 42, 168, 0.85);
  --frame-cyan: rgba(0, 229, 224, 0.75);
  --font-display: "EvilVampire", "Caveat", cursive;
  --font-hand: "Caveat", cursive;
  --font-body: "CenturyBody", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --nav-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  background-color: var(--bg);
  background-image: url("../assets/images/bg-checkered-0000.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  image-rendering: auto;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s var(--ease), filter 0.2s var(--ease);
}

a:hover {
  color: var(--pink-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Top bar —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
  padding: 0.6rem 1.25rem;
  background: linear-gradient(180deg, rgba(5, 3, 8, 0.96), rgba(5, 3, 8, 0.72));
  border-bottom: 1px solid rgba(255, 42, 168, 0.25);
  backdrop-filter: blur(8px);
}

.site-nav__ctas {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.cta-art--nav img {
  height: clamp(36px, 4.5vh, 52px);
}

.site-nav__right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.interactive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--bone);
  flex-shrink: 0;
}

.interactive-toggle__label {
  letter-spacing: 0.02em;
  text-shadow: 0 2px 6px #000;
}

.interactive-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.interactive-toggle__track {
  position: relative;
  width: 2.6rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 42, 168, 0.45);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.interactive-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--bone);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s var(--ease), background 0.15s var(--ease);
}

.interactive-toggle input:checked + .interactive-toggle__track {
  background: rgba(0, 229, 224, 0.28);
  border-color: rgba(0, 229, 224, 0.75);
  box-shadow: var(--glow-cyan);
}

.interactive-toggle input:checked + .interactive-toggle__track::after {
  transform: translateX(1.2rem);
  background: #dffcfb;
}

.interactive-toggle input:focus-visible + .interactive-toggle__track {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-hand);
  font-size: 1.35rem;
}

.site-nav__links a {
  color: var(--bone);
  position: relative;
}

.site-nav__links a[aria-current="page"],
.site-nav__links a:hover {
  color: var(--pink-soft);
  text-shadow: var(--glow-pink);
}

.site-nav__links a.visited-floor::after {
  content: none;
}

/* —— Layout —— */
.page {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
  position: relative;
}

.section--tight {
  padding: 2.5rem 0;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 0 0 0.75rem;
  color: var(--bone);
  text-shadow: 0 0 18px rgba(0, 229, 224, 0.35);
}

.display--xl {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}

.display--lg {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.hand {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  color: var(--muted);
  margin: 0;
}

.lede {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.gradient-text {
  background: linear-gradient(180deg, var(--pink) 0%, var(--pink-soft) 45%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 42, 168, 0.35));
}

/* —— Title single-frame —— */
.title-frame {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.page--title {
  position: relative;
  z-index: 2;
  min-height: 0;
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0.35rem;
}

.title-frame .site-nav {
  min-height: 0;
  padding-block: 0.3rem 0.2rem;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero--compact {
  min-height: 0;
  flex: 0 1 auto;
  align-items: center;
  overflow: visible;
  max-height: 42%;
  margin-top: -0.75rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 3, 8, 0.15) 0%, rgba(5, 3, 8, 0.55) 45%, rgba(5, 3, 8, 0.96) 100%),
    url("../assets/images/library-hero.png") center / cover no-repeat;
  transform: scale(1.04);
  animation: hero-drift 22s ease-in-out infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 35%, rgba(255, 42, 168, 0.18), transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 2rem 0 3.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero--compact .hero__content {
  padding: 0;
  gap: 0;
}

.hero__logo {
  width: min(720px, 92vw);
  border: 0;
  outline: none;
  box-shadow: none;
  text-decoration: none;
  filter: drop-shadow(0 0 28px rgba(255, 42, 168, 0.4)) drop-shadow(0 0 40px rgba(0, 229, 224, 0.25));
  animation: logo-bob 2.8s ease-in-out infinite;
  cursor: pointer;
}

.hero__logo:hover {
  animation-duration: 1.6s;
}

.hero--compact .hero__logo {
  width: min(990px, 86vw);
  max-height: 27vh;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

.hero__tag {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  color: var(--pink-soft);
  text-shadow: var(--glow-pink);
  margin: 0;
  letter-spacing: 0.04em;
}

.hero--compact .hero__tag {
  font-size: clamp(1.15rem, 2.4vh, 1.75rem);
  margin-top: -2.75rem;
  position: relative;
  z-index: 1;
}

.hero__blurb {
  max-width: 34rem;
  color: var(--muted);
  margin: 0;
}

.hero--compact .hero__blurb {
  max-width: 32rem;
  font-size: 0.92rem;
  line-height: 1.35;
  margin-top: 0.1rem;
  position: relative;
  z-index: 1;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.5rem;
}

.hero--compact .cta-row {
  gap: 0.65rem 1.25rem;
  margin-top: 0.2rem;
}

.cta-art {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}

.cta-art img {
  height: clamp(48px, 8vw, 72px);
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

.cta-art--large img {
  height: clamp(64px, 9vh, 96px);
}

.cta-art:hover {
  transform: translateY(-3px) scale(1.04);
  filter: drop-shadow(0 0 16px rgba(255, 42, 168, 0.55));
}

.cta-art--cyan:hover {
  filter: drop-shadow(0 0 16px rgba(0, 229, 224, 0.55));
}

.enter-map {
  margin-top: 1.25rem;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--bone);
  border: 2px solid var(--cyan);
  padding: 0.35rem 1.4rem;
  border-radius: 999px;
  box-shadow: var(--glow-cyan);
  background: rgba(0, 229, 224, 0.08);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.trailer-section--compact .enter-map {
  margin-top: 0.35rem;
  margin-bottom: 0.15rem;
  font-size: 1.2rem;
  padding: 0.2rem 1rem;
  flex: 0 0 auto;
}

.enter-map:hover {
  background: rgba(255, 42, 168, 0.2);
  border-color: var(--pink);
  color: var(--pink-soft);
  transform: translateY(-2px);
}

/* —— Trailer stage —— */
.trailer-section {
  padding: 1rem 0 5rem;
}

.trailer-section--compact {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin-top: -0.35rem;
  position: relative;
  z-index: 3;
}

.trailer-stage {
  position: relative;
  width: min(900px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  isolation: isolate;
  overflow: visible;
}

.trailer-section--compact .trailer-stage {
  flex: 0 1 auto;
  width: min(1100px, 94vw, calc(56vh * 16 / 9));
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 56vh;
}

.trailer-frame {
  position: absolute;
  inset: 8%;
  border: 4px solid var(--pink);
  border-radius: 6px;
  box-shadow:
    0 0 0 3px rgba(0, 229, 224, 0.55),
    var(--glow-pink),
    inset 0 0 60px rgba(0, 0, 0, 0.65);
  background:
    linear-gradient(180deg, rgba(14, 6, 24, 0.35), rgba(5, 3, 8, 0.55)),
    url("../assets/images/screenshot-battle-0001.png") center / cover no-repeat;
  overflow: hidden;
  z-index: 1;
}

.trailer-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  opacity: 0.35;
}

.trailer-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  z-index: 2;
}

.trailer-placeholder__label {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--pink-soft);
  text-shadow: var(--glow-pink);
  margin: 0 0 0.4rem;
}

.trailer-placeholder__sub {
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--cyan);
  margin: 0;
}

.trailer-frame iframe,
.trailer-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 3;
}

.leaner {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75));
  animation: lean-bob 3.8s ease-in-out infinite;
}

.leaner img {
  width: 100%;
  height: auto;
}

.leaner--magician {
  left: -2%;
  bottom: -4%;
  width: clamp(120px, 22vw, 210px);
  rotate: -12deg;
  animation-delay: 0s;
}

.leaner--demo {
  right: -2%;
  bottom: -4%;
  width: clamp(120px, 22vw, 210px);
  rotate: 12deg;
  animation-delay: 0.6s;
}

.leaner--ghost {
  left: 8%;
  top: -6%;
  width: clamp(90px, 16vw, 150px);
  rotate: -8deg;
  animation-delay: 1.1s;
}

.leaner--snake {
  right: 5%;
  top: -10%;
  width: clamp(100px, 18vw, 170px);
  rotate: 25deg;
  animation-delay: 1.7s;
}

.trailer-section--compact .leaner--magician {
  width: clamp(120px, 22vw, 210px);
  bottom: -4%;
}

.trailer-section--compact .leaner--demo {
  width: clamp(120px, 22vw, 210px);
  bottom: -4%;
}

.trailer-section--compact .leaner--ghost {
  width: clamp(90px, 16vw, 150px);
  top: -6%;
}

.trailer-section--compact .leaner--snake {
  width: clamp(100px, 18vw, 170px);
  top: -10%;
}

.trailer-section--compact .trailer-placeholder__label {
  font-size: clamp(1.2rem, 2.6vh, 2rem);
}

.trailer-section--compact .trailer-frame {
  inset: 6%;
}

/* —— Map hub —— */
.map-page:not(.map-page--dungeon) {
  background:
    linear-gradient(180deg, rgba(5, 3, 8, 0.72), rgba(5, 3, 8, 0.92)),
    url("../assets/images/map-background-0000.png") center top / cover no-repeat;
}

.map-hero {
  text-align: center;
  padding: 2.5rem 0 1rem;
}

.map-board {
  position: relative;
  width: min(960px, 100%);
  margin: 1rem auto 3rem;
  min-height: 520px;
  padding: 2rem 1rem 3rem;
}

.map-fog {
  position: absolute;
  inset: 0;
  background: url("../assets/images/mapfab-f1fog2-0000.png") center / contain no-repeat;
  opacity: 0.35;
  pointer-events: none;
  animation: fog-drift 14s ease-in-out infinite alternate;
}

.map-crow {
  position: absolute;
  top: 1rem;
  right: 8%;
  width: 64px;
  opacity: 0.85;
  animation: crow-hop 5s ease-in-out infinite;
  pointer-events: none;
}

.map-grave {
  position: absolute;
  bottom: 1rem;
  left: 6%;
  width: 72px;
  opacity: 0.7;
  pointer-events: none;
}

.map-nodes {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 1.5rem;
  max-width: 720px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.map-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.map-node a {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 3px solid var(--cyan);
  background: radial-gradient(circle at 40% 35%, #2a1540, #0a0612 70%);
  box-shadow: var(--glow-cyan);
  color: var(--bone);
  transition: transform 0.25s var(--ease), border-color 0.2s, box-shadow 0.2s;
}

.map-node a:hover,
.map-node a:focus-visible {
  transform: scale(1.08);
  border-color: var(--pink);
  box-shadow: var(--glow-pink);
  outline: none;
}

.map-node a.is-current {
  border-color: var(--pink);
  box-shadow: var(--glow-pink), 0 0 0 6px rgba(255, 42, 168, 0.15);
}

.map-node a.is-visited:not(.is-current) {
  border-color: var(--cyan-deep);
}

.map-node a.is-locked {
  opacity: 0.45;
  filter: grayscale(0.4);
  pointer-events: none;
}

.map-node__icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.map-node__label {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--bone);
  text-shadow: 0 2px 8px #000;
}

.map-node--secret {
  grid-column: 2;
}

.map-node--secret a {
  border-style: dashed;
  border-color: var(--pink-soft);
}

.map-progress {
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--cyan);
  margin-bottom: 2rem;
}

/* —— Feature strips —— */
.feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.feature--flip {
  grid-template-columns: 1fr 1.1fr;
}

.feature--flip .feature__copy {
  order: 2;
}

.feature--flip .feature__art {
  order: 1;
}

.feature__art {
  position: relative;
}

.feature__art img {
  width: 100%;
  border: 3px solid rgba(0, 229, 224, 0.55);
  box-shadow: var(--glow-cyan), 0 20px 50px rgba(0, 0, 0, 0.55);
  border-radius: 4px;
}

/* —— Live WASM stage (16:9 embed on marketing pages) —— */
.play-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.25rem auto 0;
  background: #0b0f1a;
  border: 3px solid rgba(0, 229, 224, 0.55);
  box-shadow: var(--glow-cyan), 0 20px 50px rgba(0, 0, 0, 0.55);
  border-radius: 4px;
  overflow: hidden;
}

.play-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b0f1a;
}

.play-stage--static {
  display: grid;
  place-items: center;
}

.play-stage__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) brightness(0.72);
}

.play-stage__static-note {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.65rem;
  justify-items: center;
  padding: 1rem 1.25rem;
  text-align: center;
  font-family: var(--font-hand);
  color: var(--bone);
  background: rgba(5, 3, 8, 0.78);
  border: 1px solid rgba(0, 229, 224, 0.4);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  max-width: min(420px, 90%);
}

.play-stage__static-note span {
  font-size: 1.35rem;
  text-shadow: 0 2px 6px #000;
}

.play-stage__static-note button {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: #041214;
  background: var(--cyan);
  border: 0;
  border-radius: 2px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  box-shadow: var(--glow-cyan);
}

.play-stage__static-note button:hover {
  filter: brightness(1.08);
}

.feature__copy h2 {
  margin-top: 0;
}

.bullet-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.bullet-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.25rem;
  height: 1.25rem;
  background: url("../assets/images/piece-skull-0000.png") center / contain no-repeat;
}

/* —— Match-3 toy —— */
.match-panel {
  background: linear-gradient(180deg, rgba(14, 6, 24, 0.9), rgba(5, 3, 8, 0.95));
  border: 3px solid var(--pink);
  box-shadow: var(--glow-pink);
  border-radius: 8px;
  padding: 1.25rem;
  max-width: 420px;
  margin: 0 auto;
}

.match-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  font-family: var(--font-hand);
  font-size: 1.4rem;
}

.match-panel__combo {
  color: var(--pink-soft);
  text-shadow: var(--glow-pink);
  min-width: 5ch;
  text-align: right;
}

.match-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  user-select: none;
  touch-action: none;
}

.match-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s, box-shadow 0.15s;
}

.match-cell img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  pointer-events: none;
}

.match-cell.is-selected {
  background: rgba(0, 229, 224, 0.18);
  box-shadow: inset 0 0 0 2px var(--cyan), var(--glow-cyan);
  transform: scale(1.06);
}

.match-cell.is-clearing {
  animation: piece-pop 0.35s var(--ease) forwards;
}

.match-hint {
  margin: 0.75rem 0 0;
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--muted);
  text-align: center;
}

/* —— Crypt roster —— */
.roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.75rem;
}

.roster-card {
  text-align: center;
  padding: 1rem 0.75rem 1.25rem;
  background: radial-gradient(circle at 50% 20%, rgba(255, 42, 168, 0.12), transparent 55%),
    rgba(10, 6, 18, 0.75);
  border: 2px solid rgba(0, 229, 224, 0.35);
  border-radius: 8px;
  transition: transform 0.25s var(--ease), border-color 0.2s, box-shadow 0.2s;
}

.roster-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  border-color: var(--pink);
  box-shadow: var(--glow-pink);
}

.roster-card img {
  width: min(160px, 70%);
  margin: 0 auto 0.75rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
}

.roster-card h3 {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
  color: var(--pink-soft);
}

.roster-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.scrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.scrap img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  animation: floaty 4s ease-in-out infinite;
}

.scrap img:nth-child(2n) {
  animation-delay: 0.8s;
}

.scrap img:nth-child(3n) {
  animation-delay: 1.4s;
}

/* —— Gallery —— */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  padding: 0;
  border: 3px solid rgba(0, 229, 224, 0.45);
  background: #000;
  cursor: zoom-in;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.gallery-item:hover {
  border-color: var(--pink);
  box-shadow: var(--glow-pink);
  transform: translateY(-3px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 3, 8, 0.92);
  display: none;
  place-items: center;
  padding: 1.5rem;
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-width: min(1100px, 96vw);
  max-height: 88vh;
  border: 3px solid var(--cyan);
  box-shadow: var(--glow-cyan);
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--bone);
  background: transparent;
  border: 2px solid var(--pink);
  border-radius: 999px;
  padding: 0.2rem 0.9rem;
  cursor: pointer;
}

/* —— Vault —— */
.vault-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin: 2rem 0;
}

.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--bone);
  padding: 0.55rem 1.25rem;
  border: 2px solid var(--cyan);
  border-radius: 999px;
  background: rgba(0, 229, 224, 0.08);
  box-shadow: var(--glow-cyan);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.link-chip:hover {
  transform: translateY(-3px);
  border-color: var(--pink);
  background: rgba(255, 42, 168, 0.15);
  color: var(--pink-soft);
}

.link-chip.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.3);
}

.ea-note {
  max-width: 36rem;
  margin: 2rem auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.98rem;
  border-top: 1px solid rgba(255, 42, 168, 0.25);
  padding-top: 1.5rem;
}

/* —— Footer —— */
.site-footer {
  padding: 2rem 1.25rem 2.5rem;
  text-align: center;
  border-top: 1px solid rgba(0, 229, 224, 0.2);
  color: var(--muted);
  font-family: var(--font-hand);
  font-size: 1.25rem;
}

.site-footer--compact {
  flex: 0 0 auto;
  padding: 0.2rem 1rem 0.45rem;
  font-size: 0.95rem;
  border-top-color: rgba(0, 229, 224, 0.12);
  background: transparent;
  position: relative;
  z-index: 5;
}

.site-footer--compact p {
  margin: 0;
}

.site-footer a {
  color: var(--pink-soft);
}

/* —— Floating pieces —— */
.float-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.float-piece {
  position: absolute;
  width: 36px;
  opacity: 0.35;
  animation: drift-up linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 42, 168, 0.35));
}

/* —— Easter / overlays —— */
.nibble-stamp {
  position: fixed;
  width: 72px;
  height: 72px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.9;
  animation: nibble-fade 1.1s var(--ease) forwards;
  mix-blend-mode: screen;
}

.secret-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 300;
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--bone);
  background: rgba(14, 6, 24, 0.95);
  border: 2px solid var(--pink);
  box-shadow: var(--glow-pink);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  transition: transform 0.35s var(--ease);
}

.secret-toast.is-show {
  transform: translateX(-50%) translateY(0);
}

.dev-room {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  place-items: center;
  background: rgba(5, 3, 8, 0.94);
  padding: 2rem;
  text-align: center;
}

.dev-room.is-open {
  display: grid;
}

.dev-room img {
  width: min(420px, 80vw);
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 30px rgba(255, 42, 168, 0.5));
}

.dev-room h2 {
  font-family: var(--font-display);
  color: var(--cyan);
  margin: 0 0 0.5rem;
}

.dev-room p {
  color: var(--muted);
  max-width: 28rem;
  margin: 0 auto 1.25rem;
}

.dev-room button {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--bone);
  background: transparent;
  border: 2px solid var(--cyan);
  border-radius: 999px;
  padding: 0.35rem 1.2rem;
  cursor: pointer;
}

.skull-flash {
  animation: skull-eyes 0.6s ease;
}

/* —— Animations —— */
@keyframes hero-drift {
  from {
    transform: scale(1.04) translateY(0);
  }
  to {
    transform: scale(1.08) translateY(-1.5%);
  }
}

@keyframes logo-bob {
  0%,
  100% {
    transform: translateY(4px);
    filter: drop-shadow(0 0 22px rgba(255, 42, 168, 0.35)) drop-shadow(0 0 30px rgba(0, 229, 224, 0.2));
  }
  50% {
    transform: translateY(-6px);
    filter: drop-shadow(0 0 36px rgba(255, 42, 168, 0.55)) drop-shadow(0 0 48px rgba(0, 229, 224, 0.35));
  }
}

@keyframes lean-bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes fog-drift {
  from {
    transform: translateX(-3%);
  }
  to {
    transform: translateX(3%);
  }
}

@keyframes crow-hop {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  55% {
    transform: translateY(-4px);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@keyframes drift-up {
  from {
    transform: translateY(110vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.25;
  }
  90% {
    opacity: 0.2;
  }
  to {
    transform: translateY(-10vh) rotate(40deg);
    opacity: 0;
  }
}

@keyframes piece-pop {
  to {
    transform: scale(0.2);
    opacity: 0;
  }
}

@keyframes nibble-fade {
  0% {
    opacity: 0.95;
    transform: scale(0.6) rotate(-8deg);
  }
  30% {
    opacity: 1;
    transform: scale(1.05) rotate(4deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.2) rotate(0deg);
  }
}

@keyframes skull-eyes {
  0%,
  100% {
    filter: drop-shadow(0 0 22px rgba(255, 42, 168, 0.35));
  }
  40% {
    filter: drop-shadow(0 0 40px rgba(0, 229, 224, 0.9)) brightness(1.25);
  }
}

@media (max-height: 820px) {
  .title-frame .site-nav {
    min-height: 0;
    padding-block: 0.35rem;
  }

  .title-frame .cta-art--nav img {
    height: 34px;
  }

  .title-frame .site-nav__links {
    font-size: 1.15rem;
  }

  .hero--compact .hero__blurb {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-height: 700px) {
  .hero--compact .hero__logo {
    width: min(650px, 76vw);
  }

  .hero--compact .hero__blurb {
    display: none;
  }

  .trailer-section--compact .trailer-frame {
    inset: 8%;
  }
}

@media (max-width: 820px) {
  .feature,
  .feature--flip {
    grid-template-columns: 1fr;
  }

  .feature--flip .feature__copy,
  .feature--flip .feature__art {
    order: unset;
  }

  .map-nodes {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 1rem;
  }

  .leaner--ghost,
  .leaner--snake {
    display: none;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0.85rem;
  }

  .title-frame .site-nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 0.35rem;
  }
}

@media (max-width: 520px) {
  .map-nodes {
    grid-template-columns: 1fr 1fr;
  }

  .leaner--magician {
    width: 100px;
  }

  .leaner--demo {
    width: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__bg {
    animation: none;
  }

  .float-layer {
    display: none;
  }
}
