/* ==========================================================================
   LANCE INTERNACIONAL | Consorcio minero
   Hoja de estilos (mobile first)

   Sistema de diseño
   - Paleta tomada del logotipo: azul marino del escudo, rojo LANCE, grafito.
   - Tema claro corporativo con tres bloques oscuros deliberados
     (hero, metales y contacto).
   - Radios: --r-lg 24px (paneles, imágenes), --r-md 14px (fichas, campos),
     pastilla completa solo para botones y chips.
   - Tipografía: Geist (texto) y Geist Mono (datos).
   - Capas (z-index): loader 100, progreso 90, nav 60, menú 55, WhatsApp 50.
   ========================================================================== */

/* ---------- 0. Fuentes autoalojadas (Geist y Geist Mono, licencia OFL) ---------- */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("assets/fonts/geist-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;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("assets/fonts/geist-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: "Geist Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/geist-mono-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;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/geist-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;
}

/* ---------- 1. Tokens ---------- */
:root {
  --navy-950: #050d1f;
  --navy-900: #081634;
  --navy-800: #0c2149;
  --navy-700: #12306a;
  --navy-600: #1b3f82;
  --navy-500: #24447d;

  --red: #e3000f;
  --red-700: #b6000c;
  --red-soft: #ff4b58;

  --ink: #0a1530;
  --ink-2: #3f4b66;
  --ink-3: #5b6882;

  --bg: #f5f7fb;
  --bg-tint: #ebf0f8;
  --surface: #ffffff;
  --line: #dae1ee;
  --line-strong: #c3cde0;

  --text: var(--ink);
  --text-muted: var(--ink-2);
  --accent: var(--red);

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-lg: 24px;
  --r-md: 14px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(5rem, 10vw, 9rem);

  --nav-h: 64px;
  --shadow-lg: 0 30px 80px -30px rgba(8, 22, 52, 0.35);
}

.is-dark {
  --text: #eef2fa;
  --text-muted: #a9b6d0;
  --accent: var(--red-soft);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  color: var(--text);
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;
  overflow-x: clip;
}

html.is-loading { overflow: hidden; }

/* Requisitos de Lenis (scroll suave) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, canvas, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd, address { margin: 0; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 6px;
}
.is-dark :focus-visible { outline-color: var(--red-soft); }

::selection { background: var(--red); color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 200;
  padding: 0.75rem 1.25rem; border-radius: var(--r-pill);
  background: var(--navy-900); color: #fff; font-weight: 600;
  transition: top 0.3s var(--ease);
}
.skip:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ico { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.ico--lg { width: 1.6rem; height: 1.6rem; }
.ico--xl { width: 2rem; height: 2rem; }

/* ---------- 3. Tipografía ---------- */
.h2 {
  font-size: clamp(2rem, 1.15rem + 3.1vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
  max-width: 20ch;
}

.h3 {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}

.lead {
  margin-top: 1.25rem;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 58ch;
  text-wrap: pretty;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1.1rem;
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.fine {
  margin-top: 2rem;
  max-width: 70ch;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-3);
}

/* Palabras de titulares (JS las envuelve para el efecto máscara) */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.w__in { display: inline-block; }
.js .w__in {
  transform: translateY(108%);
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.js .is-in .w__in,
.js .w__in.is-in { transform: none; }

/* ---------- 4. Secciones ---------- */
.section { position: relative; padding-block: var(--section-y); }
.section--tint { background: var(--bg-tint); }
.section__head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }

/* Revelado al hacer scroll */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="scale"] { transform: translate3d(0, 24px, 0) scale(0.94); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal].is-settled { transition-duration: 0.35s; transition-delay: 0s; }

/* ---------- 5. Botones ---------- */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 48px;
  padding: 0 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.4s var(--ease), background-color 0.3s, border-color 0.3s;
}
.btn:active { transform: scale(0.97); }
.btn .ico { transition: transform 0.5s var(--ease); }
.btn:hover .ico { transform: translate(2px, -2px); }

.btn--sm { height: 42px; padding: 0 1.1rem; font-size: 0.875rem; }
.btn--lg { height: 56px; padding: 0 1.75rem; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 28px -10px rgba(227, 0, 15, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
}
.btn--primary:hover { background: #f10b1a; box-shadow: 0 16px 36px -10px rgba(227, 0, 15, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn--primary:hover::after { transform: translateX(120%); }

.btn--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.55); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--navy-700);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap 0.4s var(--ease), color 0.3s;
}
.link-arrow:hover { gap: 0.9rem; color: var(--red); }

/* ---------- 6. Pantalla de carga ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  color: var(--ink);
  animation: loaderFailsafe 0s 12s forwards;
}
.js .loader { display: block; }
@keyframes loaderFailsafe { to { visibility: hidden; pointer-events: none; } }
html.is-loading { animation: unlockScroll 0s 12s forwards; }
@keyframes unlockScroll { to { overflow: visible; } }

.loader__half {
  position: absolute;
  left: 0;
  right: 0;
  height: 50.2%;
  background:
    radial-gradient(60% 60% at 50% 50%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #eef2f9, #f5f7fb);
  transition: transform 1.05s var(--ease-io);
}
.loader__half--top { top: 0; }
.loader__half--bottom { bottom: 0; }

.loader__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(10, 21, 48, 0.06);
}
.loader__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--navy-500), var(--red));
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}

.loader__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s var(--ease), transform 0.8s var(--ease);
}

.loader__ring {
  --size: min(58vw, 230px);
  --r: calc(var(--size) / 2);
  position: relative;
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
}

.loader__ticks { position: absolute; inset: 0; }
.loader__ticks i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 9px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--line-strong);
  transform-origin: 50% var(--r);
  transform: rotate(calc(var(--i) * 7.5deg));
  transition: background-color 0.25s, height 0.25s;
}
.loader__ticks i.is-lit { background: var(--navy-600); height: 13px; }
.loader__ticks i.is-head { background: var(--red); height: 18px; }

.loader__arc {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--red);
  border-right-color: rgba(227, 0, 15, 0.2);
  animation: spin 1.5s linear infinite;
}
.loader__arc--b {
  inset: 20%;
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: var(--navy-500);
  border-left-color: rgba(36, 68, 125, 0.22);
  animation-duration: 2.4s;
  animation-direction: reverse;
}

.loader__shield {
  width: 36%;
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(8, 22, 52, 0.25));
  animation: breathe 2.6s var(--ease-io) infinite;
}

.loader__brand {
  margin-top: 1.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
}
.loader__brand b { color: var(--red); font-weight: 700; }
.loader__sub { margin-top: 0.35rem; font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-3); }

.loader__foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  transition: opacity 0.4s var(--ease);
}
.loader__status { font: 500 0.78rem/1.3 var(--font-mono); letter-spacing: 0.06em; color: var(--ink-2); max-width: 22ch; }
.loader__pct {
  font: 500 clamp(2.4rem, 8vw, 4rem)/0.9 var(--font-mono);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--navy-700);
}
.loader__pct i { font-style: normal; font-size: 0.4em; margin-left: 0.15em; color: var(--red); }

.loader.is-done .loader__content { opacity: 0; transform: scale(1.12); }
.loader.is-done .loader__foot { opacity: 0; }
.loader.is-done .loader__bar { opacity: 0; transition: opacity 0.3s; }
.loader.is-done .loader__half--top { transform: translateY(-101%); transition-delay: 0.4s; }
.loader.is-done .loader__half--bottom { transform: translateY(101%); transition-delay: 0.4s; }
.loader.is-gone { visibility: hidden; pointer-events: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.06); } }

/* ---------- 7. Progreso de scroll ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: 3px;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--navy-500), var(--red));
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}
@supports (animation-timeline: scroll()) {
  .progress span { transform: scaleX(0); animation: progressGrow linear both; animation-timeline: scroll(root); }
  @keyframes progressGrow { to { transform: scaleX(1); } }
}

/* ---------- 8. Navegación ---------- */
.nav {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 60;
  padding-inline: var(--gutter);
  transition: transform 0.7s var(--ease), opacity 0.5s;
}
.js .nav { opacity: 0; transform: translateY(-24px); }
.is-ready .nav { opacity: 1; transform: none; transition-delay: 0.2s; }
.is-ready .nav.is-hidden { transform: translateY(-140%); transition-delay: 0s; }

