/* =====================================================================
   MiesApp — BASE
   Reset y elementos sueltos (html, body, tipografía base, inputs por
   defecto, keyframes globales). Nada de componentes ni de layout.
   ===================================================================== */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--app-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  font-size: 1rem;
  /* El documento ya NO scrollea: queda fijo al alto del viewport. Así no hay
     rebote posible, porque no hay nada que "estire". */
  height: 100%;
  overflow: hidden;
  overscroll-behavior-y: none;
}

/* Sin barra de scroll visible: en la PWA de iOS aparece una barra gris al
   scrollear que molesta. El scroll sigue funcionando igual, solo se oculta. */
::-webkit-scrollbar { width: 0; height: 0; display: none; }
.body-in, .wscroll, .scr, #s-home, html, body { scrollbar-width: none; -ms-overflow-style: none; }

/* ---- Tipografía de bloque ---- */
/* Tracking negativo en títulos: el texto grande "se abre" al crecer, se compensa
   apretando levemente (Apple, The Details of UI Typography). Leading ajustado. */
h1 { font-size: var(--fs-2xl); font-weight: 600; margin: 2px 0 14px; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: var(--fs-xl); font-weight: 600; margin: 0; letter-spacing: -.01em; }
.q  { font-size: var(--fs-2xl); font-weight: 600; margin: 0 0 16px; letter-spacing: -.015em; }
.qs { font-size: var(--fs-lg); font-weight: 600; margin: 0 0 12px; }
.mini   { font-size: var(--fs-sm); color: var(--muted); }
.stitle { font-size: var(--fs-sm); font-weight: 600; color: var(--sec); margin: 0 0 2px; }

/* ---- Inputs por defecto ---- (el estilo de formulario "rico" vive en
   componentes; esto es el reset base de los campos) */
input, select, textarea {
  width: 100%;
  height: 52px;                        /* alto ÚNICO de inputs y botones (md) */
  border: 1px solid var(--border2);
  border-radius: 14px;                 /* squircle radio 14 = card de movimientos */
  padding: 0 14px;
  font-size: 1rem;               /* 16px o menos evita el zoom de iOS al enfocar */
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  appearance: none;
}
input:focus, select:focus { border-color: var(--primary); }

/* appearance:none le saca la flecha nativa al select, así que la dibujamos
   nosotros; si no, parece un campo de texto que no se puede tocar. */
select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e80' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px;
}

/* [hidden] tiene que ganarle a los display de las clases (ej. .opt o .row son flex). */
[hidden] { display: none !important; }

/* ---- Keyframes globales ---- */
@keyframes sp      { to { transform: rotate(360deg); } }

/* ---- Accesibilidad: menos movimiento (global) ----
   Si la persona pidió "reducir movimiento" en el SO, cortamos springs/slides/
   parallax en TODA la app (no solo micro.css): animaciones y transiciones pasan
   a ~instantáneas. Los cambios de opacidad/estado que ayudan a entender quedan,
   pero sin desplazamiento. El JS (sheet spring, count-up, stagger del inicio)
   también chequea esta preferencia y muestra el estado final directo. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
