/* Minecraft mods home (/<locale>/mods): "block field". */

:root {
  --mh-bg: #070609;
  --mh-surface: rgba(18, 15, 22, 0.78);
  --mh-line: rgba(255, 255, 255, 0.08);
  --mh-text: #efedf3;
  --mh-dim: #a9a3b3;
  --mh-faint: #6f6a7a;
  --mh-accent: #fc0553;
  --mh-grass: #5fd068;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html,
body.mh {
  margin: 0;
  background: var(--mh-bg);
  color: var(--mh-text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  line-height: 1.55;
}

.mh a { color: inherit; }

/* Static dithered glow: same pixel language as the games page, but still and blocky. */
.mh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 78% 22%, rgba(252, 5, 83, 0.16), transparent 65%),
    radial-gradient(700px 500px at 10% 95%, rgba(95, 208, 104, 0.07), transparent 60%),
    var(--mh-bg);
}

.mh-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 50%, transparent 50%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 50%, transparent 50%);
  background-size: 8px 8px;
  -webkit-mask: radial-gradient(80% 70% at 75% 30%, #000, transparent 75%);
  mask: radial-gradient(80% 70% at 75% 30%, #000, transparent 75%);
}

.mh-top,
.mh main {
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------------- top bar */

.mh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 24px;
}

.mh-brand {
  font-family: "Antonio", sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.mh-top .top-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.mh-top .top-links a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  color: var(--mh-dim);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.mh-top .top-links a:hover { color: var(--mh-text); }

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

.mh-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 24px;
  max-width: 1240px;
  min-height: min(86vh, 860px);
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.mh-eyebrow {
  margin: 0;
  color: var(--mh-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mh-title {
  position: relative;
  display: inline-block;
  isolation: isolate;
  margin: 12px 0 0;
  font-family: "Antonio", sans-serif;
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: 0.01em;
}

.mh-base { position: relative; z-index: 2; display: block; }

.mh-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}

.mh-layer-r { color: rgba(252, 5, 83, 0.6); animation: mh-rgb 900ms steps(2) 200ms 1 both; }
.mh-layer-g { color: rgba(95, 208, 104, 0.55); animation: mh-rgb 900ms steps(2) 270ms 1 both; }
.mh-layer-b { color: rgba(0, 214, 255, 0.5); animation: mh-rgb 900ms steps(2) 340ms 1 both; }
.mh-title:hover .mh-layer { animation: mh-rgb 600ms steps(3) 0s 1 both; }

@keyframes mh-rgb {
  0% { opacity: 0.9; transform: translate(-8px, -2px); }
  35% { opacity: 0.8; transform: translate(7px, 3px); }
  70% { opacity: 0.5; transform: translate(-5px, 1px); }
  100% { opacity: 0; transform: none; }
}

.mh-lead {
  max-width: 56ch;
  margin: 18px 0 0;
  color: var(--mh-dim);
  font-size: 1.05rem;
}

.mh-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.mh-count { margin: 20px 0 0; color: var(--mh-faint); font-size: 0.9rem; }
.mh-count strong { color: var(--mh-text); font-size: 1.1rem; }

.mh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--mh-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--mh-text);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.mh-btn:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.07); }

.mh-btn--primary {
  border-color: var(--mh-accent);
  background: rgba(252, 5, 83, 0.16);
}

.mh-btn--primary:hover { background: rgba(252, 5, 83, 0.28); border-color: var(--mh-accent); }

.mh-btn--lg { padding: 12px 20px; font-size: 0.98rem; }

/* block field */

.mh-field {
  position: relative;
  aspect-ratio: 5 / 4;
  cursor: default;
  /* it is a toy, not text: no blue tap flash, no selection, no long-press menu */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  outline: none;
}

.mh-field *,
.mh-field svg:focus {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}

.mh-field.is-pointing { cursor: pointer; }

.mh-field::before {
  content: "";
  position: absolute;
  inset: 20% 10% 5%;
  background: radial-gradient(closest-side, rgba(252, 5, 83, 0.18), transparent);
  filter: blur(20px);
}

.mh-field__svg { position: relative; width: 100%; height: 100%; display: block; overflow: visible; }

.mh-floor { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }

.mh-block__side { fill: rgba(20, 16, 26, 0.85); stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.2; stroke-linejoin: round; }
.mh-block__top { fill: rgba(40, 30, 48, 0.9); stroke: rgba(255, 255, 255, 0.75); stroke-width: 1.2; stroke-linejoin: round; }

