/* ==========================================================================
   Palette taken from the game UI (rarity colours, hero colours, menus)
   ========================================================================== */
:root {
  --bg: #0b0f16;
  --bg-2: #101722;
  --panel: #141d2a;
  --panel-2: #1a2535;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eef2;
  --muted: #9aa8b4;
  --teal: #35c9b0;
  --gold: #ffd166;
  --amber: #ffb347;
  --blood: #e8445e;
  --blood-dark: #8a0d1f;
  --violet: #b57cff;
  --pink: #ff5c8a;
  --ice: #8fd3ff;
  --green: #5fe08a;
  --rift: #ff73d9;
  --radius: 22px;
  --display: "Lilita One", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.5px; line-height: 1.05; margin: 0; }
h2 { font-size: clamp(38px, 6vw, 68px); }
h3 { font-size: clamp(24px, 3vw, 30px); margin-bottom: 8px; }
p { margin: 0 0 14px; }
em { color: var(--gold); font-style: normal; }
b { color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.muted { color: var(--muted); font-size: 15px; }
.blood { color: var(--blood); text-shadow: 0 0 30px rgba(232, 68, 94, 0.45); }

.kicker {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}
.kicker--rift { color: var(--rift); }
.kicker--blood { color: var(--blood); }

.lede { font-size: clamp(17px, 2vw, 20px); color: #c9d4dc; max-width: 720px; }

/* ambient canvas */
#ambient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
main, footer, .topnav { position: relative; z-index: 1; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: 0.5px;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 16px;
  border: 3px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45), 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s;
}
.btn:hover { transform: translateY(-3px); filter: brightness(1.08); box-shadow: 0 9px 0 rgba(0, 0, 0, 0.45), 0 14px 34px rgba(0, 0, 0, 0.4); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45); }
.btn--gold { background: linear-gradient(180deg, #ffe08a, var(--gold) 45%, #e8a93a); color: #2a1a05; }
.btn--ghost { background: rgba(10, 14, 20, 0.6); color: var(--text); border-color: rgba(255, 255, 255, 0.25); backdrop-filter: blur(6px); }
.btn--small { font-size: 17px; padding: 8px 18px; border-radius: 12px; background: var(--teal); color: #06231d; }
.play-dot { width: 0; height: 0; border-left: 13px solid var(--gold); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }

/* ==========================================================================
   Top navigation
   ========================================================================== */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}
.topnav.is-scrolled { background: rgba(11, 15, 22, 0.86); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 22px; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.navlinks { display: flex; gap: 26px; }
.navlinks a { text-decoration: none; font-weight: 800; font-size: 15px; color: #cfd8df; transition: color 0.2s; }
.navlinks a:hover { color: var(--gold); }
@media (max-width: 1020px) { .navlinks { display: none; } }
.brand span { white-space: nowrap; }
@media (max-width: 420px) { .brand { font-size: 18px; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  z-index: 1;
}
.hero__bg {
  position: absolute;
  inset: -8% -4%;
  background-size: cover;
  background-position: center;
  z-index: -3;
  filter: blur(2px) saturate(1.05);
  animation: slowzoom 30s ease-in-out infinite alternate;
}
@keyframes slowzoom { from { scale: 1.02; } to { scale: 1.1; } }
.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(11, 15, 22, 0.55) 0%, rgba(11, 15, 22, 0.78) 55%, var(--bg) 100%),
    linear-gradient(180deg, rgba(11, 15, 22, 0.55) 0%, transparent 25%, transparent 70%, var(--bg) 100%);
}
.hero__prop { position: absolute; z-index: -1; pointer-events: none; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6)) brightness(0.8); }
.hero__prop--l { left: -40px; bottom: 6%; width: clamp(160px, 22vw, 320px); }
.hero__prop--r { right: 2%; bottom: 10%; width: clamp(70px, 9vw, 130px); }
.hero__lurker { position: absolute; z-index: -1; pointer-events: none; width: clamp(110px, 13vw, 200px); filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.6)); }
.hero__lurker--l { left: 4%; top: 13%; rotate: -8deg; animation: bob 4.5s ease-in-out infinite; }
.hero__lurker--r { right: 5%; top: 17%; rotate: 6deg; animation: bob 5s ease-in-out -1.2s infinite; }
@media (max-width: 700px) {
  .hero__lurker--l { left: -30px; top: 12%; opacity: 0.6; }
  .hero__lurker--r { right: -30px; top: 60%; opacity: 0.6; }
}

.hero__content { text-align: center; padding: 120px var(--gutter) 220px; max-width: 980px; }
.logo {
  font-size: clamp(56px, 11vw, 138px);
  line-height: 0.92;
  margin: 6px 0 18px;
  color: var(--gold);
  background: linear-gradient(180deg, #fff3c4 0%, var(--gold) 45%, #f08a3a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 0 #3a1d08) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.7));
  animation: logoIn 1s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.logo { position: relative; margin-top: 0.42em !important; }
.logo__halo {
  position: absolute;
  left: 50%;
  top: -0.28em;
  width: 1.5em;
  height: 0.36em;
  translate: -50% 0;
  border-radius: 50%;
  border: 0.07em solid #ffe08a;
  box-shadow: 0 0 20px rgba(255, 224, 138, 0.9), inset 0 0 12px rgba(255, 224, 138, 0.6);
  animation: halo 3s ease-in-out infinite;
  filter: none;
}
@keyframes halo { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-0.08em) rotate(4deg); } }.logo__name { display: block; }
@keyframes logoIn { from { opacity: 0; transform: scale(0.7) rotate(-3deg); } to { opacity: 1; transform: none; } }
.tagline { font-size: clamp(19px, 2.6vw, 27px); font-weight: 800; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); margin-bottom: 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

