/* =========================================
   TOKENS GLOBALES
   --color-* son rgb()/rgba() COMPLETOS: var(--color-acento), nunca rgb(var(--color-acento)).
   Tripletas de acto (--efigie-*): rgb(var(--efigie-paz)) en las vistas.
   --color-claro-semitransparente ya es rgba al 80 %.
   --ancho-app 448px (≥480). --sombra-narrativa aquí (no rgba(0,0,0,0.24) suelto).
   Nombres primario/secundario INVERTIDOS respecto a Figma (rosa = primario CSS).
   INTENCIONAL / EXCEPCIÓN: no tocar esos valores.
   ========================================= */

:root {
  /* Colores */
  --color-fondo: rgb(26, 21, 0);
  --color-texto: rgb(241, 255, 234);
  --color-principal: rgb(241, 255, 234);
  --color-contraste-claro: rgb(241, 255, 234); /* INTENCIONAL */
  --color-contraste-oscuro: var(--color-fondo); /* Figma: contraste oscuro; mismo valor que fondo */
  --color-alto-contraste: rgb(255, 255, 255);
  --color-alto-contraste-claro: rgb(255, 255, 255);
  --color-claro-semitransparente: rgba(241, 255, 234, 0.8);
  --color-ornamentos: rgb(97, 78, 0);
  --color-primario: rgb(255, 125, 176);
  --color-primario-activo: rgb(255, 147, 189);
  --color-secundario: rgb(0, 241, 175);
  --color-secundario-activo: rgb(50, 255, 199);
  --color-acento: rgb(241, 203, 12);
  --color-acento-activo: rgb(255, 223, 62);
  --color-error: rgb(183, 0, 42);

  /* Espaciado */
  --espacio-minimo: 2px;
  --espacio-extra-corto: 4px;
  --espacio-corto: 8px;
  --espacio-regular: 16px;
  --espacio-medio: 24px;
  --espacio-largo: 32px;
  --espacio-extra-largo: 48px;
  --espacio-enorme: 64px;
  --espacio-gigante: 80px;

  /* Bordes redondeados */
  --radio-minimo: 2px;
  --radio-chico: 4px;
  --radio-estandar: 8px;
  --radio-mediano: 16px;
  --radio-grande: 24px;
  --radio-gigante: 80px;

  /* Strokes */
  --stroke-delgado: 0.6px;
  --stroke-general: 1px;
  --stroke-llamadas: 2px;
  --stroke-medio: 2px;
  --stroke-decorados: 2.61px;
  --stroke-grueso: 3px;
  --stroke-extra-grueso: 3.91px;

  /* Tipografía */
  --font-principal: "all-round-gothic", sans-serif;
  --font-electro: "nasalization", sans-serif;

  /* Escalas tipográficas (alineadas a .texto-* en sistema-diseno.css) */
  --texto-mini: 14px;
  --texto-chico: 16px;
  --texto-cuerpo: 18px;
  --texto-llamada: 18px;
  --texto-llamada-grande: 24px;
  --texto-titulo-terciario: 22px;
  --texto-titulo-secundario: 26px;
  --texto-titulo-primario: 32px;

  /* Efectos */
  --sombra-flotante: 0 4px 24px rgba(0, 0, 0, 0.5);
  --sombra-narrativa: 8px 8px 24px rgba(20, 16, 0, 0.24);
  --brillo-blanco: 0 0 20px rgba(255, 255, 255, 0.3);

  --ancho-app: 448px;

  /* Responsividad */
  --ancho-minimo: 320px;
  --ancho-mobile: 414px;
  --ancho-tablet: 768px;
  --ancho-desktop: 1440px;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Cursor por defecto en todo el sitio */
*, *::before, *::after {
  cursor: default;
}

/* Cursor de texto SOLO en inputs y textareas y color de texto para contenido */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
[contenteditable="true"] {
  cursor: text;
  color: var(--color-alto-contraste-claro);
}

/* Color de texto para placeholder — ligeramente menos contrastado que el texto escrito */
/* Placeholder: Colores/texto rgb(241,255,234) vs Escrito: Colores/alto-contraste-claro rgb(255,255,255) */
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="search"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
  color: var(--color-texto);
  opacity: 1; /* Necesario porque los navegadores reducen la opacidad del placeholder por defecto */
}

/* Cursor pointer (manita) en elementos interactivos */
a,
a *,
a::before,
a::after,
button,
button *,
button::before,
button::after,
button *::before,
button *::after,
input[type="submit"],
input[type="button"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
select,
label[for],
.boton,
.link-texto,
[role="button"],
[role="button"] *,
[role="button"]::before,
[role="button"]::after,
[role="button"] *::before,
[role="button"] *::after,
[role="switch"],
[role="switch"] *,
[role="switch"]::before,
[role="switch"]::after,
[role="switch"] *::before,
[role="switch"] *::after {
  cursor: pointer;
}

/* Excepción: elementos deshabilitados vuelven a default */
a[disabled],
a[disabled] *,
button[disabled],
button:disabled,
button:disabled *,
button:disabled::before,
button:disabled::after,
button:disabled *::before,
button:disabled *::after,
.boton--deshabilitado,
.boton--deshabilitado *,
.boton--deshabilitado::before,
.boton--deshabilitado::after,
.boton--deshabilitado *::before,
.boton--deshabilitado *::after,
input:disabled {
  cursor: default;
}

/* ═══ Reset tipográfico ═══ 
   REGLA: Los elementos HTML no aportan márgenes propios.
   Todo el espaciado viene del sistema de diseño (gaps/paddings explícitos).
   Las alturas de texto se definen en los estilos .texto-* de sistema-diseno.css.
*/
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, li,
dl, dt, dd,
figure, figcaption,
fieldset, legend {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

ul, ol {
  list-style: none;
}

html {
  min-width: var(--ancho-minimo);
  overflow-x: hidden;
  background-color: var(--color-fondo);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  background-color: var(--color-fondo);
  color: var(--color-texto);
  font-family: var(--font-principal);
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
}

.contenedor-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  background-color: var(--color-fondo);
}

@media (min-width: 480px) {
  .contenedor-app {
    max-width: var(--ancho-app);
  }

  /* Líneas laterales dibujadas hacia adentro (no box-shadow exterior).
     Así el trazo queda a ras del contenedor, sin hueco subpíxel,
     y los elementos internos cubren hasta la orilla.
     z-index por encima del diálogo (1000) para que el overlay
     no tape los límites del lienzo. */
  .contenedor-app::before,
  .contenedor-app::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--color-ornamentos);
    pointer-events: none;
    z-index: 1100;
  }

  .contenedor-app::before {
    left: 0;
  }

  .contenedor-app::after {
    right: 0;
  }
}

/* Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-ornamentos) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-ornamentos);
  border-radius: var(--radio-chico);
}

/* Links */
a {
  color: var(--color-secundario);
  text-decoration: none;
  transition: color 200ms;
}

a:hover {
  color: var(--color-primario);
}

/* Utilidades */
.font-electro {
  font-family: var(--font-electro);
  font-weight: 400;
}

/* Páginas placeholder / 404 */
.pagina-centrada {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--espacio-medio);
  min-height: 100vh;
  padding: var(--espacio-largo);
  text-align: center;
  background-color: var(--color-fondo);
  color: var(--color-texto);
}

.pagina-centrada h1 {
  font-size: var(--texto-titulo-primario);
  line-height: 1.2;
}

.pagina-centrada nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--espacio-regular);
}
