/* Minecraft-first home hero, in the Requiem look: dark space, glass panels, gradient accents. Prefix .mch */
.mch {
  --mch-green: #4ade80;
  --mch-cyan: #38bdf8;
  --mch-purple: #a855f7;
  --mch-pink: #f472b6;
  --mch-gold: #facc15;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(30px, 5vw, 58px) 0 clamp(34px, 5vw, 60px);
}

/* ---------- Atmosphere: soft colour clouds + floating pixel items over the site's star field ---------- */
.mch__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.mch__blob {
  position: absolute;
  width: 46vw;
  max-width: 640px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.38;
  animation: mchBlob 22s ease-in-out infinite;
}
.mch__blob--a { left: -8%; top: 2%; background: radial-gradient(circle, #22c55e 0%, transparent 68%); }
.mch__blob--b { right: -10%; top: 8%; background: radial-gradient(circle, #6366f1 0%, transparent 68%); animation-delay: -7s; }
.mch__blob--c { left: 30%; bottom: -18%; background: radial-gradient(circle, #a855f7 0%, transparent 68%); animation-delay: -13s; opacity: 0.3; }
@keyframes mchBlob {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(5%, 7%, 0) scale(1.14); }
}

.mch__float {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.mch__fi {
  position: absolute;
  bottom: -10%;
  image-rendering: pixelated;
  opacity: 0.85;
  filter: drop-shadow(0 0 12px rgba(125, 211, 252, 0.55));
  animation: mchRise var(--dur, 14s) linear infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes mchRise {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.85; }
  50% { transform: translate3d(var(--sway, 30px), -55vh, 0) rotate(180deg); }
  90% { opacity: 0.85; }
  100% { transform: translate3d(calc(var(--sway, 30px) * -1), -115vh, 0) rotate(360deg); opacity: 0; }
}

/* ---------- Copy (same structure as the existing home hero: centred stack) ---------- */
.mch__copy {
  max-width: 62rem;
  margin: 0 auto;
  text-align: center;
}
.mch__title {
  margin: 0 0 14px;
  font-family: "Russo One", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(40px, 8vw, 92px);
  line-height: 1;
  letter-spacing: 0.4px;
  color: #f4f4ff;
  text-shadow: 0 0 40px rgba(168, 85, 247, 0.35);
}
.mch__line { display: block; }
.mch__fate {
  background: linear-gradient(100deg, #4ade80 0%, #38bdf8 40%, #a855f7 75%, #f472b6 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(74, 222, 128, 0.35));
  animation: mchShift 7s ease-in-out infinite;
}
@keyframes mchShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.mch__tiktok {
  margin: 0 0 14px;
  font-weight: 800;
  font-size: clamp(14px, 1.9vw, 18px);
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, #a5b4fc, #7dd3fc, #86efac);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mch__sub {
  max-width: 40rem;
  margin: 0 auto 20px;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.55;
  color: #c9c9e3;
}
.mch__sub b { color: #fff; font-weight: 700; }

.mch__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.mch__chips li {
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c, #fff);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid color-mix(in srgb, var(--c, #fff) 45%, transparent);
  border-radius: 999px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--c, #fff) 22%, transparent);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.mch__chips li:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px color-mix(in srgb, var(--c, #fff) 45%, transparent);
}
.mch__chips li:nth-child(1) { --c: #4ade80; }
.mch__chips li:nth-child(2) { --c: #fb7185; }
.mch__chips li:nth-child(3) { --c: #38bdf8; }
.mch__chips li:nth-child(4) { --c: #facc15; }
.mch__chips li:nth-child(5) { --c: #f472b6; }
.mch__chips li:nth-child(6) { --c: #c4b5fd; }

.mch__discord {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 20px;
}
.mch__discord .hero-discord { font-size: clamp(18px, 2.4vw, 24px); }
.mch__discord-note { font-weight: 650; font-size: 14px; color: #cbd5e1; }
.mch__discord-note b { color: var(--accent-gold, #facc15); letter-spacing: 0.3px; }

.mch__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.mch__price {
  margin-left: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  color: #fde68a;
  font-weight: 800;
}

/* ---------- Live demo ---------- */
.mch__demo {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 18px;
  max-width: 1040px;
  margin: clamp(28px, 4vw, 44px) auto 0;
  align-items: stretch;
}
.mch__panel {
  position: relative;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(99, 102, 241, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}
.mch__panel--scene {
  align-self: start;
  padding: 10px;
  overflow: hidden;
}
.mch__panel--scene::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, #4ade80, #38bdf8, #a855f7, #f472b6, #4ade80);
  background-size: 300% 300%;
  animation: mchShift 8s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.mch__panel--side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  text-align: left;
}
.mch__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #c7d2fe;
}
.mch__head::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px 2px rgba(239, 68, 68, 0.8);
  animation: mchLive 1.1s ease-in-out infinite;
}
@keyframes mchLive {
  50% { opacity: 0.3; }
}

.mch__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: #1b1450;
  image-rendering: pixelated;
}
.mch__sc-sky {
  position: absolute;
  inset: 0 0 30% 0;
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 28% 12%, #e0e7ff 60%, transparent 62%),
    radial-gradient(2px 2px at 44% 30%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 63% 16%, #fef9c3 60%, transparent 62%),
    radial-gradient(2px 2px at 78% 34%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 90% 12%, #e0e7ff 60%, transparent 62%),
    linear-gradient(180deg, #120d3f 0%, #2d1b7a 55%, #6d3fc4 100%);
  transition: filter 0.25s;
}
.mch__sc-sky::before {
  content: "";
  position: absolute;
  right: 11%;
  top: 14%;
  width: 11%;
  aspect-ratio: 1;
  background: #f4f1ff;
  box-shadow: inset -5px -4px 0 #d3cdf0, 0 0 0 4px rgba(244, 241, 255, 0.18), 0 0 40px 10px rgba(180, 170, 255, 0.45);
}
.mch__sc-ground {
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background:
    linear-gradient(180deg, #4ade80 0 20%, #22a05a 20% 27%, transparent 27%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.14) 0 4px, transparent 4px 26px),
    #7a4d2a;
}
.mch__sc-ground::after {
  content: "";
  position: absolute;
  inset: 27% 0 0 0;
  background:
    radial-gradient(3px 3px at 12% 30%, #5a3716 60%, transparent 62%),
    radial-gradient(3px 3px at 33% 62%, #6a4520 60%, transparent 62%),
    radial-gradient(4px 4px at 57% 40%, #5a3716 60%, transparent 62%),
    radial-gradient(3px 3px at 82% 70%, #6a4520 60%, transparent 62%);
}
.mch__ents { position: absolute; inset: 0; }
.mch__flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.mch__flash.is-on { animation: mchFlash 0.45s ease-out; }
@keyframes mchFlash {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}
.mch__screen.is-shake { animation: mchShake 0.5s linear; }
@keyframes mchShake {
  0%, 100% { translate: 0 0; }
  15% { translate: -7px 3px; }
  30% { translate: 6px -4px; }
  45% { translate: -5px -3px; }
  60% { translate: 5px 4px; }
  80% { translate: -2px 1px; }
}
.mch__screen.is-dark .mch__sc-sky { filter: brightness(0.4) saturate(0.8); }

.mch__hud {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.mch__hearts { display: flex; gap: 2px; }
.mch__hearts img { width: 14px; height: 14px; image-rendering: pixelated; }
.mch__hotbar { display: flex; gap: 3px; }
.mch__hotbar i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: rgba(15, 12, 40, 0.75);
  border: 2px solid #7c7ca8;
}
.mch__hotbar i img { width: 14px; height: 14px; image-rendering: pixelated; }
.mch__hotbar i.is-on { border-color: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, 0.6); }
.mch__banner {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -10px);
  padding: 7px 14px;
  font: 700 clamp(11px, 1.5vw, 14px) / 1.2 system-ui, sans-serif;
  letter-spacing: 0.4px;
  color: #fff;
  background: rgba(15, 12, 40, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
}
.mch__banner.is-on { animation: mchBanner 1.5s ease-out forwards; }
@keyframes mchBanner {
  0% { opacity: 0; transform: translate(-50%, -10px); }
  12%, 70% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -6px); }
}

.mch__player {
  position: absolute;
  left: 15%;
  bottom: 27%;
  width: 24px;
  height: 56px;
}
.mch__player i { position: absolute; display: block; }
.mch__player .h { top: 0; left: 2px; width: 20px; height: 18px; background: #e9bf94; box-shadow: inset 0 6px 0 #4b2f19; }
.mch__player .h::after { content: ""; position: absolute; left: 4px; top: 9px; width: 4px; height: 3px; background: #2b4aa8; box-shadow: 8px 0 0 #2b4aa8; }
.mch__player .b { top: 18px; left: 4px; width: 16px; height: 20px; background: #1ea7b8; }
.mch__player .a { top: 18px; left: 0; width: 4px; height: 18px; background: #e9bf94; box-shadow: 20px 0 0 #e9bf94; }
.mch__player .l { top: 38px; left: 4px; width: 16px; height: 18px; background: linear-gradient(90deg, #3b4fa8 0 48%, transparent 48% 52%, #3b4fa8 52%); }
.mch__player.is-hurt { animation: mchHurt 0.4s; }
.mch__player.is-hop { animation: mchHop 0.5s ease-out; }
@keyframes mchHurt {
  0%, 100% { filter: none; transform: none; }
  30% { filter: brightness(0.5) sepia(1) hue-rotate(-40deg) saturate(8); transform: translateX(-6px) rotate(-10deg); }
}
@keyframes mchHop {
  50% { transform: translateY(-26px); }
}

.mch__spr { position: absolute; image-rendering: pixelated; pointer-events: none; }
.mch__part {
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  animation: mchPart 0.9s cubic-bezier(0.1, 0.7, 0.3, 1) forwards;
}
@keyframes mchPart {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(180deg); opacity: 0; }
}
.mch__ring {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 6px solid #fff;
  border-radius: 50%;
  animation: mchRing 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes mchRing {
  to { transform: scale(10); opacity: 0; border-width: 1px; }
}
.mch__bolt {
  position: absolute;
  top: 0;
  width: 48px;
  height: 72%;
  background: #fff;
  clip-path: polygon(55% 0, 25% 38%, 48% 38%, 14% 70%, 42% 70%, 0 100%, 78% 52%, 52% 52%, 86% 22%, 62% 22%, 100% 0);
  filter: drop-shadow(0 0 12px #bfe0ff) drop-shadow(0 0 28px #6aa8ff);
  animation: mchBolt 0.5s steps(4, jump-none) forwards;
}
@keyframes mchBolt {
  0% { opacity: 1; }
  40% { opacity: 0.2; }
  60% { opacity: 1; }
  100% { opacity: 0; }
}
.mch__tnt { animation: mchFuse 0.25s steps(2, jump-none) infinite; }
@keyframes mchFuse {
  50% { filter: brightness(2.6); }
}

/* chat */
.mch__chat {
  flex: 1;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
}
.mch__msg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.35;
  color: #e9e9f5;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  animation: mchMsg 0.35s ease-out;
}
.mch__msg b { color: var(--n, #86efac); font-weight: 800; }
.mch__msg span { color: #cbd5e1; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.mch__msg em {
  margin-left: auto;
  padding: 2px 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #0b0b14;
  background: var(--e, #4ade80);
  border-radius: 999px;
}
@keyframes mchMsg {
  from { transform: translateY(10px); opacity: 0; }
}

.mch__try {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.mch__tb {
  display: grid;
  gap: 4px;
  justify-items: center;
  align-content: start;
  padding: 8px 4px 8px;
  cursor: pointer;
  font: 700 11px / 1.15 system-ui, sans-serif;
  color: #e9e9f5;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.mch__tb small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #a7a7c1;
}
.mch__tbi { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }
.mch__tb:hover {
  transform: translateY(-2px);
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 10px 28px rgba(168, 85, 247, 0.3);
}
.mch__tb:active { transform: translateY(1px); }
.mch__tb:focus-visible { outline: 2px solid #7dd3fc; outline-offset: 2px; }
.mch__gi { width: 22px; height: 22px; object-fit: contain; }
.mch__gn { color: #fff !important; font-family: system-ui, sans-serif !important; font-weight: 700; }

/* scene time of day + player states */
.mch__sc-sky { transition: filter 0.6s, background 0.6s; }
.mch__screen.is-day .mch__sc-sky {
  background: linear-gradient(180deg, #2ea8ff 0%, #7fd0ff 55%, #cdeeff 100%);
}
.mch__screen.is-day .mch__sc-sky::before {
  background: #ffe45e;
  box-shadow: 0 0 0 4px #fff3a0, 0 0 50px 14px rgba(255, 214, 80, 0.7);
}
.mch__screen.is-night .mch__sc-sky { filter: brightness(0.38) saturate(0.9); }
.mch__screen.is-night .mch__sc-ground { filter: brightness(0.55); }
.mch__player.is-fire { filter: sepia(1) saturate(6) hue-rotate(-18deg) brightness(1.15); }
.mch__player.is-frozen { filter: brightness(1.25) saturate(0.4) hue-rotate(160deg); }
.mch__player.is-frozen::after {
  content: "";
  position: absolute;
  inset: -6px -8px -2px;
  background: linear-gradient(135deg, rgba(190, 235, 255, 0.85), rgba(120, 200, 255, 0.55));
  border: 2px solid #e0f7ff;
  box-shadow: 0 0 18px rgba(125, 211, 252, 0.9);
}
.mch__player.is-armor .b { background: #4de8e0; box-shadow: inset 0 -5px 0 #1fa9b3; }
.mch__player.is-armor .l { background: linear-gradient(90deg, #2aa6b3 0 48%, transparent 48% 52%, #2aa6b3 52%); }
.mch__player.is-armor .h { box-shadow: inset 0 8px 0 #4de8e0; }
.mch__player { transition: left 0.3s, opacity 0.25s; }
.mch__player.is-thrown { animation: mchThrow 1.1s cubic-bezier(0.3, 0.6, 0.4, 1); }
@keyframes mchThrow {
  0% { transform: translate(0, 0) rotate(0); }
  45% { transform: translate(90px, -120px) rotate(300deg); }
  100% { transform: translate(0, 0) rotate(720deg); }
}
.mch__player.is-fall { animation: mchFall 1.5s ease-in; }
@keyframes mchFall {
  0%, 15% { transform: translateY(0); opacity: 1; }
  55% { transform: translateY(150px); opacity: 0; }
  75% { transform: translateY(-60px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.mch__hole {
  position: absolute;
  width: 52px;
  height: 20%;
  background: #0b0720;
  box-shadow: inset 0 6px 0 rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.mch__more {
  margin: 22px 0 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #a7a7c1;
}
.mch__more a { color: #c7d2fe; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .mch__demo { grid-template-columns: 1fr; }
  .mch__chat { min-height: 0; }
}
@media (max-width: 520px) {
  .mch__tb { font-size: 10px; padding: 7px 2px; }
  .mch__tbi { width: 28px; height: 28px; }
  .mch__msg { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .mch *, .mch *::before, .mch *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  .mch__fi { display: none; }
}
