/* ============================================================
   NawRath Auditores Certificadores — V3 «Vanguardia»
   Exo auto-hospedada · light-dark() con fallback estático ·
   esquinas rectas · bloques sólidos azul corporativo #003893
   ============================================================ */

/* ---------- Fuentes (Exo variable, subset latin + tildes) ---------- */
@font-face {
  font-family: "Exo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/exo-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Exo";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/exo-latin-italic-var.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* Paleta adaptativa — dark es el valor estático por defecto.
     Navegadores sin light-dark() (Chrome <123, Safari <17.5) usan estos valores
     y el bloque @media light de abajo; los modernos, el bloque @supports. */
  --bg: #021F49;
  --surface: #0A2B57;
  --text: #F2F5FA;
  --text-muted: #A9B7D4;
  --accent: #F09456;
  --accent-contrast: #021F49;
  --accent-btn-bg: #F09456;
  --border: rgba(242, 245, 250, .16);

  /* Constantes de marca (no cambian con el esquema) */
  --navy: #021F49;
  --navy-2: #0A2B57;
  --blue: #003893;          /* bloques sólidos: texto blanco 10.57:1 */
  --blue-deep: #002868;
  --blue-bright: #3F88FF;   /* acento sobre negro VARIO: 6.2:1 */
  --orange: #F09456;        /* sobre #003893: 4.6:1 — solo cifras/acentos grandes */
  --on-blue: #FFFFFF;
  --on-blue-muted: #D6E0F5; /* 8.3:1 sobre #003893 */
  --ink: #0B0B0D;           /* negro VARIO */

  /* Valores no cromáticos que siguen al esquema (misma triple vía que los colores) */
  --logo-filter: none;
  --seal-filter: none;
  --ink-filter: invert(1);  /* logos de clientes en tinta negra → blanca en oscuro */
  --tile-rest: .66;
  --card-shadow: none;
  --grain: .05;

  /* Movimiento: deceleración exponencial para llegadas, simétrica para cambios de estado */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  /* Tipografía — Exo es más ancha que Barlow: escalas algo más contenidas */
  --font-sans: "Exo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --text-display: clamp(2rem, 1.15rem + 3vw, 3.5rem);
  --text-h2: clamp(1.75rem, 1.15rem + 2.3vw, 3rem);
  --text-h3: clamp(1.1875rem, 1.05rem + .6vw, 1.5rem);
  --text-stat: clamp(3rem, 2rem + 4vw, 5.5rem);
  --text-lead: clamp(1.0625rem, .98rem + .4vw, 1.3125rem);
  --text-body: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --text-small: .875rem;
  --text-eyebrow: .8125rem;

  /* Espaciado — base 4px */
  --space-1: .25rem;  --space-2: .5rem;  --space-3: .75rem; --space-4: 1rem;
  --space-6: 1.5rem;  --space-8: 2rem;   --space-12: 3rem;  --space-16: 4rem;
  --space-24: 6rem;
  --section-pad: clamp(4rem, 9vw, 7.5rem);
  --container: 74rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-h: 4.5rem;

  /* Compuestos: se resuelven donde se declaran — re-declararlos en cada zona que cambie --border/--accent */
  --border-1: 1px solid var(--border);
  --focus-ring: 2px solid var(--accent);
  --logo-tint: brightness(0) saturate(100%) invert(13%) sepia(88%) saturate(3106%) hue-rotate(214deg) brightness(94%) contrast(101%);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F7F9FC;
    --surface: #FFFFFF;
    --text: #021F49;
    --text-muted: #46536A;
    --accent: #003893;
    --accent-contrast: #FFFFFF;
    --accent-btn-bg: #003893;
    --border: rgba(2, 31, 73, .14);

    --logo-filter: var(--logo-tint);
    --seal-filter: invert(1) grayscale(1) brightness(.55);
    --ink-filter: none;
    --tile-rest: .58;
    --card-shadow: 0 1px 2px rgba(16, 23, 38, .06), 0 8px 24px rgba(16, 23, 38, .08);
    --grain: .03;
  }
}

