/* ==========================================================================
   FIMA Consultores Corporativos
   Los valores hex vienen de DESIGN.md §1 — salen de los `fill` declarados en
   el vector del cliente. No se derivan, no se ajustan, no se generan rampas.
   ========================================================================== */

:root {
  /* Color — literales de DESIGN.md §1 */
  --navy-900: #232D53;
  --navy-950: #1B2646;
  --red-500:  #EB1C2B;   /* solo reglas, numerales y titulares ≥24px */
  --red-600:  #D8131F;   /* único rojo válido para texto pequeño (AA 5.21:1) */
  --surface:  #EFF1F2;
  --surface-warm: #F2F2F1;
  --ink:      #22262C;
  --muted:    #6B7287;
  --white:    #FFFFFF;

  --line: rgba(35, 45, 83, .14);
  --line-dark: rgba(255, 255, 255, .18);

  /* Ritmo */
  --gutter: clamp(20px, 5vw, 56px);
  --measure: 1200px;
  --section-y: clamp(72px, 9vw, 136px);
  --header-h: 88px;

  /* Transición de sección en diagonal (nunca un corte recto) */
  --diag: clamp(26px, 3.6vw, 68px);

  /* Movimiento — el movimiento acompaña la lectura, no la interrumpe */
  --ease: cubic-bezier(.2, .65, .25, 1);
  --t-fast: .22s;
  --t-mid: .45s;
  --t-slow: .8s;
}

/* --- Reset acotado --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: "Hanken Grotesk", Inter, sans-serif; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
/* El navegador le mete `margin: 1em 40px` a <figure>. Sin esto las fotos
   quedan 40 px adentro del texto y ninguna columna alinea.
   `<dl>` trae `margin: 1em 0` y `<dd>` trae `margin-inline-start: 40px`.
   El de `<dl>` es peor de lo que parece: como la sección que lo envuelve no
   tiene padding ni borde, ese margen **se escapa** de la sección (colapso de
   márgenes) y aparece como una franja blanca de 17 px arriba y abajo de la
   barra de credenciales — dos bloques navy separados por una raya blanca que
   se lee como defecto de maquetación. */
figure, figcaption, blockquote, dl, dd { margin: 0; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--red-600); outline-offset: 3px; }
.section--navy :focus-visible, .hero :focus-visible { outline-color: #fff; }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 200;
  background: var(--navy-900); color: #fff;
  padding: 12px 20px; font-weight: 600;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 14px; }

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

/* --- Tipografía ------------------------------------------------------- */
.display {
  font-size: clamp(2.35rem, 5.4vw, 4.15rem);
  line-height: 1.06;
  letter-spacing: -.025em;
}
.h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  line-height: 1.14;
  letter-spacing: -.018em;
  color: var(--navy-900);
}
.section--navy .h2 { color: #fff; }
.h3 {
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  line-height: 1.25;
  letter-spacing: -.01em;
  font-weight: 600;
}
.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.62;
  color: var(--muted);
}
.section--navy .lead { color: rgba(255,255,255,.78); }
.eyebrow + .h2 { margin-top: 22px; }
.h2 + .lead    { margin-top: 20px; }

.eyebrow {
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--navy-900);
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--red-500); flex: none; }
.eyebrow--light { color: rgba(255,255,255,.92); }

/* --- Layout ----------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
/* DESIGN.md §2: `muted` da 4.8:1 sobre blanco pero baja a 4.2:1 sobre
   `surface` y reprueba AA. Dentro de las secciones claras el token se
   redefine a un gris más oscuro (5.13:1). No es un color de marca nuevo. */
.section--surface { background: var(--surface); --muted: #5E6579; }
.section--navy { background: var(--navy-900); color: #fff; }

.section--diag-l, .section--diag-r {
  margin-top: calc(var(--diag) * -1);
  padding-top: calc(var(--section-y) + var(--diag));
}
.section--diag-l { clip-path: polygon(0 var(--diag), 100% 0, 100% 100%, 0 100%); }
.section--diag-r { clip-path: polygon(0 0, 100% var(--diag), 100% 100%, 0 100%); }

/* --- Botones ---------------------------------------------------------- */
.btn {
  --btn-bg: var(--navy-900);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px;
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: .92rem; font-weight: 600; letter-spacing: .02em;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bg);
  overflow: hidden; isolation: isolate; cursor: pointer;
}
/* Hover por desplazamiento de fondo, nunca por sombra */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--red-600);
  transform: translateY(101%);
  transition: transform var(--t-mid) var(--ease);
}
.btn:hover::after, .btn:focus-visible::after { transform: translateY(0); }
.btn:hover, .btn:focus-visible { border-color: var(--red-600); }

