/* ==========================================================================
   base.css — Reset, variables de diseño y tipografía global
   Paleta estricta: BLANCO · NEGRO · AMARILLO
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* --- Los tres únicos colores de la marca --- */
  --c-yellow: #ffc300;
  --c-black:  #000000;
  --c-white:  #ffffff;

  /* Variaciones derivadas (mismos colores, distinta opacidad o luminosidad) */
  --c-yellow-dark: #d9a600;   /* amarillo al pasar el ratón */
  --c-ink-90: rgba(0, 0, 0, .90);
  --c-ink-70: rgba(0, 0, 0, .70);
  --c-ink-55: rgba(0, 0, 0, .55);
  --c-ink-12: rgba(0, 0, 0, .12);
  --c-paper-85: rgba(255, 255, 255, .85);
  --c-paper-70: rgba(255, 255, 255, .70);
  --c-paper-18: rgba(255, 255, 255, .18);

  /* Roles */
  --c-text:          var(--c-black);
  --c-text-soft:     var(--c-ink-70);
  --c-text-invert:   var(--c-white);
  --c-border:        var(--c-ink-12);
  --c-border-invert: var(--c-paper-18);

  /* Tipografía: una sola familia para toda la web.
     Los titulares se distinguen por peso y tamaño, no por otra fuente. */
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-xs:   .8125rem;
  --fs-sm:   .9375rem;
  --fs-base: 1.0625rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.75rem;
  --fs-2xl:  clamp(2rem, 3.6vw, 2.75rem);
  --fs-3xl:  clamp(2.4rem, 5.4vw, 3.9rem);

  /* Espaciado */
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 6.5rem;

  /* Forma */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .10);
  --shadow:    0 10px 30px rgba(0, 0, 0, .14);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .28);

  --container: 1180px;
  --header-h: 92px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

button { cursor: pointer; }

ul, ol { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;   /* el tracking negativo es lo que da aire de marca */
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

::selection { background: var(--c-yellow); color: var(--c-black); }

/* ---------- Utilidades ---------- */
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.hl { color: var(--c-yellow); }

/* Texto sólo para lectores de pantalla y buscadores */
.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;
}

/* Antetítulo: texto pequeño precedido de una rayita amarilla */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-ink-55);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--c-yellow);
}

.section--dark .eyebrow,
.hero .eyebrow { color: var(--c-paper-70); }

.section--yellow .eyebrow { color: var(--c-ink-70); }
.section--yellow .eyebrow::before { background: var(--c-black); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--c-yellow);
  color: var(--c-black);
  padding: var(--sp-3) var(--sp-4);
  font-weight: 700;
}
.skip-link:focus { left: var(--sp-4); top: var(--sp-4); }

/* ---------- Animación de aparición ----------
   Sólo se oculta si JavaScript está activo (la clase .js la añade un script
   inline en el <head>). Así el contenido nunca queda invisible sin JS. */
/* Se usa la propiedad `translate` en lugar de `transform` a propósito:
   así los efectos de hover (que sí usan transform) no chocan con la
   animación de entrada y ambos conviven sin pisarse. */
.js [data-reveal] {
  opacity: 0;
  translate: 0 18px;
  transition: opacity .6s var(--ease), translate .6s var(--ease);
}
.js [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

@media print {
  .js [data-reveal] { opacity: 1; translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1; translate: 0 0; }
}