.mh-block.is-active .mh-block__side { stroke: var(--mh-accent); fill: rgba(60, 8, 30, 0.9); }
.mh-block.is-active .mh-block__top { stroke: #ff6b98; fill: rgba(252, 5, 83, 0.35); }

.mh-block.is-dim .mh-block__side,
.mh-block.is-dim .mh-block__top { stroke: rgba(255, 255, 255, 0.14); fill: rgba(14, 12, 18, 0.7); }

.mh-field__tip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(252, 5, 83, 0.6);
  border-radius: 12px;
  background: rgba(12, 10, 16, 0.94);
  transform: translate(-50%, calc(-100% - 14px));
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* display:flex above would otherwise override the hidden attribute */
.mh-field__tip[hidden] { display: none; }

.mh-field__tip img { width: 34px; height: 34px; border-radius: 8px; image-rendering: pixelated; }
.mh-field__tip span { display: grid; }
.mh-field__tip strong { font-size: 0.95rem; }
.mh-field__tip small { display: inline-flex; align-items: center; gap: 4px; color: var(--mh-dim); font-size: 0.78rem; }
.mh-field__tip small svg { width: 12px; height: 12px; fill: var(--mh-accent); }

.mh-field__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2%;
  margin: 0;
  text-align: center;
  color: var(--mh-faint);
  font-size: 0.82rem;
}

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

.mh-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 24px;
}

.mh-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.mh-h2 {
  margin: 8px 0 0;
  font-family: "Antonio", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1;
}

.mh-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.mh-chip {
  padding: 7px 14px;
  border: 1px solid var(--mh-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--mh-dim);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.mh-chip:hover { color: var(--mh-text); border-color: rgba(255, 255, 255, 0.25); }
.mh-chip.is-on { color: #fff; border-color: var(--mh-accent); background: rgba(252, 5, 83, 0.18); }

/* mod cards */

.mh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.mh-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--mh-line);
  border-radius: 16px;
  background: var(--mh-surface);
  backdrop-filter: blur(3px);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.mh-card[hidden] { display: none; }

.mh-card:hover {
  transform: translateY(-3px);
  border-color: rgba(252, 5, 83, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(252, 5, 83, 0.12);
}

.mh-card__top { display: flex; justify-content: space-between; align-items: flex-start; }

.mh-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  image-rendering: pixelated;
  background: rgba(0, 0, 0, 0.35);
}

.mh-heart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(252, 5, 83, 0.12);
  color: #ffd2df;
  font-size: 0.86rem;
  font-weight: 600;
}

.mh-heart svg { width: 14px; height: 14px; fill: var(--mh-accent); }
.mh-heart.is-loading { opacity: 0.5; }

.mh-card h3 { margin: 4px 0 0; font-size: 1.2rem; }

.mh-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.mh-tag {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--mh-line);
  color: var(--mh-dim);
  font-size: 0.74rem;
}

.mh-card p { margin: 0; color: var(--mh-dim); font-size: 0.93rem; }

.mh-card__actions { display: flex; gap: 8px; margin-top: 6px; }
.mh-card__actions .mh-btn { flex: 1; }

/* partners and patrons (markup kept from the translated pages) */

.mh-support .support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.mh-support .support-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 24px;
  border: 1px solid var(--mh-line);
  border-radius: 16px;
  background: var(--mh-surface);
}

.mh-support .support-card__index {
  color: var(--mh-accent);
  font-family: "Antonio", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.mh-support .support-card h3 { margin: 0; font-size: 1.3rem; }
.mh-support .support-card p { margin: 0; color: var(--mh-dim); }

.mh-support .support-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.mh-support .support-link {
  display: inline-flex;
  padding: 9px 16px;
  border: 1px solid var(--mh-line);
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9rem;
}

.mh-support .support-link--primary { border-color: var(--mh-accent); background: rgba(252, 5, 83, 0.16); }

.mh-support .support-curiosity { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--mh-line); }
.mh-support .support-curiosity__lead { margin: 0; color: var(--mh-faint); font-size: 0.88rem; }
.mh-support .support-curiosity__cta { color: var(--mh-text); font-weight: 600; text-decoration: none; }
.mh-support .support-curiosity__cta:hover { text-decoration: underline; }

.mh-support .support-note { margin: 20px 0 0; color: var(--mh-dim); }

.mh main { padding-bottom: 60px; }

@media (max-width: 900px) {
  .mh-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 10px; }
  .mh-field { order: -1; max-width: 560px; width: 100%; margin: 0 auto; }
  .mh-support .support-grid { grid-template-columns: 1fr; }
  .mh-section { padding: 50px 16px; }
  .mh-top { padding: 16px; flex-wrap: wrap; }
  .mh-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 10px; }
  .mh-card { padding: 14px; gap: 8px; border-radius: 14px; }
  .mh-card__icon { width: 48px; height: 48px; }
  .mh-card h3 { font-size: 1.02rem; }
  .mh-card p { font-size: 0.85rem; }
  .mh-card__actions { flex-direction: column; }
  .mh-heart { font-size: 0.78rem; padding: 3px 8px; }
  .mh-hero { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mh-layer { animation: none !important; }
}
