/* Base: reset mínimo, tipografía y elementos nativos. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-cal);
  color: var(--c-ink);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: var(--lh-snug);
  font-weight: 750;
  text-wrap: balance;
}

/* Títulos contenidos, en anchura normal: la jerarquía la marcan el peso y el tamaño.
   (El escenario de la portada usa su propia tipografía expandida.) */
h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.2rem;
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--c-azulejo);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--c-azulejo-strong);
}

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

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

code,
kbd {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
}

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

::selection {
  background: var(--c-albero-wash);
  color: var(--c-ink);
}

.u-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.u-muted {
  color: var(--c-ink-soft);
}

.u-small {
  font-size: var(--t-sm);
}

.u-break {
  overflow-wrap: anywhere;
}

.u-nowrap {
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

/* Enlace "saltar al contenido": invisible hasta que recibe el foco del teclado. */
.skip-link {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-s);
  background: var(--c-azulejo);
  color: var(--c-on-azulejo);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}
