/* LT Wave Mono · LyonsType · SIL Open Font License 1.1 (assets/fonts/OFL-LTWave.txt) */
@font-face {
  font-family: 'LT Wave Mono';
  src: url('../assets/fonts/LTWaveMono-Light.otf') format('opentype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'LT Wave Mono';
  src: url('../assets/fonts/LTWaveMono-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'LT Wave Mono';
  src: url('../assets/fonts/LTWaveMono-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'LT Wave Mono';
  src: url('../assets/fonts/LTWaveMono-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}

/* ─────────────────────────────────────────────────────────
   Museo Latente — estilo cianotipo
   Tokens arriba: cambia colores y tipografías desde aquí.
   ───────────────────────────────────────────────────────── */

:root {
  /* Dos modos: cianotipo (fondo azul) y papel (invertido, dentro de las salas).
     --light va de 0 a 1 y lo anima main.js al entrar o salir de una sala. */
  --blue: #04267f;
  --cream: #ebe8df; /* blanco no puro */
  --ink-dark: #f2f3ea; /* tinta clara sobre azul */
  --ink-light: #1b33b0; /* azul ultramar sobre papel */
  --light: 0;

  --bg: color-mix(in srgb, var(--cream) calc(var(--light) * 100%), var(--blue));
  --paper: color-mix(in srgb, var(--ink-light) calc(var(--light) * 100%), var(--ink-dark));
  --paper-2: color-mix(in srgb, var(--paper) 76%, transparent);
  --paper-3: color-mix(in srgb, var(--paper) 55%, transparent);
  --paper-4: color-mix(in srgb, var(--paper) 32%, transparent);
  --line: color-mix(in srgb, var(--paper) 18%, transparent);
  --line-2: color-mix(in srgb, var(--paper) 34%, transparent);
  --panel: color-mix(in srgb, var(--bg) 70%, transparent);
  --ticket: color-mix(in srgb, var(--bg) 55%, #ffffff);
  /* Grilla de fondo: crema sobre azul y, en las salas, azul sobre papel */
  --grid-line: color-mix(in srgb, var(--paper) calc(10% + var(--light) * 2%), transparent);

  --wave: 'LT Wave Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --cond: var(--wave);
  --sans: var(--wave);
  --mono: var(--wave);
  --serif: var(--wave);

  --gutter: clamp(16px, 3vw, 40px);
  --radius: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

::selection {
  background: var(--paper);
  color: var(--bg);
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

.mono {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Énfasis: mismo tipo, más claro y con más peso */
em {
  font-style: normal;
  font-weight: 500;
  color: var(--paper);
}

/* Tipografía grande condensada, apagada como en la referencia */
.big {
  font-family: var(--cond);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--paper-4);
}

#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

main {
  position: relative;
  z-index: 2;
}

/* Grano de papel + viñeta suave */
.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.grain::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.16;
  mix-blend-mode: overlay;
}

.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 10, 50, 0.4) 100%);
  opacity: calc(1 - var(--light) * 0.85);
}

/* ── Loader ─────────────────────────────────────────────── */

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 1.1s var(--ease), visibility 1.1s;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
}

.loader__bar {
  width: min(320px, calc(100% - 64px));
  height: 1px;
  background: var(--line);
  overflow: hidden;
}

.loader__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--paper);
  transition: width 0.3s linear;
}

.loader__error {
  position: absolute;
  top: calc(50% + 18px);
  color: var(--paper-3);
}

/* ── Firma e indicador fijos ────────────────────────────── */

.brand {
  position: fixed;
  top: 24px;
  left: var(--gutter);
  z-index: 30;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-decoration: none;
  color: var(--paper-3);
  transition: opacity 0.8s var(--ease), color 0.3s;
}

.brand:hover,
.brand:focus-visible {
  color: var(--paper);
  outline: none;
}

.indicator {
  position: fixed;
  right: var(--gutter);
  bottom: 22px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 48px;
  padding: 0 7px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), border-color 0.3s;
}

.indicator:hover,
.indicator:focus-visible {
  border-color: var(--line-2);
  outline: none;
}

.indicator__idx {
  color: var(--paper-3);
  font-size: 12px;
}

.indicator__label {
  font-family: var(--cond);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  min-width: 96px;
  text-align: left;
}

.indicator__icon {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: var(--paper);
  display: grid;
  grid-template-columns: repeat(2, 4px);
  gap: 4px;
  place-content: center;
}

.indicator__icon i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bg);
}

.is-loading .brand,
.is-loading .indicator,
.is-intro .indicator {
  opacity: 0;
  pointer-events: none;
}

.is-intro .indicator {
  transform: translateY(12px);
}

/* Franja superior: el contenido pasa por debajo de la marca y del botón de sonido */
.topfade {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 29;
  height: 72px;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 45%, color-mix(in srgb, var(--bg) 0%, transparent));
}

