/* =====================================================================
   Portada: pantalla de título del juego, lista de mundos, proyectos y pasos.
   ===================================================================== */

/* ---------- Pantalla de título (a sangre, rompe el contenedor) ---------- */
.mc-titulo-pantalla {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: calc(100svh - var(--barra-alto));
  margin: 0 calc(50% - 50vw);
  padding: 48px 24px 232px;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
}
.mc-titulo-pantalla::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 55% at 50% 38%, rgba(227, 38, 38, .14), transparent 70%),
    radial-gradient(90% 60% at 50% 100%, rgba(244, 120, 40, .16), transparent 60%);
}
.mc-titulo-corto { min-height: 0; padding: 48px 24px 200px; }
.mc-titulo-in { display: grid; justify-items: center; gap: 0; width: 100%; max-width: 760px; margin: 0 auto; }

/* Logotipo: escudo + BLOODDATE en pixel con fondo de bloque */
.mc-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 28px;
  margin: 0 0 20px;
  font-weight: 400;
}
.mc-logo-escudo { width: 132px; height: 132px; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 32px rgba(227, 38, 38, .35)); }
.mc-logo-marca { position: relative; display: block; }
/* Logotipo pixel (herramientas/logo.py): se amplía en múltiplos exactos de su tamaño (67 × 13) */
.mc-logo-img { display: block; width: 603px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .55)); }
/* Splash: frase amarilla girada que late, como en el menú del juego */
.mc-splash {
  position: absolute;
  right: -72px;
  bottom: -18px;
  max-width: 300px;
  font-family: var(--pixel);
  font-size: 24px;
  line-height: 1.15;
  color: var(--oro-claro);
  text-shadow: .125em .125em 0 #3f3810;
  white-space: nowrap;
  transform: rotate(-18deg);
  transform-origin: center;
  animation: mc-splash 1s ease-in-out infinite;
  pointer-events: none;
}
@keyframes mc-splash {
  0%, 100% { transform: rotate(-18deg) scale(1); }
  50% { transform: rotate(-18deg) scale(1.08); }
}
.mc-lema { margin: 40px 0 0; font-family: var(--pixel); font-size: 24px; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.mc-intro { max-width: 56ch; margin: 12px auto 0; color: var(--tinta-2); font-size: 18px; line-height: 1.55; }
.mc-intro strong { color: var(--tinta) !important; }

/* Menú del juego: botones de 400 px, los secundarios de dos en dos */
.mc-menu-juego {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: min(400px, 100%);
  margin-top: 36px;
}
.mc-menu-juego .bd-btn { width: 100%; }
.mc-menu-juego .bd-btn img, .mc-menu-juego .bd-btn svg { width: 24px; height: 24px; }
.mc-ancho { grid-column: 1 / -1; }
.mc-menu-juego > .bd-btn-gold { min-height: 52px; font-size: 16px; margin-bottom: 8px; }
.mc-entrar { margin-top: 10px; }
.mc-entrar button { border: 0; background: none; color: var(--tinta-2); font: inherit; font-size: 15px; cursor: pointer; padding: 6px; }
.mc-entrar span { color: var(--oro-claro); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 2px; }
.mc-entrar button:hover span { color: var(--oro); }

/* Versión y aviso en las esquinas, como la pantalla del juego */
.mc-version, .mc-copy {
  position: absolute;
  bottom: 112px;
  margin: 0;
  font-family: var(--pixel);
  font-size: 16px;
  color: #fff;
  text-shadow: .125em .125em 0 #3f3f3f;
  opacity: .85;
}
.mc-version { left: max(24px, calc(50vw - var(--ancho) / 2)); }
.mc-copy { right: max(24px, calc(50vw - var(--ancho) / 2)); }

/* Muralla del bastión con almenas, sobre el mar de lava */
.mc-muralla {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 48px;
  z-index: -1;
  height: 96px;
  background: url(../img/mundo/ladrillos.png) 0 0 / 64px 64px;
  image-rendering: pixelated;
  -webkit-mask: linear-gradient(#000 0 0) bottom / 100% 64px no-repeat, repeating-linear-gradient(90deg, #000 0 32px, transparent 32px 64px) top / 100% 32px no-repeat;
  mask: linear-gradient(#000 0 0) bottom / 100% 64px no-repeat, repeating-linear-gradient(90deg, #000 0 32px, transparent 32px 64px) top / 100% 32px no-repeat;
  filter: drop-shadow(0 -2px 0 #000);
}
/* El mar de lava: un bloque entero de alto (no la franja del pie), con su resplandor subiendo por la muralla */
.mc-titulo-pantalla > .mc-lava { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; box-shadow: 0 -20px 48px rgba(227, 38, 38, .45), 0 -2px 0 #000; }

/* ---------- Proyectos de Farmermon ---------- */
.mc-proyectos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.mc-proyecto h3 { margin: 0 0 14px; font-family: var(--pixel); font-size: 24px; font-weight: 400; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.mc-proyecto-objetos { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.mc-proyecto-objetos .mc-slot { position: relative; }
.mc-proyecto-objetos .mc-hecho img { opacity: .45; }
.mc-proyecto-objetos .mc-hecho::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 12px;
  height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6' shape-rendering='crispEdges'%3E%3Cpath fill='%236fdc7e' d='M6 0h1v2H6zM5 2h1v1H5zM4 3h1v1H4zM3 4h1v1H3zM2 5h1v1H2zM1 4h1v1H1zM0 3h1v1H0z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mc-proyecto-cifras { display: flex; justify-content: space-between; margin: 10px 0 0; color: var(--tinta-2); font-size: 15px; }
.mc-proyecto-cifras b { font-family: var(--pixel); font-size: 16px; font-weight: 400; color: var(--oro-claro); }
.mc-novedades p { margin: 0; color: var(--tinta-2); line-height: 1.7; }

/* ---------- Cómo unirse ---------- */
.mc-pasos { position: relative; }
.mc-unirse-cta { margin: 28px 0 0; text-align: center; }

/* ---------- Adaptación ---------- */
@media (max-width: 1023px) {
  .mc-logo { flex-direction: column; gap: 16px; }
  .mc-logo-escudo { width: 96px; height: 96px; }
  .mc-logo-img { width: 469px; }
  .mc-splash { right: -16px; bottom: -22px; font-size: 16px; }
  .mc-copy { display: none; }
  .mc-version { left: 16px; }
}
@media (max-width: 560px) {
  .mc-titulo-pantalla { padding: 40px 16px 168px; min-height: calc(100svh - var(--barra-alto) - 80px); }
  .mc-titulo-corto { min-height: 0; padding-bottom: 168px; }
  .mc-titulo-pantalla > .mc-lava { height: 32px; }
  .mc-muralla { bottom: 32px; }
  .mc-logo-img { width: 335px; }
  /* En el móvil el escudo ya está en la barra: sin él, la muralla y la lava quedan por encima de la hotbar */
  .mc-logo-escudo { display: none; }
  .mc-splash { right: -4px; bottom: -26px; }
  .mc-lema { font-size: 16px; margin-top: 56px; }
  .mc-intro { font-size: 16px; }
  .mc-menu-juego { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-splash { animation: none; }
}