.hero__party {
  position: absolute;
  bottom: 4%;
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: flex-end;
  gap: clamp(2px, 1.5vw, 18px);
  pointer-events: none;
}
.hero__party img { width: clamp(64px, 9vw, 120px); animation: hop 1.6s ease-in-out var(--d) infinite; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.55)); }
.hero__party img.lead { width: clamp(82px, 12vw, 158px); }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.scrollcue { position: absolute; bottom: 18px; right: var(--gutter); width: 28px; height: 44px; border: 3px solid rgba(255, 255, 255, 0.5); border-radius: 16px; }
.scrollcue span { position: absolute; left: 50%; top: 8px; width: 6px; height: 8px; margin-left: -3px; border-radius: 3px; background: var(--gold); animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { position: relative; padding: clamp(80px, 12vw, 140px) 0; }
.section-head { margin-bottom: clamp(36px, 6vw, 60px); }
.section-head h2 { margin-bottom: 14px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Trailer
   ========================================================================== */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  padding: 10px;
  background: linear-gradient(135deg, var(--gold), var(--blood) 50%, var(--violet));
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55);
}
.video iframe, .video video, .video__placeholder { width: 100%; height: 100%; border: 0; border-radius: calc(var(--radius) - 8px); display: block; background: #000; }
.video__placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.video__placeholder::before { content: ""; position: absolute; inset: 0; background: rgba(8, 11, 17, 0.62); backdrop-filter: blur(3px); }
.video__placeholder > * { position: relative; }
.video__play {
  width: clamp(70px, 10vw, 110px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 209, 102, 0.95);
  box-shadow: 0 0 0 12px rgba(255, 209, 102, 0.2), 0 0 60px rgba(255, 209, 102, 0.5);
  margin-bottom: 18px;
  animation: pulse 2s ease-in-out infinite;
}
.video__play::after { content: ""; position: absolute; left: 54%; top: 50%; translate: -50% -50%; border-left: 30px solid #2a1a05; border-top: 18px solid transparent; border-bottom: 18px solid transparent; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 10px rgba(255, 209, 102, 0.2), 0 0 50px rgba(255, 209, 102, 0.4); } 50% { box-shadow: 0 0 0 22px rgba(255, 209, 102, 0.08), 0 0 80px rgba(255, 209, 102, 0.6); } }
.video__label { font-family: var(--display); font-size: clamp(26px, 4vw, 44px); margin: 0 0 4px; }
.video__sub { color: #c9d4dc; margin: 0; font-size: clamp(14px, 1.8vw, 17px); }
.video__corner { position: absolute; width: 150px; pointer-events: none; }
.video__corner--tl { left: -50px; top: -50px; }

/* gore splats: the game's white splat sprites, tinted blood red via mask */
.video__corner, .feature__icon--blood {
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
  background: var(--blood-dark);
}
.video__corner { --m: url(img/art/gore_splat1.png); aspect-ratio: 1; }

/* ==========================================================================
   Features
   ========================================================================== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.feature {
  position: relative;
  padding: 150px 28px 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s;
}
.feature:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45); }
.feature { --c: var(--gold); }
.feature:nth-child(1) { --c: #ffb347; }
.feature:nth-child(2) { --c: #b57cff; }
.feature:nth-child(3) { --c: #5ca8ff; }
.feature:nth-child(4) { --c: #ff5c8a; }
.feature:nth-child(5) { --c: #73f2ff; }
.feature:nth-child(6) { --c: #e8445e; }
.feature::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 118px;
  height: 118px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 35%, transparent), rgba(0, 0, 0, 0.35) 70%);
  border: 3px solid var(--c);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--c) 12%, transparent), 0 0 40px color-mix(in srgb, var(--c) 30%, transparent);
  transition: transform 0.3s ease;
}
.feature:hover::before { transform: scale(1.06); }
.feature::after { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); opacity: 0.8; }
.feature__icon { position: absolute; top: 25px; left: 50%; width: 92px; height: 92px; object-fit: contain; translate: -50% 0; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.feature:hover .feature__icon { transform: scale(1.12) rotate(6deg); }
.feature__icon--blood { --m: url(img/art/gore_splat2.png); background: var(--blood); }
.feature h3 { text-align: center; }
.feature p { color: #c2cdd5; margin: 0; text-align: center; }

/* ==========================================================================
   Heroes
   ========================================================================== */
.heroes { background: linear-gradient(180deg, transparent, rgba(53, 201, 176, 0.05) 30%, transparent); }
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .hero-grid { grid-template-columns: 1fr; } }
.hcard {
  --c: var(--teal);
  position: relative;
  border-radius: var(--radius);
  padding: 20px 22px 22px;
  background:
    radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 30%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 2px solid color-mix(in srgb, var(--c) 45%, transparent);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
}
.hcard:hover { transform: translateY(-6px); border-color: var(--c); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45), 0 0 40px color-mix(in srgb, var(--c) 25%, transparent); }
.hcard__img { width: 150px; height: 150px; margin: 0 auto 6px; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.5)); transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.hcard:hover .hcard__img { transform: translateY(-8px) scale(1.06); }
.hcard h3 { text-align: center; color: var(--c); margin-bottom: 4px; }
.hcard__blurb { text-align: center; color: #c2cdd5; font-size: 15px; min-height: 48px; }
.hcard__weapon { text-align: center; font-size: 13px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.hcard__ability { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.28); }
.hcard__ability img { width: 46px; height: 46px; flex: none; }
.hcard__ability b { display: block; color: var(--c); font-size: 15px; }
.hcard__ability span { font-size: 13.5px; color: #c2cdd5; line-height: 1.4; display: block; }
.hcard__secret {
  position: absolute;
  top: 14px;
  right: -36px;
  rotate: 35deg;
  padding: 4px 42px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  background: var(--gold);
  color: #2a1a05;
  text-transform: uppercase;
}
/* Hidden heroes: a flat silhouette with a question mark, no colours to give them away. */
.hcard--secret { --c: #8a94a0; border-style: dashed; }
.hcard__silhouette { position: relative; width: 150px; margin: 0 auto 6px; }
.hcard--secret .hcard__img { filter: brightness(0) drop-shadow(0 0 1px rgba(255, 209, 102, 0.9)) drop-shadow(0 0 14px rgba(255, 209, 102, 0.25)); opacity: 0.92; }
.hcard__qmark {
  position: absolute;
  left: 50%;
  top: 44%;
  translate: -50% -50%;
  font-family: var(--display);
  font-size: 56px;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 209, 102, 0.6);
  animation: qpulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes qpulse { 0%, 100% { opacity: 0.55; scale: 0.95; } 50% { opacity: 1; scale: 1.08; } }
.hcard--secret h3 { color: var(--gold); letter-spacing: 6px; }
.hcard__ability .hcard__lock {
  width: 46px;
  line-height: 1;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.3);
  font-family: var(--display);
  font-size: 24px;
  color: var(--muted);
}
.hcard__hint { font-size: 12.5px; text-align: center; color: var(--gold); margin: 10px 0 0; font-weight: 700; }

/* ==========================================================================
   Stages
   ========================================================================== */
.stage {
  --a: var(--green);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-bottom: clamp(70px, 10vw, 120px);
}
.stage:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.stage:nth-child(even) .stage__visual { order: 2; }
@media (max-width: 880px) {
  .stage, .stage:nth-child(even) { grid-template-columns: 1fr; }
  .stage:nth-child(even) .stage__visual { order: 0; }
}
.stage__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid color-mix(in srgb, var(--a) 60%, transparent);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 60px color-mix(in srgb, var(--a) 18%, transparent);
  background-size: 180px;
}
.stage__visual > img.stage__shot { width: 100%; height: 100%; object-fit: cover; transition: transform 6s ease; }
.stage:hover .stage__shot { transform: scale(1.06); }
.stage__diorama { position: absolute; inset: 0; }
.stage__diorama img { position: absolute; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.45)); }
.stage__tier { font-family: var(--display); color: var(--a); font-size: 22px; letter-spacing: 1px; }
.stage h3 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 12px; }
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  color: #0b0f16;
  background: var(--a);
  margin-left: 10px;
  vertical-align: middle;
}
.stage p { color: #c9d4dc; }
.stage__label { font-size: 12px; font-weight: 900; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.stage__bosses { display: flex; gap: 12px; flex-wrap: wrap; }
.boss-chip { display: flex; flex-direction: column; align-items: center; width: 96px; text-align: center; font-size: 12.5px; font-weight: 800; color: #d9e2e8; }
.boss-chip img { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5)); transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.boss-chip:hover img { transform: scale(1.15) rotate(-4deg); }
.stage__locals { display: flex; flex-wrap: wrap; gap: 2px; }
.stage__locals img { width: 46px; height: 46px; object-fit: contain; transition: transform 0.2s; }
.stage__locals img:hover { transform: scale(1.35) translateY(-4px); }

/* ==========================================================================
   Bestiary
   ========================================================================== */
.bestiary { overflow: hidden; }
.marquee { display: flex; width: max-content; gap: 22px; padding: 12px 0; animation: marquee 60s linear infinite; }
.marquee--reverse { animation-direction: reverse; animation-duration: 70s; }
.bestiary:hover .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.critter { position: relative; width: 130px; flex: none; text-align: center; }
.critter img { width: 120px; height: 120px; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5)); transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.critter:hover img { transform: scale(1.2) translateY(-6px); }
.critter span { display: block; font-size: 13px; font-weight: 800; color: var(--muted); opacity: 0; transition: opacity 0.2s; }
.critter:hover span { opacity: 1; }

.bossline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  margin-top: clamp(60px, 8vw, 100px);
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  background: radial-gradient(circle at 80% 50%, rgba(181, 124, 255, 0.18), transparent 60%), linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
}
@media (max-width: 820px) { .bossline { grid-template-columns: 1fr; } }
.bossline__art { position: relative; height: 320px; }
.bossline__art .reaper { position: absolute; right: 8%; bottom: 0; width: 72%; max-width: 320px; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 0 40px rgba(181, 124, 255, 0.45)); }
.bossline__art .centipede { position: absolute; left: 0; bottom: 10px; width: 42%; max-width: 180px; rotate: -12deg; animation: bob 3s ease-in-out -1s infinite; }
.bossline p { color: #c9d4dc; }

/* ==========================================================================
   Builds and cards
   ========================================================================== */
.build { overflow-x: clip; background: radial-gradient(ellipse at 70% 30%, rgba(255, 209, 102, 0.08), transparent 60%); }
.build__layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-bottom: 60px; }
@media (max-width: 940px) { .build__layout { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 20px 0; }
.ticks li { position: relative; padding-left: 34px; margin-bottom: 12px; color: #c9d4dc; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; rotate: 45deg; border-radius: 3px; background: var(--gold); box-shadow: 0 0 12px rgba(255, 209, 102, 0.6); }
.ticks--rift li::before { background: var(--rift); box-shadow: 0 0 12px rgba(255, 115, 217, 0.6); }
.aside { padding: 16px 18px; border-left: 4px solid var(--pink); background: rgba(255, 92, 138, 0.07); border-radius: 0 12px 12px 0; color: #d7dfe5; }

.build__cards { position: relative; height: 480px; }
.gcard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 230px;
  aspect-ratio: 400 / 580;
  margin: calc(-230px * 0.725) 0 0 -115px;
  background-size: 100% 100%;
  transform-origin: 50% 120%;
  transition: transform 0.45s cubic-bezier(0.2, 1.3, 0.4, 1), filter 0.3s;
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.55));
  cursor: default;
}
.gcard:hover { z-index: 5; filter: drop-shadow(0 30px 36px rgba(0, 0, 0, 0.6)) brightness(1.08); }
.gcard { font-size: 16px; }
.gcard__pill { position: absolute; top: 2.6%; left: 50%; translate: -50% 0; font-size: 0.62em; font-weight: 900; letter-spacing: 0.2em; padding: 0.2em 0.9em; border-radius: 1em; color: #10141a; border: 2px solid rgba(10, 14, 18, 0.9); white-space: nowrap; }
.gcard__icon { position: absolute; top: 18%; left: 33%; width: 34%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5)); }
.gcard__name { position: absolute; top: 47.5%; left: 5%; right: 5%; text-align: center; font-family: var(--display); font-size: 1.15em; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard__type { position: absolute; top: 59%; left: 0; right: 0; text-align: center; font-size: 0.62em; font-weight: 900; letter-spacing: 0.2em; white-space: nowrap; }
.gcard__chip { position: absolute; top: 67%; left: 50%; translate: -50% 0; white-space: nowrap; font-size: 0.78em; font-weight: 800; padding: 0.25em 0.8em; border-radius: 0.8em; border: 2px solid; }
.gcard__shine { position: absolute; inset: 3%; overflow: hidden; border-radius: 14px; pointer-events: none; }
.gcard__shine::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 20%; left: -40%; rotate: 18deg; background: rgba(255, 255, 255, 0.12); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0% { left: -40%; } 35%, 100% { left: 140%; } }

