/* ==========================================================================
   Megía Flores — sistema de diseño v1
   Marca: Manrope · Headings: Newsreader · Paleta: niebla regia v2
   Regla de color: blanco y negro primero; el azul vive en las imágenes,
   el footer, la banda de CTA y microcomponentes.
   ========================================================================== */

:root {
  /* color */
  --ink: #101418;
  --body: #3F4650;
  --muted: #6E7883;
  --rule: #E3E7EA;
  --rule-dark: #223347;
  --white: #FFFFFF;
  --ground: #FFFFFF;
  --night: #0C1E33;
  --night-deep: #081527;
  --slate: #35506B;
  --steel: #5D8FC2;
  --mist: #BCD2E2;
  --ice: #EDF5FB;

  /* type */
  --sans: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  /* scale */
  --display-xl: clamp(2.6rem, 5vw, 4rem);      /* 42–64 */
  --display: clamp(2.1rem, 3.4vw, 2.9rem);     /* 34–46 */
  --display-sm: clamp(1.5rem, 2.2vw, 1.9rem);  /* 24–30 */

  /* rhythm */
  --section: clamp(5rem, 10vw, 8.5rem);
  --container: 1520px;
  --gutter: clamp(1.25rem, 3.2vw, 3.5rem);
  /* margen real desde el borde de la ventana: lo usan los bloques a sangre
     (héroe, contacto) para alinearse con .container y con el header. */
  --edge: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* corta el rebote del scroll; el fondo oscuro es el respaldo para
     navegadores que lo ignoran y para páginas más cortas que la ventana */
  overscroll-behavior-y: none;
  background: var(--night-deep);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; }

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

/* ---------- tipografía ---------- */
.label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 1.1rem;
}
.label--muted { color: var(--muted); }
.label--steel { color: var(--steel); }
.label--ice { color: var(--mist); }

h1, h2, h3 { margin: 0; font-weight: 400; color: var(--ink); text-wrap: balance; }
.display-xl { font-family: var(--serif); font-size: var(--display-xl); line-height: 1.08; }
.display { font-family: var(--serif); font-size: var(--display); line-height: 1.16; }
.display-sm { font-family: var(--serif); font-size: var(--display-sm); line-height: 1.28; }

p { margin: 0 0 1.1rem; max-width: 62ch; }
p:last-child { margin-bottom: 0; }
strong { color: var(--ink); font-weight: 700; }

.lede { font-size: 1.12rem; line-height: 1.65; }

/* enlace con subrayado fino (patrón Ritch "Learn more") */
.link-more {
  display: inline-block; font-size: 0.95rem; font-weight: 700; color: var(--ink);
  border-bottom: 1px solid var(--steel); padding-bottom: 3px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.link-more:hover { color: var(--slate); border-color: var(--slate); }
.link-more--ice { color: var(--ice); }
.link-more--ice:hover { color: var(--mist); border-color: var(--mist); }

/* ---------- botones ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; line-height: 1;
  padding: 1.05em 2.1em; border: 1px solid transparent; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--solid { background: var(--ink); color: var(--white); }
.btn--solid:hover { background: var(--night); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--ice { background: var(--ice); color: var(--night); }
.btn--ice:hover { background: var(--white); }
.btn--outline-ice { border-color: var(--mist); color: var(--ice); background: transparent; }
.btn--outline-ice:hover { border-color: var(--ice); background: rgba(237, 245, 251, 0.08); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  height: 84px;
}
.site-header--solid { background: var(--white); box-shadow: 0 1px 0 var(--rule); }

.brand { display: inline-flex; align-items: baseline; gap: 0.55rem; }
.brand__wordmark {
  font-family: var(--sans); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 1.12rem;
  color: var(--ice); transition: color 0.25s ease; white-space: nowrap;
}
.site-header--solid .brand__wordmark { color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.2vw, 2rem); }
.site-nav__link {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mist); transition: color 0.2s ease; white-space: nowrap;
}
.site-nav__link:hover, .site-nav__link[aria-current="page"] { color: var(--white); }
.site-header--solid .site-nav__link { color: var(--muted); }
.site-header--solid .site-nav__link:hover,
.site-header--solid .site-nav__link[aria-current="page"] { color: var(--ink); }

.site-nav__cta {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ice); border: 1px solid var(--mist); padding: 0.7em 1.5em; white-space: nowrap;
  transition: all 0.2s ease;
}
.site-nav__cta:hover { background: var(--ice); color: var(--night); border-color: var(--ice); }
.site-header--solid .site-nav__cta { color: var(--ink); border-color: var(--ink); }
.site-header--solid .site-nav__cta:hover { background: var(--ink); color: var(--white); }

.site-nav__lang { font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; color: var(--muted); white-space: nowrap; }
.site-nav__lang b { color: var(--mist); font-weight: 700; }
.site-header--solid .site-nav__lang b { color: var(--ink); }
.site-nav__lang a { color: inherit; transition: color 0.2s ease; }
.site-nav__lang a:hover { color: var(--mist); }
.site-header--solid .site-nav__lang a:hover, .site-header--static .site-nav__lang a:hover { color: var(--ink); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ice); margin: 5px 0; transition: background 0.25s ease; }
.site-header--solid .nav-toggle span { background: var(--ink); }

/* páginas interiores: header siempre sólido */
.site-header--static { position: static; background: var(--white); box-shadow: 0 1px 0 var(--rule); }
.site-header--static .brand__wordmark { color: var(--ink); }
.site-header--static .site-nav__link { color: var(--muted); }
.site-header--static .site-nav__link:hover,
.site-header--static .site-nav__link[aria-current="page"] { color: var(--ink); }
.site-header--static .site-nav__cta { color: var(--ink); border-color: var(--ink); }
.site-header--static .site-nav__cta:hover { background: var(--ink); color: var(--white); }
.site-header--static .site-nav__lang b { color: var(--ink); }
.site-header--static .nav-toggle span { background: var(--ink); }

/* ---------- hero (inicio) ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; background: var(--night);
}
.hero__media { position: absolute; inset: 0; }
.hero__media picture { display: contents; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 21, 39, 0.55) 0%, rgba(8, 21, 39, 0.12) 40%, rgba(8, 21, 39, 0.62) 100%);
}
.hero__inner {
  position: relative;
  /* el padding inferior sube el bloque: centrado óptico, no matemático,
     y deja aire para el tagline y la nota destacada */
  padding: 0 0 clamp(1.5rem, 4.5vh, 3.5rem);
}
.hero__foot {
  position: absolute; left: 0; right: 0; bottom: clamp(1.6rem, 4.5vh, 2.8rem);
  text-align: center; pointer-events: none;
}