.nav__bar {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
  max-width: var(--container);
  height: var(--nav-h);
  margin-inline: auto;
  padding: 0 0.75rem 0 1.25rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 12px 40px -14px rgba(5, 13, 31, 0.45);
  transition: background-color 0.4s, box-shadow 0.4s;
}
.nav.is-scrolled .nav__bar { background: rgba(255, 255, 255, 0.97); box-shadow: 0 16px 44px -14px rgba(5, 13, 31, 0.35); }

.nav__brand { display: block; flex: none; }
.nav__brand img { width: auto; height: 32px; }

.nav__links { display: none; margin-left: auto; align-items: center; gap: 0.25rem; }
.nav__links a {
  position: relative;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-pill);
  transition: color 0.3s, background-color 0.3s;
}
.nav__links a:hover { color: var(--ink); background: rgba(10, 21, 48, 0.06); }
.nav__links a.is-current { color: var(--navy-700); }
.nav__links a.is-current::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
}

/* Selector de idioma ES / EN: el indicador se desliza hacia el idioma activo */
.lang {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  flex: none;
  padding: 3px;
  border-radius: var(--r-pill);
  background: rgba(10, 21, 48, 0.07);
}
.lang::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: var(--r-pill);
  background: var(--navy-900);
  transition: transform 0.45s var(--ease);
}
html[lang^="en"] .lang::before { transform: translateX(100%); }
.lang__btn {
  position: relative;
  min-width: 2.5rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  border-radius: var(--r-pill);
  transition: color 0.3s;
}
.lang__btn[aria-pressed="true"] { color: #fff; }
.nav__lang { margin-left: auto; }
.lang--menu { justify-self: start; margin-top: 1.25rem; background: rgba(255, 255, 255, 0.12); }
.lang--menu::before { background: #fff; }
.lang--menu .lang__btn { padding: 0.65rem 1.2rem; font-size: 0.95rem; color: rgba(255, 255, 255, 0.78); }
.lang--menu .lang__btn[aria-pressed="true"] { color: var(--navy-900); }
.menu__inner .lang { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); }

.nav__cta { display: none; }

.nav__toggle {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy-900);
}
.nav__toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 18px; }
.nav__toggle span:nth-child(2) { top: 24px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* Menú móvil */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  align-items: center;
  padding: 6rem var(--gutter) 2rem;
  background: radial-gradient(90% 70% at 100% 0%, #16397c 0%, transparent 60%), var(--navy-950);
  clip-path: circle(0 at calc(100% - 2.8rem) 2.8rem);
  visibility: hidden;
  transition: clip-path 0.9s var(--ease-io), visibility 0s 0.9s;
}
.menu.is-open { clip-path: circle(150% at calc(100% - 2.8rem) 2.8rem); visibility: visible; transition: clip-path 0.9s var(--ease-io), visibility 0s; }
.menu__inner { display: grid; gap: 0.25rem; max-width: 28rem; width: 100%; margin-inline: auto; }
.menu__inner a:not(.btn) {
  padding: 0.7rem 0;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease), color 0.3s;
}
.menu__inner a:not(.btn):hover { color: var(--red-soft); }
.menu__inner .btn { margin-top: 1.5rem; opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); }
.menu.is-open .menu__inner > * { opacity: 1; transform: none; }
.menu.is-open .menu__inner > *:nth-child(1) { transition-delay: 0.35s; }
.menu.is-open .menu__inner > *:nth-child(2) { transition-delay: 0.41s; }
.menu.is-open .menu__inner > *:nth-child(3) { transition-delay: 0.47s; }
.menu.is-open .menu__inner > *:nth-child(4) { transition-delay: 0.53s; }
.menu.is-open .menu__inner > *:nth-child(5) { transition-delay: 0.59s; }
.menu.is-open .menu__inner > *:nth-child(6) { transition-delay: 0.65s; }
.menu.is-open .menu__inner > *:nth-child(7) { transition-delay: 0.75s; }
.menu.is-open .menu__inner > *:nth-child(8) { transition-delay: 0.85s; }

@media (min-width: 1100px) {
  .nav__links { display: flex; }
  .nav__lang { margin-left: 0; }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }
  .menu { display: none; }
  .nav__brand img { height: 34px; }
  .nav__links a { padding: 0.55rem 0.7rem; }
}
/* Barra más compacta entre 1100 y 1279 px para que quepa el selector de idioma sin recortar el botón */
@media (min-width: 1100px) and (max-width: 1279px) {
  .nav__bar { gap: 0.5rem; }
  .nav__links { gap: 0; }
  .nav__links a { padding: 0.55rem 0.4rem; }
  .nav__links a.is-current::after { left: 0.4rem; right: 0.4rem; }
}
@media (max-width: 1319px) {
  .nav__lang .lang__btn { min-width: 1.9rem; padding: 0.4rem 0.45rem; }
}
/* En móvil el selector de idioma queda visible en la barra: el logo se encoge si hace falta para que quepa */
@media (max-width: 1099px) {
  .nav__brand { flex: 0 1 auto; min-width: 0; }
  .nav__brand img { max-width: 100%; object-fit: contain; object-position: left center; }
}
@media (min-width: 1280px) {
  .nav__brand img { height: 40px; }
  .nav__links a { padding: 0.55rem 0.85rem; }
}

