/* ============================================================================
   BASE — reset ligero, tipografía y elementos por defecto.
   Todo referencia tokens.css; aquí no hay valores de marca "a mano".
   ============================================================================ */

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

* {
  margin: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Titulares: fuente de marca, jerarquía clara, interlineado ajustado. */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { line-height: var(--lh-base); }

small { font-size: var(--fs-sm); }

/* Enlaces: el dorado NO es el color del texto (mal contraste en texto pequeño).
   El acento va en el SUBRAYADO; el texto se mantiene legible (casi-negro). */
a,
.link {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: text-decoration-color var(--t-fast), color var(--t-fast);
}

a:hover,
.link:hover {
  text-decoration-color: var(--color-accent-strong);
}

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

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

textarea {
  resize: none;
}

/* Foco accesible y coherente en todo lo interactivo. */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* Utilidad para etiquetas solo-lector (accesibilidad). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scrollbars discretas (WebKit), coherentes con la paleta clara. */
.scroll-y {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}
.scroll-y::-webkit-scrollbar { width: 10px; }
.scroll-y::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}
.scroll-y::-webkit-scrollbar-thumb:hover { background: var(--color-border-stronger); background-clip: content-box; }
