/*
 * base.css — Reset, globals, utilidades
 * Inpulso Pro — Diseño Lucía — v2 2026-05-17
 */

/* ─── Reset ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── HTML / Body ─────────────────────────────────────────── */
html {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: auto; /* Lenis gestiona el scroll, no CSS */
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg-base);
}

/* ─── Tipografía base ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.6;
  color: var(--text-secondary);
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

/* ─── Cursor personalizado (desktop only) ─────────────────── */
@media (hover: hover) {
  * { cursor: none !important; }
}

/* ─── Skip to content ─────────────────────────────────────── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--accent);
  color: var(--text-inverse);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-body-m);
  text-decoration: none;
  z-index: 9999;
  transition: top 200ms ease;
}
.skip-to-content:focus {
  top: var(--space-4);
}

/* ─── Fuentes Google ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Layout container ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Grid de 12 columnas ─────────────────────────────────── */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
}

@media (max-width: 767px) {
  .grid-12 {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ─── Screen reader only ──────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Etiqueta label mono ─────────────────────────────────── */
.label {
  font-family: var(--font-mono);
  font-size: var(--text-mono-s);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── Divisor ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  width: 100%;
}

/* ─── Tag chip ────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-mono-s);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 0.2em 0.75em;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ─── Sección base ────────────────────────────────────────── */
.section {
  padding: var(--space-40) 0;
}

@media (max-width: 767px) {
  .section {
    padding: var(--space-24) 0;
  }
}

/* ─── Headings de sección ─────────────────────────────────── */
.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-display-m);
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-12);
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-mono-m);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-6);
  display: block;
}

/* ─── Reveal animation base ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

/* Defensive: si JS no carga en 6s, mostrar todo */
.reveal[data-fallback] {
  opacity: 1;
  transform: none;
}

/* ─── Scroll indicator ────────────────────────────────────── */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-mono-s);
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
}

.scroll-indicator__line {
  width: 1px;
  height: 40px;
  background: var(--text-tertiary);
  animation: scrollIndicatorPulse 2s ease-in-out infinite;
}

@keyframes scrollIndicatorPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(0.5); transform-origin: top; }
}

/* ─── Placeholder overlay (desarrollo) ───────────────────── */
.placeholder-banner {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid var(--color-error);
  color: var(--color-error);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: var(--space-2) var(--space-4);
  text-align: center;
  position: relative;
  z-index: var(--z-overlay);
}
