/* =========================================================
   Maggie Games - hub estilo plataforma de juegos (sep 2026)
   .hub      = banda oscura de la home: titular + tile destacado + grilla de tiles
   .tiles    = grilla de juegos con captura real (img/previews), reutilizada en
               las paginas de juego como "More games"
   .rail     = carrusel horizontal de imprimibles
   .theatre  = pagina de juego: el juego al centro sobre banda oscura y ancha
   Se carga DESPUES de site.css. La prosa de abajo sigue clara.
   ========================================================= */

/* ---------- banda oscura ---------- */
.hub {
  background:
    radial-gradient(900px 520px at 12% -10%, #2a5f8f 0%, transparent 60%),
    radial-gradient(700px 480px at 92% 8%, #3b1d4b 0%, transparent 55%),
    linear-gradient(180deg, #0f1e33 0%, #12233a 100%);
  color: #fff;
}
.hub .wrap { padding-block: clamp(34px, 5vw, 64px) clamp(40px, 6vw, 72px); }
.hub-top {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(26px, 4vw, 60px); align-items: center;
}
.hub h1 {
  color: #fff; font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.6rem);
  line-height: 1.02; letter-spacing: -.025em;
}
.hub .lede { color: rgba(255,255,255,.84); margin-top: .8em; max-width: 52ch; }
.hub .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hub .btn { background: var(--accent); color: #3a2405; box-shadow: 0 6px 0 #a9620b; }
.hub .btn:hover { background: #f0a03a; transform: translateY(-2px); }
.hub .btn.ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; border: 2px solid rgba(255,255,255,.3); }
.hub .btn.ghost:hover { background: rgba(255,255,255,.18); }
.hub .badges { margin-top: 22px; }
.hub .badge { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #fff; }

/* ---------- tile destacado ---------- */
.feat {
  position: relative; display: block; border-radius: 26px; overflow: hidden;
  aspect-ratio: 3 / 2; background: #12172e; color: #fff; text-decoration: none;
  box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.12) inset;
  transform: rotate(-1.5deg);
  transition: transform calc(.25s * var(--speed)) ease;
}
.feat:hover, .feat:focus-visible { transform: rotate(0deg) scale(1.02); }
.feat img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.feat .cap {
  position: absolute; inset: auto 0 0 0; padding: 60px 20px 18px;
  background: linear-gradient(transparent, rgba(6,12,24,.85));
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
}
.feat h2 { color: #fff; font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem); margin: 0; }
.feat .cap p { color: rgba(255,255,255,.8); font-size: .95rem; margin-top: 2px; }
.feat .playbtn {
  flex: none; background: var(--accent); color: #3a2405; font-weight: 900;
  border-radius: 999px; padding: 13px 24px; box-shadow: 0 6px 0 #a9620b;
  display: inline-flex; align-items: center; gap: 8px; font-size: 1.05rem;
}
.feat .new {
  position: absolute; top: 16px; left: 16px; background: #ff5c7a; color: #fff;
  font-weight: 900; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.35);
}

/* ---------- grilla de tiles ---------- */
.tiles {
  display: grid; gap: clamp(14px, 2vw, 22px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(30px, 4vw, 52px);
}
.tile {
  position: relative; display: block; border-radius: 20px; overflow: hidden;
  aspect-ratio: 3 / 2; background: #173a56; color: #fff; text-decoration: none;
  box-shadow: 0 10px 28px rgba(0,0,0,.38), 0 0 0 1px rgba(255,255,255,.1) inset;
  transition: transform calc(.18s * var(--speed)) ease, box-shadow .18s;
  outline-offset: 4px;
}
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform calc(.4s * var(--speed)) ease; }
.tile:hover, .tile:focus-visible { transform: translateY(-6px) scale(1.02); box-shadow: 0 24px 44px rgba(0,0,0,.5); }
.tile:hover img { transform: scale(1.06); }
.tile .cap {
  position: absolute; inset: auto 0 0 0; padding: 44px 16px 14px;
  background: linear-gradient(transparent, rgba(6,12,24,.82));
}
.tile h3 { color: #fff; font-size: 1.15rem; margin: 0; line-height: 1.15; }
.tile .chip {
  display: inline-block; font-size: .7rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: .07em; color: #fff; background: rgba(255,255,255,.2);
  padding: 4px 9px; border-radius: 999px; margin-bottom: 7px;
}
.tile .go {
  position: absolute; top: 12px; right: 12px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: #3a2405; display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 900; box-shadow: 0 4px 0 #a9620b;
  opacity: 0; transform: scale(.7); transition: calc(.18s * var(--speed));
}
.tile:hover .go, .tile:focus-visible .go { opacity: 1; transform: none; }
@media (hover: none) { .tile .go { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hub-top { grid-template-columns: 1fr; }
  .feat { transform: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .tiles { grid-template-columns: 1fr; }
  .feat .cap { flex-direction: column; align-items: flex-start; }
}

/* ---------- carrusel de imprimibles ---------- */
.rail-wrap { position: relative; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(180px, 22vw, 230px);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 4px 16px; scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.sheet {
  scroll-snap-align: start; display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform calc(.18s * var(--speed)) ease, box-shadow .18s;
}
.sheet:hover, .sheet:focus-visible { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(18,35,58,.16); }
.sheet .paper {
  aspect-ratio: 1 / 1.06; background: #fff; padding: 16px 16px 12px;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px;
  border-bottom: 1px solid var(--border);
  background-image: linear-gradient(180deg, transparent 84%, #eef3f8 84%);
}
.sheet .paper img { width: 100%; height: 100%; object-fit: contain; }
.sheet .paper .sil { filter: brightness(0); opacity: .82; }
.sheet .paper.pdf { grid-template-columns: 1fr; place-items: center; font-size: 2.6rem; }
.sheet .name { display: block; padding: 12px 14px 14px; font-weight: 800; font-size: .95rem; line-height: 1.25; }
.sheet .name small { display: block; color: var(--ink-soft); font-weight: 600; font-size: .8rem; margin-top: 3px; }

/* ---------- pagina de juego: teatro ---------- */
/* 2026-09-18: sin banda oscura, el fondo es el de toda la pagina; el color lo pone la zona de juego */
.theatre {
  background: var(--bg);
  color: var(--ink);
  padding-block: clamp(18px, 3vw, 32px) clamp(30px, 5vw, 56px);
}
.theatre .wrap { max-width: 1400px; }
.theatre .thead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.theatre h1 { color: var(--ink); font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.3rem); margin: 0; letter-spacing: -.02em; }
.theatre .chip {
  display: inline-block; font-size: .72rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: .07em; color: #3a2405; background: var(--accent);
  padding: 5px 11px; border-radius: 999px;
}
.theatre .lede { color: var(--ink-soft); max-width: 72ch; font-size: 1.02rem; margin: 0 0 18px; }
.theatre .play { box-shadow: 0 18px 44px rgba(18,35,58,.28); }
.theatre .more { margin-top: clamp(22px, 3vw, 34px); }
.theatre .more h2 { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .06em; }
.theatre .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 0; }
.theatre .tile { border-radius: 14px; }
.theatre .tile h3 { font-size: .95rem; }
.theatre .tile .chip { font-size: .68rem; padding: 3px 8px; }
.theatre .tile .cap { padding: 28px 12px 10px; }
.theatre .tile .go { width: 38px; height: 38px; font-size: 1.05rem; top: 8px; right: 8px; }
@media (max-width: 900px) { .theatre .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .theatre .tile .chip { display: none; } }
@media (max-width: 560px) { .theatre .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* la miga arriba de la banda oscura */

/* la miga vive adentro de la banda oscura, no como franja blanca arriba */
.theatre .crumb { color: var(--ink-soft); padding: 0 0 12px; font-size: .92rem; }
.theatre .crumb a { color: var(--brand-dark); }
.theatre .crumb span { color: var(--border); }

/* "No download, no account...": texto con tilde, no botones */
.hub .badges { gap: 6px 22px; }
.hub .badge { background: none; border: 0; padding: 0; color: rgba(255,255,255,.85); font-size: .95rem; }
.hub .badge::before { content: "✓"; color: var(--accent); font-weight: 900; margin-right: 7px; }

/* ---------- secciones de la home con imagen: texto a un lado, ilustracion al otro ---------- */
.split {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 5vw, 64px); align-items: center;
  margin-bottom: clamp(34px, 5vw, 56px);
}
.split .pic {
  border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-alt);
  box-shadow: 0 18px 44px rgba(18,35,58,.16);
}
.split .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.split.rev .pic { order: 2; }
.split .section-head { margin-bottom: 0; }
.split .lede { margin-top: .7em; }
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .split.rev .pic { order: 0; }
}
/* mas aire entre bloques de prosa largos */
#for-grownups .prose h3 { margin-top: 2.2em; }

/* 6 tarjetas de caracteristicas: 3 columnas, no 4 + 2 huerfanas */
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- tarjetas de caracteristicas: icono de linea en pastilla de color ---------- */
.feature {
  border-radius: 20px; padding: 26px 24px 24px; position: relative;
  box-shadow: 0 1px 2px rgba(18,35,58,.04);
  transition: transform calc(.18s * var(--speed)) ease, box-shadow .18s, border-color .18s;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(18,35,58,.12); border-color: transparent; }
.feature .ico {
  width: 52px; height: 52px; border-radius: 16px; margin-bottom: 16px;
  display: grid; place-items: center; color: #fff; background: var(--brand);
  box-shadow: 0 6px 14px rgba(18,35,58,.18);
}
.feature .ico svg { width: 26px; height: 26px; }
.feature .ico.t1 { background: linear-gradient(145deg, #1a7fa3, #14607d); }
.feature .ico.t2 { background: linear-gradient(145deg, #f0a03a, #d8801a); }
.feature .ico.t3 { background: linear-gradient(145deg, #8b5cf6, #6d3fd8); }
.feature .ico.t4 { background: linear-gradient(145deg, #2fa872, #1d8a5a); }
.feature .ico.t5 { background: linear-gradient(145deg, #ef5f86, #d63d69); }
.feature .ico.t6 { background: linear-gradient(145deg, #3b82f6, #2563c9); }
.feature h3 { font-size: 1.12rem; margin-bottom: .35em; letter-spacing: -.01em; }
.feature p { color: var(--ink-soft); font-size: .95rem; line-height: 1.55; }

/* ---------- categorias (sep 2026): una categoria = una pagina con su keyword ---------- */
.hub .cats-h { color: rgba(255,255,255,.9); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; margin-top: clamp(30px, 4vw, 52px); }
.hub .tiles.cats { margin-top: 14px; }
