/* ==========================================================================
   BASE: tokens de diseno, reset, tipografia y fondo.
   Direccion: "pergamino nocturno". Tinta azul-negra, pergamino, bermellon, oro
   y el cian de las llamas espirituales del arte del banner.
   ========================================================================== */
:root {
  --ink-0: #090b12;
  --ink-1: #0f121c;
  --ink-2: #161a27;
  --ink-3: #1e2333;
  --line: #2a3043;
  --line-hi: #3a4260;

  --gold: #cfa95a;
  --gold-hi: #ecd08e;
  --gold-lo: #7d6334;

  --paper: #eadfc7;
  --paper-dim: #b8ad97;
  --paper-mute: #867f70;
  --parch-ink: #1a130e;

  --verm: #c43d2f;
  --verm-hi: #e0583f;
  --verm-lo: #8d2a20;

  --spirit: #8fe3f5;
  --spirit-lo: #2f7f95;

  --ok: #78d3a0;
  --err: #ff907e;

  --font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Segoe UI", system-ui, sans-serif;

  /* Colores del fondo WebGL (web/assets/js/backdrop.js) */
  --bd-bg: #090b12;
  --bd-red: #b6281d;
  --bd-gold: #cfa95a;
  --bd-violet: #3b2350;

  --radius: 3px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --bar-h: 64px;
  --page-w: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  font: 400 16px/1.55 var(--font-body);
  background: var(--ink-0);
  overflow-x: hidden;
}

/* Atmosfera: resplandor espiritual arriba a la derecha, brasa abajo a la izquierda. */
body::before {
  content: "";
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60rem 38rem at 88% -6%, rgba(143, 227, 245, .11), transparent 70%),
    radial-gradient(48rem 34rem at -6% 106%, rgba(196, 61, 47, .14), transparent 70%),
    linear-gradient(180deg, #0b0d15, #090b12);
}
/* Fondo WebGL propio: niebla roja y dorada con chispas de reitsu. Se desvanece al entrar. */
.bleach-backdrop {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; pointer-events: none;
  display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .9s ease-out;
}
.bleach-backdrop.is-ready { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .bleach-backdrop { transition: none; } }

/* Grano de papel muy sutil sobre todo el sitio. */
body::after {
  content: "";
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; pointer-events: none;
  opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 1.1; }
p { margin: 0; }
a { color: var(--gold-hi); }
a:hover { color: var(--paper); }
img { max-width: 100%; }
button, input, select { font-family: inherit; }
::selection { background: var(--verm); color: #fff; }

.container { width: calc(100% - 40px); max-width: var(--page-w); margin: 0 auto; }
/* Moviles con muesca (viewport-fit=cover): en horizontal el contenido no queda bajo la muesca. */
@supports (padding: env(safe-area-inset-left)) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  body.is-play { padding: 0; }
}
.page { padding-bottom: 56px; }

.eyebrow {
  font: 700 .68rem/1 var(--font-body);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Barras de desplazamiento a juego (WebKit). */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-1); }
::-webkit-scrollbar-thumb { background: var(--gold-lo); border: 2px solid var(--ink-1); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
