/* Tiamat guia — misma marca que la tienda (tokens tomados de tiamat-tienda/site/css/style.css). */
:root {
  --bg: #0e0b16;
  --bg-2: #15101f;
  --surface: #221a34;
  --surface-2: #2b2142;
  --line: rgba(237, 230, 214, .10);
  --text: #ede6d6;
  --muted: #b9b0c9;
  --primary: #8c3fd6;
  --primary-hover: #9d55e3;
  --gold: #f2c14e;
  --gold-hover: #f7cf6d;
  --on-gold: #1b1206;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 18px 48px rgba(0, 0, 0, .45);
  --container: 1152px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: 'Monocraft', 'Syne', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-hover); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--gold); color: var(--on-gold); padding: 10px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
main { flex: 1; }

/* Header */
.site-header { background: #1e1730; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand b { font-family: var(--display); color: var(--text); font-size: 16px; }
.brand small { display: block; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.header-link { margin-left: auto; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.header-link:hover { color: var(--gold); }

/* Buscador */
.buscador-wrap { padding-block: 18px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.buscador { position: relative; max-width: 480px; margin: 0 auto; }
.buscador input {
  width: 100%; min-height: 48px; border-radius: var(--radius); border: 0;
  background: var(--surface); color: var(--text); padding: 0 16px 0 44px;
  font: 600 16px var(--body); box-shadow: inset 0 0 0 1px var(--line);
}
.buscador input::placeholder { color: var(--muted); font-weight: 400; }
.buscador input:focus { box-shadow: inset 0 0 0 2px var(--gold); outline: none; }
.buscador svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
#resultados {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface-2);
  border-radius: var(--radius); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  max-height: 60vh; overflow-y: auto; display: none; z-index: 30;
}
#resultados.abierto { display: block; }
#resultados a { display: block; padding: 10px 16px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
#resultados a:last-child { border-bottom: 0; }
#resultados a:hover, #resultados a:focus { background: rgba(242, 193, 78, .1); }
#resultados a b { color: var(--gold); display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
#resultados .vacio { padding: 16px; color: var(--muted); font-size: 14px; }

/* Hero */
.hero { padding-block: 48px 8px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); text-wrap: balance; }
.hero h1 span { color: var(--gold); }
.hero p { color: var(--muted); max-width: 560px; margin: 14px auto 0; font-size: 17px; }
.hero-banner { max-width: 720px; margin: 24px auto 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.hero-banner img { width: 100%; height: auto; display: block; image-rendering: pixelated; }

/* Grid de modos (portada) */
.modos { padding-block: 36px 64px; }
.grid-modos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.modo-card {
  display: flex; flex-direction: column; gap: 10px; padding: 0 0 18px; border-radius: var(--radius-lg);
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--text);
  transition: box-shadow .18s var(--ease), transform .12s var(--ease); overflow: hidden;
}
.modo-card:hover { box-shadow: inset 0 0 0 1px var(--gold), var(--shadow); transform: translateY(-2px); }
.modo-card .thumb { width: 100%; aspect-ratio: 224 / 96; overflow: hidden; }
.modo-card .thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.modo-card .body { display: flex; flex-direction: column; gap: 8px; padding: 14px 22px 0; }
.modo-card h3 { font-size: 20px; color: var(--text); }
.modo-card p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.modo-card .tag { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--gold); background: rgba(242, 193, 78, .1); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, .3); padding: 3px 10px; border-radius: 999px; }

/* Primeros pasos */
.pasos-card { background: var(--bg-2); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line); padding: 28px; margin-top: 24px; }
.pasos-card h2 { font-size: 22px; margin-bottom: 6px; }
.pasos-card ol { margin: 16px 0 0; padding-left: 20px; color: var(--muted); }
.pasos-card li { margin-bottom: 8px; }
.pasos-card li b { color: var(--text); }

/* Pagina de modo */
.modo-hero { padding-block: 32px 8px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.modo-hero h1 { font-size: clamp(28px, 4.4vw, 40px); }
.modo-banner { margin-top: 18px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.modo-banner img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }

.section { padding-block: 32px 0; }
.section h2 { font-size: 22px; margin-bottom: 14px; }
.pagina-lista { display: grid; gap: 14px; }
.pagina-item { background: var(--bg-2); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); padding: 18px 20px; }
.pagina-item h3 { font-size: 17px; margin-bottom: 6px; color: var(--gold); }
.pagina-item p { color: var(--text); font-size: 15px; line-height: 1.6; white-space: pre-line; }
.pagina-item .acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cmd-chip { font: 600 13px/1 'Menlo', 'Consolas', monospace; color: var(--on-gold); background: var(--gold); padding: 6px 10px; border-radius: 8px; text-decoration: none; }
.cmd-chip:hover { background: var(--gold-hover); color: var(--on-gold); }

.comandos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 4px; }
.comandos-grid code { display: block; text-align: center; font: 600 14px/1 'Menlo', 'Consolas', monospace; padding: 10px 8px; border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }

.cajas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 4px; }
.caja-card { background: var(--bg-2); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); padding: 16px 18px; }
.caja-card .rareza { font-weight: 700; color: var(--gold); font-size: 15px; }
.caja-card .n { color: var(--muted); font-size: 13px; margin-top: 2px; }
.caja-card .destacado { margin-top: 8px; font-size: 14px; color: var(--text); }
.caja-card .destacado b { color: var(--gold); }

.proximamente { background: var(--surface); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); padding: 16px 20px; color: var(--muted); font-size: 14px; }

.cta-tienda { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(135deg, var(--surface-2), var(--surface)); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line); padding: 22px 26px; margin-top: 10px; }
.cta-tienda p { color: var(--muted); font-size: 14px; max-width: 420px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 10px; font-weight: 700; font-size: 15px; text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-hover); color: var(--on-gold); }

/* Footer */
.site-footer { margin-top: 56px; padding: 32px 0 40px; border-top: 1px solid var(--line); background: url(../img/scales.svg) center top / 40px 20px, var(--bg-2); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; }
.site-footer p { color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--muted); font-size: 13px; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

@media (max-width: 640px) {
  .brand small { display: none; }
  .modo-hero h1 { font-size: 28px; }
  .cta-tienda { flex-direction: column; align-items: flex-start; }
}

.cajas-grid + p { margin-top: 16px; }
