/* ============================================================
   VEKTIA — main.css
   Variables globales, reset, tipografía base, utilidades
   Estilo: editorial brutalista sobre gris cálido.
   ============================================================ */

/* --- Tipografías, servidas desde el propio sitio ---
   Sólo el subconjunto latino (cubre tildes, ñ, ¿ y ¡). Pedirlas a Google Fonts
   bloqueaba el primer pintado unos 850 ms en 4G lenta. Licencia OFL. */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/anton-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Variables --- */
:root {
  /* Colores */
  --color-carbon-black:   #000000;  /* Texto principal, bloques oscuros */
  --color-paper-white:    #ffffff;  /* Tarjetas, texto sobre negro */
  --color-warm-canvas:    #e5e5e5;  /* Fondo de página — nunca blanco puro */
  --color-mist-gray:      #f3f3f3;  /* Paneles suaves */
  --color-ash:            #c6c6c6;  /* Líneas finas, deshabilitados */
  --color-smoke:          #979797;  /* Texto secundario SOLO sobre negro (sobre gris no llega al contraste) */
  --color-slate:          #444444;  /* Texto secundario sobre gris o blanco */
  --color-graphite:       #2f2f2f;  /* Superficie casi negra */
  --color-mint-chip:      #d1ffca;  /* Acento: tags y detalles chicos */
  --color-voltage-yellow: #fff100;  /* Acento: email y chispazos chicos */
  --color-error:          #b3261e;

  /* Superficies */
  --surface-canvas:   var(--color-warm-canvas);
  --surface-card:     var(--color-paper-white);
  --surface-inverted: var(--color-carbon-black);
  --surface-mist:     var(--color-mist-gray);

  /* Tipografías (sustitutos libres de Suisse Intl) */
  --font-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;   /* Solo títulos, 48px o más */
  --font-body:    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Escala tipográfica */
  --text-caption:       12px;
  --text-body-sm:       14px;
  --text-body:          16px;
  --text-subheading:    18px;
  --text-subheading-lg: 20px;
  --text-heading-sm:    28px;
  --text-heading:       40px;
  --text-heading-lg:    48px;
  --text-display:       clamp(52px, 7.4vw, 80px);
  --text-display-xl:    clamp(60px, 11vw, 130px);

  /* Espaciado (base 8px) */
  --spacing-8:  8px;
  --spacing-16: 16px;
  --spacing-24: 24px;
  --spacing-40: 40px;
  --spacing-64: 64px;
  --spacing-80: 80px;
  --spacing-96: 96px;

  /* Radios */
  --radius-button:     8px;
  --radius-button-sm:  4px;
  --radius-card:       32px;
  --radius-card-sm:    24px;
  --radius-nav-pill:   48px;
  --radius-large-card: 64px;
  --radius-tag:        64px;

  /* Layout */
  --page-max-width: 1200px;
  --gutter:         clamp(16px, 4vw, 40px);
  --section-gap:    clamp(64px, 9vw, 96px);
  --header-height:  clamp(72px, 9vw, 128px);

  --transition-fast: 0.15s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--surface-canvas);
  color: var(--color-carbon-black);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 450;
  line-height: 1.25;
  letter-spacing: -0.011em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img, video {
  height: auto;
}

a {
  color: inherit;
}

ul, ol {
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--color-carbon-black);
  outline-offset: 3px;
}

.is-inverted :focus-visible {
  outline-color: var(--color-mint-chip);
}

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

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

/* Título gigante condensado. Siempre en mayúsculas, siempre apretado.
   Anton tiene las mayúsculas más altas que Suisse Condensed: con 0.9 los
   acentos (Á, Ú) tocan la línea de arriba, por eso 0.95 en los tamaños chicos. */
.display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.display--xl {
  font-size: var(--text-display-xl);
  line-height: 0.92;
  letter-spacing: -0.025em;
}

.display--lg {
  font-size: var(--text-heading-lg);
}

/* Título secundario: Inter 450 en mayúsculas. */
.heading {
  font-family: var(--font-body);
  font-size: clamp(28px, 3.4vw, var(--text-heading));
  font-weight: 450;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.heading--sm {
  font-size: var(--text-heading-sm);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lead {
  font-size: clamp(var(--text-subheading), 1.6vw, var(--text-subheading-lg));
  line-height: 1.33;
  color: var(--color-slate);
  max-width: 34em;
  text-wrap: pretty;
}

.is-inverted .lead {
  color: var(--color-smoke);
}

/* Rótulo técnico en mono: numeración, metadatos, pies de figura. */
.mono-label {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--color-slate);
}

.is-inverted .mono-label {
  color: var(--color-smoke);
}

/* Tarjeta blanca adentro de un bloque negro: vuelve al gris oscuro,
   el humo sobre blanco no llega al contraste mínimo. */
.is-inverted .card:not(.card--dark):not(.card--graphite) .mono-label {
  color: var(--color-slate);
}

.is-inverted .card:not(.card--dark):not(.card--graphite) :focus-visible {
  outline-color: var(--color-carbon-black);
}

/* --- Utilidades --- */
.container {
  width: 100%;
  max-width: calc(var(--page-max-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.is-inverted {
  background: var(--surface-inverted);
  color: var(--color-paper-white);
}

[hidden] {
  display: none !important;
}

.nowrap {
  white-space: nowrap;
}

.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;
}

.skip-link {
  position: absolute;
  left: var(--spacing-16);
  top: -100px;
  z-index: 300;
  background: var(--color-carbon-black);
  color: var(--color-paper-white);
  padding: 12px 16px;
  border-radius: var(--radius-button);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--spacing-16);
}
