/* =====================================================================
   BASE: reset, tipografía, utilidades
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

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

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h3 { font-size: var(--fs-md); letter-spacing: -0.01em; line-height: 1.2; }

strong { font-weight: 700; color: var(--ink); }

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

::selection { background: var(--accent); color: #fff; }

/* Línea con resplandor, como las del logotipo: —— TEXTO —— */
.tagline-glow { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); }
.tagline-glow::before, .tagline-glow::after { content: ""; flex: 0 0 26px; height: 3px; border-radius: 2px; background: var(--accent-light); }

/* Contenedor con gutter lateral */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 16px; top: -100px; z-index: 1000;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 16px; }

[hidden] { display: none !important; }

/* Placeholders [ASÍ] — se marcan con borde discontinuo hasta tener datos reales */
.is-placeholder {
  outline: 1px dashed currentColor;
  outline-offset: 2px;
  border-radius: 2px;
  opacity: .85;
  font-family: var(--font-mono);
  font-size: .88em;
  letter-spacing: 0;
}

/* Imágenes: fondo mientras cargan */
img[data-img], .masonry img, .ba__img img {
  background: var(--bg-alt);
}

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