/* ==========================================================================
   Siety Compliance — base: fuente, reinicio, tipografía y estructura
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

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

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

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--link);
}

/* --- Tipografía --------------------------------------------------------- */

.display,
h1 {
  font-size: var(--fs-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
  text-wrap: balance;
}

h2,
.h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-h2);
  letter-spacing: var(--track-h2);
  text-wrap: balance;
}

h3,
.h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  line-height: var(--lh-h3);
  letter-spacing: var(--track-h3);
}

.lead {
  max-width: var(--measure);
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
}

p {
  max-width: var(--measure);
  text-wrap: pretty;
}

.small {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.muted {
  color: var(--text-2);
}

.label {
  display: block;
  color: var(--text-3);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  line-height: 1.3;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

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

/* --- Estructura --------------------------------------------------------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-section);
}

.section--alt {
  background: var(--bg-alt);
}

.section--ink {
  background: var(--ink);
  color: var(--text-1);
}

.section--line {
  border-top: var(--border) solid var(--line);
}

.stack > * + * {
  margin-top: var(--stack, var(--s-4));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Foco y salto al contenido ----------------------------------------- */

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

.skip {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-s);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
  outline-color: var(--text-1);
}

/* --- Entrada al hacer scroll (solo con JavaScript) ---------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity var(--dur-enter) var(--ease),
    transform var(--dur-enter) var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

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

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