.hero__wordmark {
  display: block; width: 100%;
  font-family: var(--sans); font-weight: 800; text-transform: uppercase;
  /* el tracking baja según sube el cuerpo: 0.04em aquí, 0.12em en el nav */
  letter-spacing: 0.04em; line-height: 1;
  font-size: clamp(2.2rem, 11.2vw, 10.2rem);
  color: var(--white); text-align: center; white-space: nowrap;
  user-select: none;
  text-shadow: 0 4px 60px rgba(8, 21, 39, 0.35);
}
.hero__tagline {
  font-family: var(--serif); font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--ice); text-align: center; margin: 0 auto;
}
.hero__meta {
  position: absolute; bottom: clamp(1.5rem, 4vh, 2.5rem);
  /* único elemento que rompe la retícula: se sale a medio camino
     entre el margen de página y el borde de la ventana */
  right: calc(var(--gutter) + (var(--edge) - var(--gutter)) * 0.5);
  width: min(340px, 82vw);
  background: rgba(12, 30, 51, 0.92); padding: 1.35rem 1.5rem;
  border-top: 2px solid var(--steel);
}
.hero__meta .label { color: var(--steel); margin-bottom: 0.5rem; font-size: 10.5px; }
.hero__meta-title { font-family: var(--serif); font-size: 1.08rem; line-height: 1.4; color: var(--ice); display: block; }
.hero__meta-link { display: inline-block; margin-top: 0.7rem; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist); }
.hero__meta-link:hover { color: var(--white); }

/* héroe interior (banda) */
.page-hero { padding: calc(var(--section) * 0.75) 0 calc(var(--section) / 2); }
.page-hero--night { background: var(--night); }
.page-hero--night .label { color: var(--steel); }
.page-hero--night h1 { color: var(--ice); }
.page-hero--night .lede { color: var(--mist); }
.page-hero__intro { margin-top: 1.4rem; max-width: 640px; }

.breadcrumb { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 2.2rem; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span[aria-current] { color: var(--ink); }

/* ---------- secciones: UN solo ritmo vertical (regla Ritch) ---------- */
.section { padding: calc(var(--section) / 2) 0; }
main > .section:first-child, .page-hero + .section { padding-top: calc(var(--section) / 2); }
main .section:last-of-type { padding-bottom: var(--section); }
.section--mist { background: var(--ice); }
.section--night { background: var(--night); }
.section--night .label { color: var(--steel); }
.section--night h2, .section--night h3 { color: var(--ice); }
.section--night p { color: var(--mist); }

.section-head { max-width: 720px; margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.section-head--row {
  max-width: none; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}

/* dos columnas editoriales (patrón Ritch About) */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center; }
.split--start { align-items: start; }
.split__media picture { display: contents; }
.split__media img { width: 100%; height: auto; }
.split__media--tall img { aspect-ratio: 4 / 4.3; object-fit: cover; }
/* variante baja: iguala la altura de la foto a la del texto y evita
   el hueco blanco cuando la columna de texto es corta */
.split__media--wide img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.split__body .label { margin-bottom: 1rem; }
.split__body .display { margin-bottom: 1.4rem; }
.split__body .link-more { margin-top: 1.4rem; }

/* lista con filetes (patrón Ritch practice areas) */
.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-list__item { border-top: 1px solid var(--rule); }
.rule-list__item:last-child { border-bottom: 1px solid var(--rule); }
.rule-list__link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 2rem;
  padding: 1.05rem 0.15rem;
  transition: padding-left 0.22s ease;
}
.rule-list__link:hover { padding-left: 0.7rem; }
.rule-list__name { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.rule-list__desc { font-size: 0.9rem; color: var(--muted); flex: 1; display: none; }
.rule-list__more {
  font-size: 0.85rem; font-weight: 700; color: var(--muted); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.rule-list__link:hover .rule-list__more { color: var(--ink); }
.rule-list__more svg { transition: transform 0.22s ease; }
.rule-list__link:hover .rule-list__more svg { transform: translateX(4px); }
@media (min-width: 900px) {
  .rule-list--desc .rule-list__desc { display: block; }
  .rule-list--desc .rule-list__name { flex: 0 0 340px; }
}

/* banda de cita (patrón Ritch quote band) */
/* cita en caja: bloque oscuro DENTRO del margen de página (patrón Ritch) */
.quote { display: grid; grid-template-columns: 1.3fr 0.7fr; background: var(--night-deep); }
.quote__text { display: flex; align-items: center; padding: clamp(2.6rem, 6vw, 5.5rem); }
.quote__text blockquote {
  margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  line-height: 1.35; color: var(--ice); max-width: 21em;
}
/* la foto del cañón es vertical: manda ella la altura del bloque */
.quote__media { position: relative; aspect-ratio: 3 / 4; min-height: 320px; }
.quote__media picture { display: contents; }
.quote__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quote--cta .quote__media img { object-position: center 58%; }

/* tres columnas con filete superior (diferenciadores) */
/* tríada: filas editoriales numeradas */
.triad { border-bottom: 1px solid var(--rule); }
.triad__row {
  display: grid; grid-template-columns: 5rem 1fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 4.5rem); align-items: baseline;
  border-top: 1px solid var(--rule); padding: clamp(1.8rem, 3.5vw, 2.8rem) 0;
}
.triad__num { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: var(--steel); }
.triad__title { font-family: var(--serif); font-size: clamp(1.6rem, 2.8vw, 2.5rem); line-height: 1.15; margin: 0; }
.triad__desc { margin: 0; color: var(--muted); max-width: 34em; }

/* puente México–España */
.bridge { position: relative; overflow: hidden; }
.bridge img { width: 100%; height: auto; display: block; }

/* tarjetas de conocimiento (filete superior, sin imagen — patrón sobrio) */
.nota-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.8rem, 4vw, 3rem); }
.nota-card { border-top: 1px solid var(--rule); padding-top: 1.3rem; display: flex; flex-direction: column; gap: 0.75rem; }
.nota-card__meta { display: flex; gap: 1.1rem; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.nota-card__date { color: var(--muted); }
.nota-card__cat { color: var(--steel); text-transform: uppercase; }
.nota-card__title { font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; color: var(--ink); }
a.nota-card:hover .nota-card__title { color: var(--slate); }
.nota-card__more { font-size: 0.88rem; font-weight: 700; color: var(--ink); margin-top: auto; }

/* ---------- CTA ---------- */
.cta-band { background: var(--night); }

/* variante en caja: mismo lenguaje que el bloque de cita, pero con la foto
   a la izquierda y, a la derecha, una frase y el botón. La sección va en
   blanco; la caja es la que aporta el oscuro. */
main .section.cta-band--media { background: var(--ground); }
.quote--cta { grid-template-columns: 0.9fr 1.1fr; }
.quote--cta .quote__media { aspect-ratio: 4 / 3; min-height: 0; }
.quote--cta .quote__text { display: block; align-self: center; }
.quote--cta .label { color: var(--steel); margin-bottom: 1.1rem; }
.quote--cta h2 { color: var(--ice); max-width: 13em; margin: 0 0 2rem; }
.cta-band .label { color: var(--steel); }
.cta-band h2 { color: var(--ice); max-width: 15em; margin: 0 0 2rem; }
.cta-band .btn { margin: 0 1rem 0.5rem 0; }

/* perfil individual */
.profile-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.profile-aside { position: sticky; top: 110px; }
.profile-aside__photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--ice); margin-bottom: 1.6rem; }
.profile-aside__photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-aside dl { margin: 0; font-size: 0.95rem; }
.profile-aside dt { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 1.1rem; }
.profile-aside dd { margin: 0.25rem 0 0; color: var(--ink); }
.profile-aside dd a:hover { color: var(--slate); }

