/* ==========================================================================
   base.css — Reset moderno y estilos globales.
   Depende de tokens.css.
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

/* El atributo hidden gana siempre.
   El navegador trae [hidden] { display: none } en su hoja de estilos, pero
   cualquier regla nuestra que fije display la pisa: las hojas del autor van
   por delante de las del navegador, sin importar la especificidad. Por eso
   .contact__error-box { display: flex } dejaba el aviso de fallo en pantalla
   aunque el JS hiciera errorBox.hidden = true, y el usuario veia a la vez
   "Postulacion recibida" y "No pudimos enviar el mensaje". */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* compensa navbar sticky */
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--fs-100);
  line-height: var(--lh-base);
  color: var(--text-base);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv02", "cv11"; /* Inter stylistic sets */
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover { color: var(--text-accent); }

ul, ol { list-style: none; padding: 0; }

/* ---- Tipografia ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-heading);
  color: var(--text-base);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-600);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}
h2 { font-size: var(--fs-500); }
h3 { font-size: var(--fs-400); }
h4 { font-size: var(--fs-300); }
h5 { font-size: var(--fs-200); }
h6 { font-size: var(--fs-100); }

p { text-wrap: pretty; }

@media (min-width: 768px) {
  h1 { font-size: var(--fs-700); }
  h2 { font-size: var(--fs-600); }
  h3 { font-size: var(--fs-500); }
}

@media (min-width: 1024px) {
  h1 { font-size: var(--fs-800); }
}

/* ---- Utilidades de layout ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

.section {
  padding-block: var(--section-py);
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 { color: var(--text-inverse); }

/* Overline (etiqueta tipo eyebrow sobre titulos) */
.overline {
  display: inline-block;
  font-size: var(--fs-50);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  color: var(--text-accent);
}

/* Accesibilidad: skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-4);
  background: var(--color-negro);
  color: var(--color-blanco);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: var(--z-top);
}
.skip-link:focus { left: var(--space-4); }

/* Foco visible coherente */
:focus-visible {
  /* usa el acento del contexto: 5.08:1 en claro, 5.11:1 en oscuro (>=3:1, WCAG 1.4.11) */
  outline: 2px solid var(--text-accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}
