/* =============================================================================
   VMA Software — landing page
   Hoja única, sin dependencias externas. Las fuentes viven en /assets/fonts:
   ninguna petición sale del propio dominio, lo que permite la CSP estricta
   declarada en firebase.json (`default-src 'self'`).

   Los tokens replican las dos paletas del diseño (claro / oscuro). El tema
   activo se selecciona con el atributo `data-tema` en <html>, que escribe
   main.js a partir de lo guardado en localStorage.
   ========================================================================== */

/* ── Fuentes ────────────────────────────────────────────────────────────────
   Space Grotesk e IBM Plex Sans se sirven como fuentes variables: un solo
   archivo por subconjunto cubre todos los pesos declarados. IBM Plex Mono es
   estática, así que lleva un archivo por peso.                             */

/* Space Grotesk 400–700 — latin */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-var-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;
}
/* Space Grotesk 400–700 — latin-ext */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Sans 400–600 — latin */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-var-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;
}
/* IBM Plex Sans 400–600 — latin-ext */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Mono 400 — latin */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-400-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;
}
/* IBM Plex Mono 400 — latin-ext */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Mono 500 — latin */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500-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;
}
/* IBM Plex Mono 500 — latin-ext */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Tokens: tema oscuro (predeterminado) ───────────────────────────────── */
:root,
[data-tema="oscuro"] {
  --vma-bg: #07070f;
  --vma-surface: #090a14;
  --vma-panel: #0a0b17;
  --vma-panel2: #0c0e1b;
  --vma-panel-hover: #101223;

  --vma-fg: #ffffff;
  --vma-strong: #dfe3f2;
  --vma-body: #c4c9dc;
  --vma-soft: #a9afc6;
  --vma-muted: #8b92ac;
  --vma-faint: #5e657e;

  --vma-line: rgba(255, 255, 255, 0.08);
  --vma-line2: rgba(255, 255, 255, 0.13);
  --vma-line3: rgba(255, 255, 255, 0.16);

  --vma-fill0: rgba(255, 255, 255, 0.01);
  --vma-fill: rgba(255, 255, 255, 0.03);
  --vma-fill2: rgba(255, 255, 255, 0.035);
  --vma-fill3: rgba(255, 255, 255, 0.04);
  --vma-fill4: rgba(255, 255, 255, 0.06);
  --vma-grid: rgba(255, 255, 255, 0.03);

  --vma-accent: #6a76e0;
  --vma-accent2: #a9c3f8;
  --vma-accent-text: #bccefb;
  --vma-on-accent: #07070f;
  --vma-accent2-line: rgba(169, 195, 248, 0.3);
  --vma-accent2-soft: rgba(169, 195, 248, 0.08);
  --vma-accent2-strong: rgba(169, 195, 248, 0.55);

  --vma-glow-a: rgba(74, 86, 192, 0.34);
  --vma-glow-b: rgba(169, 195, 248, 0.14);
  --vma-ring: rgba(106, 118, 224, 0.26);
  --vma-shadow-accent: rgba(74, 86, 192, 0.45);
  --vma-select: rgba(106, 118, 224, 0.38);

  --vma-link: #a9c3f8;
  --vma-link-hover: #d2defc;

  --vma-header: rgba(7, 7, 15, 0.74);
  --vma-menu: rgba(7, 7, 15, 0.96);

  color-scheme: dark;
}

/* ── Tokens: tema claro ─────────────────────────────────────────────────── */
[data-tema="claro"] {
  --vma-bg: #ffffff;
  --vma-surface: #f4f5fb;
  --vma-panel: #f7f8fd;
  --vma-panel2: #ffffff;
  --vma-panel-hover: #eceef9;

  --vma-fg: #0d0f1a;
  --vma-strong: #1c2033;
  --vma-body: #3f4559;
  --vma-soft: #454b60;
  --vma-muted: #5a6076;
  --vma-faint: #767d94;

  --vma-line: rgba(13, 15, 26, 0.1);
  --vma-line2: rgba(13, 15, 26, 0.13);
  --vma-line3: rgba(13, 15, 26, 0.17);

  --vma-fill0: rgba(13, 15, 26, 0.012);
  --vma-fill: rgba(13, 15, 26, 0.022);
  --vma-fill2: rgba(13, 15, 26, 0.03);
  --vma-fill3: rgba(13, 15, 26, 0.035);
  --vma-fill4: rgba(13, 15, 26, 0.06);
  --vma-grid: rgba(13, 15, 26, 0.05);

  --vma-accent: #4a56c0;
  --vma-accent2: #2f3c9e;
  --vma-accent-text: #333f9c;
  --vma-on-accent: #ffffff;
  --vma-accent2-line: rgba(74, 86, 192, 0.3);
  --vma-accent2-soft: rgba(74, 86, 192, 0.07);
  --vma-accent2-strong: rgba(74, 86, 192, 0.55);

  --vma-glow-a: rgba(74, 86, 192, 0.14);
  --vma-glow-b: rgba(169, 195, 248, 0.26);
  --vma-ring: rgba(74, 86, 192, 0.2);
  --vma-shadow-accent: rgba(74, 86, 192, 0.32);
  --vma-select: rgba(74, 86, 192, 0.22);

  --vma-link: #2f3c9e;
  --vma-link-hover: #4a56c0;

  --vma-header: rgba(255, 255, 255, 0.86);
  --vma-menu: rgba(255, 255, 255, 0.98);

  color-scheme: light;
}