.profile-body h2 { margin: 2.6rem 0 1rem; }
.profile-body h2:first-child { margin-top: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.chip {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  border: 1px solid var(--rule); color: var(--body); padding: 0.55em 1.1em;
  transition: all 0.2s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }

/* trayectoria y formación: una sola lista con filete, puesto a la izquierda
   y fechas a la derecha. La descripción sólo aparece si la entrada la trae. */
.cv-list { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.cv-item { border-top: 1px solid var(--rule); padding: 1.15rem 0 1.25rem; }
.cv-item:last-child { border-bottom: 1px solid var(--rule); }
.cv-item__head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.3rem 1.5rem;
}
.cv-item__role { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--ink); line-height: 1.35; }
.cv-item__dates {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.cv-item__org { margin: 0.3rem 0 0; font-size: 0.95rem; color: var(--slate); }
.cv-item__place { color: var(--muted); }
.cv-item__desc { margin: 0.6rem 0 0; font-size: 0.92rem; line-height: 1.6; color: var(--muted); max-width: 62ch; }

@media (max-width: 520px) {
  /* a un ancho de móvil las fechas ya no caben junto al puesto */
  .cv-item__head { flex-direction: column; }
}

/* ---------- área de práctica (plantilla) ---------- */
.area-hero { padding: calc(var(--section) * 0.7) 0 0; }
.area-hero__tagline { font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.8rem); line-height: 1.4; color: var(--slate); max-width: 30em; margin-top: 1.6rem; }
.service-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 4rem; }
.service-list li { break-inside: avoid; border-top: 1px solid var(--rule); padding: 0.85rem 0.1rem; font-size: 1rem; color: var(--ink); font-weight: 600; }

/* ---------- contacto ---------- */
/* el header de esta página está en flujo (84 px), así que la primera pantalla
   ocupa exactamente el resto: el mapa queda por debajo del pliegue */
.contact-layout {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  min-height: calc(100svh - 84px);
}
.contact-info {
  background: var(--night); color: var(--mist); display: flex; flex-direction: column;
  padding: calc(var(--section) * 0.9) clamp(1.5rem, 4vw, 3.5rem) calc(var(--section) * 0.9) var(--edge);
}
.contact-info .label { color: var(--steel); }
.contact-info h1 { color: var(--ice); margin-bottom: 2.4rem; }
.contact-offices {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 3vw, 2.8rem);
  margin-bottom: 2.4rem;
}
.contact-office__city {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2vw, 1.7rem);
  line-height: 1.2; color: var(--ice); margin: 0 0 1.1rem;
  border-top: 1px solid var(--steel); padding-top: 1.1rem;
}
.contact-office__address {
  font-style: normal; font-size: 0.98rem; line-height: 1.7; color: var(--mist);
  display: block; margin: 0 0 0.9rem;
}
.contact-office__tel { font-size: 0.98rem; color: var(--ice); }
a.contact-office__tel { border-bottom: 1px solid var(--steel); padding-bottom: 2px; }
a.contact-office__tel:hover { color: var(--white); border-color: var(--mist); }
.contact-mail {
  /* .contact-info es flex column: sin align-self el subrayado cruza el panel */
  display: inline-block; align-self: flex-start;
  font-size: 0.98rem; color: var(--ice);
  border-bottom: 1px solid var(--steel); padding-bottom: 2px;
}
.contact-mail:hover { color: var(--white); border-color: var(--mist); }
.contact-info dl { margin: 0; }
.contact-info dt { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--steel); margin-top: 1.7rem; }
.contact-info dd { margin: 0.4rem 0 0; font-size: 1rem; line-height: 1.65; color: var(--ice); }
.contact-info dd a:hover { color: var(--white); }

.contact-form { padding: calc(var(--section) * 0.9) var(--edge) calc(var(--section) * 0.9) clamp(1.5rem, 4vw, 3.5rem); }
.contact-form form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--rule); background: transparent;
  padding: 0.6rem 0.1rem; border-radius: 0; appearance: none;
  transition: border-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--night); }
