/* base.css — reset corto + tipografía. Todo sale de tokens.css. */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--txt-base);
  line-height: 1.5;
  letter-spacing: -0.006em; /* Inter respira mejor un poco apretada */
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* la app se usa con el dedo: nada de "selección" accidental al arrastrar la agenda */
  -webkit-tap-highlight-color: transparent;
}

/* Con un panel abierto, el fondo no scrollea detrás (sobre todo en el celular, donde el
   gesto de bajar el panel movía la agenda de atrás). */
body.con-panel {
  overflow: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink-900);
  line-height: 1.2;
  font-weight: var(--peso-fuerte);
  letter-spacing: var(--track-titulo);
  text-wrap: balance;
}
/* El título de pantalla es EDITORIAL: Georgia del sistema, sin descargar nada. */
h1 {
  font-family: var(--font-display);
  font-size: var(--txt-display);
  font-weight: var(--peso-normal);
  line-height: 1.12;
  letter-spacing: var(--track-display);
}
h2 {
  font-size: var(--txt-lg);
}
h3 {
  font-size: var(--txt-base);
}

p {
  margin: 0;
}

a {
  color: var(--brand-600);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

img,
svg {
  max-width: 100%;
  display: block;
}

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

/* Los números se comparan en columna (montos, horas): que no bailen al cambiar. */
.plata,
.lista__monto,
.tile__valor,
.agenda__hora,
.turno__hora,
time {
  font-variant-numeric: tabular-nums;
}

/* El foco se ve SIEMPRE (teclado y lector de pantalla): accesibilidad no es opcional.
   Terracota con un halo claro, para que se vea sobre CUALQUIER fondo (incluso sobre la
   barra oscura o un bloque de turno de color). */
:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--surface);
  border-radius: var(--r-sm);
}
:focus:not(:focus-visible) {
  outline: none;
}

/* Saltar al contenido: el primer tab de la página, invisible hasta que se enfoca. */
.saltar {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: calc(var(--z-toast) + 1);
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--brand-500);
  border-radius: var(--r-md);
  color: var(--ink-900);
  font-weight: var(--peso-medio);
  transform: translateY(-200%);
}
.saltar:focus {
  transform: translateY(0);
  text-decoration: none;
}

/* Respeta a quien pidió menos movimiento en el sistema. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Alpine: esconde lo que todavía no se hidrató (evita el flash de todos los tabs juntos). */
[x-cloak] {
  display: none !important;
}

.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Para el lector de pantalla y nadie más (la leyenda de un fieldset, un rótulo que ya se ve). */
.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
