/* Base del sitio de MDIL Games: colores, menú del estudio, encabezado del juego, páginas legales y pie.
   Cada juego agrega su propia hoja (/<juego>/styles.css) y puede cambiar --accent. */
:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #62646a;
  --accent: #b8562f;
  --accent-ink: #ffffff;
  --border: #e4e1d8;
  --studio-bg: #1c1d1f;
  --studio-ink: #efe3c6;
  --radius: 16px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315;
    --surface: #1b1c1f;
    --text: #f1f1f3;
    --muted: #a0a2a8;
    --accent: #e08a62;
    --accent-ink: #1a0f0a;
    --border: #2a2b2f;
    --studio-bg: #232327;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; }

a { color: var(--accent); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Menú del estudio: igual en todas las páginas */
header.studio { background: var(--studio-bg); color: var(--studio-ink); font-size: 14px; }
header.studio .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.studio-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--studio-ink); text-decoration: none; font-weight: 700; letter-spacing: 0.01em; }
.studio-logo .cat {
  width: 22px; height: 22px; background: currentColor;
  -webkit-mask: url(/assets/mdil-cat.png) center / contain no-repeat;
  mask: url(/assets/mdil-cat.png) center / contain no-repeat;
}
header.studio nav a { margin-left: 18px; color: var(--studio-ink); opacity: 0.8; text-decoration: none; }
header.studio nav a:hover { opacity: 1; }

/* Encabezado de cada juego */
header.site { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.logo { font-weight: 800; font-size: 20px; text-decoration: none; color: var(--text); }
.logo span { color: var(--accent); }
header.site nav a { margin-left: 18px; color: var(--muted); text-decoration: none; font-size: 15px; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--text); }

/* Páginas legales y de soporte */
.doc { max-width: 720px; padding: 24px 0 72px; }
.doc h1 { font-size: 36px; margin-bottom: 4px; }
.doc .updated { color: var(--muted); margin-top: 0; }
.doc h2 { font-size: 21px; margin-top: 32px; }

/* Portada del estudio */
.studio-hero { padding: 64px 0 40px; }
.studio-hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.02em; }
.studio-hero p { font-size: 19px; color: var(--muted); margin: 0; max-width: 34em; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; padding-bottom: 72px; }
.game-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; color: var(--text); text-decoration: none; }
.game-card:hover { border-color: var(--accent); }
.game-card img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 10px; margin-bottom: 16px; background: var(--bg); }
.game-card h3 { margin: 0 0 6px; font-size: 20px; }
.game-card p { margin: 0; color: var(--muted); }

footer.site {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
}
footer.site a { color: var(--muted); }

@media (max-width: 760px) {
  header.site nav a, header.studio nav a { margin-left: 12px; }
}