.field input::placeholder, .field textarea::placeholder { color: #A9B2BA; }
.contact-form .btn { justify-self: start; }
.form-note { grid-column: 1 / -1; font-size: 0.85rem; color: var(--muted); }

/* ---------- mapa de sedes con selector ---------- */
.office-map { position: relative; border-top: 1px solid var(--rule); background: var(--night); }
.office-map__switch {
  position: absolute; z-index: 2; top: clamp(1rem, 2vw, 1.6rem); left: var(--edge);
  /* la tarjeta que Google pinta arriba a la izquierda se solapaba con
     el selector, así que se va a la derecha */
  display: flex; gap: 1px; background: var(--rule-dark);
  box-shadow: 0 2px 14px rgba(8, 21, 39, 0.28);
}
.office-map__tab {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.95em 1.7em; border: 0; cursor: pointer;
  background: var(--white); color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.office-map__tab:hover { color: var(--ink); }
.office-map__tab[aria-selected="true"] { background: var(--night-deep); color: var(--ice); }
.office-map__tab:focus-visible { outline: 2px solid var(--steel); outline-offset: -4px; }
.office-map__switch--right { left: auto; right: var(--edge); }
.office-map__frame { position: relative; overflow: hidden; aspect-ratio: 21 / 9; min-height: 0; }
.office-map__frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  filter: grayscale(1) contrast(0.92) brightness(0.96);
}
@media (max-width: 767px) {
  .office-map__frame { aspect-ratio: 4 / 3; }
  .office-map__tab { padding: 0.85em 1.2em; }
}

/* ---------- artículo ---------- */
.article { max-width: 720px; margin: 0 auto; }
.article__meta { display: flex; gap: 1.2rem; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 1.4rem; }
.article__meta .cat { color: var(--steel); text-transform: uppercase; }
.article__meta .date { color: var(--muted); }
.article h1 { margin-bottom: 2rem; }
.article__body p { max-width: none; }
.article__body h2 { font-family: var(--serif); font-size: 1.5rem; margin: 2.4rem 0 1rem; }
.article__footer { border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 1.6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* aviso de placeholder editorial */
.pending {
  background: var(--ice); border-left: 3px solid var(--steel);
  padding: 0.85rem 1.2rem; font-size: 0.92rem; color: var(--slate);
}

/* ---------- footer ---------- */
.site-footer { background: var(--night-deep); color: var(--mist); }
.site-footer__main {
  display: grid; grid-template-columns: 0.85fr 1.15fr 1.15fr 1fr 0.75fr; gap: clamp(1.5rem, 2.6vw, 2.4rem);
  padding: calc(var(--section) * 0.75) 0 3rem;
}
.footer-brand__wordmark { font-family: var(--sans); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 1.3rem; color: var(--ice); display: block; }
.footer-brand__est {
  display: inline-block; margin-top: 0.8rem; padding-top: 0.55rem; border-top: 1px solid var(--steel);
  font-size: 10px; font-weight: 600; letter-spacing: 0.24em; color: var(--steel);
}
.site-footer h4 { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--steel); margin: 0 0 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.site-footer li a { font-size: 0.95rem; color: var(--mist); }
.site-footer li a:hover { color: var(--white); }
.site-footer address { font-style: normal; font-size: 0.95rem; line-height: 1.7; }
.site-footer__tel { display: block; margin-top: 0.7rem; font-size: 0.95rem; color: var(--mist); }
a.site-footer__tel:hover { color: var(--white); }
.site-footer__legal {
  border-top: 1px solid var(--rule-dark);
  padding: 1.4rem 0 1.8rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem;
  font-size: 12.5px; color: #7B8896;
}
.site-footer__legal a:hover { color: var(--mist); }

/* ---------- reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .site-nav {
    position: fixed; inset: 84px 0 auto 0; z-index: 55;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); box-shadow: 0 18px 30px rgba(12, 30, 51, 0.12);
    padding: 0.8rem 0 1.4rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav__link, .site-header--solid .site-nav__link, .site-header--static .site-nav__link { color: var(--ink); padding: 0.9rem var(--edge); }
  .site-nav__cta, .site-header--solid .site-nav__cta, .site-header--static .site-nav__cta {
    color: var(--ink); border-color: var(--ink); margin: 0.8rem var(--edge) 0; text-align: center;
  }
  .site-nav__lang { padding: 1rem var(--edge) 0; }
  .site-nav__lang b { color: var(--ink); }
  .site-nav__lang a:hover { color: var(--ink); }
  .nav-toggle { display: block; }
  .site-header:not(.site-header--solid):not(.site-header--static) .site-nav { background: var(--white); }

  .quote { grid-template-columns: 1fr; }
  .quote__media { aspect-ratio: 16 / 10; min-height: 0; }
  .quote--cta .quote__media { aspect-ratio: 16 / 9; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-aside { position: static; max-width: 380px; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-info, .contact-form { padding-inline: var(--edge); }
}

@media (max-width: 900px) {
  /* en vertical el recorte centrado se come el pico de la Silla: lo corremos */
  .hero__media img { object-position: 64% center; }
}

@media (max-width: 767px) {
  .split, .nota-grid { grid-template-columns: 1fr; }
  .split__media { order: -1; }
  .service-list { columns: 1; }
  .contact-form form { grid-template-columns: 1fr; }
  .site-footer__main { grid-template-columns: 1fr 1fr; }
  .contact-offices { grid-template-columns: 1fr; }
  /* relative, no static: la imagen y el scrim son absolute y taparían
     el tagline y la nota si estos no crean contexto de apilamiento */
  .hero__inner { padding-bottom: 0; }
  .hero__meta { position: relative; inset: auto; width: auto; margin: 2rem var(--edge) 0; }
  .hero__foot { position: relative; inset: auto; margin-top: 1.6rem; padding: 0 var(--edge); }
  .hero { padding-bottom: 2rem; }
  .hero__wordmark { white-space: normal; line-height: 1.02; }
}

@media (max-width: 479px) {
  .site-footer__main { grid-template-columns: 1fr; }
}


/* ---------- cifras (numerales serif, patrón Ritch) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.6rem, 4vw, 3rem); }
.stat { border-top: 2px solid var(--ink); padding-top: 1.7rem; }
.stat__num {
  font-family: var(--serif); font-size: clamp(3rem, 5.4vw, 4.8rem); line-height: 0.95;
  color: var(--ink); display: block; font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}
.stat__unit {
  font-family: var(--sans); font-size: 0.3em; font-weight: 700;
  letter-spacing: 0.1em; color: var(--slate);
  margin-left: 0.3em; vertical-align: baseline;
}
.stat__label {
  display: block; margin-top: 1rem; font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate);
  line-height: 1.5; max-width: 15em;
}

/* ---------- misión / visión (dos columnas con regla central) ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); }
.duo > div { border-top: 1px solid var(--steel); padding-top: 1.6rem; }
.duo h3 { font-family: var(--serif); font-size: 1.6rem; margin-bottom: 0.9rem; }

/* ---------- valores (retícula compacta) ---------- */
.valores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.6rem, 3.5vw, 2.6rem); }
.valor { border-top: 1px solid var(--rule); padding-top: 1.1rem; }
.valor h4 { margin: 0 0 0.35rem; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.valor p { font-size: 0.9rem; line-height: 1.55; color: var(--muted); margin: 0; }

/* ---------- industrias (lista en columnas) ---------- */
.industrias { columns: 3; column-gap: clamp(2rem, 5vw, 4rem); }
.industrias li {
  break-inside: avoid; list-style: none; border-top: 1px solid var(--rule);
  padding: 0.8rem 0.1rem; font-size: 0.98rem; font-weight: 600; color: var(--ink);
  cursor: default; transition: color 0.25s ease, border-color 0.25s ease;
}
/* el texto se desplaza dentro de su propio span: el filete no se mueve y el
   ancho de la caja no cambia, así que las columnas no se recomponen */
.industrias__name {
  display: inline-block;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.industrias li:hover { color: var(--slate); border-top-color: var(--ink); }
.industrias li:hover .industrias__name { transform: translateX(0.55rem); }
ul.industrias { margin: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  .industrias li, .industrias__name { transition: none; }
  .industrias li:hover .industrias__name { transform: none; }
}

/* ---------- práctica transatlántica: dos sedes en blanco, sobre la retícula ---------- */
.offices { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5.5rem); }
.office { border-top: 1px solid var(--steel); padding-top: 1.8rem; }
.office__city { font-family: var(--serif); font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.1; color: var(--ink); display: block; }
.office__country { display: block; margin: 0.7rem 0 1.1rem; font-size: 11px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--slate); }
.office p { margin: 0; color: var(--muted); max-width: 30em; }