@supports (color: light-dark(#000, #fff)) {
  :root {
    --bg: light-dark(#F7F9FC, #021F49);
    --surface: light-dark(#FFFFFF, #0A2B57);
    --text: light-dark(#021F49, #F2F5FA);
    --text-muted: light-dark(#46536A, #A9B7D4);
    --accent: light-dark(#003893, #F09456);
    --accent-contrast: light-dark(#FFFFFF, #021F49);
    --accent-btn-bg: light-dark(#003893, #F09456);
    --border: light-dark(rgba(2, 31, 73, .14), rgba(242, 245, 250, .16));
  }

  /* Esquema forzado por el toggle (nwr-scheme): color-scheme voltea los light-dark();
     los no cromáticos se re-declaran (html.x gana en especificidad a :root) */
  html.scheme-light {
    color-scheme: light;
    --logo-filter: var(--logo-tint);
    --seal-filter: invert(1) grayscale(1) brightness(.55);
    --ink-filter: none;
    --tile-rest: .58;
    --card-shadow: 0 1px 2px rgba(16, 23, 38, .06), 0 8px 24px rgba(16, 23, 38, .08);
    --grain: .03;
  }
  html.scheme-dark {
    color-scheme: dark;
    --logo-filter: none;
    --seal-filter: none;
    --ink-filter: invert(1);
    --tile-rest: .66;
    --card-shadow: none;
    --grain: .05;
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  font-optical-sizing: auto;
}

/* Grano de página (estático, nunca animado) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 { margin: 0 0 var(--space-4); color: var(--text); text-wrap: balance; }
h1 { font-size: var(--text-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: var(--text-h2); font-weight: 700; line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-size: var(--text-h3); font-weight: 600; line-height: 1.25; letter-spacing: -0.005em; }
h4 { font-weight: 600; }

p { margin: 0 0 var(--space-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* Superficies del navegador con la paleta: selección, cursor de texto, controles y scrollbar */
::selection { background: var(--blue); color: #FFFFFF; }
html {
  accent-color: var(--blue);
  caret-color: var(--accent);
  scrollbar-color: color-mix(in srgb, var(--text) 35%, transparent) var(--bg);
}

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }

/* Ids heredados (#manifiesto, #tecnologia) siguen funcionando como anclas */
.anchor-alias { position: absolute; }
.about,
.vario { position: relative; }
.anchor-alias { top: 0; }

.eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
/* Marca sólida delante del eyebrow: el cuadrado reemplaza a las píldoras */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: .5rem;
  height: .5rem;
  margin-right: .625rem;
  vertical-align: .08em;
  background: var(--accent);
}

.lead { font-size: var(--text-lead); line-height: 1.55; }
.muted { color: var(--text-muted); }

.section-head { margin-bottom: var(--space-12); }
.section-head > .lead { max-width: 64ch; }
.section-head h2 { max-width: 28ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  padding: .875rem 1.5rem;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
}

.btn-primary {
  background-color: var(--accent-btn-bg);
  color: var(--accent-contrast);
}

.btn-secondary {
  background: transparent;
  border: var(--border-1);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent); }

.btn-light {
  background: #FFFFFF;
  color: var(--ink);
}

/* CTA de servicio: botón notorio con flecha (R23) */
.btn-cta {
  margin-top: var(--space-2);
  padding: 1rem 1.375rem;
  text-align: left;
}
/* Flecha dibujada (SVG en máscara, hereda currentColor) en vez del glifo → */
.btn-cta::after {
  content: "";
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-left: auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: filter .15s ease, transform .2s var(--ease-out), border-color .15s ease, background-color .15s ease; }
  .btn-primary:hover,
  .btn-light:hover { filter: brightness(1.08); transform: translateY(-1px); }
  .btn-secondary:hover { transform: translateY(-1px); }
  .btn-cta::after { transition: transform .25s var(--ease-out); }
  .btn-cta:hover::after { transform: translateX(4px); }
  .btn:active { transition-duration: .08s; }
}

.btn:active { transform: scale(.98); }
.btn-secondary:hover { background-color: color-mix(in srgb, var(--accent) 8%, transparent); }

.chip {
  display: inline-block;
  padding: .375rem .75rem;
  border: var(--border-1);
  font-size: var(--text-small);
  font-weight: 600;
}
.chip-accent {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 200;
  padding: .75rem 1.25rem;
  background: var(--orange);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible {
  top: 0;
  outline-offset: -3px;
}

/* ---------- Header (sigue al esquema) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: var(--border-1);
}
/* El blur va en un pseudo-elemento: backdrop-filter en el header lo vuelve el bloque
   contenedor del menú móvil (position: fixed) y el panel quedaría recortado a 0 de alto */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.brand { display: inline-flex; flex-shrink: 0; margin-right: auto; }
.brand img { width: 148px; height: auto; filter: var(--logo-filter); }

.site-nav ul {
  display: flex;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: .625rem .625rem;
  color: var(--text);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--accent); }

/* Sección en curso (script.js marca aria-current): regla que crece desde la izquierda */
@media (min-width: 1180px) {
  .site-nav a { position: relative; }
  .site-nav a::after {
    content: "";
    position: absolute;
    left: .625rem;
    right: .625rem;
    bottom: .25rem;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
  }
  .site-nav a[aria-current]::after { transform: none; }
  .site-nav a[aria-current] { color: var(--accent); }
}
@media (min-width: 1180px) and (prefers-reduced-motion: no-preference) {
  .site-nav a::after { transition: transform .35s var(--ease-out); }
}

.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  min-width: 44px;
  min-height: 44px;
  padding: .5rem .875rem;
  background: transparent;
  border: var(--border-1);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

/* 7 ítems + toggle + CTA: el menú compacto entra antes que en la versión de 6 ítems */
@media (max-width: 1179.98px) {
  html.js .nav-toggle { display: inline-flex; }

  html.js .site-nav {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 99;
    background: var(--bg);
    padding: var(--space-8) var(--gutter);
    overflow-y: auto;
  }
  html.js .site-nav.open { display: block; }

  @media (prefers-reduced-motion: no-preference) {
    html.js .site-nav.open { animation: nav-fade .2s ease; }
  }

  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li { border-bottom: var(--border-1); }
  .site-nav a {
    display: block;
    font-size: var(--text-h3);
    padding: var(--space-4) var(--space-2);
  }

  html:not(.js) .site-nav {
    order: 3;
    width: 100%;
    padding-bottom: var(--space-4);
  }
  html:not(.js) .site-nav ul { flex-direction: row; flex-wrap: wrap; }
  html:not(.js) .site-nav li { border: 0; }
  html:not(.js) .site-nav a { font-size: .9375rem; padding: .5rem; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
}

@keyframes nav-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 519.98px) {
  .header-cta { display: none; }
}

/* Toggle de esquema: oculto FUERA del @supports (sin light-dark() no existe) */
.scheme-toggle { display: none; }

@supports (color: light-dark(#000, #fff)) {
  .scheme-toggle {
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;   /* ≥ 24px de objetivo (WCAG 2.5.8) sin caja visible */
    height: 32px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
  }
  html.js .scheme-toggle { display: inline-flex; }
  .scheme-toggle:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--text) 8%, transparent);
  }
  .scheme-toggle:active { transform: scale(.94); }
  .scheme-toggle svg { width: 17px; height: 17px; }
  @media (prefers-reduced-motion: no-preference) {
    .scheme-toggle { transition: color .15s ease, background-color .15s ease; }
  }

  /* Icono = esquema al que se cambiaría: sol en oscuro, luna en claro */
  .scheme-toggle .icon-moon { display: none; }
  html.scheme-light .scheme-toggle .icon-sun { display: none; }
  html.scheme-light .scheme-toggle .icon-moon { display: block; }
  @media (prefers-color-scheme: light) {
    html:not(.scheme-dark) .scheme-toggle .icon-sun { display: none; }
    html:not(.scheme-dark) .scheme-toggle .icon-moon { display: block; }
  }
}

/* Selector de idioma: en la barra del header a todo ancho (visible sin abrir el menú ni JS) */
.lang-switch {
  display: flex;
  flex-shrink: 0;
  border: var(--border-1);
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0 .625rem;
  color: var(--text-muted);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
}
.lang-switch a:hover { color: var(--accent); }
.lang-switch a[aria-current] {
  background: var(--accent-btn-bg);
  color: var(--accent-contrast);
}

@media (min-width: 1180px) {
  .site-nav { display: flex; align-items: center; gap: var(--space-3); }
  /* Misma separación que cuando vivía dentro del nav */
  .lang-switch { margin-left: calc(var(--space-3) - var(--space-4)); }
}
/* Móvil: logo + ES/EN + Menú + esquema deben caber en 360px */
@media (max-width: 519.98px) {
  .header-inner { gap: var(--space-2); }
  .brand img { width: 120px; }
  .nav-toggle { flex-shrink: 0; padding-inline: .5rem; }
  .lang-switch a { min-width: 1.875rem; min-height: 2rem; padding: 0 .3125rem; font-size: .75rem; letter-spacing: .04em; }
}

/* ---------- Hero con carrusel de fondo (sigue al esquema) ---------- */
/* Tokens propios con valores LITERALES por esquema (misma triple vía que :root, sin
   light-dark()): --hero-wash/--hero-ink son tripletes RGB para rgba() con alfa por uso. */
.hero {
  --hero-wash: 2, 31, 73;
  --hero-ink: 242, 245, 250;
  --hero-heading: #FFFFFF;
  --hero-text: #F2F5FA;
  --hero-emphasis: #F09456;
  /* Velo móvil (<900px): en oscuro el titular cae en el tercio superior de la foto;
     velo denso desde el 16% para que el acento naranja pase 4.5:1 en todas las diapositivas */
  --veil-0: .55; --veil-16: .9; --veil-42: .93; --veil-100: .96;
}
@media (prefers-color-scheme: light) {
  html:not(.scheme-dark) .hero {
    --hero-wash: 247, 249, 252;
    --hero-ink: 2, 31, 73;
    --hero-heading: #021F49;
    --hero-text: #021F49;
    --hero-emphasis: #003893;   /* el naranja no llega a 3:1 sobre claro */
    --veil-0: .45; --veil-16: .59; --veil-42: .82; --veil-100: .94;
  }
}
html.scheme-light .hero {
  --hero-wash: 247, 249, 252;
  --hero-ink: 2, 31, 73;
  --hero-heading: #021F49;
  --hero-text: #021F49;
  --hero-emphasis: #003893;
  --veil-0: .45; --veil-16: .59; --veil-42: .82; --veil-100: .94;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: min(90svh, 54rem);
  padding-block: clamp(4rem, 9vh, 6.5rem);
  background-color: rgb(var(--hero-wash));
  color: var(--hero-text);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden; /* el zoom lento no debe asomar fuera del recorte */
  background: rgb(var(--hero-wash));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide picture { display: contents; }
.hero-slide img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--focal, 50% 40%);
  transform-origin: var(--focal, 50% 40%);
}

/* Velo (navy u hoja clara según esquema): más denso del lado del texto para asegurar AA en cualquier foto */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--hero-wash), var(--veil-0)) 0%, rgba(var(--hero-wash), var(--veil-16)) 16%, rgba(var(--hero-wash), var(--veil-42)) 42%, rgba(var(--hero-wash), var(--veil-100)) 100%);
}