.btn--ghost { --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost::after { background: rgba(255,255,255,.14); }
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: #fff; }

.btn__arrow { width: 16px; height: 16px; flex: none; transition: transform var(--t-mid) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* --- Header ----------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}
/* Sin isla blanca: el header flota sobre la foto. Lo que le da piso al logo y
   a los enlaces es un velo degradado desde arriba, no una caja. */
.site-header::before {
  content: "";
  position: absolute; inset: 0 0 -48px 0;
  background: linear-gradient(to bottom, rgba(27,38,70,.72) 0%, rgba(27,38,70,.34) 55%, rgba(27,38,70,0) 100%);
  pointer-events: none;
  transition: opacity var(--t-mid) var(--ease);
}
.site-header.is-stuck::before { opacity: 0; }

.site-header__inner {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 48px);
  min-height: var(--header-h);
  transition: min-height var(--t-mid) var(--ease);
}
/* Las dos versiones del logo ocupan el mismo hueco y se cruzan por opacidad.
   El ancho baja al fijarse el header: con la barra en 74 px, el logo grande
   quedaba a un pixel del borde. */
.brand { position: relative; display: block; line-height: 0; --logo-w: clamp(126px, 13.5vw, 156px); }
.brand img { width: var(--logo-w); height: auto; transition: width var(--t-mid) var(--ease), opacity var(--t-mid) var(--ease); }
.brand__inverso { position: absolute; inset: 0 auto auto 0; }
.brand__color { opacity: 0; }

.site-header.is-stuck { background: var(--white); border-bottom-color: var(--line); }
.site-header.is-stuck .site-header__inner { min-height: 74px; }
.site-header.is-stuck .brand { --logo-w: 134px; }
.site-header.is-stuck .brand__color { opacity: 1; }
.site-header.is-stuck .brand__inverso { opacity: 0; }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav a {
  position: relative;
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: .92rem; font-weight: 600; letter-spacing: .01em;
  text-decoration: none; color: #fff;
  padding-block: 6px;
  transition: color var(--t-fast) var(--ease);
}
/* :not(.btn) — el CTA del menú es un .btn y trae su propio ::after y su
   propio color; sin la exclusión esta regla le gana por especificidad. */
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--red-500);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-mid) var(--ease);
}
.nav a:not(.btn):hover::after, .nav a:not(.btn):focus-visible::after { transform: scaleX(1); }
.site-header.is-stuck .nav a:not(.btn) { color: var(--navy-900); }

.nav__cta { display: none; }
@media (min-width: 1040px) { .nav__cta { display: inline-flex; } }

.nav-toggle {
  display: none; margin-left: auto;
  background: transparent; border: 1px solid rgba(255,255,255,.45);
  width: 52px; height: 52px;
  align-items: center; justify-content: center; cursor: pointer;
  transition: border-color var(--t-mid) var(--ease);
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; position: relative; transition: background var(--t-fast) var(--ease); }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: #fff;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }
.site-header.is-stuck .nav-toggle,
.site-header:has(.nav.is-open) .nav-toggle { border-color: var(--line); }
.site-header.is-stuck .nav-toggle span,
.site-header.is-stuck .nav-toggle span::before,
.site-header.is-stuck .nav-toggle span::after,
.site-header:has(.nav.is-open) .nav-toggle span,
.site-header:has(.nav.is-open) .nav-toggle span::before,
.site-header:has(.nav.is-open) .nav-toggle span::after { background: var(--navy-900); }
.nav-toggle[aria-expanded="true"] span { background: transparent !important; }

@media (max-width: 899px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    clip-path: inset(0 0 100% 0);
    transition: clip-path var(--t-mid) var(--ease);
  }
  .nav.is-open { clip-path: inset(0 0 0 0); }
  .site-header.is-stuck .nav { inset-block-start: 74px; }
  /* Con el menú abierto la barra se cierra en blanco: si no, la foto se
     asoma detrás del logo y del botón. */
  .site-header:has(.nav.is-open) { background: var(--white); border-bottom-color: var(--line); }
  .site-header:has(.nav.is-open)::before { opacity: 0; }
  .site-header:has(.nav.is-open) .brand__color { opacity: 1; }
  .site-header:has(.nav.is-open) .brand__inverso { opacity: 0; }
  .nav a:not(.btn) { color: var(--navy-900); padding-block: 16px; border-bottom: 1px solid var(--line); }
  .nav__cta { display: inline-flex; margin-top: 20px; justify-content: center; }
}