/* ── Botón de sonido (arriba a la derecha) ───────────────── */

.sound {
  position: fixed;
  top: 18px;
  right: var(--gutter);
  z-index: 31;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 26px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper-3);
  font: inherit;
  cursor: pointer;
  transition: color 0.3s, opacity 0.8s var(--ease);
}

.sound:hover,
.sound:focus-visible {
  color: var(--paper);
  outline: none;
}

.sound__label {
  font-size: 10px;
  min-width: 9ch;
  text-align: left;
}

/* Ecualizador: barras quietas cuando está en silencio, bailan cuando suena */
.sound__bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 12px;
}

.sound__bars i {
  width: 2px;
  height: 100%;
  background: currentColor;
  transform: scaleY(0.14);
  transition: transform 0.5s var(--ease);
}

.sound.is-on .sound__bars i:nth-child(odd) {
  transform: scaleY(0.45);
}

.sound.is-playing .sound__bars i {
  animation: eq 1.2s ease-in-out infinite;
}

.sound.is-playing .sound__bars i:nth-child(2) { animation-duration: 0.9s; animation-delay: -0.3s; }
.sound.is-playing .sound__bars i:nth-child(3) { animation-duration: 1.5s; animation-delay: -0.7s; }
.sound.is-playing .sound__bars i:nth-child(4) { animation-duration: 1.05s; animation-delay: -0.2s; }
.sound.is-playing .sound__bars i:nth-child(5) { animation-duration: 1.35s; animation-delay: -0.9s; }

/* Apagado: las barras respiran despacio, invitando a encender el sonido */
.sound:not(.is-on) .sound__bars i {
  animation: invite 2.6s ease-in-out infinite;
}

.sound:not(.is-on) .sound__bars i:nth-child(2) { animation-delay: 0.15s; }
.sound:not(.is-on) .sound__bars i:nth-child(3) { animation-delay: 0.3s; }
.sound:not(.is-on) .sound__bars i:nth-child(4) { animation-delay: 0.45s; }
.sound:not(.is-on) .sound__bars i:nth-child(5) { animation-delay: 0.6s; }

@keyframes invite {
  0%,
  60%,
  100% {
    transform: scaleY(0.14);
  }
  30% {
    transform: scaleY(0.5);
  }
}

@keyframes eq {
  0%,
  100% {
    transform: scaleY(0.2);
  }
  50% {
    transform: scaleY(1);
  }
}

.is-loading .sound {
  opacity: 0;
  pointer-events: none;
}

/* ── Cursor ─────────────────────────────────────────────── */

.cursor {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 60;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    border: 1px solid var(--paper-3);
    border-radius: 50%;
    pointer-events: none;
    transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), border-color 0.35s;
  }

  .cursor i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    margin: -2px 0 0 -2px;
    border-radius: 50%;
    background: var(--paper);
  }

  .has-cursor,
  .has-cursor a,
  .has-cursor button {
    cursor: none;
  }

  .cursor.is-hover {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border-color: var(--paper);
  }

  .is-loading .cursor {
    opacity: 0;
  }
}

/* ── Bloques compartidos: stats e info_log ──────────────── */

.stats {
  width: 230px;
}

.stats__title {
  color: var(--paper-3);
  font-size: 10px;
}

.stats__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 22px;
  color: var(--paper);
}

.stats__status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--paper);
  animation: pulse 2.4s ease-in-out infinite;
}

.stats__sub {
  color: var(--paper-3);
  font-size: 10px;
  margin: 6px 0 20px;
}

.bar {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 8px;
  margin-bottom: 18px;
  font-size: 10px;
  color: var(--paper-2);
}

.bar b {
  font-weight: 400;
  color: var(--paper);
}

.bar i {
  grid-column: 1 / -1;
  height: 2px;
  background: linear-gradient(to right, var(--paper-2) calc(var(--v) * 100%), var(--line) 0);
}

.stats__log {
  list-style: none;
  padding: 0;
  margin-top: 26px;
  font-size: 9.5px;
  line-height: 1.9;
  color: var(--paper-3);
}

.log {
  display: flex;
  gap: 22px;
  margin-top: 28px;
}

.log__line {
  flex: none;
  width: 72px;
  height: 1px;
  margin-top: 8px;
  background: var(--paper-3);
}

.log__label {
  color: var(--paper-3);
  margin-bottom: 8px;
}

.log__text {
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper-2);
}

.log__date {
  margin-top: 10px;
  color: var(--paper-3);
}

@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
}

