
/* ── Onest autoalojada (public/fonts) ──────────────────────────────────── */
@font-face { font-family: Onest; src: url("/fonts/Onest-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Onest; src: url("/fonts/Onest-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Onest; src: url("/fonts/Onest-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Onest; src: url("/fonts/Onest-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: Onest; src: url("/fonts/Onest-ExtraBold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

/* ── Reset ─────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
  scroll-padding-top: 8rem;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  background: var(--a-bg);
  color: var(--a-ink);
  font-family: var(--a-font);
  line-height: var(--a-leading);
  caret-color: var(--a-brand-700);
  accent-color: var(--a-brand-700);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: inherit;
  font-size: inherit;
  font-weight: 700;
  line-height: var(--a-leading-tight);
  text-wrap: balance;
}

p { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

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

img { height: auto; }

ul,
ol {
  list-style: none;
}

button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

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

table { border-collapse: collapse; }

/* ── Superficies del navegador ─────────────────────────────────────────── */
::selection {
  background: var(--a-brand-100);
  color: var(--a-ink);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--a-line-strong) transparent;
}

:focus-visible {
  outline: none;
  box-shadow: var(--a-focus);
}

/* Bloquea el scroll de la página mientras hay un <dialog> modal abierto. */
html:has(dialog[open]:modal) {
  overflow: hidden;
}

/* ── Utilidades ────────────────────────────────────────────────────────── */
.a-wrap {
  width: 100%;
  max-width: var(--a-wrap);
  margin-inline: auto;
  padding-inline: var(--a-gutter);
}

.a-wrap--narrow { max-width: 880px; }
.a-wrap--mid { max-width: 1120px; }

.a-section {
  margin-block: var(--a-section-gap);
}

.a-num {
  font-variant-numeric: tabular-nums;
}

.a-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;
}

.a-skip {
  position: absolute;
  left: var(--a-space-4);
  top: -3rem;
  z-index: 100;
  padding: var(--a-space-2) var(--a-space-4);
  border-radius: var(--a-radius);
  background: var(--a-ink);
  color: var(--a-bg);
  font-weight: 600;
}

.a-skip:focus {
  top: var(--a-space-2);
  color: var(--a-bg);
}

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