/* --- Hero ------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden; background: var(--navy-950);
}
.hero__media { position: absolute; inset: -14px 0; z-index: 0; will-change: transform; }
.hero__media img, .hero__media video {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, rgba(27,38,70,.94) 0%, rgba(27,38,70,.72) 26%, rgba(27,38,70,.18) 58%, rgba(27,38,70,.26) 100%),
    linear-gradient(to right, rgba(27,38,70,.55) 0%, rgba(27,38,70,0) 62%);
}
@media (max-width: 760px) {
  .hero__scrim {
    background: linear-gradient(to top,
      rgba(27,38,70,.96) 0%, rgba(27,38,70,.88) 42%,
      rgba(27,38,70,.58) 74%, rgba(27,38,70,.46) 100%);
  }
  .hero__media img, .hero__media video { object-position: 50% 26%; }
}

.hero__inner { position: relative; z-index: 2; width: 100%; padding-block: clamp(120px, 16vh, 190px) clamp(64px, 9vh, 104px); }
.hero__copy { max-width: 44ch; color: #fff; }
.hero .display { margin-top: 26px; color: #fff; }
.hero .display em { font-style: normal; color: rgba(255,255,255,.68); }
.hero__lead { margin-top: 24px; color: rgba(255,255,255,.86); font-size: clamp(1.02rem, 1.4vw, 1.16rem); line-height: 1.6; max-width: 52ch; }
.hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero__cue {
  position: absolute; z-index: 2;
  right: var(--gutter); bottom: clamp(64px, 9vh, 104px);
  display: none; align-items: center; gap: 12px;
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.7); text-decoration: none;
}
@media (min-width: 900px) { .hero__cue { display: flex; } }
.hero__cue i { display: block; width: 1px; height: 44px; background: rgba(255,255,255,.4); position: relative; overflow: hidden; }
.hero__cue i::after { content: ""; position: absolute; inset: 0; background: var(--red-500); animation: cue 2.6s var(--ease) infinite; }
@keyframes cue {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* --- Cabecera de página interna ---------------------------------------
   Es el mismo `.hero` con otra altura: el header del sitio es transparente
   y sólo se vuelve blanco al bajar 40 px, así que TODA página necesita una
   banda oscura arriba o el menú queda ilegible sobre fondo blanco.
   También conserva el `.hero` que el JS busca para el globo de WhatsApp. */
.hero--page { min-height: clamp(400px, 58svh, 600px); }
.hero--page .hero__inner { padding-block: clamp(140px, 20vh, 200px) clamp(48px, 7vh, 76px); }
.hero--page .hero__media img { object-position: 50% 42%; }
/* Menos degradado que en la home: aquí la foto es acompañamiento, no
   protagonista, y el bloque de texto es más corto. */
.hero--page .hero__scrim {
  background:
    linear-gradient(to top, rgba(27,38,70,.92) 0%, rgba(27,38,70,.78) 40%, rgba(27,38,70,.52) 100%),
    linear-gradient(to right, rgba(27,38,70,.62) 0%, rgba(27,38,70,.16) 70%);
}
.hero--page .display { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.hero--page .hero__lead { max-width: 56ch; }

/* Miga de pan: en un sitio de cinco páginas no es navegación, es ubicación.
   El `aria-current` va en el <span>, que es la página en la que ya estamos. */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .82rem; color: rgba(255,255,255,.66); }
.crumbs a { color: rgba(255,255,255,.86); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color var(--t-fast) var(--ease); }
.crumbs a:hover { border-bottom-color: var(--red-500); }
/* .55 y no .4: medido, a .4 el separador da 3.61:1 sobre navy y reprueba AA.
   Sigue siendo puntuación, pero es texto y cuenta. */
.crumbs i { font-style: normal; color: rgba(255,255,255,.55); }
.crumbs + .eyebrow { margin-top: 22px; }

/* Página actual en el menú. Sobre la foto el subrayado va en rojo de marca
   como decoración; el dato accesible lo lleva `aria-current`, no el color. */
.nav a[aria-current="page"]:not(.btn)::after { transform: scaleX(1); }

/* --- Barra de credenciales -------------------------------------------- */
.creds { background: var(--navy-950); color: #fff; }
.creds .wrap { padding-inline: 0; }
.creds__grid { display: grid; gap: 1px; background: var(--line-dark); grid-template-columns: 1fr; }
@media (min-width: 820px) { .creds__grid { grid-template-columns: repeat(3, 1fr); } }
.creds__item { background: var(--navy-950); padding: clamp(28px, 3.4vw, 44px) clamp(20px, 2.6vw, 38px); }
.creds__item dt {
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.66);
}
.creds__item dd { margin: 12px 0 0; font-family: "Hanken Grotesk", Inter, sans-serif; font-size: 1.12rem; font-weight: 600; line-height: 1.35; }

