/* base.css — Estilos base globales */
/* Requiere que variables.css se cargue antes. No define componentes ni layout. */

/* === Box-sizing global === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* === Reset mínimo === */
* {
  margin: 0;
  padding: 0;
}

/* === html y body === */
html {
  font-size: var(--font-size-base);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: var(--line-height-base);
  min-height: 100vh;
}

/* === Tipografía base === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text);
  font-weight: 400;
  line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* === Párrafos === */
p {
  line-height: var(--line-height-base);
  color: var(--color-text);
}

p + p {
  margin-top: var(--space-sm);
}

/* === Links === */
a {
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

/* === Imágenes === */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Botones e inputs (sin diseño todavía, ver components.css) === */
button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* === Foco visible accesible === */
:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

/* === Selección de texto === */
::selection {
  background-color: var(--color-petal-rose);
  color: var(--color-bg-warm);
}

/* === Utilidad de accesibilidad === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