.shot { margin: 0; }
.shot img { border-radius: var(--radius); border: 3px solid rgba(255, 255, 255, 0.08); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55); width: 100%; }
.shot figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 12px; }
.shot--wide { max-width: 980px; margin: 0 auto; }

/* ==========================================================================
   Weird events
   ========================================================================== */
.weird { background: linear-gradient(180deg, transparent, rgba(139, 90, 60, 0.12) 40%, transparent); }
.outhouse {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 28px;
  background: url(img/art/ground_road.png) center / 220px, var(--panel);
  background-blend-mode: soft-light;
  border: 1px solid var(--line);
  margin-bottom: 40px;
  overflow: hidden;
}
@media (max-width: 820px) { .outhouse { grid-template-columns: 1fr; } }
.outhouse__stage { position: relative; height: 380px; display: flex; align-items: flex-end; justify-content: center; }
.outhouse__img { width: 170px; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.55)); animation: rattle 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes rattle { 0%, 70%, 100% { rotate: 0deg; } 74% { rotate: -3deg; } 78% { rotate: 3deg; } 82% { rotate: -2deg; } 86% { rotate: 2deg; } 90% { rotate: 0deg; } }
.bubble {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  width: min(300px, 90%);
  padding: 12px 18px 14px;
  border-radius: 18px;
  background: #fbf6ec;
  color: #2b2118;
  text-align: center;
  border: 3px solid #8b5a3c;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.2s;
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -13px; width: 20px; height: 20px; background: #fbf6ec; border-right: 3px solid #8b5a3c; border-bottom: 3px solid #8b5a3c; rotate: 45deg; translate: -50% 0; }
.bubble.is-swapping { transform: scale(0.85); opacity: 0; }
.bubble__who { display: block; font-size: 12px; font-weight: 800; color: #8b6a50; }
.bubble__text { font-weight: 900; font-size: 18px; line-height: 1.3; }
.outhouse__fly { position: absolute; width: 10px; opacity: 0.55; filter: grayscale(1) brightness(0.3); animation: fly 3s linear infinite; left: 50%; bottom: 140px; }
@keyframes fly { 0% { transform: translate(0, 0); } 25% { transform: translate(60px, -30px); } 50% { transform: translate(10px, -60px); } 75% { transform: translate(-60px, -20px); } 100% { transform: translate(0, 0); } }
.outhouse__text p { color: #c9d4dc; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.event {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  transition: transform 0.25s, border-color 0.25s;
  overflow: hidden;
}
.event:hover { transform: translateY(-4px) rotate(-0.6deg); border-color: rgba(255, 209, 102, 0.4); }
.event__icon { width: 64px; height: 64px; flex: none; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.45)); transition: transform 0.3s; }
.event:hover .event__icon { transform: scale(1.15) rotate(8deg); }
.event b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.1; margin-bottom: 4px; color: #fff; letter-spacing: 0.3px; }
.event span { font-size: 14px; color: #b8c4cc; line-height: 1.4; display: block; }
.event--disco::before { content: ""; position: absolute; inset: 0; background: conic-gradient(from 0deg, #ff5c8a33, #ffd16633, #5fe08a33, #5ca8ff33, #b57cff33, #ff5c8a33); animation: spin 6s linear infinite; z-index: -1; scale: 2; }
.event--disco { isolation: isolate; }
@keyframes spin { to { rotate: 360deg; } }
.event--bighead .event__icon { transform: scale(1.35); transform-origin: 50% 90%; }
.event--bighead:hover .event__icon { transform: scale(1.6) rotate(-6deg); }
.event--blood .event__icon { -webkit-mask: url(img/art/gore_splat1.png) center / contain no-repeat; mask: url(img/art/gore_splat1.png) center / contain no-repeat; background: var(--blood); }

/* ==========================================================================
   The Rift
   ========================================================================== */
.rift { overflow: hidden; isolation: isolate; }
.rift__bg { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; background-repeat: no-repeat; opacity: 0.9; }
.rift__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg), transparent 18%, transparent 82%, var(--bg)), repeating-linear-gradient(90deg, rgba(181, 124, 255, 0.07) 0 1px, transparent 1px 80px), repeating-linear-gradient(0deg, rgba(181, 124, 255, 0.07) 0 1px, transparent 1px 80px); }
.rift__layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-bottom: 60px; }
@media (max-width: 940px) { .rift__layout { grid-template-columns: 1fr; } }
.rift h2 { color: #fff; text-shadow: 0 0 30px rgba(255, 115, 217, 0.6); }
.rift__bosses { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.rboss { width: 100px; text-align: center; font-size: 12.5px; font-weight: 800; }
.rboss img { width: 88px; height: 88px; margin: 0 auto 4px; filter: drop-shadow(0 0 16px var(--g)); animation: bob 3s ease-in-out infinite; }
.rboss:nth-child(2) img { animation-delay: -0.8s; }
.rboss:nth-child(3) img { animation-delay: -1.6s; }
.rboss:nth-child(4) img { animation-delay: -2.2s; }

.demo { position: relative; max-width: 560px; margin: 0 auto; }
#riftCanvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 20%, rgba(255, 115, 217, 0.18), transparent 60%), #150a24;
  border: 3px solid rgba(255, 115, 217, 0.5);
  box-shadow: 0 0 60px rgba(255, 115, 217, 0.25), 0 30px 70px rgba(0, 0, 0, 0.6);
  cursor: none;
  touch-action: none;
}
.demo__hud { position: static; margin-top: 10px; padding: 0 6px; display: flex; justify-content: space-between; gap: 12px; font-weight: 900; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #f5d7ff; pointer-events: none; }
.demo__hint { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }
.shot--rift { max-width: 900px; margin: 0 auto; }
.shot--rift img { border-color: rgba(255, 115, 217, 0.35); }

/* ==========================================================================
   Heat / curses
   ========================================================================== */
.heat { background: radial-gradient(ellipse at 50% 0%, rgba(232, 68, 94, 0.14), transparent 60%); }
.curse-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1100px) { .curse-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }
.curse {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: rgba(232, 68, 94, 0.06);
  border: 1px solid rgba(232, 68, 94, 0.22);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.curse:hover { transform: translateY(-3px); }
.curse img { width: 46px; height: 46px; flex: none; transition: transform 0.3s; }
.curse b { display: block; font-size: 15px; }
.curse span { font-size: 13px; color: #b8c4cc; line-height: 1.35; display: block; }
.curse.is-on { background: rgba(232, 68, 94, 0.22); border-color: var(--blood); box-shadow: 0 0 24px rgba(232, 68, 94, 0.25); }
.curse.is-on img { transform: rotate(-10deg) scale(1.1); }
.heatmeter { display: flex; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.heatmeter__bar { flex: 1; min-width: 200px; height: 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.heatmeter__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--amber), var(--blood)); transition: width 0.4s cubic-bezier(0.2, 1.2, 0.4, 1); box-shadow: 0 0 16px rgba(232, 68, 94, 0.6); }
.heatmeter__label { font-family: var(--display); font-size: 24px; color: var(--amber); min-width: 150px; }

/* ==========================================================================
   Stats
   ========================================================================== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 50px; }
.stat { text-align: center; padding: 26px 14px; border-radius: 20px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); }
.stat__value { font-family: var(--display); font-size: clamp(44px, 6vw, 64px); line-height: 1; color: var(--gold); text-shadow: 0 4px 0 rgba(0, 0, 0, 0.4); }
.stat__label { font-weight: 900; margin-top: 6px; }
.stat__note { font-size: 13px; color: var(--muted); }
.silly { text-align: center; }
.silly__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 6px 0 16px; }
.silly__grid div { font-weight: 800; color: #d9e2e8; }
.silly__grid b { color: var(--blood); font-family: var(--display); font-weight: 400; font-size: 26px; margin-left: 8px; }

/* ==========================================================================
   Finale + footer
   ========================================================================== */
.finale { overflow: hidden; isolation: isolate; text-align: center; }
.finale__bg { position: absolute; inset: -20px; z-index: -1; background-size: cover; background-position: center; opacity: 0.4; filter: blur(4px); }
.finale__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 0%, var(--bg) 75%), linear-gradient(180deg, var(--bg), transparent 30%, transparent 70%, var(--bg)); }
.finale__inner { display: flex; flex-direction: column; align-items: center; }
.finale__reaper { width: 200px; margin-bottom: 10px; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 0 40px rgba(181, 124, 255, 0.5)); }
.finale .lede { margin: 16px auto 28px; }
.btn[aria-disabled="true"] { cursor: default; }

