/** Reset y fundamentos tipográficos. */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);

  /* Resplandor ambiental muy contenido: da profundidad sin caer en el neón. */
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgba(124, 108, 255, 0.14), transparent 60%),
    radial-gradient(80% 50% at 0% 100%, rgba(61, 219, 192, 0.07), transparent 65%);
  background-attachment: fixed;

  -webkit-font-smoothing: antialiased;
  /* Evita el rebote elástico horizontal en móvil. */
  overscroll-behavior-y: none;
}

h1,
h2,
h3 {
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  /* Quita el destello azul al tocar en Chrome Android. */
  -webkit-tap-highlight-color: transparent;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Foco visible solo con teclado, pero siempre claramente visible: es un
   requisito de accesibilidad, no un adorno. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--accent-dim);
  color: var(--text);
}

/* Los importes se leen mejor con cifras de ancho fijo. */
.numeric {
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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