/* Desktop: la foto arranca donde termina el titular (ninguna cara queda bajo el texto).
   --face (inline, fracción del ancho de la foto) es el borde de cara que se pega al texto;
   --photo-w estima el ancho renderizado (alto del hero × 16:9) y max(…, 100%) impide que
   la foto deje hueco a la derecha en pantallas anchas. */
@media (min-width: 900px) {
  .hero {
    --text-edge: calc(max(var(--gutter), (100% - var(--container)) / 2 + var(--gutter)) + 46rem);
    --photo-gap: 24px;
  }
  .hero-slide {
    --face-now: var(--face);
    --photo-fade: 48px;
    --photo-w: calc(min(90vh, 54rem) * 16 / 9);
    left: calc(var(--text-edge) + var(--photo-gap) - var(--photo-fade));
    -webkit-mask: linear-gradient(90deg, transparent, #000 var(--photo-fade)) no-repeat;
    mask: linear-gradient(90deg, transparent, #000 var(--photo-fade)) no-repeat;
  }
  .hero-slide img {
    object-position: max(var(--photo-fade) - var(--face-now) * var(--photo-w), 100%) 0;
    transform-origin: var(--photo-fade) 25%;
  }
  .hero-media::after {
    background:
      linear-gradient(90deg, rgb(var(--hero-wash)) 0%, rgb(var(--hero-wash)) 35%, rgba(var(--hero-wash), .86) 50%, rgba(var(--hero-wash), .35) 72%, rgba(var(--hero-wash), .08) 100%),
      linear-gradient(0deg, rgba(var(--hero-wash), .55) 0%, rgba(var(--hero-wash), 0) 35%);
  }
}
/* 900–1179px: el titular llega al ~85% del ancho y pisaba la zona clara de la foto
   (acento 1.1:1); columna de texto más angosta y velo opaco hasta más allá */
@media (min-width: 900px) and (max-width: 1179.98px) {
  .hero .hero-inner > h1,
  .hero .hero-inner > .hero-lead { max-width: 62vw; }
  .hero { --text-edge: calc(var(--gutter) + 62vw); --photo-gap: 16px; }
  .hero-slide { --face-now: var(--face-md, var(--face)); }
  .hero-media::after {
    background:
      linear-gradient(90deg, rgb(var(--hero-wash)) 0%, rgb(var(--hero-wash)) 41%, rgba(var(--hero-wash), .9) 62%, rgba(var(--hero-wash), .6) 82%, rgba(var(--hero-wash), .2) 100%),
      linear-gradient(0deg, rgba(var(--hero-wash), .55) 0%, rgba(var(--hero-wash), 0) 35%);
  }
}
@media (min-width: 1680px) {
  .hero-slide { --face-now: var(--face-xl, var(--face)); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-slide { transition: opacity 1.2s ease; }
  .hero-slide.is-active img,
  .hero-slide.is-leaving img { animation: hero-zoom 8s linear both; }
  .hero.is-paused .hero-slide img { animation-play-state: paused; }
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.hero-inner { position: relative; width: 100%; }
.hero-inner > * { max-width: 40rem; }
.hero-inner > h1 { max-width: 46rem; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: .5rem .875rem;
  border: 1px solid rgba(var(--hero-ink), .3);
  background: rgba(var(--hero-wash), .55);
  font-size: var(--text-small);
  font-weight: 600;
  margin-bottom: var(--space-8);
}
.hero-badge img { width: auto; height: 22px; filter: var(--seal-filter); }

.hero h1 { color: var(--hero-heading); margin-bottom: var(--space-6); }
.hero-accent { color: var(--hero-emphasis); }

/* Lead y CTAs escalan con el H1: la promesa y la acción pesan junto al titular */
.hero-lead {
  max-width: 38rem;
  font-size: clamp(1.125rem, 1rem + .6vw, 1.4375rem);
  line-height: 1.55;
  color: var(--hero-text);
  margin-bottom: var(--space-12);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  align-items: center;
}
.hero-ctas .btn {
  min-height: 3.5rem;
  padding: 1rem 1.875rem;
  font-size: clamp(1rem, .95rem + .2vw, 1.125rem);
}
.hero .btn-secondary { background: rgba(var(--hero-wash), .4); border-color: rgba(var(--hero-ink), .55); }
.hero .btn-secondary:hover { background: rgba(var(--hero-wash), .7); border-color: var(--hero-emphasis); }
@media (max-width: 519.98px) {
  .hero-ctas .btn { flex: 1 1 100%; justify-content: center; }
}

/* Controles del carrusel: pausa + progreso por diapositiva, alineados a la columna de texto */
.hero-controls {
  position: absolute;
  left: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  bottom: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.hero-progress {
  display: flex;
  gap: 6px;
  width: min(15rem, 45vw);
}
.hero-progress span {
  flex: 1;
  height: 2px;
  background: rgba(var(--hero-ink), .28);
  overflow: hidden;
}
.hero-progress span::after {
  content: "";
  display: block;
  height: 100%;
  background: var(--hero-heading);
  transform: scaleX(0);
  transform-origin: left;
}
.hero-progress .is-done::after { transform: none; }
.hero-progress .is-current::after { animation: hero-progress var(--slide-ms, 6500ms) linear both; }
.hero.is-paused .hero-progress .is-current::after { animation-play-state: paused; }
@keyframes hero-progress {
  to { transform: none; }
}

.hero-pause {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(var(--hero-ink), .4);
  background: rgba(var(--hero-wash), .6);
  color: var(--hero-heading);
  cursor: pointer;
}
.hero-pause[hidden] { display: none; }
.hero-pause:hover { border-color: var(--hero-emphasis); }
.hero-pause svg { width: 18px; height: 18px; fill: currentColor; }
.hero-pause .icon-play { display: none; }
.hero-pause[aria-pressed="true"] .icon-play { display: block; }
.hero-pause[aria-pressed="true"] .icon-pause { display: none; }

@media (max-width: 899.98px) {
  .hero { align-items: end; min-height: min(92svh, 50rem); }
}

/* Entrada del hero: una sola vez, CSS puro. El overlay navy llega primero y la foto
   se revela desde la columna de texto, como si se descorriera el expediente */
@media (prefers-reduced-motion: no-preference) {
  .hero-badge,
  .hero h1,
  .hero-lead,
  .hero-ctas { animation: hero-in .8s var(--ease-out) both; }
  .hero h1 { animation-delay: .08s; }
  .hero-lead { animation-delay: .18s; }
  .hero-ctas { animation-delay: .28s; }
  .hero-controls { animation: hero-fade .6s ease .9s both; }
  .hero-media { animation: hero-unveil 1.6s var(--ease-out) both; }
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes hero-fade {
  from { opacity: 0; }
}
@keyframes hero-unveil {
  from { clip-path: inset(0 0 0 55%); opacity: .25; }
}

/* ---------- Stats: banda azul sólida (R4–R8, R39) ---------- */
.stats {
  background: var(--blue);
  color: var(--on-blue);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.stat { padding-inline: clamp(1rem, 3vw, 2.5rem); }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid rgba(255, 255, 255, .22); }

.stat-figure {
  font-size: var(--text-stat);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: var(--space-4);
  font-variant-numeric: tabular-nums;
}
.stat-plus { color: var(--orange); margin-right: .04em; }

.stat-label {
  font-size: clamp(1rem, .94rem + .3vw, 1.1875rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--on-blue);
  max-width: 32ch;
}

@media (max-width: 819.98px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat { padding: var(--space-6) 0; }
  .stat + .stat { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .22); }
}

/* ---------- Faena: colores LITERALES por esquema (R9) ----------
   El bug «estas letras no se ven» venía de tokens que resolvían a claro sobre
   navy fijo. Aquí fondo y texto se fijan JUNTOS en cada vía (estático oscuro,
   @media claro, toggle claro), nunca con light-dark(): no hay combinación cruzada. */
.faena {
  --bg: #021F49;
  --surface: #0A2B57;
  --text: #F2F5FA;
  --text-muted: #C9D4E8;
  --accent: #F09456;
  --border: rgba(242, 245, 250, .28);
  --faena-heading: #FFFFFF;
}
@media (prefers-color-scheme: light) {
  html:not(.scheme-dark) .faena {
    --bg: #F7F9FC;
    --surface: #E6ECF5;
    --text: #021F49;
    --text-muted: #46536A;
    --accent: #003893;
    --border: rgba(2, 31, 73, .14);
    --faena-heading: #021F49;
  }
}
html.scheme-light .faena {
  --bg: #F7F9FC;
  --surface: #E6ECF5;
  --text: #021F49;
  --text-muted: #46536A;
  --accent: #003893;
  --border: rgba(2, 31, 73, .14);
  --faena-heading: #021F49;
}
.faena {
  --border-1: 1px solid var(--border);
  --focus-ring: 2px solid var(--accent);
  background-color: var(--bg);
  color: var(--text);
}
.faena h2 { color: var(--faena-heading); }
.faena .lead { color: var(--text-muted); }
.faena { padding-bottom: clamp(3rem, 6vw, 5rem); }
.faena .section-head { margin-bottom: var(--space-8); }

.photo-strip {
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0 calc(var(--space-4) / 2);
  list-style: none;
}

.photo-strip figure {
  position: relative;
  margin: 0;
  height: clamp(12rem, 22vw, 17rem);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface);
}

.photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-strip figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: .625rem 1.125rem .625rem 1rem;
  background: var(--blue);
  color: #FFFFFF;
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
/* Marca naranja: la misma del eyebrow, ancla la etiqueta a la foto */
.photo-strip figcaption::before {
  content: "";
  display: inline-block;
  width: .4375rem;
  height: .4375rem;
  margin-right: .625rem;
  vertical-align: .1em;
  background: var(--orange);
}

@media (prefers-reduced-motion: no-preference) {
  .photo-strip img { transition: transform .6s var(--ease-out); }
  .photo-strip figure:hover img { transform: scale(1.04); }
}

/* ---------- Marquees (faena y clientes), CSS-only ---------- */
.marquee {
  overflow: hidden;
  display: grid;
  gap: var(--space-4);
}

.marquee-row { overflow: hidden; }
.marquee-row:focus-visible {
  outline: var(--focus-ring);
  outline-offset: -3px;
}

.track {
  display: flex;
  width: max-content;
}

/* Botón pausar/reanudar (WCAG 2.2.2) — solo con JS y sin reduced-motion */
.marquee-toggle {
  display: none;
  align-items: center;
  margin-top: var(--space-6);
  min-height: 44px;
  padding: .5rem 1rem;
  background: transparent;
  border: var(--border-1);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 600;
  cursor: pointer;
}
html.js .marquee-toggle { display: inline-flex; }
.marquee-toggle:hover { border-color: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  /* Bordes que se desvanecen: la franja entra y sale en vez de cortarse */
  .marquee-row {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  }
  .track { animation: marquee 70s linear infinite; }
  .track-reverse { animation-direction: reverse; }
  .faena-marquee .track { animation-duration: 60s; }
  .marquee:hover .track,
  .marquee:focus-within .track,
  .marquee.is-paused .track { animation-play-state: paused; }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  html.js .marquee-toggle { display: none; }
  .track { width: auto; }
  .track > ul {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: var(--space-4);
  }
  .track > ul[aria-hidden="true"] { display: none; }

  /* Faena fija: retícula de 4 con la primera foto a doble ancho → 2 filas completas, sin huérfanas */
  .faena-marquee .track > .photo-strip:not([aria-hidden]) {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .faena-marquee .photo-strip figure { width: 100%; height: auto; }
  .faena-marquee .photo-strip li:first-child { grid-column: span 2; }
  .faena-marquee .photo-strip li:first-child figure { aspect-ratio: auto; height: 100%; }
  /* Foto fuera del flujo: si no, su alto intrínseco estira la fila y deja hueco bajo las vecinas */
  .faena-marquee .photo-strip li:first-child img { position: absolute; inset: 0; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 899.98px) {
  .faena-marquee .track > .photo-strip:not([aria-hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .faena-marquee .photo-strip li:first-child figure { aspect-ratio: 3 / 1; }
}

/* ---------- Quiénes somos (R17–R21) ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: start;
}

@media (min-width: 900px) {
  .about-head { position: sticky; top: calc(var(--header-h) + var(--space-8)); }
}

.about-head h2 {
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3.125rem);
  line-height: 1.1;
}

.credential-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-8) 0 0;
  padding: 0;
  list-style: none;
}

.about-body {
  display: grid;
  gap: var(--space-6);
  padding-top: var(--space-8);
}

.about-text {
  margin: 0;
  font-size: var(--text-lead);
  line-height: 1.6;
}

.about-block {
  position: relative;
  margin: 0;
  padding: clamp(2.25rem, 4vw, 3rem) clamp(1.5rem, 3.5vw, 2.5rem) clamp(1.75rem, 3.5vw, 2.5rem);
  background: var(--blue);
  color: var(--on-blue);
  font-size: var(--text-lead);
  line-height: 1.55;
}
/* El cuadrado naranja de la marca, en la esquina del bloque */
.about-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: .875rem;
  height: .875rem;
  background: var(--orange);
}

@media (max-width: 899.98px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-body { padding-top: 0; }
}

/* ---------- Servicios: explorador de 10 tabs (R22–R23) ---------- */
.services-explorer {
  display: grid;
  grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr);
  gap: clamp(var(--space-6), 3vw, var(--space-12));
  align-items: start;
}

.tablist {
  display: flex;
  flex-direction: column;
}

.services-explorer .tablist { border-top: var(--border-1); }

[role="tab"] {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 44px;
  padding: .8125rem 1rem;
  border: 0;
  border-bottom: var(--border-1);
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

[role="tab"]:hover { background: rgba(127, 140, 160, .1); background: color-mix(in srgb, var(--accent) 9%, transparent); }

@media (prefers-reduced-motion: no-preference) {
  [role="tab"] { transition: color .25s var(--ease-out), background-color .15s ease; }
}

[role="tab"][aria-selected="true"] {
  background: var(--accent-btn-bg);
  color: var(--accent-contrast);
}

/* Indicador deslizante (script.js): un solo bloque que viaja a la pestaña activa.
   Sin él (sin JS o antes de medir) la pestaña activa pinta su propio fondo. */
.tablist.has-indicator { position: relative; isolation: isolate; }
.tablist.has-indicator [role="tab"] { position: relative; }
.tablist.has-indicator [role="tab"][aria-selected="true"] { background: transparent; }
.tab-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  background: var(--accent-btn-bg);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .tab-indicator.is-ready { transition: transform .3s var(--ease-out), width .3s var(--ease-out), height .3s var(--ease-out); }
}

.tab-index {
  flex-shrink: 0;
  min-width: 1.5rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
[role="tab"][aria-selected="true"] .tab-index { color: inherit; opacity: .8; }

.tab-badge {
  margin-left: auto;
  padding: .0625rem .375rem;
  border: 1px solid currentColor;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
}

/* Sin JS: tablist oculto, los 10 paneles quedan apilados y completos */
html:not(.js) .tablist-wrap { display: none; }
html:not(.js) .services-explorer { grid-template-columns: 1fr; }
html:not(.js) .panel { margin-bottom: var(--space-8); }

.panel {
  display: grid;
  background: var(--surface);
  border: var(--border-1);
  box-shadow: var(--card-shadow);
}
.panel[hidden] { display: none; }

.panel-media {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--blue);
}
.panel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-index {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: .5rem .875rem;
  background: var(--blue);
  color: #FFFFFF;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

/* Servicios sin foto: portada tipográfica — el nombre del servicio en el bloque azul,
   con el número grande como marca de agua que sangra por el borde */
.panel-media--type {
  --type-pad: clamp(1.25rem, 3.5vw, 2.25rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--type-pad);
  background: var(--blue);
  color: #FFFFFF;
}
.panel-media--type::after {
  content: "";
  position: absolute;
  top: var(--type-pad);
  right: var(--type-pad);
  width: .875rem;
  height: .875rem;
  background: var(--orange);
}
.type-index {
  position: relative;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}
.type-total { color: var(--on-blue-muted); }
.type-title {
  position: relative;
  max-width: 15ch;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.875rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
/* Marca de agua: el número del servicio, enorme y casi transparente */
.type-mark {
  position: absolute;
  right: -.04em;
  bottom: -.2em;
  font-size: clamp(9rem, 6rem + 10vw, 16rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, .07);
  font-variant-numeric: tabular-nums;
}

.panel-text { padding: clamp(1.5rem, 3vw, 2.5rem); }

.panel-text h3 {
  margin-bottom: var(--space-3);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

.panel-promise {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 30ch;
  margin-bottom: var(--space-6);
}

.panel-text p:not(.panel-promise) {
  color: var(--text-muted);
  max-width: 68ch;
}
.panel-text .btn-cta { margin-top: var(--space-4); }

@media (prefers-reduced-motion: no-preference) {
  html.js .panel:not([hidden]),
  html.js .law-panel:not([hidden]) { animation: panel-in .35s var(--ease-out); }
  html.js .panel:not([hidden]) .panel-media > img { animation: panel-media-in .6s var(--ease-out); }
  html.js .panel:not([hidden]) .type-title { animation: panel-type-in .55s var(--ease-out) .05s both; }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes panel-media-in {
  from { transform: scale(1.04); }
}
@keyframes panel-type-in {
  from { opacity: 0; transform: translateY(.4em); }
}

/* Móvil: tabs en fila con scroll horizontal (scroll-snap + fades laterales) */
@media (max-width: 899.98px) {
  .services-explorer { grid-template-columns: 1fr; }

  .tablist-wrap {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: var(--space-2);
    mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  }

  .tablist { flex-direction: row; width: max-content; gap: var(--space-2); }
  .services-explorer .tablist { border-top: 0; }
  .services-explorer [role="tab"] {
    width: auto;
    white-space: nowrap;
    scroll-snap-align: start;
    border: var(--border-1);
  }
  .panel-media { aspect-ratio: 16 / 9; }

  .law-tablist-wrap {
    overflow-x: visible;
    margin-inline: 0;
    padding-inline: 0;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .law-tablist { width: auto; }
}

/* ---------- Principios éticos: bloque azul sólido (R24) ---------- */
.ethics {
  margin-top: clamp(var(--space-12), 7vw, var(--space-24));
  padding: clamp(1.75rem, 5vw, 3.5rem);
  background: var(--blue);
  color: var(--on-blue);
  counter-reset: principio;
}

.ethics-title {
  margin-bottom: var(--space-8);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  color: #FFFFFF;
}

.ethics-cols,
.ethics-list li {
  display: grid;
  grid-template-columns: 3.5rem minmax(10rem, 17rem) minmax(0, 1fr);
  gap: var(--space-6);
}

.ethics-cols {
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, .35);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-blue-muted);
}
.ethics-cols span:first-child { grid-column: 2; }

.ethics-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ethics-list li {
  counter-increment: principio;
  align-items: baseline;
  padding-block: var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.ethics-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.ethics-list li::before {
  content: counter(principio, decimal-leading-zero);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}

.ethics-list h4 {
  margin: 0;
  font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem);
  font-weight: 700;
  color: #FFFFFF;
}
.ethics-list p {
  margin: 0;
  color: var(--on-blue-muted);
  max-width: 60ch;
}

@media (max-width: 767.98px) {
  .ethics-cols { display: none; }
  .ethics-list li {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: var(--space-2) var(--space-3);
    padding-block: var(--space-4);
  }
  .ethics-list p { grid-column: 2; }
}

/* ---------- Spotlight leyes (R25–R26) ---------- */
.spotlight {
  padding: clamp(var(--space-6), 6vw, var(--space-16));
  background: var(--surface);
  border: var(--border-1);
  border-top: 6px solid var(--blue);
  box-shadow: var(--card-shadow);
}

.law-tablist-wrap { margin-bottom: var(--space-8); }
.law-tablist {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.law-tablist [role="tab"] {
  width: auto;
  border: var(--border-1);
  font-size: 1.0625rem;
  padding: .875rem 1.375rem;
}

.law-panel > .chip { margin-bottom: var(--space-6); }
.law-panel > .lead,
.law-panel > p { max-width: 65ch; }
.law-panel h3 { margin-top: var(--space-8); }

html:not(.js) .law-panel + .law-panel {
  margin-top: var(--space-12);
  padding-top: var(--space-12);
  border-top: var(--border-1);
}

.list-intro { font-weight: 600; margin-bottom: var(--space-2); }

.law-list { max-width: 65ch; padding-left: 1.25rem; }
.law-list li { margin-bottom: var(--space-2); }
.law-list li::marker { color: var(--accent); }

.method-steps {
  list-style: none;
  counter-reset: paso;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  padding: 0;
  margin: 0 0 var(--space-8);
}

.method-steps li {
  counter-increment: paso;
  position: relative;
  padding: var(--space-6) var(--space-6) var(--space-6) 5rem;
  border: var(--border-1);
  background: var(--bg);
}

.method-steps li::before {
  content: counter(paso);
  position: absolute;
  left: var(--space-6);
  top: var(--space-6);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--blue);
  color: #FFFFFF;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.method-steps h4 { font-size: 1.0625rem; margin-bottom: var(--space-2); line-height: 1.35; }
.method-steps h4:last-child { margin-bottom: 0; padding-top: .5rem; }
.method-steps p { font-size: var(--text-small); color: var(--text-muted); }

.spotlight-close { font-weight: 600; margin-bottom: var(--space-4); }

@media (max-width: 767.98px) {
  .method-steps { grid-template-columns: 1fr; }
}

/* ---------- Alianza NawRath × VARIO: negro VARIO + azul NwR (R27) ---------- */
.vario {
  --bg: #0B0B0D;
  --surface: #151518;
  --text: #F4F4F5;
  --text-muted: #B4B4BB;
  --accent: #3F88FF;
  --border: rgba(255, 255, 255, .16);
  --border-1: 1px solid var(--border);
  --focus-ring: 2px solid var(--accent);
  background: var(--ink);
  color: #F4F4F5;
  border-top: 6px solid var(--blue);
}
.vario h2,
.vario h3 { color: #FFFFFF; }
.vario .eyebrow::before { background: var(--blue-bright); }

.vario-head { max-width: 58rem; margin-bottom: var(--space-12); }

.vario-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.vario-lockup img { width: auto; height: 44px; }
.vario-x {
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  color: var(--blue-bright);
}
.vario-wordmark {
  padding: .25rem .625rem .25rem .75rem;
  border: 2px solid #FFFFFF;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .22em;
  color: #FFFFFF;
}

.equation {
  display: grid;
  justify-items: start;
  gap: .12em;
  margin-bottom: var(--space-8);
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem);
  line-height: 1.1;
}
.eq-op {
  margin-left: .2em;
  font-weight: 400;
  color: var(--blue-bright);
}
.eq-result {
  padding: .02em .25em .08em;
  background: var(--blue);
  color: #FFFFFF;
}

/* Momento de autor: la ecuación se resuelve — términos en secuencia y el resultado
   subrayado en bloque azul como un marcador que barre de izquierda a derecha */
@media (prefers-reduced-motion: no-preference) {
  html.js .vario-head .eq-term,
  html.js .vario-head .eq-result {
    opacity: 0;
    transform: translateY(.35em);
    transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  }
  html.js .vario-head .eq-term + .eq-term { transition-delay: .18s; }
  html.js .vario-head .eq-result {
    background: linear-gradient(var(--blue), var(--blue)) no-repeat left / 0% 100%;
    transition: opacity .6s var(--ease-out) .36s, transform .6s var(--ease-out) .36s, background-size .75s var(--ease-in-out) .6s;
  }
  html.js .vario-head.is-visible .eq-term,
  html.js .vario-head.is-visible .eq-result { opacity: 1; transform: none; }
  html.js .vario-head.is-visible .eq-result { background-size: 100% 100%; }
}

.vario .lead { color: #D4D4D8; max-width: 62ch; }

.vario-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin: 0 0 var(--space-12);
  padding: 0;
  list-style: none;
}
.vario-flow li {
  padding-top: var(--space-6);
  border-top: 2px solid rgba(255, 255, 255, .85);
}
.vario-flow li:first-child { border-top-color: var(--blue-bright); }
.vario-flow li:last-child { border-top-color: var(--orange); }
.vario-flow p { color: #C9C9CF; }
.vario-flow .flow-label {
  margin-bottom: var(--space-3);
  font-size: var(--text-small);
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.vario-why {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--space-6) clamp(var(--space-8), 5vw, var(--space-16));
  padding: clamp(1.75rem, 5vw, 3.5rem);
  background: var(--blue);
  color: var(--on-blue);
}
.vario-why h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-blue-muted);
}
.why-highlight {
  margin: 0;
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}
.why-body p { color: var(--on-blue-muted); }
.vario-why .btn-cta { grid-column: 2; justify-self: start; }
.vario-why .btn-light:focus-visible { outline-color: #FFFFFF; }

@media (max-width: 899.98px) {
  .vario-flow { grid-template-columns: 1fr; }
  .vario-why { grid-template-columns: 1fr; }
  .vario-why .btn-cta { grid-column: 1; }
}

/* ---------- Frases: Antonio y Joaquín como par de bloques azules (R28–R29) ---------- */
.quotes { padding-block: calc(var(--section-pad) * .75); }

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.quote-card {
  margin: 0;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--blue);
  color: var(--on-blue);
  display: flex;
  flex-direction: column;
}

.quote-person {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--space-6);
  align-items: center;
  margin-bottom: var(--space-8);
}
.quote-person picture { display: block; grid-row: 1 / 3; }
.quote-person img {
  width: clamp(7rem, 5rem + 6vw, 9.5rem);
  height: auto;
  border-radius: 50%;
  outline: 3px solid rgba(255, 255, 255, .25);
  outline-offset: 4px;
}
.quote-name {
  align-self: end;
  font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.125rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.quote-role {
  align-self: start;
  margin-top: var(--space-2);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-blue-muted);
}

.quote-card blockquote {
  margin: 0;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  line-height: 1.6;
}
/* Comilla al inicio del filete: abre la cita y la línea continúa tras ella, a la misma altura en ambas tarjetas */
.quote-card blockquote::before {
  content: "“";
  display: block;
  height: .4em;
  margin-bottom: var(--space-4);
  font-size: 5.5rem;
  font-weight: 800;
  line-height: .9;
  color: var(--orange);
  background: linear-gradient(rgba(255, 255, 255, .25), rgba(255, 255, 255, .25)) no-repeat right 0 top .14em / calc(100% - .6em) 1px;
}
.quote-card blockquote p { color: #FFFFFF; }

.quote-keys {
  counter-reset: clave;
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}
.quote-keys li {
  counter-increment: clave;
  position: relative;
  padding: var(--space-2) 0 var(--space-2) 2.25rem;
  border-top: 1px solid rgba(255, 255, 255, .15);
  font-weight: 600;
}
.quote-keys li::before {
  content: counter(clave) ")";
  position: absolute;
  left: 0;
  font-weight: 800;
  color: var(--orange);
}

@media (max-width: 991.98px) {
  .quotes-grid { grid-template-columns: 1fr; }
}

/* ---------- Equipo: tarjetas azules, bio en hover/tap/teclado (R30–R33) ---------- */
.team-grid {
  --team-gap: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--team-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-card {
  --actions-h: 4.25rem;
  position: relative;
  flex: 0 0 calc((100% - 2 * var(--team-gap)) / 3);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8) var(--space-6) 0;
  background: var(--blue);
  color: var(--on-blue);
  text-align: center;
  overflow: hidden;
}

.team-photo {
  width: 10rem;
  margin-bottom: var(--space-6);
  border-radius: 50%;
  outline: 3px solid rgba(255, 255, 255, .22);
  outline-offset: 5px;
  overflow: hidden;
}
.team-photo img { width: 100%; height: auto; border-radius: 50%; }

.team-name {
  margin-bottom: var(--space-2);
  font-size: clamp(1.25rem, 1.15rem + .35vw, 1.4375rem);
  font-weight: 700;
  line-height: 1.2;
  color: #FFFFFF;
}
.team-role {
  max-width: 28ch;
  margin-bottom: var(--space-8);
  font-size: .9375rem;
  line-height: 1.45;
  color: var(--on-blue-muted);
}

.team-actions {
  position: relative;
  z-index: 2;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--actions-h);
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, .22);
  background: var(--blue);
}

.team-bio-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
/* Signo +/− dibujado: dos trazos; el vertical se pliega al abrir */
.team-bio-toggle::before {
  content: "";
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid rgba(255, 255, 255, .6);
  background:
    linear-gradient(#FFFFFF, #FFFFFF) center / 10px 1.5px no-repeat,
    linear-gradient(#FFFFFF, #FFFFFF) center / 1.5px 10px no-repeat;
}
.team-card.is-open .team-bio-toggle::before {
  background:
    linear-gradient(#FFFFFF, #FFFFFF) center / 10px 1.5px no-repeat,
    linear-gradient(#FFFFFF, #FFFFFF) center / 1.5px 0 no-repeat;
}
.team-bio-toggle:hover::before { border-color: #FFFFFF; }
.team-bio-toggle:focus-visible,
.team-linkedin:focus-visible { outline-color: #FFFFFF; }

.team-bio-toggle .bio-close { display: none; }
.team-card.is-open .bio-open { display: none; }
.team-card.is-open .bio-close { display: inline; }

.team-linkedin {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  color: #FFFFFF;
}
.team-linkedin svg { width: 20px; height: 20px; fill: currentColor; }
.team-linkedin:hover { color: var(--orange); }

.team-actions:has(.team-bio-toggle:only-child) { justify-content: flex-start; }

/* Bio superpuesta: oculta (también para lector de pantalla) hasta hover o aria-expanded.
   Repite el nombre arriba (aria-hidden) para no perder a quién pertenece. */
.team-bio {
  position: absolute;
  inset: 0 0 var(--actions-h) 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-6) var(--space-6) var(--space-4);
  background: var(--blue-deep);
  text-align: left;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
}
.team-bio p {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.55;
  color: #FFFFFF;
}
.team-bio .bio-name {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--on-blue-muted);
}

.team-card.is-open .team-bio {
  opacity: 1;
  visibility: visible;
}
/* Hover solo con puntero fino: en táctil el tap ya abre por el botón (sin hover pegajoso) */
@media (hover: hover) {
  .team-card:hover .team-bio {
    opacity: 1;
    visibility: visible;
  }
}

/* La bio sube desde la barra de acciones como una hoja: el botón que la abre es su origen */
@media (prefers-reduced-motion: no-preference) {
  .team-photo img { transition: transform .6s var(--ease-out); }
  .team-photo { transition: outline-color .3s ease; }
  .team-card:hover .team-photo { outline-color: rgba(255, 255, 255, .6); }
  .team-card:hover .team-photo img { transform: scale(1.04); }

  .team-bio {
    opacity: 1;
    clip-path: inset(100% 0 0 0);
    transition: clip-path .24s var(--ease-in-out), visibility 0s linear .24s;
  }
  .team-bio > * {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .15s ease, transform .15s ease;
  }
  .team-card.is-open .team-bio {
    clip-path: inset(0);
    transition: clip-path .42s var(--ease-out), visibility 0s;
  }
  .team-card.is-open .team-bio > * {
    opacity: 1;
    transform: none;
    transition: opacity .35s ease .12s, transform .45s var(--ease-out) .12s;
  }
  @media (hover: hover) {
    .team-card:hover .team-bio {
      clip-path: inset(0);
      transition: clip-path .42s var(--ease-out) .06s, visibility 0s .06s;
    }
    .team-card:hover .team-bio > * {
      opacity: 1;
      transform: none;
      transition: opacity .35s ease .18s, transform .45s var(--ease-out) .18s;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .team-bio { transition: opacity .2s ease, visibility 0s linear .2s; }
  .team-card.is-open .team-bio { transition: opacity .2s ease, visibility 0s; }
  @media (hover: hover) {
    .team-card:hover .team-bio { transition: opacity .2s ease, visibility 0s; }
  }
}

/* Sin JS: la bio va en el flujo, siempre legible; el botón no haría nada */
html:not(.js) .team-bio {
  position: static;
  opacity: 1;
  visibility: visible;
  clip-path: none;
  padding: 0 0 var(--space-6);
  background: none;
}
html:not(.js) .team-bio > * { opacity: 1; transform: none; }
html:not(.js) .team-bio .bio-name { display: none; }
html:not(.js) .team-bio-toggle { visibility: hidden; }

@media (max-width: 991.98px) {
  .team-card { flex-basis: calc((100% - var(--team-gap)) / 2); }
}

/* Móvil: ficha horizontal (retrato a la izquierda) y la bio se despliega en el flujo —
   once tarjetas apiladas de ~400px eran un muro azul */
@media (max-width: 599.98px) {
  .team-grid { --team-gap: var(--space-3); }
  .team-card {
    flex-basis: 100%;
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    column-gap: var(--space-4);
    align-items: center;
    padding: var(--space-4) var(--space-4) 0;
    text-align: left;
  }
  .team-photo { grid-row: 1 / 3; width: 5.5rem; margin: 0; outline-width: 2px; outline-offset: 3px; }
  .team-name { align-self: end; margin: 0; font-size: 1.1875rem; }
  .team-role { align-self: start; margin: var(--space-1) 0 0; font-size: .875rem; }
  .team-bio,
  html:not(.js) .team-bio {
    position: static;
    grid-column: 1 / -1;
    display: none;
    margin-top: var(--space-4);
    padding: var(--space-4) 0 0;
    border-top: 1px solid rgba(255, 255, 255, .22);
    background: none;
    clip-path: none;
    overflow: visible;
  }
  html:not(.js) .team-bio,
  .team-card.is-open .team-bio { display: block; }
  .team-bio .bio-name { display: none; }
  .team-actions { grid-column: 1 / -1; min-height: 3.5rem; margin-top: var(--space-4); }
}
@media (max-width: 599.98px) and (prefers-reduced-motion: no-preference) {
  .team-card.is-open .team-bio { animation: panel-in .35s var(--ease-out); }
}

/* ---------- Clientes: carrusel de logos en gris → color (R34–R35) ----------
   En reposo todos los logos son tinta monocroma (assets/clientes/mono, extraída del original)
   sobre una retícula de líneas finas; al hover/foco aparece la ficha original a color. */
.logo-strip {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clients .marquee { gap: 0; }
.clients .marquee-row + .marquee-row { margin-top: -1px; }

.logo-tile {
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 10.5rem;
  height: 7.875rem;
  margin-right: -1px;
  overflow: hidden;
  border: var(--border-1);
}

.logo-mono {
  width: auto;
  max-width: 78%;
  max-height: 4.25rem;
  object-fit: contain;
  filter: var(--ink-filter);
  opacity: var(--tile-rest);
}
/* Tamaño óptico parejo: el ancho crece con la raíz de la proporción (área ~constante) */
@supports (width: calc(1px * sqrt(4))) {
  .logo-mono { width: min(80%, calc(4rem * sqrt(var(--ar, 2)))); height: auto; }
}

.logo-tile > picture,
.logo-tile > .logo-color {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.logo-tile > picture .logo-color { width: 100%; height: 100%; object-fit: contain; }
.logo-tile--fill .logo-color { object-fit: cover; }
.logo-tile--contain > picture { padding: 1rem 1.125rem; background: #FFFFFF; }
.logo-tile--dark > .logo-color { padding: 1rem; background: #021F49; object-fit: contain; }

/* Capa color sin descargar hasta la primera interacción con la grilla (script.js pone .has-color):
   un lazy con display:none no se pide al hacer scroll. Sin JS quedan solo los monocromos */
.marquee:not(.has-color) .logo-tile > picture,
.marquee:not(.has-color) .logo-tile > .logo-color { display: none; }

.logo-tile:hover > picture,
.logo-tile:hover > .logo-color,
.marquee-row:focus-visible .logo-tile > picture,
.marquee-row:focus-visible .logo-tile > .logo-color { opacity: 1; }
.has-color .logo-tile:hover .logo-mono,
.has-color .marquee-row:focus-visible .logo-mono { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .logo-tile > picture,
  .logo-tile > .logo-color,
  .logo-mono { transition: opacity .3s ease; }
}
/* Fijos: retícula alineada (la última fila queda a la izquierda de la grilla, no flotando al centro) */
@media (prefers-reduced-motion: reduce) {
  .track > .logo-strip:not([aria-hidden]) {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, 10.5rem);
    justify-content: center;
    padding-left: 1px;
  }
  .logo-tile { margin-bottom: -1px; }
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  gap: var(--space-12);
  align-items: start;
}

.contact-data ul {
  list-style: none;
  margin: 0 0 var(--space-8);
  padding: 0;
}
.contact-data li {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-4);
  border-bottom: var(--border-1);
}
.contact-label {
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form {
  padding: clamp(var(--space-6), 4vw, var(--space-8));
  background: var(--surface);
  border: var(--border-1);
  border-top: 6px solid var(--blue);
  box-shadow: var(--card-shadow);
}

.field { margin-bottom: var(--space-6); }

.field label {
  display: block;
  font-weight: 600;
  font-size: var(--text-small);
  margin-bottom: var(--space-2);
}

.field input,
.field textarea {
  width: 100%;
  padding: .75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: var(--border-1);
  border-radius: 0;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field textarea { resize: vertical; min-height: 8rem; }

.hp { position: absolute; left: -9999px; }

.form-status { margin-top: var(--space-4); font-weight: 600; color: var(--accent); }
.form-status:empty { margin: 0; }
.contact-form button:disabled { cursor: wait; }
.form-fallback { margin-top: var(--space-4); font-size: var(--text-small); }
.form-microcopy { margin-top: var(--space-2); font-size: var(--text-small); color: var(--text-muted); }

@media (max-width: 899.98px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer (sigue al esquema) ---------- */
.site-footer {
  background: var(--bg);
  color: var(--text);
  border-top: 6px solid var(--blue);
  padding-block: var(--space-16) var(--space-8);
  font-size: var(--text-small);
}

.footer-seals { margin-bottom: var(--space-12); }
.footer-seals-label {
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.footer-seals ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8) clamp(var(--space-8), 5vw, var(--space-16));
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-seals img { height: 44px; width: auto; filter: var(--seal-filter); }

.footer-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
  padding-block: var(--space-8);
  border-top: var(--border-1);
  border-bottom: var(--border-1);
  margin-bottom: var(--space-8);
}

.footer-brand img { width: 180px; height: auto; margin-bottom: var(--space-4); filter: var(--logo-filter); }
.footer-brand p { color: var(--text-muted); max-width: 34ch; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a {
  display: inline-block;
  padding: var(--space-3) var(--space-2);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--accent); }

.footer-data { color: var(--text-muted); margin-bottom: var(--space-3); }
.footer-legal { margin-bottom: var(--space-3); }
.footer-legal a { font-weight: 600; }
.footer-copyright { color: var(--text-muted); margin: 0; }

/* ---------- Página legal (privacidad.html) ---------- */
.legal-hero {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem);
  background: var(--blue);
  color: var(--on-blue);
}
.legal-hero h1 {
  max-width: 30ch;
  margin-bottom: var(--space-4);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
  color: #FFFFFF;
}
.legal-hero p { color: var(--on-blue-muted); }
.legal-hero .eyebrow { color: var(--on-blue-muted); }
.legal-hero .eyebrow::before { background: var(--orange); }
.legal-hero a { color: var(--on-blue); }

.legal-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 46rem);
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + var(--space-6));
  padding-left: var(--space-4);
  border-left: 3px solid var(--blue);
  font-size: var(--text-small);
}
.legal-toc p { font-weight: 700; margin-bottom: var(--space-2); }
.legal-toc ul { list-style: none; margin: 0; padding: 0; }
.legal-toc a { display: inline-block; padding: var(--space-1) 0; }

.legal-doc h2 {
  margin-top: var(--space-16);
  padding-top: var(--space-6);
  border-top: 6px solid var(--blue);
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.25rem);
}
.legal-doc > h2:first-child { margin-top: 0; }
.legal-doc h3 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  font-size: 1.125rem;
  font-weight: 700;
}
.legal-doc h4 { margin: var(--space-6) 0 var(--space-2); font-size: 1rem; }
.legal-doc li { margin-bottom: var(--space-2); }
.legal-doc li::marker { color: var(--accent); }
.legal-doc p,
.legal-doc li { color: var(--text); }

@media (max-width: 899.98px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}

/* ---------- Reveals de scroll (solo con JS + motion permitido) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .7s var(--ease-out), transform .9s var(--ease-out);
  }
  html.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
  html.js .stats-grid [data-reveal]:nth-child(2),
  html.js .about-body [data-reveal]:nth-child(2),
  html.js .quotes-grid [data-reveal]:nth-child(2),
  html.js .team-grid [data-reveal]:nth-child(3n + 2) { transition-delay: .12s; }
  html.js .stats-grid [data-reveal]:nth-child(3),
  html.js .team-grid [data-reveal]:nth-child(3n) { transition-delay: .24s; }
}

/* ---------- WhatsApp flotante ---------- */
/* Verde #25D366 = color de marca del ícono (glifo, no texto). Círculo: excepción
   deliberada a las esquinas rectas (R38). */
.wa-float {
  position: fixed;
  right: max(var(--space-4), env(safe-area-inset-right));
  bottom: max(var(--space-4), env(safe-area-inset-bottom));
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: #25D366;
  box-shadow: 0 2px 10px rgba(2, 31, 73, .35);
}

.wa-float svg {
  width: 28px;
  height: 28px;
  fill: #FFFFFF;
}

.wa-float:focus-visible {
  outline: 2px solid #F09456;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .wa-float { transition: transform .15s ease; }
  .wa-float:hover,
  .wa-float:focus-visible { transform: scale(1.06); }
}

@media (max-width: 899.98px) {
  .hero { padding-bottom: 6rem; }
  .hero-controls { bottom: var(--space-6); }
}

@media print {
  .wa-float,
  .hero-controls { display: none; }
}