.footer { padding: 40px 0 50px; border-top: 1px solid var(--line); background: #080b10; }
.footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.footer p { margin: 0; color: #aab6c0; font-size: 14px; }

/* ==========================================================================
   Accessibility
   ========================================================================== */
a:focus-visible, .curse:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Clickable events (events.js)
   ========================================================================== */
.event--live { cursor: pointer; }
.event .event__play {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 9px 3px 20px;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.35);
  opacity: 0.55;
  transition: opacity 0.2s;
}
.event__play::before { content: ""; position: absolute; left: 8px; top: 50%; translate: 0 -50%; border-left: 7px solid var(--gold); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.event--live:hover .event__play, .event--live:focus-visible .event__play { opacity: 1; }
.event--live:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.event.is-fired { animation: fired 0.35s ease; }
@keyframes fired { 30% { transform: scale(0.95); } 70% { transform: scale(1.03); } }

.fx-layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.fx-layer > * { position: absolute; left: 0; top: 0; }

/* banner */
.fx-banner {
  --a: var(--gold);
  top: 28% !important;
  left: 0; right: 0;
  padding: 18px 20px 20px;
  text-align: center;
  background: linear-gradient(90deg, transparent, rgba(8, 11, 17, 0.92) 15%, rgba(8, 11, 17, 0.92) 85%, transparent);
  border-top: 3px solid var(--a);
  border-bottom: 3px solid var(--a);
  animation: bannerIn 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.fx-banner.is-out { animation: bannerOut 0.45s ease-in forwards; }
@keyframes bannerIn { from { transform: scaleY(0) skewX(-10deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bannerOut { to { transform: translateX(60px) skewX(-10deg); opacity: 0; } }
.fx-banner__kicker { font-weight: 900; font-size: 13px; letter-spacing: 5px; text-transform: uppercase; color: var(--a); }
.fx-banner__title { font-family: var(--display); font-size: clamp(38px, 7vw, 76px); line-height: 1; color: #fff; text-shadow: 0 0 30px var(--a), 0 4px 0 rgba(0, 0, 0, 0.5); }
.fx-banner__sub { color: #d7dfe5; font-weight: 700; margin-top: 6px; }

/* achievement-style toast */
.fx-toast {
  left: 50% !important; top: 72px !important;
  translate: -50% 0;
  display: flex; gap: 12px; align-items: center;
  padding: 12px 18px 12px 12px;
  border-radius: 16px;
  background: #121a26;
  border: 2px solid var(--gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 209, 102, 0.2);
  animation: toastIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  max-width: calc(100vw - 40px);
}
.fx-toast.is-out { animation: toastOut 0.5s ease-in forwards; }
.fx-toast img { width: 44px; height: 44px; }
.fx-toast__kicker { font-size: 11px; font-weight: 900; letter-spacing: 3px; color: var(--gold); text-transform: uppercase; }
.fx-toast__title { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.fx-toast__sub { font-size: 13px; color: var(--muted); }
@keyframes toastIn { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(-30px); opacity: 0; } }
@media (max-width: 700px) { .fx-wallet { top: 150px !important; } }

/* wallet (like the in-game coin pill) */
.fx-wallet {
  left: auto !important; top: 76px !important; right: 20px;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 8px;
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.9);
  border: 2px solid rgba(255, 209, 102, 0.6);
  font-family: var(--display); font-size: 24px; color: var(--gold);
  opacity: 0; transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
}
.fx-wallet img { width: 30px; height: 30px; }
.fx-wallet.is-shown { opacity: 1; transform: none; }
.fx-wallet.is-bump { animation: bump 0.35s ease; }
@keyframes bump { 40% { scale: 1.25; } }
.fx-coin { width: 26px; height: 26px; }
.fx-float { font-family: var(--display); white-space: nowrap; translate: -50% 0; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.6), 0 0 12px rgba(0, 0, 0, 0.5); }
.fx-splat {
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
  opacity: 0.9;
  transition: opacity 0.8s;
  animation: splatIn 0.15s ease-out;
}
.fx-splat.is-out { opacity: 0; }
@keyframes splatIn { from { scale: 0.3; } }

/* speech bubbles for actors */
.fx-actor { width: 130px; }
.fx-actor__img { width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.5)); pointer-events: none; }
.fx-bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  translate: -50% 0;
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 8px 14px;
  border-radius: 14px;
  background: #fbf6ec;
  color: #2b2118;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
  border: 3px solid #8b5a3c;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}
.fx-bubble::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 14px; height: 14px; background: #fbf6ec; border-right: 3px solid #8b5a3c; border-bottom: 3px solid #8b5a3c; rotate: 45deg; translate: -50% 0; }
.fx-bubble.is-pop { animation: pop 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pop { from { scale: 0.6; opacity: 0; } }
.fx-walk { animation: hop 0.5s ease-in-out infinite; }

/* chickens */
.fx-runner { cursor: pointer; }
.fx-chicken { display: block; animation: chickenHop linear infinite; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.4)); }
@keyframes chickenHop { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(6deg); } }
.fx-feather { width: 12px; height: 7px; border-radius: 50%; background: #fff; }

/* tax collector */
.fx-taxman { cursor: pointer; }
.fx-taxman .fx-actor__img { animation: hop 0.4s ease-in-out infinite; }

/* merchant shop */
.fx-merchant .fx-actor__img { animation: bob 3s ease-in-out infinite; }
.fx-shop { position: absolute; top: 100%; right: 0; display: flex; gap: 8px; margin-top: 6px; pointer-events: auto; }
.fx-shop .btn { font-size: 15px; padding: 8px 14px; white-space: nowrap; }
@media (max-width: 600px) { .fx-shop { flex-direction: column; } }

/* altar + elites */
.fx-altar { cursor: pointer; animation: altarIn 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.fx-altar .fx-actor__img { width: 140px; height: 140px; filter: drop-shadow(0 0 30px rgba(181, 124, 255, 0.8)); animation: bob 2.5s ease-in-out infinite; }
.fx-altar.is-out { opacity: 0; transition: opacity 0.5s; }
@keyframes altarIn { from { opacity: 0; scale: 0.3; } }
.fx-flash { inset: 0 !important; width: 100%; height: 100%; background: radial-gradient(circle, rgba(181, 124, 255, 0.55), rgba(90, 20, 140, 0.25) 60%, transparent); animation: flash 0.7s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.fx-elite { cursor: crosshair; }
.fx-elite .fx-actor__img { width: 120px; height: 120px; filter: drop-shadow(0 0 14px rgba(255, 179, 71, 0.9)) drop-shadow(0 10px 8px rgba(0, 0, 0, 0.5)); animation: hop 0.8s ease-in-out infinite; }
.fx-elite::before { content: "ELITE"; position: absolute; top: -8px; left: 50%; translate: -50% 0; font-size: 10px; font-weight: 900; letter-spacing: 2px; color: #2a1a05; background: var(--amber); padding: 1px 8px; border-radius: 8px; z-index: 1; }
.fx-elite.is-hit .fx-actor__img { animation: hitFlash 0.2s ease; }
@keyframes hitFlash { 50% { filter: brightness(3) drop-shadow(0 0 14px #fff); scale: 0.9; } }

/* chest reveal */
.fx-modal {
  inset: 0 !important; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: rgba(6, 9, 14, 0.82);
  backdrop-filter: blur(4px);
  animation: toastIn 0.3s ease both;
  padding: 20px;
}
.fx-modal.is-out { opacity: 0; transition: opacity 0.3s; }
.fx-modal__title { font-family: var(--display); font-size: clamp(40px, 7vw, 72px); color: var(--gold); text-shadow: 0 4px 0 #3a1d08, 0 0 30px rgba(255, 209, 102, 0.5); }
.fx-chest { width: 120px; animation: chestShake 0.18s ease-in-out infinite; filter: drop-shadow(0 0 30px rgba(255, 209, 102, 0.6)); }
.fx-chest.is-open { animation: chestOpen 0.5s ease-out forwards; }
@keyframes chestShake { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
@keyframes chestOpen { 40% { scale: 1.3; } to { scale: 0.7; opacity: 0.5; } }
.fx-cards { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.gcard--static { position: relative !important; left: auto; top: auto; margin: 0 !important; width: min(200px, 28vw); transform: none; animation: cardIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.gcard--static { font-size: min(14px, 1.95vw); }
@keyframes cardIn { from { opacity: 0; transform: translateY(-120px) scale(0.3) rotate(-15deg); } }
.fx-modal__close { margin-top: 6px; }

/* disco */
.fx-disco-canvas { inset: 0 !important; width: 100%; height: 100%; transition: opacity 0.8s; }
.fx-disco-canvas.is-out, .fx-floor.is-out { opacity: 0; }
.fx-floor {
  top: auto !important; bottom: -10px; left: 50% !important;
  width: min(1400px, 130vw);
  translate: -50% 0;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 5px;
  padding: 6px;
  background: #0b0612;
  transform-origin: 50% 100%;
  transform: perspective(500px) rotateX(58deg);
  animation: floorUp 0.7s cubic-bezier(0.2, 1.3, 0.4, 1) both;
  transition: opacity 0.8s;
  box-shadow: 0 -20px 60px rgba(255, 61, 242, 0.25);
}
.fx-floor__tile { height: 46px; border-radius: 4px; transition: background 0.12s, box-shadow 0.12s; }
@keyframes floorUp { from { translate: -50% 200px; } }
.fx-dancer .fx-dancer__img { width: clamp(64px, 8vw, 96px); height: clamp(64px, 8vw, 96px); object-fit: contain; animation: danceStep 0.5s ease-in-out infinite; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.5)); }
@keyframes danceStep { 0%, 100% { transform: translateY(0) rotate(-14deg); } 50% { transform: translateY(-22px) rotate(14deg) scale(1.05, 0.95); } }
.fx-disco .critter img, .fx-disco .hcard__img, .fx-disco .boss-chip img, .fx-disco .stage__locals img, .fx-disco .event__icon, .fx-disco .rboss img, .fx-disco .feature__icon, .fx-disco .outhouse__img, .fx-disco .hero__party img { animation: dance 0.5s ease-in-out infinite alternate !important; }
.fx-disco .critter:nth-child(odd) img, .fx-disco .stage__locals img:nth-child(odd), .fx-disco .hcard:nth-child(odd) .hcard__img, .fx-disco .event:nth-child(odd) .event__icon { animation-delay: -0.5s !important; }
@keyframes dance { from { transform: rotate(-14deg) translateY(0); } to { transform: rotate(14deg) translateY(-14px); } }
.fx-disco .event, .fx-disco .hcard, .fx-disco .feature, .fx-disco .curse, .fx-disco .stat { transition: transform 0.14s ease-out, box-shadow 0.14s; }
.fx-beat .event, .fx-beat .hcard, .fx-beat .feature, .fx-beat .curse, .fx-beat .stat { transform: scale(1.025); box-shadow: 0 0 30px rgba(255, 61, 242, 0.35); }
.fx-disco .fx-banner__title { animation: rainbowText 1s linear infinite; }
@keyframes rainbowText { 0% { color: #ff3df2; } 25% { color: #ffd166; } 50% { color: #4dff9a; } 75% { color: #4db8ff; } 100% { color: #ff3df2; } }
/* big heads */
.fx-bighead .critter img, .fx-bighead .hcard__img, .fx-bighead .boss-chip img, .fx-bighead .stage__locals img, .fx-bighead .hero__party img, .fx-bighead .hero__lurker, .fx-bighead .event__icon, .fx-bighead .rboss img, .fx-bighead .bossline img {
  scale: 1.55;
  transform-origin: 50% 90%;
  transition: scale 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
}
.critter img, .hcard__img, .boss-chip img, .stage__locals img, .hero__party img, .event__icon, .rboss img { transition: scale 0.4s ease; }

/* blood moon */
.fx-moon {
  left: auto !important; right: 8vw; top: 12vh !important;
  width: clamp(100px, 16vw, 180px); height: clamp(100px, 16vw, 180px); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a8a, #c0142a 55%, #5a0612);
  box-shadow: 0 0 60px rgba(232, 68, 94, 0.9), 0 0 160px rgba(232, 68, 94, 0.5);
  animation: moonRise 1.2s ease-out both;
}
.fx-moon::before, .fx-moon::after { content: ""; position: absolute; border-radius: 50%; background: rgba(90, 6, 18, 0.35); }
.fx-moon::before { width: 22%; height: 22%; left: 22%; top: 33%; }
.fx-moon::after { width: 14%; height: 14%; left: 61%; top: 22%; }
.fx-moon.is-out { transition: transform 1.2s ease-in, opacity 1.2s; transform: translateY(-300px); opacity: 0; }
@keyframes moonRise { from { transform: translateY(260px); opacity: 0; } }
.fx-bloodtint { inset: 0 !important; width: 100%; height: 100%; background: radial-gradient(ellipse at center, rgba(120, 0, 20, 0.08), rgba(120, 0, 20, 0.45)); mix-blend-mode: multiply; animation: toastIn 1s ease both; transition: opacity 1.2s; }
.fx-bloodtint.is-out { opacity: 0; }
.fx-bloodmoon .marquee { animation-duration: 18s; }
.fx-bloodmoon .marquee--reverse { animation-duration: 22s; }
.fx-bloodmoon .hero__party img, .fx-bloodmoon .rboss img { animation-duration: 0.5s; }

/* outhouse hits */
.outhouse__img.is-hit { animation: outhouseHit 0.25s ease; }
@keyframes outhouseHit { 25% { rotate: -6deg; scale: 0.95 1.05; filter: brightness(1.6); } 60% { rotate: 5deg; } }
.outhouse__img.is-freed { animation: freed 0.8s cubic-bezier(0.2, 1.6, 0.4, 1); filter: drop-shadow(0 0 30px rgba(255, 209, 102, 0.8)); }
@keyframes freed { 30% { translate: 0 -40px; rotate: -8deg; } }



/* one event at a time */
.event--live.is-locked { opacity: 0.45; filter: grayscale(0.6); cursor: not-allowed; }
.event--live.is-locked:hover { transform: none; }
.event--live.is-playing { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.35), 0 0 30px rgba(255, 209, 102, 0.2); }
.event.event--live.is-playing .event__play { opacity: 1; color: #2a1a05; background: var(--gold); animation: pulse 1.2s ease-in-out infinite; }
.event--live.is-playing .event__play::before { border-left-color: #2a1a05; }
.event.is-denied { animation: denied 0.35s ease; }
@keyframes denied { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }

/* ---- small screens ---- */
@media (max-width: 700px) {
  /* Compact round play badge so it never collides with long event titles. */
  .event > div { padding-right: 30px; }
  .event .event__play { font-size: 0; width: 26px; height: 26px; padding: 0; top: 10px; right: 10px; }
  .event__play::before { left: 10px; }
  .event--live.is-playing .event__play, .event--live .event__play { font-size: 0; }
  .rift__bosses { gap: 6px; justify-content: space-between; }
  .rboss { width: 22%; font-size: 11px; }
  .rboss img { width: 100%; height: auto; aspect-ratio: 1; }
  .bossline__art { height: 260px; }
  .bossline__art .reaper { right: 0; width: 58%; }
  .bossline__art .centipede { left: 0; width: 34%; bottom: 0; }
  .scrollcue { display: none; }
}
@media (max-width: 640px) {
  .video { aspect-ratio: auto; padding: 7px; }
  .video__placeholder { min-height: 280px; padding: 24px 18px; }
  .video__play { width: 64px; margin-bottom: 14px; box-shadow: 0 0 0 8px rgba(255, 209, 102, 0.2), 0 0 40px rgba(255, 209, 102, 0.4); }
  .video__play::after { border-left-width: 20px; border-top-width: 12px; border-bottom-width: 12px; }
  .video__corner { width: 80px; }
  .video__corner--tl { left: -22px; top: -26px; }
  .build__cards { height: 360px; }
}
/* ==========================================================================
   Concerning upgrades (flip cards)
   ========================================================================== */
.concerns { margin-top: clamp(60px, 9vw, 100px); }
.concerns__title { font-size: clamp(30px, 4.5vw, 46px); margin-bottom: 10px; }
.concern-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 26px 0 30px; }
@media (max-width: 960px) { .concern-grid { grid-template-columns: repeat(2, 1fr); } }
.ccard { appearance: none; border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; perspective: 900px; height: 250px; text-align: center; }
.ccard__inner { position: relative; display: block; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.3, 1.4, 0.5, 1); transform-style: preserve-3d; }
.ccard.is-flipped .ccard__inner { transform: rotateY(180deg); }
.ccard:hover .ccard__inner { transform: translateY(-4px); }
.ccard.is-flipped:hover .ccard__inner { transform: rotateY(180deg) translateY(-4px); }
.ccard__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 14px;
  border-radius: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 2px dashed rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.ccard__front img { width: 70px; height: 70px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4)); }
.ccard__front b, .ccard__back b { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.1; }
.ccard__front i { font-size: 13.5px; color: #b8c4cc; line-height: 1.35; }
.ccard__front em { font-size: 11px; font-weight: 900; letter-spacing: 2px; color: var(--gold); font-style: normal; }
.ccard__back { transform: rotateY(180deg); border: 2px solid var(--gold); background: radial-gradient(circle at 50% 20%, rgba(255, 209, 102, 0.18), transparent 70%), var(--panel); }
.ccard__kicker { font-size: 11px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); }
.ccard__does { font-size: 15px; font-weight: 700; color: #e8eef2; line-height: 1.4; }
.ultimate {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 620px;
  margin: 0 auto;
  padding: 14px 20px 14px 14px;
  border-radius: 18px;
  background: #121a26;
  border: 2px solid var(--gold);
  box-shadow: 0 0 30px rgba(255, 209, 102, 0.15);
}
.ultimate img { width: 60px; height: 60px; flex: none; }
.ultimate span { display: block; font-size: 14px; color: #c9d4dc; }
.ultimate b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; color: #fff; }
.ultimate .ultimate__kicker { font-size: 11px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); }
