/* Reset, documento y utilidades globales. */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--void);
  color: var(--cream);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Lenis */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--void);
  color: var(--cream);
  font-family: var(--font-text);
  font-weight: var(--w-regular);
  font-synthesis: none;                 /* nunca negrita/cursiva falsas: cada peso sale del eje wght */
  font-variant-emoji: text;             /* símbolos como ↗ o → en texto, nunca como emoji de color (iOS/Android) */
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

::selection { background: var(--blood-deep); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
}
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* El cursor nativo solo se oculta cuando la luz-cursor está activa (puntero fino + WebGL) */
html.has-cursor,
html.has-cursor a,
html.has-cursor button { cursor: none; }
html.has-cursor iframe { cursor: auto; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: calc(var(--z-cursor) + 1);
  padding: 12px 18px;
  background: var(--cream);
  color: var(--ink-dark);
  font: var(--w-semibold) 11px/1 var(--font-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: top 0.3s var(--ease-out);
}
.skip-link:focus { top: 16px; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Flecha diagonal de botones y enlaces (<use href="#icon-arrow-ne">): hereda color y tamaño del texto */
.icon-arrow {
  display: block;
  width: 0.85em;
  height: 0.85em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Fondo: la tela WebGL; el degradado es el respaldo sin JS/WebGL */
.stage {
  position: fixed;
  inset: 0;
  z-index: var(--z-stage);
  pointer-events: none;
  background: var(--void);
}
/* Respaldo si no hay JS o WebGL: degradado carmesi (con JS la intro empieza en negro total) */
.no-js .stage,
.no-webgl .stage { background: radial-gradient(120% 90% at 50% 40%, #3a050c, #000 70%); }
.stage canvas { display: block; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