/* ---------- 9. Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding: 6.5rem 0 7.5rem;
  background: var(--navy-950);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(110% 80% at 85% 15%, #17397a 0%, transparent 58%),
    linear-gradient(180deg, #050d1f 0%, #081634 55%, #0b1d44 100%);
}

.hero__aurora {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  will-change: transform;
}
.hero__aurora--a {
  top: -22%;
  right: -14%;
  width: 62vw;
  height: 62vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(46, 88, 170, 0.85), transparent 66%);
  animation: drift 24s var(--ease-io) infinite alternate;
}
.hero__aurora--b {
  bottom: -26%;
  left: -16%;
  width: 52vw;
  height: 52vw;
  max-width: 760px;
  max-height: 760px;
  background: radial-gradient(circle, rgba(227, 0, 15, 0.32), transparent 66%);
  animation: drift 30s var(--ease-io) infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6vw, 4vw, 0) scale(1.18); }
}

.hero__grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(75% 65% at 62% 45%, #000 0%, transparent 100%);
  mask-image: radial-gradient(75% 65% at 62% 45%, #000 0%, transparent 100%);
}
.hero__grid::before {
  content: "";
  position: absolute;
  inset: -64px 0;
  background-image:
    linear-gradient(rgba(140, 170, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 170, 255, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: gridRise 10s linear infinite;
}
@keyframes gridRise { to { transform: translate3d(0, 64px, 0); } }

.hero__particles { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero__inner { position: relative; display: grid; gap: 2.5rem; }
.hero__copy { position: relative; z-index: 2; max-width: 56rem; }

.hero .eyebrow { margin-bottom: 1.5rem; }

.hero__title {
  font-size: clamp(2.05rem, 1.15rem + 3.7vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: #fff;
  text-wrap: balance;
}

.line { display: block; overflow: hidden; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.line__in { display: block; }
.js .line__in { transform: translateY(115%); transition: transform 1.3s var(--ease); transition-delay: var(--d, 0s); }
.is-ready .line__in { transform: none; }

.cycle {
  display: inline-grid;
  vertical-align: bottom;
  overflow: hidden;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
  color: var(--red-soft);
}
.cycle__w {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(105%);
  transition: transform 0.85s var(--ease), opacity 0.85s var(--ease);
}
.cycle__w.is-active { opacity: 1; transform: none; }
.cycle__w.is-leaving { opacity: 0; transform: translateY(-105%); }

.hero__lead {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: clamp(1.05rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.55;
  color: #c3cee4;
  text-wrap: pretty;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.25rem; }

/* Entrada del hero (se activa al terminar la carga) */
.js [data-intro] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.is-ready [data-intro] { opacity: 1; transform: none; }
.js [data-intro-visual] {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 1.6s var(--ease) 0.2s, transform 1.8s var(--ease) 0.2s;
}
.is-ready [data-intro-visual] { opacity: 1; transform: none; }

/* Globo */
.hero__visual {
  position: relative;
  width: min(94vw, 600px);
  height: min(94vw, 600px);
  margin-inline: auto;
  margin-top: 0.5rem;
}
.globe { position: absolute; inset: 0; }
.globe canvas { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.globe canvas:active { cursor: grabbing; }

.globe::before,
.globe::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.globe::before {
  inset: 2%;
  border: 1px dashed rgba(150, 185, 255, 0.28);
  animation: spin 80s linear infinite;
}
.globe::after {
  inset: 7%;
  border: 1px solid transparent;
  border-top-color: rgba(255, 75, 88, 0.7);
  border-right-color: rgba(150, 185, 255, 0.3);
  animation: spin 18s linear infinite reverse;
}

.orbit { position: absolute; inset: 0; pointer-events: none; display: none; }
@media (min-width: 700px) { .orbit { display: block; } }
.orbit__chip {
  position: absolute;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "n s" "e e";
  align-items: baseline;
  gap: 0 0.5rem;
  padding: 0.6rem 0.85rem;
  min-width: 78px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 18px 40px -16px rgba(0, 0, 0, 0.6);
  color: #fff;
  animation: floaty 7s var(--ease-io) infinite alternate;
  translate: calc(var(--px, 0) * var(--k, 14) * 1px) calc(var(--py, 0) * var(--k, 14) * 1px);
}
.orbit__chip b { grid-area: n; font: 500 0.7rem/1 var(--font-mono); color: #a9b6d0; }
.orbit__chip span { grid-area: s; font: 600 1.6rem/1 var(--font-sans); letter-spacing: -0.03em; }
.orbit__chip em { grid-area: e; margin-top: 0.2rem; font-style: normal; font-size: 0.78rem; color: #c3cee4; }
.orbit__chip--1 { top: 9%; left: 30%; --k: 18; animation-delay: -1s; }
.orbit__chip--2 { top: 6%; right: 4%; --k: -12; animation-delay: -3s; animation-duration: 8s; }
.orbit__chip--3 { bottom: 14%; left: 0; --k: -20; animation-delay: -5s; animation-duration: 9s; }
.orbit__chip--4 { bottom: 8%; right: 2%; --k: 14; animation-delay: -2s; animation-duration: 6.5s; }
@keyframes floaty {
  from { transform: translate3d(0, -8px, 0); }
  to { transform: translate3d(0, 10px, 0); }
}

@media (min-width: 1100px) {
  .globe canvas {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 20%, #000 36%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 20%, #000 36%);
  }
  .hero { padding: 6rem 0 8rem; }
  .hero__inner { display: block; min-height: 560px; position: static; }
  .hero__copy { padding-block: 1rem; }
  .hero__visual {
    position: absolute;
    top: 0;
    bottom: 0;
    right: max(0px, calc((100vw - var(--container)) / 2 - 3vw));
    margin: auto 0;
    width: min(54vw, 820px);
    height: min(54vw, 820px);
  }
}

/* Pausar movimiento decorativo mientras carga y cuando el hero sale de pantalla */
html.is-loading .hero__aurora,
html.is-loading .hero__grid::before,
html.is-loading .globe::before,
html.is-loading .globe::after,
html.is-loading .orbit__chip,
html.is-loading .element::after,
html.is-loading .wa__pulse,
html.is-loading .wa__pulse::after,
.hero.is-paused .hero__aurora,
.hero.is-paused .hero__grid::before,
.hero.is-paused .globe::before,
.hero.is-paused .globe::after,
.hero.is-paused .orbit__chip { animation-play-state: paused; }

.is-fx-off *,
.is-fx-off *::before,
.is-fx-off *::after { animation-play-state: paused !important; }

/* En pantallas estrechas se omite el destello de las fichas (ahorra capas de composición) */
@media (max-width: 899px) { .element::after { display: none; } }

/* ---------- 10. Cifras ---------- */
.kpis { position: relative; z-index: 5; margin-top: -4.5rem; }
.kpis__panel {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.kpis__list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 1.25rem; }
.kpi { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 0.65rem; }
.kpi dt { font-size: 0.875rem; line-height: 1.4; color: var(--ink-2); max-width: 24ch; }
.kpi dd { display: flex; align-items: baseline; gap: 0.3rem; }
.kpi__n {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--navy-700);
}
.kpi__u { font-size: clamp(1rem, 0.8rem + 0.9vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; color: var(--red); }
.kpis__note { margin-top: 1.75rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-3); }

@media (min-width: 900px) {
  .kpis__list { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .kpi { padding-inline: 1.75rem; }
  .kpi:first-child { padding-left: 0; }
  .kpi + .kpi { border-left: 1px solid var(--line); }
}

/* ---------- 11. Empresa ---------- */
.about__grid { display: grid; gap: 3.5rem; }
.about__copy .lead { margin-top: 1.5rem; }

.pillars { margin-top: 2.5rem; display: grid; }
.pillar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.15rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.pillar:first-child { border-top: 1px solid var(--line); }
.pillar__ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--navy-900);
  color: #fff;
  transition: background-color 0.4s, transform 0.5s var(--ease);
}
.pillar:hover .pillar__ico { background: var(--red); transform: rotate(-6deg) scale(1.05); }
.pillar h3 { font-size: 1.15rem; letter-spacing: -0.02em; font-weight: 600; }
.pillar p { margin-top: 0.3rem; color: var(--ink-2); max-width: 46ch; font-size: 0.975rem; }

.about__media { position: relative; display: grid; gap: 1.25rem; }
.about__fig figcaption { margin-top: 0.7rem; font-size: 0.8125rem; color: var(--ink-3); }

.frame {
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--navy-900);
  box-shadow: 0 30px 70px -30px rgba(8, 22, 52, 0.45);
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.frame:hover img { transform: scale(1.04); }
.frame--dark { box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8); border: 1px solid rgba(255, 255, 255, 0.1); }