/* La info del hero va fija a la pantalla (main.js la muestra arriba y al final) */
.hero__plate {
  position: fixed;
  top: 52px;
  right: var(--gutter);
  font-size: 10px;
  color: var(--paper-3);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Etiquetas proyectadas desde la escena 3D */
.annos {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.anno {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  will-change: transform, opacity;
}

.anno .mono {
  font-size: 10px;
  color: var(--paper-2);
  white-space: nowrap;
}

.anno--height > span {
  position: absolute;
  right: 0;
  transform: translate(-12px, -50%);
}

.anno--base > span {
  position: absolute;
  transform: translate(-50%, 10px);
}

.hero__stats {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
}

.hero__sign {
  position: fixed;
  right: var(--gutter);
  bottom: 34px;
}

.hero__sign::before {
  content: '';
  position: absolute;
  inset: -60px -40px -40px -80px;
  background: radial-gradient(closest-side, rgba(4, 38, 127, 0.92) 45%, rgba(4, 38, 127, 0));
  z-index: -1;
  pointer-events: none;
}

/* Contacto abajo a la izquierda */
.hero__contact {
  position: fixed;
  left: var(--gutter);
  bottom: 34px;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: end;
  gap: 40px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
}

.hero__contact-label {
  color: var(--paper-3);
}

.hero__contact-value {
  color: var(--paper);
  text-decoration: none;
}

a.hero__contact-value:hover,
a.hero__contact-value:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
  outline: none;
}

.hero__cue {
  justify-content: flex-end;
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper-2);
}

.hero__cue-line {
  position: relative;
  width: 1px;
  height: 32px;
  background: var(--line);
  overflow: hidden;
}

.hero__cue-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: -40%;
  width: 1px;
  height: 40%;
  background: var(--paper);
  animation: cue 1.8s var(--ease) infinite;
}

@keyframes cue {
  to {
    top: 100%;
  }
}

/* ── Inmersión ──────────────────────────────────────────── */

.dive {
  height: 260vh;
}

/* ── Salas ──────────────────────────────────────────────── */

.room {
  position: relative;
}

.room__intro {
  position: relative;
  height: 100vh;
  height: 100svh;
}

.room__left {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  max-width: 27vw;
}

.room__kicker {
  color: var(--paper-2);
  margin-bottom: 14px;
}

.room__kicker span {
  color: var(--paper-3);
}

.room__title {
  position: relative;
  font-size: clamp(44px, 5.4vw, 88px);
  color: color-mix(in srgb, var(--paper) 62%, transparent);
}

.room__right {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
}

.room__work {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.room__body {
  width: min(540px, 40vw);
  margin: 0 max(var(--gutter), 5vw) 0 auto;
  padding-top: 14vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.room__tail {
  height: 55vh;
}

/* Tramo final: al llegar al fondo, el sitio vuelve a la pirámide (ver main.js) */
.loop {
  height: 170vh;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--paper);
  animation: pulse 2.4s ease-in-out infinite;
}

/* ── Tarjetas estilo terminal vintage (Minitel / videojuego) ─────
   Marco de píxeles con esquinas recortadas, prompt "→", número grande
   en matriz de puntos, barra invertida, campos con puntos guía y
   leyenda de teclas. Mismos colores: tinta ultramar sobre papel. */

.term {
  position: relative;
  padding: 16px 18px 18px;
  background: var(--ticket);
  color: var(--paper);
  /* borde de 2 px sin esquinas (look 8 bits) + sombra dura desplazada */
  box-shadow:
    0 -2px 0 var(--paper),
    0 2px 0 var(--paper),
    -2px 0 0 var(--paper),
    2px 0 0 var(--paper),
    6px 6px 0 color-mix(in srgb, var(--paper) 22%, transparent);
}

/* Líneas de barrido muy sutiles, como un monitor CRT */
.term::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--paper) 6%, transparent) 0 1px, transparent 1px 3px);
}