/* ── Constantes de layout y tipografía ──────────────────────────────────── */
:root {
  --container: 1200px;
  --header-h: 72px;
  --pad-x: clamp(20px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

/* ── Reset mínimo ───────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--vma-body);
  background: var(--vma-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, dl, dd, dt, ul, ol, li, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

a {
  color: var(--vma-link);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
a:hover { color: var(--vma-link-hover); }

::selection { background: var(--vma-select); color: var(--vma-fg); }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
}

/* Se oculta recortándolo, no desplazándolo fuera de la ventana: un
   `left: -9999px` puede ensanchar el área desplazable del documento. */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 12px 20px;
  background: var(--vma-fg);
  color: var(--vma-on-accent);
  font-weight: 600;
  border-radius: 0 0 10px 0;
}
.skip-link:focus {
  width: auto;
  height: auto;
  clip-path: none;
  color: var(--vma-on-accent);
}

/* ── Fondo: lluvia y rejilla ────────────────────────────────────────────── */
.rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(var(--vma-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--vma-grid) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
}

/* ── Animaciones ────────────────────────────────────────────────────────── */
@keyframes vmaPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
/* El centrado va dentro de los keyframes: `animation` reemplaza la propiedad
   `transform` entera, así que un translateX(-50%) declarado aparte se pierde
   en cuanto arranca la animación y el halo se va hacia la derecha. */
@keyframes vmaDrift {
  0%   { transform: translateX(-50%) translate3d(0, 0, 0); }
  50%  { transform: translateX(-50%) translate3d(2%, -3%, 0); }
  100% { transform: translateX(-50%) translate3d(0, 0, 0); }
}
@keyframes vmaTicker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Botones ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: box-shadow 0.2s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn-gradient {
  background: linear-gradient(120deg, var(--vma-accent), var(--vma-accent2));
  color: var(--vma-on-accent);
}
.btn-gradient:hover {
  color: var(--vma-on-accent);
  box-shadow: 0 12px 40px var(--vma-shadow-accent);
}

.btn-outline {
  border-color: var(--vma-line3);
  color: var(--vma-strong);
  font-weight: 500;
}
.btn-outline:hover {
  background: var(--vma-fill4);
  color: var(--vma-fg);
}

.btn-solid {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  background: var(--vma-fg);
  color: var(--vma-on-accent);
}
.btn-solid:hover {
  color: var(--vma-on-accent);
  box-shadow: 0 0 0 4px var(--vma-ring);
}

.btn-block { width: 100%; }
.btn-arrow { font-family: var(--font-mono); }

/* ── Cabecera ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--vma-header);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--vma-line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  white-space: nowrap;
  color: var(--vma-fg);
}
.brand:hover { color: var(--vma-fg); }

/* La marca va como imagen de fondo y no como <img>: así el navegador solo
   descarga el PNG del tema activo. Es decorativa — el nombre está en texto al
   lado y el enlace lleva su propio aria-label. El alto fijo evita reflow.
   `data-tema` ya está puesto antes del primer pintado (ver main.js). */
.brand-mark {
  display: block;
  flex: none;
  width: 36px;
  height: 41px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
[data-tema="oscuro"] .brand-mark { background-image: url("/assets/brand/vma-mark-claro.png"); }
[data-tema="claro"]  .brand-mark { background-image: url("/assets/brand/vma-mark-indigo.png"); }

.brand-mark-sm { width: 28px; height: 32px; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.045em;
  color: var(--vma-fg);
}

.brand-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border: 1px solid var(--vma-accent2-line);
  border-radius: 999px;
  background: var(--vma-accent2-soft);
}

.brand-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--vma-accent2);
  box-shadow: 0 0 8px var(--vma-accent2);
}

.brand-word {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vma-accent-text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.nav-links a { color: var(--vma-soft); }
.nav-links a:hover,
.nav-links a.is-active { color: var(--vma-fg); }

.theme-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--vma-line2);
  border-radius: 999px;
  background: var(--vma-fill);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--vma-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.theme-btn[aria-pressed="true"] {
  background: var(--vma-fg);
  color: var(--vma-on-accent);
}

