/* web/app/styles/base.css — Estilos base (solo elementos, sin clases). Dueño: S6.
   Mobile-first para iPhone: sin zoom al escribir (16 px+), sin resaltado gris al tocar,
   sin rebote del documento (el desplazamiento vive dentro de cada pantalla). */

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

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

body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

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

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

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

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

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

button:disabled {
  cursor: default;
}

input,
textarea,
select {
  font-size: max(16px, 1em); /* Safari de iOS no hace zoom con 16 px o más */
}

a {
  color: var(--c-primary);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

[hidden] {
  display: none !important;
}

::selection {
  background: color-mix(in srgb, var(--c-primary) 30%, transparent);
}

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