.about__fig--a .frame { aspect-ratio: 4 / 3; }
.about__fig--b .frame { aspect-ratio: 4 / 3; }

@media (min-width: 640px) {
  .about__fig--b { width: 62%; margin: -18% 0 0 auto; position: relative; z-index: 2; }
  .about__fig--b .frame { border: 8px solid var(--bg); aspect-ratio: 5 / 4; }
  .about__fig--b figcaption { padding-right: 0.5rem; text-align: right; }
}
@media (min-width: 1024px) {
  .about__grid { grid-template-columns: 5fr 6fr; gap: 6rem; align-items: start; }
  .about__copy { position: sticky; top: 7rem; }
  .about__media { padding-top: 3rem; }
}

/* ---------- 12. Operación (acordeón de imágenes) ---------- */
.acc {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: clamp(520px, 120vw, 680px);
}
.acc__item {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--navy-900);
  outline-offset: 4px;
  cursor: pointer;
  transition: flex-grow 0.9s var(--ease);
}
.acc__item.is-active { flex-grow: 5; cursor: default; }
.acc__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.6) brightness(0.7);
  transform: scale(1.12);
  transition: filter 0.9s var(--ease), transform 1.6s var(--ease);
}
.acc__item.is-active img { filter: none; transform: scale(1); }
.acc__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(5, 13, 31, 0.88) 100%);
  opacity: 0.55;
  transition: opacity 0.7s;
}
.acc__item.is-active::after { opacity: 1; }
.acc__cap {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.25rem;
  z-index: 1;
  color: #fff;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s, transform 0.8s var(--ease);
}
.acc__item.is-active .acc__cap { opacity: 1; transform: none; transition-delay: 0.3s; }
.acc__cap h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 600; letter-spacing: -0.03em; }
.acc__cap p { margin-top: 0.25rem; color: #c3cee4; font-size: 0.95rem; }

@media (min-width: 900px) {
  .acc { flex-direction: row; height: clamp(460px, 44vw, 600px); gap: 1rem; }
  .acc__item { min-width: 0; }
  .acc__item.is-active { flex-grow: 6; }
}

/* ---------- 13. Metales y ensayos (oscuro) ---------- */
.metals { background: var(--navy-950); overflow: clip; }
.metals__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.metals__glow {
  position: absolute;
  top: -10%;
  left: 40%;
  width: 70vw;
  height: 70vw;
  max-width: 1000px;
  max-height: 1000px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(36, 68, 125, 0.55), transparent 65%);
}
.metals__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(140, 170, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 170, 255, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000, transparent);
  mask-image: radial-gradient(80% 70% at 50% 30%, #000, transparent);
}
.metals .container { position: relative; z-index: 1; }
.metals .h2 { color: #fff; }

.metals__top { display: grid; gap: 3rem; }
.metals__fig { margin-top: 2.5rem; max-width: 26rem; }
.metals__fig .frame { aspect-ratio: 3 / 2; }
.metals__fig figcaption { margin-top: 0.7rem; font-size: 0.8125rem; color: var(--text-muted); }

.elements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; align-content: start; }
.element {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 11.5rem;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.13);
  overflow: hidden;
  transform-style: preserve-3d;
}
.js .element.is-in { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); }
.element::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.element:hover::before { opacity: 1; }
.element::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(0) skewX(-18deg);
  animation: sheen 9s var(--ease-io) infinite;
  pointer-events: none;
}
.element:nth-child(1)::after { animation-delay: 0s; }
.element:nth-child(2)::after { animation-delay: 0.7s; }
.element:nth-child(3)::after { animation-delay: 1.4s; }
.element:nth-child(4)::after { animation-delay: 2.1s; }
.element:nth-child(5)::after { animation-delay: 2.8s; }
.element:nth-child(6)::after { animation-delay: 3.5s; }
.element:nth-child(7)::after { animation-delay: 4.2s; }
.element:nth-child(8)::after { animation-delay: 4.9s; }
@keyframes sheen {
  0%, 55% { transform: translateX(0) skewX(-18deg); }
  100% { transform: translateX(520%) skewX(-18deg); }
}