.sec-head { max-width: 62ch; }

/* --- Servicios: pestañas 01–04 ---------------------------------------- */
.tabs { margin-top: clamp(44px, 5vw, 68px); }

.tabs__bar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs__bar::-webkit-scrollbar { display: none; }
@media (max-width: 860px) {
  .tabs__bar { grid-auto-columns: minmax(200px, 1fr); }
}

.tab {
  position: relative;
  display: grid; gap: 12px; align-content: start;
  text-align: left;
  padding: clamp(22px, 2.4vw, 30px) clamp(18px, 2vw, 28px) clamp(26px, 3vw, 34px);
  background: transparent;
  border: 0; border-left: 1px solid var(--line);
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  transition: color var(--t-mid) var(--ease);
}
.tab:first-child { border-left: 0; }
/* Hover por desplazamiento de fondo */
.tab::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--surface);
  transform: translateY(100%);
  transition: transform var(--t-mid) var(--ease);
}
.tab:hover::before { transform: translateY(0); }
/* Regla roja que marca la pestaña activa */
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--red-500);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-slow) var(--ease);
}
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab[aria-selected="true"]::before { transform: translateY(0); }

/* 1.18rem = 20 px. A 700 eso cuenta como texto grande (≥18.66 px bold), que es
   el umbral donde el rojo de marca pasa AA con 3:1. Un punto menos y el
   numeral activo en `red-500` reprueba por 0.06. */
.tab__num {
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: 1.18rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--muted);
  transition: color var(--t-mid) var(--ease);
}
.tab[aria-selected="true"] .tab__num { color: var(--red-500); }
.tab__label {
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: clamp(.98rem, 1.2vw, 1.08rem); font-weight: 600; line-height: 1.25;
  color: var(--navy-900);
}

.panel { display: none; padding-top: clamp(38px, 4.4vw, 58px); }
.panel.is-active { display: grid; }
@media (min-width: 900px) { .panel.is-active { grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 88px); } }
@media (max-width: 899px) { .panel.is-active { gap: 32px; } }

.panel__body .h3 { color: var(--navy-900); font-size: clamp(1.4rem, 2.2vw, 1.85rem); }
.panel__body p { margin-top: 18px; color: var(--muted); font-size: 1.03rem; }
.panel__body .btn { margin-top: 30px; }

/* Pestañas breves: en la home el panel es una frase y un botón, sin la lista
   de actividades — ésa vive en `servicios.html`. A dos columnas el contenido
   se quedaba en la mitad izquierda y la derecha vacía. */
.tabs--breve .panel.is-active { grid-template-columns: 1fr; }
.tabs--breve .panel__body { max-width: 64ch; }
.tabs--breve .panel__body p { margin-top: 0; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.6; }

.panel__list { display: grid; gap: 0; align-content: start; }
.panel__list li {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  font-size: .99rem; line-height: 1.5;
}
.panel__list li:last-child { border-bottom: 1px solid var(--line); }
.panel__list li::before {
  content: ""; width: 16px; height: 1px; background: var(--red-600); margin-top: .7em;
}

/* Los paneles entran con el mismo escalonado que el resto del sitio */
.panel.is-active > * { animation: panelIn var(--t-slow) var(--ease) both; }
.panel.is-active > *:nth-child(2) { animation-delay: 70ms; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* --- Cómo trabajamos: foto sangrando a la derecha ---------------------- */
.method { position: relative; overflow: hidden; }
/* Arranca en el centro exacto: la columna de texto llega hasta el 48%, así que
   la foto ocupa la mitad derecha limpia y no hay nada encima de ella. */
.method__media {
  position: absolute; z-index: 0;
  inset: 0 0 0 auto;
  width: min(50%, 780px);
  pointer-events: none;
}
.method__media img { width: 100%; height: 100%; object-fit: cover; opacity: .62; }
/* El degradado disuelve la foto dentro del navy por su borde izquierdo: no hay
   borde, no hay caja. Del centro a la derecha la foto se ve. */
.method__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, var(--navy-900) 0%, rgba(35,45,83,.82) 14%, rgba(35,45,83,.32) 52%, rgba(35,45,83,.06) 100%),
    linear-gradient(to bottom, var(--navy-900) 0%, rgba(35,45,83,0) 20%, rgba(35,45,83,0) 78%, var(--navy-900) 100%);
}
.method__body { position: relative; z-index: 1; max-width: 60ch; }
@media (min-width: 960px) { .method__body { max-width: 48%; } }
@media (max-width: 959px) {
  /* Aquí la foto sí queda debajo del texto, así que se mantiene apagada: lo
     que arriba es fondo visible, aquí sería un problema de legibilidad. */
  .method__media { width: 100%; }
  .method__media img { opacity: .22; }
  .method__media::after {
    background: linear-gradient(to bottom, var(--navy-900) 0%, rgba(35,45,83,.72) 40%, var(--navy-900) 100%);
  }
}