.header-mobile {
  display: none;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--vma-line3);
  border-radius: 13px;
  background: var(--vma-fill3);
  color: var(--vma-fg);
  cursor: pointer;
}

/* El icono de tema muestra el tema al que se cambiaría, no el activo. */
[data-tema="oscuro"] .icon-moon,
[data-tema="claro"] .icon-sun { display: none; }

.mobile-menu {
  border-top: 1px solid var(--vma-line);
  background: var(--vma-menu);
  padding: 12px var(--pad-x) 22px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 16px;
}
.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--vma-strong);
}
.mobile-menu a:hover { color: var(--vma-fg); }
.mobile-cta {
  margin-top: 14px;
  width: 100%;
  min-height: 50px;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  /* Recorta el halo, que es más ancho que la ventana y si no obliga a scroll
     horizontal (`overflow-x` en body no basta en Safari de iOS). */
  overflow: hidden;
  padding: clamp(72px, 11vw, 132px) var(--pad-x) clamp(56px, 7vw, 88px);
}

.hero-glow {
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 120vw);
  height: 640px;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    var(--vma-glow-a),
    var(--vma-glow-b) 42%,
    transparent 70%
  );
  filter: blur(30px);
  animation: vmaDrift 18s ease-in-out infinite;
}

.hero .container { position: relative; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--vma-accent2-line);
  border-radius: 999px;
  background: var(--vma-accent2-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vma-accent-text);
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vma-accent2);
  box-shadow: 0 0 10px var(--vma-accent2);
  animation: vmaPulse 2.4s ease-in-out infinite;
}

.hero-title {
  margin-top: 30px;
  max-width: 15ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 6.6vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--vma-fg);
  text-wrap: balance;
}

.grad {
  background: linear-gradient(100deg, var(--vma-accent2), var(--vma-accent) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-lede {
  margin-top: 28px;
  max-width: 60ch;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.65;
  color: var(--vma-muted);
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.stats {
  margin-top: clamp(56px, 7vw, 84px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 1px;
  background: var(--vma-line);
  border: 1px solid var(--vma-line);
  border-radius: 18px;
  overflow: hidden;
}
.stat {
  background: var(--vma-panel);
  padding: 26px 24px;
}
.stat dt {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--vma-fg);
  line-height: 1.1;
}
.stat dd {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--vma-muted);
}

/* ── Cinta de sectores ──────────────────────────────────────────────────── */
.ticker {
  border-top: 1px solid var(--vma-line);
  border-bottom: 1px solid var(--vma-line);
  padding: 22px 0;
  overflow: hidden;
  background: var(--vma-surface);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: vmaTicker 32s linear infinite;
}
.ticker-list {
  display: flex;
  gap: 56px;
  padding-right: 56px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vma-faint);
  white-space: nowrap;
}
.ticker-list .sep { color: var(--vma-accent); }

/* ── Secciones ──────────────────────────────────────────────────────────── */
.section { padding: clamp(72px, 9vw, 120px) var(--pad-x); }
.section-tight { padding-block: clamp(20px, 3vw, 32px) clamp(72px, 9vw, 110px); }
.section-top-flush { padding-top: 0; }
.section-alt {
  border-top: 1px solid var(--vma-line);
  background: var(--vma-surface);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vma-accent);
}
.eyebrow-alt { color: var(--vma-accent2); }

.section-title {
  margin-top: 16px;
  max-width: 24ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--vma-fg);
}
.section-title-sm {
  font-size: clamp(28px, 3.6vw, 46px);
  max-width: 20ch;
}

.section-sub {
  margin-top: 20px;
  max-width: 58ch;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--vma-muted);
  text-wrap: pretty;
}
.section-sub-narrow { max-width: 52ch; font-size: 16px; line-height: 1.68; }

/* ── Tarjetas de servicio ───────────────────────────────────────────────── */
.cards {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

.card {
  position: relative;
  padding: 34px 30px 32px;
  border: 1px solid var(--vma-line);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--vma-fill2), var(--vma-fill0));
  transition: border-color 0.24s var(--ease), transform 0.24s var(--ease);
}
.card:hover {
  border-color: var(--vma-accent2-strong);
  transform: translateY(-4px);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--vma-accent2-line);
  border-radius: 13px;
  background: var(--vma-accent2-soft);
  color: var(--vma-accent2);
}

.card h3 {
  margin-top: 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--vma-fg);
}
.card > p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--vma-muted);
}

.card-list {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 14px;
  color: var(--vma-soft);
}
.card-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.card-list li::before {
  content: "—";
  color: var(--vma-accent);
  font-family: var(--font-mono);
  flex: none;
}