/* ---------- aliados ---------- */
.allies-note { font-size: 0.95rem; color: var(--muted); max-width: 560px; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .valores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .industrias { columns: 2; }
  .duo { grid-template-columns: 1fr; }
  .triad__row { grid-template-columns: 2.6rem 1fr; }
  .triad__desc { grid-column: 2; }
  .offices { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .industrias { columns: 1; }
}

/* ---------- utilidades de ritmo interno ---------- */
.mt-block { margin-top: clamp(2.2rem, 5vw, 3.6rem); }


/* ---------- áreas de práctica: foto fija + lista (portada) ---------- */
.areas-showcase {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start;
}
.areas-showcase__media { align-self: start; }
.areas-showcase__media picture { display: contents; }
.areas-showcase__media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.areas-showcase__body .display { margin-bottom: 1.3rem; }
.areas-showcase__list { margin-top: clamp(1.8rem, 4vw, 2.8rem); }
.areas-showcase__list .rule-list__link { padding: 1rem 0.15rem; }
.areas-showcase__list .rule-list__name { font-size: 1rem; font-weight: 600; }
@media (max-width: 900px) {
  .areas-showcase { grid-template-columns: 1fr; }
  .areas-showcase__media { position: static; }
  .areas-showcase__media img { aspect-ratio: 16 / 10; }
}

/* ---------- áreas de práctica: mapa agrupado ----------
   16 áreas en cuatro familias legibles de una sola pasada, en vez de una
   lista corrida. La descripción vive junto al nombre; en la versión
   compacta (inicio) sólo se muestran los nombres. */
.area-groups {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.8rem, 3vw, 2.8rem) clamp(1.6rem, 3vw, 3rem);
}
.area-group { border-top: 2px solid var(--ink); padding-top: 1.15rem; }
.area-group__title {
  font-family: var(--serif); font-size: 1.32rem; line-height: 1.25;
  color: var(--ink); margin: 0 0 0.4rem;
}
.area-group__note { font-size: 0.86rem; line-height: 1.5; color: var(--muted); margin: 0 0 1.1rem; max-width: none; }
.area-group__count { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel); }
.area-group ul { list-style: none; margin: 0; padding: 0; }

.area-item { border-top: 1px solid var(--rule); }
.area-item:last-child { border-bottom: 1px solid var(--rule); }
.area-item__link { display: block; padding: 0.8rem 0; transition: padding-left 0.2s ease; }
a.area-item__link:hover { padding-left: 0.45rem; }
.area-item__name { display: block; font-size: 0.98rem; font-weight: 700; line-height: 1.35; color: var(--ink); transition: color 0.2s ease; }
.area-item__desc { display: block; margin-top: 0.3rem; font-size: 0.855rem; line-height: 1.5; color: var(--muted); }
a.area-item__link:hover .area-item__name { color: var(--slate); }

.areas-lead { margin-bottom: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); }

/* versión compacta: sólo nombres (bloque de inicio) */
.area-groups--compact .area-item__desc { display: none; }
.area-groups--compact .area-item__link { padding: 0.62rem 0; }
.area-groups--compact .area-item__name { font-weight: 600; }

/* subgrid: los nombres arrancan a la misma altura aunque el intro
   de cada familia ocupe una o dos líneas */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1101px) {
    .area-groups { grid-template-rows: auto auto auto; row-gap: 0; }
    .area-group {
      display: grid; grid-row: span 3; grid-template-rows: subgrid;
      row-gap: 0; align-content: start;
    }
    .area-groups--compact { grid-template-rows: auto auto; }
    .area-groups--compact .area-group { grid-row: span 2; }
  }
}