.element__num { font: 500 0.78rem/1 var(--font-mono); color: #a9b6d0; }
.element__sym {
  align-self: center;
  font-size: clamp(2.6rem, 2rem + 2.4vw, 3.75rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.05em;
  color: #fff;
}
.element__name { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; color: #fff; }
.element__kind { margin-top: 0.1rem; font-size: 0.8rem; color: #a9b6d0; }
.element:nth-child(-n + 2) .element__kind { color: var(--red-soft); }

@media (min-width: 640px) { .elements { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) {
  .metals__top { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: center; }
  .element { min-height: 14.5rem; }
}

/* Explorador de ensayos */
.assays { margin-top: clamp(4.5rem, 8vw, 7rem); }
.assays__head .h3 { color: #fff; }
.assays__sub { margin-top: 0.6rem; max-width: 56ch; color: var(--text-muted); }
.assays__body { margin-top: 2rem; display: grid; gap: 1.5rem; }

.assay-tabs {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.4rem;
  scrollbar-width: none;
}
.assay-tabs::-webkit-scrollbar { display: none; }
.assay-tab {
  position: relative;
  flex: 0 0 min(78%, 17rem);
  scroll-snap-align: start;
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.15rem;
  text-align: left;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.13);
  transition: background-color 0.35s, border-color 0.35s, transform 0.5s var(--ease);
}
.assay-tab:hover { background: rgba(255, 255, 255, 0.08); transform: translateX(3px); }
.assay-tab__t { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; color: #fff; }
.assay-tab__m { font-size: 0.8rem; color: #a9b6d0; }
.assay-tab[aria-selected="true"] { background: rgba(255, 255, 255, 0.11); border-color: var(--red-soft); }
.assay-tab[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 3px;
  background: var(--red-soft);
}

.assays__sample { display: none; margin-top: 1.25rem; }
.assays__sample img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-lg); filter: saturate(0.9); }
.assays__sample figcaption { margin-top: 0.6rem; font-size: 0.8125rem; color: var(--text-muted); }

.assays__panel {
  padding: clamp(1.1rem, 3vw, 2rem);
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.assays__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; margin-bottom: 1.25rem; }
.assays__title { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); font-weight: 600; letter-spacing: -0.025em; color: #fff; }
.assays__unit { font: 500 0.8rem/1.6 var(--font-mono); color: #a9b6d0; }
.assays__unit span { color: var(--red-soft); }
.assays__note { margin-top: 1.25rem; font-size: 0.8125rem; color: #a9b6d0; max-width: 70ch; }

.assay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; }
.assay-cell {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0.8rem 0.9rem;
  border-radius: var(--r-md);
  background: rgba(5, 13, 31, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s, transform 0.5s var(--ease);
}
.assay-cell:hover { border-color: rgba(255, 255, 255, 0.3); transform: translateY(-3px); }
.assay-cell__top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.assay-cell__sym { font: 600 0.95rem/1 var(--font-mono); color: var(--red-soft); }
.assay-cell__name { font-size: 0.72rem; color: #a9b6d0; }
.assay-cell__val {
  margin-top: 0.35rem;
  font-size: clamp(1.35rem, 1rem + 1.8vw, 2.25rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.assay-cell__val.is-na { font-size: clamp(0.85rem, 0.75rem + 0.6vw, 1.05rem); font-weight: 500; letter-spacing: 0; color: #a9b6d0; padding-block: 0.35rem; }
.assay-cell__bar {
  display: block;
  height: 3px;
  margin-top: 0.5rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red-soft), #fff);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s var(--ease);
}
.assay-grid.is-on .assay-cell__bar { transform: scaleX(var(--w, 0)); }

@media (min-width: 1024px) {
  .assays__body { grid-template-columns: 4fr 8fr; gap: 2rem; align-items: start; }
  .assay-tabs { flex-direction: column; overflow: visible; }
  .assay-tab { flex: none; }
  .assays__sample { display: block; }
}

/* ---------- 14. Proceso ---------- */
.process__grid { display: grid; gap: 0; }

.process__stage {
  position: sticky;
  top: 5.4rem;
  z-index: 3;
  align-self: start;
  margin-inline: calc(var(--gutter) * -1);
  padding: 0.5rem var(--gutter) 0.9rem;
  background: var(--bg);
}
.stage {
  position: relative;
  height: clamp(190px, 32svh, 320px);
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--navy-900);
  box-shadow: 0 24px 60px -28px rgba(8, 22, 52, 0.55);
}
.stage__fig { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s var(--ease); }
.stage__fig.is-active { opacity: 1; }
.stage__fig img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); transition: transform 3s var(--ease); }
.stage__fig.is-active img { transform: scale(1); }
.stage__fig::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 13, 31, 0.85));
}
.stage__fig figcaption {
  position: absolute;
  left: 1.25rem;
  bottom: 1rem;
  z-index: 2;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
}

/* Plasma generativo (CSS) */
.plasma {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 55%, #0f2a62 0%, #050d1f 72%);
  overflow: hidden;
}
.plasma__core {
  position: absolute;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #dfe9ff 10%, #6e97ff 34%, rgba(227, 0, 15, 0.6) 60%, transparent 72%);
  filter: blur(3px);
  animation: plasmaPulse 3.4s var(--ease-io) infinite;
}
.plasma__arc {
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(255, 75, 88, 0.9) 70%, #fff 76%, transparent 80% 100%);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%, #000 64%, transparent 66%);
  mask: radial-gradient(circle, transparent 58%, #000 60%, #000 64%, transparent 66%);
  animation: spin 4.5s linear infinite;
}
.plasma__ring { position: absolute; border-radius: 50%; border: 1px solid rgba(150, 185, 255, 0.3); }
.plasma__ring--a { width: 78%; aspect-ratio: 1; animation: spin 26s linear infinite; border-style: dashed; }
.plasma__ring--b { width: 90%; aspect-ratio: 1; animation: spin 40s linear infinite reverse; }
.plasma__temp { position: relative; z-index: 2; font: 500 0.85rem/1 var(--font-mono); color: #fff; letter-spacing: 0.04em; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); }
.plasma__temp b { font: 600 clamp(1.8rem, 1.2rem + 2vw, 3rem)/1 var(--font-sans); letter-spacing: -0.04em; margin-right: 0.15em; }
@keyframes plasmaPulse { 50% { transform: scale(1.14); opacity: 0.85; } }

.process__track { position: relative; }
.process__rail { display: none; --p: 0.1; }
.step {
  display: grid;
  align-content: start;
  min-height: 58svh;
  padding-block: 1.5rem 2rem;
}
.step h3, .step p { color: var(--ink-3); transition: color 0.7s var(--ease); }
.step.is-active h3 { color: var(--ink); }
.step.is-active p { color: var(--ink-2); }
.step__ico {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.1rem;
  border-radius: var(--r-md);
  background: var(--navy-900);
  color: #fff;
  opacity: 0.6;
  transition: background-color 0.5s, transform 0.7s var(--ease), opacity 0.7s var(--ease);
}
.step.is-active .step__ico { background: var(--red); transform: scale(1.06); opacity: 1; }
.step h3 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.1; letter-spacing: -0.035em; font-weight: 600; max-width: 18ch; }
.step p { margin-top: 0.85rem; max-width: 44ch; font-size: 1.05rem; }

@media (min-width: 1024px) {
  .process__grid { grid-template-columns: 1fr 1fr; gap: 5rem; }
  .process__stage { top: 6.5rem; margin: 0; padding: 0; background: none; }
  .stage { height: min(calc(100svh - 9rem), 640px); }
  .process__track { padding-left: 2.5rem; }
  .process__rail { display: block; position: absolute; left: 0; top: 8svh; bottom: 8svh; width: 2px; background: var(--line); }
  .process__rail span { display: block; height: 100%; background: linear-gradient(180deg, var(--navy-500), var(--red)); transform-origin: top; transform: scaleY(var(--p, 0.1)); transition: transform 0.9s var(--ease); }
  .step { min-height: 78svh; position: relative; align-content: center; padding-block: 2rem; }
  .step::before {
    content: "";
    position: absolute;
    left: -2.5rem;
    top: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -5px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--line-strong);
    transition: background-color 0.4s, border-color 0.4s, transform 0.5s var(--ease);
  }
  .step.is-active::before { background: var(--red); border-color: var(--red); transform: scale(1.5); }
}

/* ---------- 15. Alianza ---------- */
.roles { display: grid; gap: 0; align-items: stretch; }
.role {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: var(--r-lg);
}
.role__where { font: 500 0.8rem/1 var(--font-mono); color: var(--ink-3); margin-bottom: 0.9rem; }
.role h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); letter-spacing: -0.035em; font-weight: 600; }
.role ul { margin-top: 1.5rem; display: grid; gap: 0.85rem; }
.role li { display: flex; align-items: flex-start; gap: 0.7rem; font-size: 1.02rem; }
.role li .ico { margin-top: 0.2rem; color: var(--red); }

.role--lance { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.role--plasma {
  background: radial-gradient(90% 90% at 100% 0%, #1b3f82 0%, transparent 60%), var(--navy-900);
  color: #fff;
  box-shadow: 0 30px 80px -30px rgba(8, 22, 52, 0.7);
}
.role--plasma .role__where { color: #a9b6d0; }
.role--plasma li .ico { color: var(--red-soft); }

.roles__link { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 5.5rem; }
.roles__line { position: relative; flex: 1; width: 2px; overflow: hidden; background: rgba(36, 68, 125, 0.25); }
.roles__line i {
  position: absolute;
  left: 0;
  right: 0;
  top: -30%;
  height: 30%;
  background: linear-gradient(180deg, transparent, var(--red), transparent);
  animation: flowY 2.2s linear infinite;
}
.roles__badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(227, 0, 15, 0.12);
}
@keyframes flowY { to { transform: translateY(433%); } }
@keyframes flowX { to { transform: translateX(433%); } }

@media (min-width: 900px) {
  .roles { grid-template-columns: 1fr auto 1fr; }
  .roles__link { flex-direction: row; height: auto; width: 7rem; }
  .roles__line { width: auto; height: 2px; }
  .roles__line i { top: 0; bottom: 0; left: -30%; right: auto; width: 30%; height: auto; background: linear-gradient(90deg, transparent, var(--red), transparent); animation-name: flowX; }
}

/* Comparativa */
.compare { margin-top: clamp(3.5rem, 7vw, 6rem); }
.compare__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.5rem; }
.compare__head .h3 { max-width: 24ch; }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.85rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.legend li::before { content: ""; width: 22px; height: 6px; border-radius: 6px; }
.legend__a::before { background: linear-gradient(90deg, var(--red), #ff6b75); }
.legend__b::before { background: #9aa6be; }

.compare__row {
  display: grid;
  gap: 0.75rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}
.compare__row:last-of-type { border-bottom: 1px solid var(--line); }
.compare__label { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.bar { display: flex; align-items: center; gap: 0.75rem; margin-block: 0.3rem; }
.bar i {
  display: block;
  flex: none;
  width: calc(var(--w, 0) * 0.6%);
  height: 14px;
  border-radius: var(--r-pill);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.5s var(--ease) 0.2s;
}
.bar--a i { background: linear-gradient(90deg, var(--red), #ff6b75); }
.bar--b i { background: #9aa6be; transition-delay: 0.4s; }
.bar span { font: 500 0.875rem/1 var(--font-mono); color: var(--ink-2); white-space: nowrap; }
.bar--a span { color: var(--ink); font-weight: 600; }
.compare__row.is-in .bar i { transform: scaleX(1); }
.compare__src { margin-top: 1.25rem; font-size: 0.8125rem; color: var(--ink-3); }

@media (min-width: 768px) {
  .compare__row { grid-template-columns: 15rem 1fr; align-items: center; gap: 2rem; }
}

/* ---------- 16. Capacidad proyectada ---------- */
.flow__line { position: relative; display: grid; gap: 2rem; padding-left: 2.25rem; }
.flow__line::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: linear-gradient(180deg, var(--navy-500), var(--red));
  opacity: 0.35;
}
.node { position: relative; }
.node__ico {
  position: absolute;
  left: -2.25rem;
  top: -2px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--navy-600);
  color: var(--navy-700);
  box-shadow: 0 0 0 6px var(--bg);
  transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}
.node:hover .node__ico { background: var(--navy-900); color: #fff; }
.node > *:not(.node__ico) { margin-left: 2.1rem; }
.node__n {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  padding-top: 0.15rem;
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 3.9rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--navy-700);
}
.node__n small { font: 500 0.9rem/1 var(--font-mono); letter-spacing: 0; color: var(--ink-3); }
.node h3 { margin-top: 0.75rem; margin-bottom: 0.25rem; font-size: 1.15rem; letter-spacing: -0.02em; font-weight: 600; }
.node p:last-child { color: var(--ink-2); font-size: 0.975rem; max-width: 30ch; }

.node--hi .node__ico { background: var(--red); border-color: var(--red); color: #fff; }
.node--hi .node__n { color: var(--red); }

.flow__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
}
.flow__plant { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; }
.flow__plant .ico { color: var(--red); font-size: 1.4rem; }

@media (min-width: 1024px) {
  .flow__line { grid-template-columns: 1fr 1fr 1fr 1.45fr; gap: 2.5rem; padding: 4.5rem 0 0; container-type: inline-size; }
  .flow__line::before { left: 0; right: 0; top: 28px; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, var(--navy-500), var(--red)); }
  .flow__line::after {
    content: "";
    position: absolute;
    top: 25px;
    left: 0;
    width: 90px;
    height: 8px;
    border-radius: 8px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    animation: pulseRun 4.5s linear infinite;
  }
  .node__ico { left: 0; top: -4.5rem; }
  .node > *:not(.node__ico) { margin-left: 0; }
  .node--hi {
    padding: 1.75rem 1.75rem 1.9rem;
    margin-top: -1rem;
    border-radius: var(--r-lg);
    background: radial-gradient(90% 90% at 100% 0%, #1b3f82 0%, transparent 60%), var(--navy-900);
    color: #fff;
    box-shadow: 0 30px 80px -30px rgba(8, 22, 52, 0.7);
  }
  .node--hi .node__ico { left: 1.75rem; top: -3.5rem; }
  .node--hi .node__n { color: #fff; }
  .node--hi .node__n small { color: #a9b6d0; }
  .node--hi p:last-child { color: #c3cee4; }
}
@keyframes pulseRun { from { transform: translateX(-90px); } to { transform: translateX(100cqw); } }

/* ---------- 17. Equipo y laboratorio (bento) ---------- */
.bento { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.bento__cell { position: relative; border-radius: var(--r-lg); overflow: hidden; }
.bento__photo { min-height: 260px; background: var(--navy-900); }
.bento__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.bento__photo:hover img { transform: scale(1.06); }

.bento__navy,
.bento__red {
  display: grid;
  align-content: end;
  gap: 0.6rem;
  min-height: 260px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  color: #fff;
}
.bento__navy { background: radial-gradient(90% 90% at 100% 0%, #1b3f82 0%, transparent 60%), var(--navy-900); }
.bento__red { background: radial-gradient(90% 90% at 100% 0%, #ff4b58 0%, transparent 62%), var(--red); }
.bento__navy .ico, .bento__red .ico { margin-bottom: auto; opacity: 0.95; }
.bento__navy h3, .bento__red h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -0.035em; font-weight: 600; }
.bento__navy p, .bento__red p { max-width: 38ch; font-size: 0.975rem; color: rgba(255, 255, 255, 0.86); }
.bento__navy::before, .bento__red::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.bento__navy:hover::before, .bento__red:hover::before { opacity: 1; }

@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__a { grid-column: 1 / -1; min-height: 340px; }
  .bento__e { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(12, 1fr); grid-template-rows: 380px 320px; }
  .bento__cell { min-height: 0; }
  .bento__a { grid-column: 1 / 8; grid-row: 1; }
  .bento__b { grid-column: 8 / 13; grid-row: 1; }
  .bento__c { grid-column: 1 / 5; grid-row: 2; }
  .bento__d { grid-column: 5 / 9; grid-row: 2; }
  .bento__e { grid-column: 9 / 13; grid-row: 2; }
}

/* ---------- 18. Organización ---------- */
.org { --line-org: #b7c3da; }
.node-box {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--r-md);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-align: center;
}
.node-box--root { background: var(--navy-900); color: #fff; font-size: 1.1rem; padding: 1.05rem 1.6rem; box-shadow: 0 18px 40px -18px rgba(8, 22, 52, 0.7); }
.node-box--root .ico { color: var(--red-soft); }
.node-box--staff { background: var(--surface); border: 1px dashed var(--line-org); color: var(--ink-2); font-weight: 500; font-size: 0.925rem; }
.node-box--dir { width: 100%; justify-content: center; background: var(--surface); border: 1px solid var(--line-strong); color: var(--navy-700); box-shadow: 0 12px 30px -18px rgba(8, 22, 52, 0.45); }

.org__top { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.org__staff { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }

.org__branches { position: relative; display: grid; gap: 1.25rem; margin-top: 2.5rem; padding-left: 1.25rem; border-left: 2px solid var(--line-org); }
.branch { position: relative; display: grid; gap: 0.75rem; align-content: start; }
.branch::before { content: ""; position: absolute; left: -1.25rem; top: 1.45rem; width: 1.25rem; height: 2px; background: var(--line-org); }
.org__leaves { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.org__leaves li {
  padding: 0.4rem 0.8rem;
  border-radius: var(--r-pill);
  background: var(--bg-tint);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-2);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.org__leaves li:hover { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

@media (min-width: 900px) {
  .org__top { position: relative; padding-bottom: 2.5rem; flex-direction: row; justify-content: center; }
  .org__top::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 2px; height: 2.5rem; margin-left: -1px; background: var(--line-org); }
  .org__staff { position: absolute; left: calc(50% + 11rem); top: 50%; transform: translateY(-50%); flex-wrap: nowrap; }
  .org__branches { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 0; padding: 2.25rem 0 0; border-left: 0; }
  .org__branches::before { content: ""; position: absolute; top: 0; left: calc(12.5% - 7.5px); right: calc(12.5% - 7.5px); height: 2px; background: var(--line-org); transform-origin: center; }
  .branch::before { left: 50%; top: -2.25rem; width: 2px; height: 2.25rem; margin-left: -1px; }
  .branch { justify-items: center; }
  .org__leaves { justify-content: center; }
  .node-box--dir { min-height: 4.5rem; }
}

/* ---------- 19. Preguntas frecuentes ---------- */
.faq__grid { display: grid; gap: 0.85rem; align-items: start; }
.faq__item { border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.3s, box-shadow 0.4s; }
.faq__item.is-open { border-color: var(--navy-500); box-shadow: 0 20px 44px -26px rgba(8, 22, 52, 0.5); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 1.35rem;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.faq__q .ico { transition: transform 0.6s var(--ease), color 0.3s; color: var(--red); font-size: 1.3rem; }
.faq__item.is-open .faq__q .ico { transform: rotate(135deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease); }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding: 0 1.35rem 1.3rem; color: var(--ink-2); max-width: 56ch; }

@media (min-width: 900px) { .faq__grid { grid-template-columns: 1fr 1fr; gap: 1rem; } }

/* ---------- 20. Contacto (oscuro) ---------- */
.contact { background: var(--navy-950); overflow: clip; }
.contact__bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.contact__bg .hero__aurora { animation: none; }
.contact .container { position: relative; z-index: 1; }
.contact .h2 { color: #fff; }
.contact__grid { display: grid; gap: 3rem; }
.contact__list { margin-top: 2.25rem; display: grid; gap: 0.35rem; }
.contact__row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.9rem;
  margin-inline: -0.9rem;
  border-radius: var(--r-md);
  color: #c3cee4;
  font-size: 0.975rem;
  transition: background-color 0.35s, transform 0.5s var(--ease);
}
.contact__row:hover { background: rgba(255, 255, 255, 0.06); transform: translateX(4px); }
.contact__row b { display: block; font-size: 0.8rem; font-weight: 500; color: #8e9cba; margin-bottom: 0.1rem; }
.contact__row span:last-child { color: #fff; font-weight: 500; }
.contact__ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--red-soft);
  font-size: 1.25rem;
  transition: background-color 0.35s, color 0.35s;
}
.contact__row:hover .contact__ico { background: var(--red); color: #fff; border-color: var(--red); }

.contact__map { margin-top: 2rem; overflow: hidden; border-radius: var(--r-lg); border: 1px solid rgba(255, 255, 255, 0.14); height: 240px; background: var(--navy-900); }
.contact__map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.9) contrast(1.05) brightness(0.92); transition: filter 0.6s; }
.contact__map:hover iframe { filter: grayscale(0.2); }

.form {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
  display: grid;
  gap: 1.15rem;
}
.form__head h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); letter-spacing: -0.035em; font-weight: 600; }
.form__head p { margin-top: 0.35rem; color: var(--ink-2); font-size: 0.95rem; }

.field { display: grid; gap: 0.5rem; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
  appearance: none;
  -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 116px; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: #66728b; opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--navy-500); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgba(36, 68, 125, 0.16);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--red-700); background: #fff7f7; }
.field.is-invalid input:focus, .field.is-invalid textarea:focus { box-shadow: 0 0 0 4px rgba(182, 0, 12, 0.14); }
.field__err { min-height: 0; font-size: 0.8125rem; line-height: 1.35; color: var(--red-700); font-weight: 500; }
.field__err:empty { display: none; }

.select { position: relative; }
.select select { padding-right: 2.75rem; cursor: pointer; }
.select .ico { position: absolute; right: 1rem; top: 50%; margin-top: -0.575em; pointer-events: none; color: var(--ink-2); }

.form .btn--primary:disabled { opacity: 0.75; cursor: progress; }
.form__hint { text-align: center; font-size: 0.8125rem; color: var(--ink-3); }
.form__ok {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-radius: var(--r-md);
  background: #eaf7ef;
  border: 1px solid #b5e0c4;
  color: #12532c;
  font-size: 0.9rem;
}
.form__ok[hidden] { display: none; }
.form__ok .ico { margin-top: 0.15rem; color: #1a7a43; font-size: 1.2rem; }
.form__ok a { text-decoration: underline; font-weight: 600; }

@media (min-width: 1024px) {
  .contact__grid { grid-template-columns: 6fr 5fr; gap: 6rem; align-items: start; }
  .contact__formwrap { position: sticky; top: 6.5rem; }
}

/* ---------- 21. Pie de página ---------- */
.footer { background: var(--navy-950); border-top: 1px solid rgba(255, 255, 255, 0.08); padding: clamp(3.5rem, 7vw, 5.5rem) 0 2rem; color: var(--text-muted); }
.footer__top { display: grid; gap: 2.5rem; }
.footer__logo { display: inline-block; padding: 1rem 1.4rem; border-radius: var(--r-md); background: #fff; }
.footer__logo img { width: 130px; height: auto; }
.footer__brand p { margin-top: 1.25rem; max-width: 30ch; font-size: 0.95rem; }
.footer__col h2 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.footer__col ul { display: grid; gap: 0.6rem; font-size: 0.95rem; }
.footer__col a { transition: color 0.3s; }
.footer__col a:hover { color: #fff; }
.footer__plate { display: inline-block; padding: 0.8rem 1rem; border-radius: var(--r-md); background: #fff; }
.footer__plate img { width: 120px; height: auto; }
.footer__bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.1); display: grid; gap: 0.75rem; font-size: 0.8125rem; }
.footer__legal { max-width: 80ch; color: #8e9cba; }

@media (min-width: 768px) { .footer__top { grid-template-columns: 1.4fr 1fr 1.2fr auto; gap: 3rem; } }
@media (max-width: 767px) { .footer { padding-bottom: 6rem; } }

/* ---------- 22. WhatsApp flotante ---------- */
.wa {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 50;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, #25c562, #14934b);
  color: #fff;
  box-shadow: 0 16px 36px -10px rgba(20, 147, 75, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.6s var(--ease), opacity 0.6s;
}
.js .wa { opacity: 0; transform: scale(0.4) translateY(30px); pointer-events: none; }
.is-ready .wa { opacity: 1; transform: none; pointer-events: auto; transition-delay: 1.4s; }
.is-ready .wa:hover { transform: scale(1.08); transition-delay: 0s; }
.wa__pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(37, 197, 98, 0.8); animation: waPulse 2.6s var(--ease-io) infinite; }
.wa__pulse::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(37, 197, 98, 0.5); animation: waPulse 2.6s var(--ease-io) 0.5s infinite; }
@keyframes waPulse { from { transform: scale(1); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.wa__tip {
  position: absolute;
  right: calc(100% + 0.75rem);
  top: 50%;
  padding: 0.65rem 1rem;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 14px 34px -12px rgba(5, 13, 31, 0.5);
  opacity: 0;
  transform: translate(10px, -50%);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.6s var(--ease);
}
.wa:hover .wa__tip, .wa.is-tip .wa__tip { opacity: 1; transform: translate(0, -50%); }

@media (max-width: 480px) { .wa__tip { display: none; } }

/* ---------- 23. Reducir movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal], .js [data-intro], .js [data-intro-visual], .js .line__in, .js .w__in, .js .nav, .js .wa { opacity: 1; transform: none; }
  .element::after, .orbit__chip { animation: none; }
  .bar i, .assay-cell__bar { transform: scaleX(1); }
  .assay-cell__bar { transform: scaleX(var(--w, 1)); }
}