/* ── Paneles (IA y contacto) ────────────────────────────────────────────── */
.panel {
  position: relative;
  border: 1px solid var(--vma-line);
  border-radius: 26px;
  overflow: hidden;
  background: var(--vma-panel);
}
.panel-contacto { border-radius: 28px; }

.panel-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.panel-glow-tr {
  background: radial-gradient(ellipse 70% 100% at 100% 0%, var(--vma-ring), transparent 60%);
}
.panel-glow-bl {
  background:
    radial-gradient(ellipse 80% 120% at 0% 100%, var(--vma-glow-a), transparent 62%),
    radial-gradient(ellipse 60% 100% at 100% 0%, var(--vma-glow-b), transparent 60%);
}

.panel-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(36px, 5vw, 60px);
}
.panel-contacto .panel-grid { padding: clamp(36px, 5vw, 64px); }

.split-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-self: start;
  background: var(--vma-line);
  border: 1px solid var(--vma-line);
  border-radius: 16px;
  overflow: hidden;
}
.split-list li {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 22px;
  background: var(--vma-panel2);
}
.split-title {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--vma-fg);
}
.split-desc {
  font-size: 14.5px;
  line-height: 1.58;
  color: var(--vma-muted);
}

/* ── Proyectos ──────────────────────────────────────────────────────────── */
.projects {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1px;
  background: var(--vma-line);
  border: 1px solid var(--vma-line);
  border-radius: 22px;
  overflow: hidden;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 214px;
  padding: 30px 28px 32px;
  background: var(--vma-panel);
  transition: background 0.24s var(--ease);
}
.project:hover { background: var(--vma-panel-hover); }

.project-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vma-faint);
}
.project h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19.5px;
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: var(--vma-fg);
}
.project p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--vma-muted);
  text-wrap: pretty;
}
.project-metric {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--vma-accent2);
}

/* ── Proceso ────────────────────────────────────────────────────────────── */
.steps {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 28px;
}
.step {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid var(--vma-line2);
}
.step::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, var(--vma-accent2), var(--vma-accent));
}
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--vma-faint);
}
.step h3 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--vma-fg);
}
.step p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--vma-muted);
}

/* ── Stack ──────────────────────────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips li {
  padding: 10px 18px;
  border: 1px solid var(--vma-line2);
  border-radius: 999px;
  background: var(--vma-fill);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--vma-body);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.chips li:hover {
  border-color: var(--vma-accent2-strong);
  color: var(--vma-fg);
}

/* ── Contacto ───────────────────────────────────────────────────────────── */
.contact-direct {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mail-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--vma-fg);
}
.mail-link:hover { color: var(--vma-accent2); }
.mail-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--vma-line2);
  border-radius: 11px;
  color: var(--vma-accent2);
}
.contact-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--vma-faint);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-label {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vma-muted);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--vma-line2);
  border-radius: 12px;
  background: var(--vma-fill3);
  color: var(--vma-fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.contact-form textarea { resize: vertical; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--vma-faint); }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--vma-accent);
  box-shadow: 0 0 0 3px var(--vma-ring);
}
/* Los campos ya señalan el foco con borde + halo; el contorno global sobraría.
   El botón de envío conserva el suyo. */
.contact-form input:focus-visible,
.contact-form textarea:focus-visible { outline: none; }

.form-status {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--vma-accent2);
}
.form-status:empty { display: none; }
.form-status.is-error { color: var(--vma-accent-text); }

/* ── Pie ────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--vma-line);
  padding: 56px var(--pad-x) 32px;
  background: var(--vma-surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--vma-fg);
}
.footer-blurb {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.65;
  color: var(--vma-muted);
}

.footer-head {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vma-faint);
}
.footer-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 14px;
  color: var(--vma-soft);
}
.footer-list a { color: var(--vma-soft); }
.footer-list a:hover { color: var(--vma-fg); }

.footer-bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--vma-line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--vma-faint);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
/* 900px es el mismo punto de corte que usa main.js para el menú móvil. */
@media (max-width: 899px) {
  .site-nav { display: none; }
  .header-mobile { display: flex; }
}

@media (min-width: 900px) {
  .mobile-menu { display: none; }
}

/* En pantallas muy estrechas (≤360px) la marca completa y los dos botones de la
   cabecera dejan de caber en una línea. El logotipo y "VMA" bastan para
   identificar el sitio; el distintivo "Software" es lo primero que sobra. */
@media (max-width: 420px) {
  .header-inner { gap: 12px; }
}
@media (max-width: 359px) {
  .brand-chip { display: none; }
}

/* ── Movimiento reducido ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* La cinta se detiene en su posición inicial en lugar de saltar al final. */
  .ticker-track { animation: none; }
  .card:hover { transform: none; }
}