@media (max-width: 1100px) {
  .area-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .area-groups { grid-template-columns: 1fr; }
}

/* ---------- La Firma: presentación en una sola pieza ---------- */
.firm-intro { padding-top: calc(var(--section) * 0.62); }
.firm-intro__grid {
  display: grid; grid-template-columns: 1.18fr 0.82fr;
  gap: clamp(2.5rem, 4vw, 4rem); align-items: start;
}
.firm-intro__media picture { display: contents; }
/* 5/4 coincide con el archivo (1.252): la foto entra sin recorte */
.firm-intro__media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.firm-intro__body h1 { margin: 0 0 1.6rem; }
.firm-intro__body p { max-width: 58ch; }

/* ---------- oficinas: caja oscura con dirección y mapa ---------- */
.office-boxes { display: flex; flex-direction: column; gap: clamp(1.5rem, 3vw, 2.5rem); }
.office-box {
  display: grid; grid-template-columns: 1fr 1.15fr;
  background: var(--night-deep); overflow: hidden;
}
/* sin esto un iframe puede ensanchar su columna por encima de la pista */
.office-box > * { min-width: 0; }
.office-box__info {
  padding: clamp(2rem, 4vw, 3.4rem);
  display: flex; flex-direction: column; justify-content: center;
}
.office-box__info .label { color: var(--steel); margin-bottom: 0.9rem; }
.office-box__address {
  font-family: var(--serif); font-style: normal;
  font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.35;
  color: var(--ice); margin: 0 0 1.6rem;
}
.office-box__phone {
  font-size: 1rem; letter-spacing: 0.02em; color: var(--mist); margin: 0;
}
.office-box__phone a { border-bottom: 1px solid var(--steel); padding-bottom: 2px; }
.office-box__phone a:hover { color: var(--white); border-color: var(--mist); }
/* la segunda caja invierte: mapa a la izquierda, datos a la derecha.
   Las columnas también se invierten, si no el mapa sale más estrecho
   que el de la primera caja. */
.office-box--reverse { grid-template-columns: 1.15fr 1fr; }
.office-box--reverse .office-box__info { order: 2; }
/* fondo oscuro debajo: si el mapa no carga (bloqueador, red restringida)
   el hueco queda en el tono de la caja y no en un gris claro */
.office-box__map {
  position: relative; overflow: hidden; background: var(--night);
  min-height: clamp(340px, 30vw, 460px);
}
.office-box__map iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  /* el mapa de Google llega en color: se apaga para que no rompa la paleta */
  filter: grayscale(1) contrast(0.92) brightness(0.96);
}

/* ---------- valores: filete que crece al pasar el cursor ---------- */
.valor { position: relative; transition: transform 0.3s ease; }
.valor::after {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s ease;
}
.valor:hover { transform: translateY(-2px); }
.valor:hover::after { transform: scaleX(1); }
.valor h4 { transition: color 0.25s ease; }
.valor:hover h4 { color: var(--slate); }
.valor:hover p { color: var(--body); }

@media (max-width: 900px) {
  .firm-intro__grid { grid-template-columns: 1fr; }
  .firm-intro__media { position: static; }
  .firm-intro__media img { aspect-ratio: 16 / 10; }
  .office-box--reverse .office-box__info { order: 0; }
  .office-box { grid-template-columns: 1fr; }
  /* min-height + aspect-ratio se pelean y fuerzan el ancho: hay que anularlo */
  .office-box__map { min-height: 0; aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) {
  .valor, .valor::after, .valor h4 { transition: none; }
  .valor:hover { transform: none; }
}

/* ---------- equipo ---------- */
.team__head { max-width: 44rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.team__head h1 { margin-bottom: 1.3rem; }
.team__lede { color: var(--muted); max-width: 40rem; }

/* ---------- directorio de personas ---------- */
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(220px, 20vw, 285px), 1fr));
  gap: clamp(2.2rem, 4vw, 3.2rem) clamp(1.5rem, 2.5vw, 2.4rem);
}
/* el filete es un marcador de entrada de directorio: necesita aire por debajo
   o se lee como el borde de la foto. Bajo el retrato basta la mitad. */