/* La lista se declara para fondo CLARO y la banda navy la invierte. Al revés
   —blanco por defecto— basta reusarla en una sección clara para dejar texto
   blanco sobre `surface`: 1.07:1, o sea invisible. Se midió, pasó. */
.method__list { margin-top: 34px; display: grid; gap: 0; }
.method__list li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: baseline;
}
.method__list li:last-child { border-bottom: 1px solid var(--line); }
.method__list b {
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: .74rem; font-weight: 700; letter-spacing: .14em;
  color: var(--muted); min-width: 2ch;
}
.method__list span { color: var(--muted); font-size: .98rem; line-height: 1.55; }
.method__list strong { color: var(--navy-900); font-weight: 600; }

/* Sobre navy. El numeral va en blanco translúcido y no en rojo: el rojo de
   marca da 3.42:1 sobre navy y a este tamaño reprueba AA (DESIGN.md §2). */
.section--navy .method__list li { border-top-color: var(--line-dark); }
.section--navy .method__list li:last-child { border-bottom-color: var(--line-dark); }
.section--navy .method__list b { color: rgba(255,255,255,.55); }
.section--navy .method__list span { color: rgba(255,255,255,.84); }
.section--navy .method__list strong { color: #fff; }

/* --- Figuras / fotografía --------------------------------------------- */
/* overflow:hidden recorta la holgura del parallax — la foto se mueve 32 px más
   alta que su marco y sin esto se asoma por arriba y por abajo. */
.figure { position: relative; overflow: hidden; }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure--tall { aspect-ratio: 4 / 5; }
.figure--wide { aspect-ratio: 16 / 9; }
.figure--band { aspect-ratio: 21 / 9; }
@media (max-width: 700px) { .figure--band { aspect-ratio: 4 / 3; } }

/* Contorno suavizado: se le quita el filo al rectángulo, no se disuelve la
   foto. Dos detalles que importan y que la primera versión tenía mal:
   — La medida va en px, no en %. En porcentaje, una banda 21:9 recibía un
     degradado nueve veces más largo arriba que a los lados.
   — El borde termina en 60% de opacidad, no en transparente. Es un filo
     suavizado; llegar a cero es lo que se leía como viñeta.
   Si el navegador no soporta mask-composite el modo por defecto es unión y la
   imagen queda sin difuminar. Degrada sin romperse. */
.figure--soft {
  --feather: 14px;
  --feather-end: rgba(0, 0, 0, .6);
  -webkit-mask-image:
    linear-gradient(to bottom, var(--feather-end) 0, #000 var(--feather), #000 calc(100% - var(--feather)), var(--feather-end) 100%),
    linear-gradient(to right,  var(--feather-end) 0, #000 var(--feather), #000 calc(100% - var(--feather)), var(--feather-end) 100%);
  mask-image:
    linear-gradient(to bottom, var(--feather-end) 0, #000 var(--feather), #000 calc(100% - var(--feather)), var(--feather-end) 100%),
    linear-gradient(to right,  var(--feather-end) 0, #000 var(--feather), #000 calc(100% - var(--feather)), var(--feather-end) 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* Holgura para el recorrido del parallax. */
.figure img.parallax { height: calc(100% + 32px); margin-top: -16px; will-change: transform; }

.figure__tag {
  position: absolute; left: 0; bottom: 0;
  background: var(--white); color: var(--navy-900);
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 14px 22px;
}
/* Sobre una foto con bordes difuminados una etiqueta pegada a la esquina
   delata el rectángulo que acabamos de disolver. Se despega. */
.figure--soft .figure__tag { left: 18px; bottom: 18px; }

/* --- Nosotros --------------------------------------------------------- */
.about__grid { display: grid; gap: clamp(36px, 5vw, 80px); align-items: center; }
@media (min-width: 960px) { .about__grid { grid-template-columns: 1.05fr 1fr; } }
.about__body { display: grid; gap: 20px; }
/* :not(.eyebrow) — el eyebrow es un <p> y esta regla le ganaba por orden. */
.about__body p:not(.eyebrow) { color: var(--muted); }
.about__body p strong { color: var(--navy-900); font-weight: 600; }

.facts { margin-top: 34px; display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
@media (min-width: 620px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts div { background: var(--white); padding: 22px 24px; }
.section--surface .facts div { background: var(--surface); }
.facts dt { font-family: "Hanken Grotesk", Inter, sans-serif; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 8px 0 0; font-family: "Hanken Grotesk", Inter, sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--navy-900); line-height: 1.35; }

/* --- Equipo ----------------------------------------------------------- */
.team__band { margin-top: clamp(44px, 5vw, 68px); }
.team__note { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: .9rem; color: var(--muted); }

/* --- Rejilla de retratos ----------------------------------------------
   Los once retratos salen de la sesión de la revista: mismo encuadre, misma
   luz, mismo fondo. Es literalmente el diferenciador del sitio (DESIGN.md
   §6: ningún despacho de León muestra a su equipo con cara y nombre).
   ⚠️ `.people--sin-nombres` oculta los pies. Está puesto a propósito hasta
   que Iván confirme qué nombre va con qué cara: publicar un nombre mal
   asignado en un despacho que representa contribuyentes es el peor error
   posible. Para publicar: llenar los <figcaption> y quitar el modificador. */
.people { margin-top: clamp(44px, 5vw, 68px); display: grid; gap: clamp(16px, 2vw, 26px); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px)  { .people { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .people { grid-template-columns: repeat(4, 1fr); } }

.person { position: relative; }
.person__foto { aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.person__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.person:hover .person__foto img { transform: scale(1.035); }
/* Regla roja que crece bajo el retrato al pasar el cursor — el mismo gesto
   que marca la pestaña activa en servicios, no un tratamiento nuevo. */
.person__foto::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 1;
  background: var(--red-500); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-mid) var(--ease);
}
.person:hover .person__foto::after { transform: scaleX(1); }
.person figcaption { padding-top: 16px; }
.person__nombre { font-family: "Hanken Grotesk", Inter, sans-serif; font-size: 1.02rem; font-weight: 600; color: var(--navy-900); line-height: 1.3; }
.person__puesto { margin-top: 5px; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.people--sin-nombres figcaption { display: none; }

/* --- Historia: hitos numerados ----------------------------------------- */
.hitos { margin-top: clamp(40px, 4.6vw, 60px); display: grid; gap: 0; }
.hitos li { display: grid; gap: 8px 28px; padding: clamp(24px, 2.6vw, 34px) 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .hitos li { grid-template-columns: 160px 1fr; } }
.hitos li:last-child { border-bottom: 1px solid var(--line); }
.hitos dt, .hitos b {
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: 1.18rem; font-weight: 700; letter-spacing: -.01em; color: var(--red-500);
}
.hitos h3 { color: var(--navy-900); font-size: clamp(1.1rem, 1.6vw, 1.28rem); }
.hitos p { margin-top: 12px; color: var(--muted); }

/* --- Servicios: bloque a detalle, alternando lado ---------------------- */
.svc { display: grid; gap: clamp(30px, 4vw, 68px); align-items: start; padding-block: clamp(46px, 5vw, 74px); border-top: 1px solid var(--line); }
@media (min-width: 940px) { .svc { grid-template-columns: 1fr 1.15fr; } }
.svc:first-of-type { border-top: 0; padding-top: 0; }
.svc__num {
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 700; line-height: 1;
  letter-spacing: -.03em; color: var(--red-500);
}
.svc__head h2 { margin-top: 16px; color: var(--navy-900); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; letter-spacing: -.015em; }
/* :not(.svc__num) — el numeral es un <p> y `.svc__head p` le gana por
   especificidad: lo dejaba en 16.48px gris en vez de 41.6px rojo. Es la
   cuarta vez que este patrón muerde en este código; la regla es que todo
   selector `contenedor + etiqueta` excluya a los componentes que anida. */
.svc__head p:not(.svc__num) { margin-top: 18px; color: var(--muted); font-size: 1.03rem; }
.svc__head .btn { margin-top: 30px; }
/* La lista reusa exactamente el patrón de `.panel__list` de la home: mismo
   guion rojo, mismas reglas. Un servicio no puede verse distinto según la
   página desde la que se llegue. */
.svc__list { display: grid; align-content: start; }
.svc__list li {
  display: grid; grid-template-columns: auto 1fr; gap: 18px;
  padding: 18px 0; border-top: 1px solid var(--line); font-size: .99rem; line-height: 1.55;
}
.svc__list li:last-child { border-bottom: 1px solid var(--line); }
.svc__list li::before { content: ""; width: 16px; height: 1px; background: var(--red-600); margin-top: .78em; }
.svc__list strong { color: var(--navy-900); font-weight: 600; }

/* --- Banda de cierre con llamada a la acción --------------------------- */
.cta-band__inner { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .cta-band__inner { grid-template-columns: 1fr auto; gap: 56px; } }
/* :not(.eyebrow) — el eyebrow es un <p> y `.cta-band p` le gana por
   especificidad. Sin la exclusión, en la banda clara de servicios el eyebrow
   quedaba blanco sobre `surface`: 1.10:1. Mismo caso que `.about__body p`. */
.cta-band p:not(.eyebrow) { color: var(--muted); margin-top: 16px; max-width: 52ch; }
.section--navy.cta-band p:not(.eyebrow) { color: rgba(255,255,255,.78); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- Texto legal corrido ------------------------------------------------
   El aviso de privacidad es el único bloque del sitio que se lee como
   documento, no como página: una columna, medida corta, sin fotografía. */
.prose { max-width: 74ch; }
.prose h2 { margin-top: clamp(44px, 4.4vw, 60px); color: var(--navy-900); font-size: clamp(1.3rem, 2vw, 1.6rem); }
.prose h3 { margin-top: 34px; color: var(--navy-900); font-size: 1.08rem; }
.prose p, .prose li { color: var(--ink); font-size: 1rem; line-height: 1.68; }
.prose p { margin-top: 18px; }
.prose ul { margin-top: 18px; display: grid; gap: 12px; }
.prose ul li { display: grid; grid-template-columns: auto 1fr; gap: 16px; }
.prose ul li::before { content: ""; width: 14px; height: 1px; background: var(--red-600); margin-top: .85em; }
.prose a { color: var(--navy-900); text-decoration: none; border-bottom: 1px solid var(--line); }
.prose a:hover { color: var(--red-600); border-bottom-color: var(--red-600); }
.prose__meta { display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 20px 0; border-block: 1px solid var(--line); font-size: .86rem; color: var(--muted); }

/* --- Visión y misión --------------------------------------------------- */
.vm { display: grid; gap: 1px; background: var(--line); margin-top: clamp(44px, 5vw, 68px); border-block: 1px solid var(--line); }
@media (min-width: 880px) { .vm { grid-template-columns: repeat(2, 1fr); } }
.vm__item { background: var(--white); padding: clamp(32px, 3.6vw, 52px); }
.vm__item h3 { color: var(--navy-900); font-size: 1.3rem; }
.vm__item p:not(.eyebrow) { margin-top: 18px; color: var(--muted); }
.vm__item .eyebrow { margin-bottom: 18px; }

/* --- Contacto --------------------------------------------------------- */
.contact__grid { display: grid; gap: clamp(40px, 5vw, 72px); }
@media (min-width: 960px) { .contact__grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.contact__list { display: grid; gap: 0; margin-top: 36px; }
.contact__list > div { display: grid; gap: 4px; padding: 20px 0; border-top: 1px solid var(--line); }
@media (min-width: 560px) { .contact__list > div { grid-template-columns: 140px 1fr; gap: 20px; align-items: baseline; } }
.contact__list > div:last-child { border-bottom: 1px solid var(--line); }
.contact__list dt { font-family: "Hanken Grotesk", Inter, sans-serif; font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact__list dd { margin: 0; font-size: 1.02rem; color: var(--ink); }
.contact__list a { color: var(--navy-900); text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.contact__list a:hover { color: var(--red-600); border-bottom-color: var(--red-600); }

/* --- Formulario -------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; }
@media (min-width: 620px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; }
.field label {
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 14px 16px;
  width: 100%;
  transition: border-color var(--t-fast) var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field textarea:focus { border-color: var(--navy-900); outline-offset: 1px; }
.form__legal { font-size: .84rem; color: var(--muted); line-height: 1.5; }
.form__legal a { color: var(--navy-900); }
.form .btn { justify-self: start; }

.form__status { display: none; padding: 16px 18px; font-size: .95rem; border-left: 3px solid var(--navy-900); background: var(--surface); }
.form__status.is-shown { display: block; }
.form__status.is-error { border-left-color: var(--red-600); }

/* --- Mapa -------------------------------------------------------------- */
.map { margin-top: clamp(44px, 5vw, 68px); border: 1px solid var(--line); }
.map iframe { display: block; width: 100%; height: clamp(280px, 38vw, 420px); border: 0; filter: grayscale(1) contrast(1.05); transition: filter var(--t-slow) var(--ease); }
.map:hover iframe { filter: grayscale(0); }

/* --- Redes sociales ----------------------------------------------------- */
.socials { display: flex; gap: 10px; }
.socials a {
  position: relative;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  color: var(--navy-900);
  isolation: isolate; overflow: hidden;
  transition: color var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}
.socials a::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--navy-900);
  transform: translateY(100%);
  transition: transform var(--t-mid) var(--ease);
}
.socials a:hover, .socials a:focus-visible { color: #fff; border-color: var(--navy-900); }
.socials a:hover::before, .socials a:focus-visible::before { transform: translateY(0); }
.socials svg { width: 18px; height: 18px; }

.socials--light a { border-color: var(--line-dark); color: #fff; }
.socials--light a::before { background: #fff; }
.socials--light a:hover, .socials--light a:focus-visible { color: var(--navy-950); border-color: #fff; }

/* --- Globo de WhatsApp -------------------------------------------------- */
.wa {
  position: fixed; z-index: 90;
  right: clamp(16px, 3vw, 30px); bottom: clamp(16px, 3vw, 30px);
  display: inline-flex; align-items: center; gap: 0;
  padding: 15px;
  background: var(--navy-900); color: #fff;
  text-decoration: none;
  font-family: "Hanken Grotesk", Inter, sans-serif; font-size: .92rem; font-weight: 600;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease), background var(--t-fast) var(--ease);
}
.wa.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.wa:hover, .wa:focus-visible { background: var(--red-600); }
.wa svg { width: 22px; height: 22px; flex: none; }
/* Colapsado a icono: un globo con etiqueta tapa media columna de texto en el
   rincón inferior derecho. La etiqueta se despliega al pasar el cursor; en
   táctil se queda como icono, que es el patrón esperado. */
.wa span {
  max-width: 0; opacity: 0; margin-left: 0;
  overflow: hidden; white-space: nowrap;
  transition: max-width var(--t-mid) var(--ease), opacity var(--t-fast) var(--ease), margin-left var(--t-mid) var(--ease);
}
.wa:hover span, .wa:focus-visible span { max-width: 260px; opacity: 1; margin-left: 12px; }

/* --- Footer ------------------------------------------------------------ */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,.72); padding-block: clamp(52px, 6vw, 76px) 34px; font-size: .92rem; }
.site-footer__top { display: grid; gap: 34px; align-items: start; }
@media (min-width: 900px) { .site-footer__top { grid-template-columns: auto 1fr auto; gap: 56px; } }
.site-footer .brand--pie { --logo-w: 150px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.site-footer a { color: #fff; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color var(--t-fast) var(--ease); }
.site-footer__links a:hover { border-bottom-color: var(--red-500); }
.site-footer address a:hover { border-bottom-color: var(--red-500); }
.site-footer__legal {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
  font-size: .84rem; color: rgba(255,255,255,.62);
}

/* Crédito de autoría. Va en el último renglón, del tamaño del aviso legal y
   sin logotipo: el sitio es de FIMA, la firma es una nota al pie.
   ⚠️ El pie del sitio de 2022 decía "Este sitio fue creado por Hugo
   Ontiveros" — y ese señor es quien hoy tiene el dominio. "Diseño y
   desarrollo" declara un servicio; "creado por" se lee como propiedad.
   ⚠️ El enlace ancla en el nombre de la marca, nunca en palabras clave:
   un crédito de autor es legítimo, un enlace de pie con texto optimizado
   es un esquema de enlaces. */
/* `order:3` lo manda al final del renglón, después de las redes: los
   iconos son de FIMA y van junto a su copyright; la firma queda aparte.
   Sin el orden explícito el crédito cae en medio y se agrupa con ellos. */
.credito { color: rgba(255,255,255,.5); order: 3; }
.credito a {
  color: rgba(255,255,255,.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.24);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.credito a:hover, .credito a:focus-visible { color: #fff; border-bottom-color: var(--red-500); }

/* --- Movimiento: reveal escalonado ------------------------------------ */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Pausado en cualquier punto debe verse sobrio: si el usuario pidió menos
   movimiento, todo queda en su posición final, sin excepción. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__cue i::after { animation: none; }
  .panel.is-active > * { animation: none; }
  .wa { transition: opacity .01ms; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .parallax { transform: none !important; }
}