.term__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.term__prompt {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.term__prompt span {
  margin-right: 6px;
}

/* Número grande hecho de puntos (como el "11" de la referencia) */
.term__num {
  font-size: 64px;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.02em;
  -webkit-mask: radial-gradient(circle, #000 1.55px, transparent 1.75px) 0 0 / 4px 4px;
  mask: radial-gradient(circle, #000 1.55px, transparent 1.75px) 0 0 / 4px 4px;
}

/* Barra invertida: fondo de tinta, texto en papel */
.term__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ticket);
}

.term__name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.term__tag {
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid var(--ticket);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Campos: etiqueta alineada a la derecha + valor + puntos guía */
.term__form {
  display: grid;
  gap: 7px;
}

.term__field {
  display: grid;
  grid-template-columns: 9.5ch 1fr;
  align-items: baseline;
  gap: 8px;
}

.term__field dt {
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.term__field dd {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.term__field dd::after {
  content: '';
  flex: 1 1 18px;
  min-width: 18px;
  height: 3px;
  background: radial-gradient(circle, var(--paper-3) 1.1px, transparent 1.4px) 0 0 / 7px 3px repeat-x;
}

/* Nota en minúsculas, como "vous pouvez préciser" */
.term__note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid var(--paper);
  font-size: 13px;
  line-height: 1.6;
  color: var(--paper-2);
}

/* Leyenda de teclas: descripción alineada a la derecha + tecla invertida */
.keys {
  list-style: none;
  padding: 12px 0 0;
  margin-top: 12px;
  border-top: 2px solid var(--paper);
  display: grid;
  gap: 6px;
}

/* Todas las teclas con el mismo ancho (la columna toma el nombre más largo) */
.keys {
  grid-template-columns: 1fr max-content;
  column-gap: 10px;
  align-items: center;
}

.keys li {
  display: contents;
}

.keys span {
  text-align: right;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--paper-2);
}

.keys b {
  padding: 3px 9px;
  background: var(--paper);
  color: var(--ticket);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.models__title {
  margin: 14px 0 -2px;
  color: var(--paper-3);
}

.models {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.room__note {
  margin-top: 4px;
  padding: 2px 0 2px 12px;
  border-left: 1.5px solid var(--paper);
  color: var(--paper-2);
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* ── Índice: vista previa de las cuatro salas ─────────── */

.index {
  height: 220vh;
}

.index__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}

/* Fijos a la pantalla (no al bloque sticky) para que coincidan con el 3D
   también mientras la sección entra o sale */
.callouts {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* Cada nodo se ubica por JS exactamente sobre su obra */
.node {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  text-decoration: none;
  color: var(--paper);
  outline: 1px solid transparent;
  outline-offset: 10px;
  transition: outline-color 0.5s var(--ease);
}

.node:hover,
.node:focus-visible {
  outline-color: var(--line);
}

.node__meta {
  position: absolute;
  left: -6px;
  top: calc(100% + 10px);
  padding: 3px 6px;
  background: var(--bg);
  white-space: nowrap;
  color: var(--paper-2);
  transition: color 0.4s;
}

.node__meta b {
  font-weight: 400;
  color: var(--paper-3);
  margin-right: 10px;
}

.node__cta {
  position: absolute;
  left: -6px;
  top: calc(100% + 34px);
  padding: 2px 6px;
  background: var(--bg);
  white-space: nowrap;
  color: var(--paper);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

/* Si el nodo está en una esquina de abajo, la etiqueta va arriba */
.node.label-top .node__meta {
  top: auto;
  bottom: calc(100% + 10px);
}

.node.label-top .node__cta {
  top: auto;
  bottom: calc(100% + 36px);
}

.node:hover .node__meta,
.node:focus-visible .node__meta {
  color: var(--paper);
}

.node:hover .node__cta,
.node:focus-visible .node__cta {
  opacity: 1;
  transform: none;
}

/* Coordenadas junto a cada nodo del grafo */
.knees {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.knee {
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 5px;
  background: var(--bg);
  font-size: 9.5px;
  color: var(--paper-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  will-change: transform, opacity;
}

/* Grilla de fondo muy sutil que se desvanece hacia los bordes */
.gridbg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 132px 132px, 132px 132px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 48%, #000 15%, transparent 88%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 48%, #000 15%, transparent 88%);
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1100px) {
  .hero__stats {
    display: none;
  }
}

@media (max-width: 760px) {
  .brand {
    font-size: 11px;
  }

  .hero__sign {
    left: var(--gutter);
    right: var(--gutter);
    bottom: 92px;
    width: auto;
  }

  .log {
    gap: 14px;
    margin-top: 18px;
  }

  .log__line {
    width: 32px;
  }

  .log__text {
    font-size: 13px;
  }

  .hero__contact {
    bottom: 26px;
    gap: 24px;
    font-size: 10.5px;
  }

  .hero__cue,
  .annos,
  .hero__plate {
    display: none;
  }

  .room__left {
    top: auto;
    bottom: 84px;
    transform: none;
    max-width: none;
    right: var(--gutter);
  }

  .room__title {
    font-size: 44px;
  }

  .room__right {
    display: none;
  }

  .room__body {
    width: auto;
    margin: 0 var(--gutter);
    padding-top: 18vh;
  }

  .term__num {
    font-size: 48px;
  }

  .term__field {
    grid-template-columns: 8ch 1fr;
  }

  .keys {
    grid-template-columns: 1fr;
    row-gap: 3px;
  }

  .keys b {
    margin-bottom: 6px;
  }

  .keys span {
    text-align: left;
  }

  .keys b {
    justify-self: start;
  }

  .knees {
    display: none;
  }

  .indicator {
    bottom: 14px;
    height: 42px;
  }

  .indicator__label {
    font-size: 17px;
    min-width: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