.person-card {
  display: flex; flex-direction: column;
  border-top: 2px solid var(--ink); padding-top: clamp(1.6rem, 2.2vw, 2.1rem);
}
.person-card__photo {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--night-deep); margin-bottom: 1.15rem;
}
.person-card__photo picture { display: contents; }
.person-card__photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.person-card:hover .person-card__photo img { transform: scale(1.035); }
.person-card__name {
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.25;
  color: var(--ink); transition: color 0.25s ease;
}
.person-card:hover .person-card__name { color: var(--slate); }
.person-card__role {
  margin-top: 0.35rem; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.person-card__more {
  margin-top: 1.1rem; display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 700; color: var(--muted);
  transition: color 0.25s ease;
}
.person-card__more svg { transition: transform 0.25s ease; }
.person-card:hover .person-card__more { color: var(--ink); }
.person-card:hover .person-card__more svg { transform: translateX(4px); }
.person-card:focus-visible { outline: 2px solid var(--steel); outline-offset: 6px; }

@media (prefers-reduced-motion: reduce) {
  .person-card__photo img, .person-card__name,
  .person-card__more, .person-card__more svg { transition: none; }
  .person-card:hover .person-card__photo img { transform: none; }
}

/* ---------- inicio: áreas con subáreas desplegables al pasar el cursor ----------
   El panel se abre con grid-template-rows 0fr→1fr: la altura se anima sin
   conocer el contenido. En pantallas táctiles, sin hover, queda siempre abierto. */
.area-row { position: relative; }
.area-row__link { padding-right: 0.15rem; }
.area-row__panel {
  display: grid; grid-template-rows: 0fr; overflow: hidden;
  transition: grid-template-rows 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.area-row__panel > * { min-height: 0; }
.area-row__subs {
  list-style: none; margin: 0; padding: 0 0.15rem 0 1.5rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.4rem;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.32s ease 0.06s, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.02s, padding 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.area-row__subs li {
  position: relative; font-size: 0.9rem; font-weight: 500; color: var(--body);
  padding: 0.45rem 0 0.45rem 1.1rem; border-top: 1px solid var(--rule);
}
.area-row__subs li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 0.55rem; height: 1px; background: var(--steel); }
.area-row__subs li:nth-child(-n+2) { border-top: 0; }
.area-row:hover .area-row__panel,
.area-row:focus-within .area-row__panel { grid-template-rows: 1fr; }
.area-row:hover .area-row__subs,
.area-row:focus-within .area-row__subs { opacity: 1; transform: none; padding-bottom: 1.2rem; }
.area-row:hover .rule-list__link,
.area-row:focus-within .rule-list__link { padding-left: 0.7rem; }
.area-row:hover .rule-list__more,
.area-row:focus-within .rule-list__more { color: var(--ink); }
.area-row:hover .rule-list__more svg { transform: translateX(4px); }
@media (hover: none) {
  .area-row__panel { grid-template-rows: 1fr; }
  .area-row__subs { opacity: 1; transform: none; padding-bottom: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .area-row__panel, .area-row__subs { transition: none; }
}

/* ---------- áreas de práctica: seis áreas en tres columnas ---------- */
.area-groups--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.area-groups--six .area-group { scroll-margin-top: 110px; }
.area-groups--six .area-group__title { font-size: 1.5rem; }
.area-groups--six .area-group__note { min-height: 3.6em; }
.area-groups--six .area-item__link { padding: 0.62rem 0; }
.area-groups--six .area-item__name { font-weight: 600; font-size: 0.95rem; }
.area-groups--six a.area-item__link .area-item__name::after {
  content: " \2192"; color: var(--steel); font-weight: 400;
}
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1101px) {
    .area-groups--six { grid-template-rows: auto auto auto auto auto auto; }
  }
}
@media (max-width: 1100px) { .area-groups--six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .area-groups--six { grid-template-columns: 1fr; } }
.area-group:target .area-group__title { color: var(--slate); }

/* ---------- oficinas: correo bajo el teléfono ---------- */
.office-box__mail { font-size: 1rem; letter-spacing: 0.02em; color: var(--mist); margin: 0.55rem 0 0; }
.office-box__mail a { border-bottom: 1px solid var(--steel); padding-bottom: 2px; }
.office-box__mail a:hover { color: var(--white); border-color: var(--mist); }

/* ---------- Conocimiento: tarjetas con resumen ---------- */
.nota-card__excerpt { font-size: 0.92rem; line-height: 1.6; color: var(--muted); margin: 0; max-width: none; }
.nota-card__meta .nota-card__read { color: var(--muted); font-weight: 600; }

/* ---------- Conocimiento: artículo largo ----------
   Cabecera a todo el ancho del contenedor; después una retícula con un
   índice fijo a la izquierda y la columna de lectura (~70 caracteres). */
.post-hero { padding: calc(var(--section) * 0.55) 0 calc(var(--section) * 0.45); border-bottom: 1px solid var(--rule); }
.post-hero .breadcrumb { margin-bottom: 2.6rem; }
.post-hero__kicker { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: baseline; margin-bottom: 1.4rem; }
.post-hero__kicker .label { margin: 0; color: var(--steel); }
.post-hero__kicker .label--muted { color: var(--muted); }
.post-hero h1 { max-width: 22ch; margin: 0 0 1.6rem; }
.post-hero__lede { font-size: 1.22rem; line-height: 1.6; color: var(--body); max-width: 60ch; margin: 0 0 2.4rem; }
.post-hero__byline { display: flex; align-items: center; gap: 1rem; }
.post-hero__avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex-shrink: 0; }
.post-hero__who { display: flex; flex-direction: column; gap: 0.15rem; }
.post-hero__name { font-weight: 700; color: var(--ink); font-size: 0.98rem; }
.post-hero__role { font-size: 0.85rem; color: var(--muted); }

.post { display: grid; grid-template-columns: 260px minmax(0, 700px); gap: clamp(3rem, 7vw, 8rem); align-items: start; }
.post__rail { position: sticky; top: 108px; }
.post__toc { border-top: 2px solid var(--ink); padding-top: 1rem; }
.post__toc .label { margin-bottom: 0.9rem; }
.post__toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.post__toc li { counter-increment: toc; border-top: 1px solid var(--rule); }
.post__toc a {
  display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.4rem; padding: 0.7rem 0;
  font-size: 0.9rem; line-height: 1.4; font-weight: 600; color: var(--body); transition: color 0.2s ease;
}
.post__toc a::before { content: counter(toc, upper-roman); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--steel); padding-top: 0.2em; }
.post__toc a:hover, .post__toc a.is-active { color: var(--ink); }
.post__rail-links { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }

.post__body { font-size: 1.06rem; line-height: 1.75; }
.post__body p { max-width: none; margin: 0 0 1.35rem; }
.post__body h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.2vw, 2rem); line-height: 1.22;
  margin: 3.2rem 0 1.2rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); scroll-margin-top: 110px;
}
.post__body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.post__body h2 .num { display: block; font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; color: var(--steel); margin-bottom: 0.8rem; }
.post__body h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--ink); margin: 2.2rem 0 0.8rem; letter-spacing: 0.01em; }
.post__body h3 .num { color: var(--steel); margin-right: 0.6rem; font-variant-numeric: tabular-nums; }
.post__list { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.post__list li { position: relative; padding: 0.7rem 0 0.7rem 1.7rem; border-top: 1px solid var(--rule); }
.post__list li:last-child { border-bottom: 1px solid var(--rule); }
.post__list li::before { content: ""; position: absolute; left: 0; top: 1.45rem; width: 0.9rem; height: 1px; background: var(--steel); }
.post__pull {
  margin: 2.4rem 0; padding: 0.3rem 0 0.3rem 1.6rem; border-left: 2px solid var(--steel);
  font-family: var(--serif); font-size: clamp(1.3rem, 1.8vw, 1.55rem); line-height: 1.4; color: var(--ink);
}
.post__pull p { margin: 0; }

.post__cta { background: var(--night-deep); color: var(--mist); padding: clamp(1.8rem, 3.5vw, 2.8rem); margin: 3.4rem 0 0; }
.post__cta h2 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.25; color: var(--ice); margin: 0 0 0.9rem; border: 0; padding: 0; }
.post__cta p { margin: 0 0 1.4rem; font-size: 0.98rem; }
.post__cta-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.post__cta-contact { font-size: 0.9rem; color: var(--mist); }
.post__cta-contact a { border-bottom: 1px solid var(--steel); padding-bottom: 1px; }
.post__cta-contact a:hover { color: var(--white); }

.post__author { display: grid; grid-template-columns: 96px 1fr; gap: 1.6rem; align-items: start; border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 2rem; }
.post__author img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.post__author .label { margin-bottom: 0.5rem; }
.post__author-name { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); margin: 0 0 0.5rem; }
.post__author p { font-size: 0.95rem; line-height: 1.65; color: var(--body); margin: 0; }
.post__author p + p { margin-top: 0.7rem; }
.post__disclaimer { margin-top: 1.6rem; font-size: 0.82rem; line-height: 1.6; color: var(--muted); }

.post__nav { border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 1.8rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.post__nav a { display: flex; flex-direction: column; gap: 0.4rem; }
.post__nav a:last-child { text-align: right; align-items: flex-end; }
.post__nav .label { margin: 0; color: var(--muted); }
.post__nav-title { font-family: var(--serif); font-size: 1.1rem; line-height: 1.35; color: var(--ink); transition: color 0.2s ease; }
.post__nav a:hover .post__nav-title { color: var(--slate); }

@media (max-width: 1023px) {
  .post { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
  .post__rail { position: static; }
  .post__toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.6rem; }
}
@media (max-width: 640px) {
  .post__toc ol { grid-template-columns: 1fr; }
  .post__author { grid-template-columns: 1fr; }
  .post__author img { width: 72px; height: 72px; }
  .post__nav { grid-template-columns: 1fr; }
  .post__nav a:last-child { text-align: left; align-items: flex-start; }
  .post-hero__lede { font-size: 1.08rem; }
}

/* cabecera del artículo: texto + fotografía */
.post-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: end; }
.post-hero__media picture { display: contents; }
.post-hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
@media (max-width: 1023px) {
  .post-hero__grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .post-hero__media img { aspect-ratio: 16 / 9; }
}
/* seis áreas: aire entre las dos filas cuando las columnas comparten retícula */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1101px) {
    .area-groups--six .area-group:nth-child(-n+3) { margin-bottom: clamp(2.2rem, 4vw, 3.4rem); }
  }
}
/* inicio: las subáreas acompañan el desplazamiento del nombre */
.area-row:hover .area-row__subs, .area-row:focus-within .area-row__subs { padding-left: 2.2rem; }
/* cabecera del artículo: la foto ocupa toda la altura del texto */
.post-hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: stretch; }
.post-hero h1 { font-size: clamp(2.2rem, 3.6vw, 3.3rem); line-height: 1.1; max-width: none; }
.post-hero__media { position: relative; min-height: 320px; }
.post-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
@media (max-width: 1023px) {
  .post-hero__media { min-height: 0; aspect-ratio: 16 / 9; }
}
.post__toc a.is-active { color: var(--ink); font-weight: 700; }
.post__toc a.is-active::before { color: var(--ink); }

@media (max-width: 640px) {
  .area-row__subs { grid-template-columns: 1fr; padding-left: 1rem; }
  .area-row__subs li:nth-child(2) { border-top: 1px solid var(--rule); }
  .area-row:hover .area-row__subs, .area-row:focus-within .area-row__subs { padding-left: 1.4rem; }
}

/* ---------- Sectores: filas grandes con contexto ---------- */
.sectores { border-bottom: 1px solid var(--rule); }
.sectores__row {
  display: grid; grid-template-columns: 4rem 1fr 1fr; gap: 1.5rem clamp(1.5rem, 4vw, 4rem);
  align-items: baseline; padding: clamp(1.6rem, 3vw, 2.3rem) 0; border-top: 1px solid var(--rule);
}
.sectores__num { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: var(--steel); }
.sectores__title { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2.2rem); line-height: 1.15; margin: 0; color: var(--ink); }
.sectores__desc { margin: 0; color: var(--muted); max-width: 34em; }
@media (max-width: 900px) {
  .sectores__row { grid-template-columns: 2.6rem 1fr; gap: 0.6rem 1.2rem; }
  .sectores__desc { grid-column: 2; }
}

/* ---------- héroe: entrada suave ----------
   La foto y el wordmark aparecen cuando la imagen ya está cargada (clase
   is-ready desde main.js); antes sólo se ve el azul noche de fondo. */
.hero__media img { opacity: 0; transform: scale(1.035); transition: opacity 1.1s ease, transform 2.4s cubic-bezier(0.22, 1, 0.36, 1); }
.hero__inner, .hero__foot, .hero__meta { opacity: 0; transform: translateY(14px); transition: opacity 0.9s ease 0.25s, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s; }
.hero__foot { transition-delay: 0.45s; }
.hero__meta { transition-delay: 0.6s; }
.hero.is-ready .hero__media img { opacity: 1; transform: none; }
.hero.is-ready .hero__inner, .hero.is-ready .hero__foot, .hero.is-ready .hero__meta { opacity: 1; transform: none; }
.no-js .hero__media img, .no-js .hero__inner, .no-js .hero__foot, .no-js .hero__meta { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero__media img, .hero__inner, .hero__foot, .hero__meta { transition: none; }
}

/* ---------- Contacto: envío del formulario ---------- */
.form-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status:empty { display: none; }
.form-status { grid-column: 1 / -1; margin: -1rem 0 0; font-size: 0.92rem; color: var(--muted); min-height: 1.4em; }
.form-status.is-ok { color: var(--night); }
.form-status.is-error { color: #A3361F; }
.contact-form .btn[disabled] { opacity: 0.6; cursor: wait; }
