/* ==========================================================================
   Factor 18 · sitio-v3 · sistema visual compartido
   Dos divisiones: nómina/payrolling y limpieza corporativa.
   Tipografía local: Archivo Expanded (titulares), Inter (texto),
   JetBrains Mono (etiquetas, folios y datos). Cero CDNs.
   Regla dura: ningún color literal fuera del bloque :root y de sus alias.
   ========================================================================== */

/* OD-LAYOUT-PRIMITIVES v1 — structure only: display, flex/grid, overflow, wrapping, ratio, geometry.
   Put this @layer first; product CSS outside the layer wins ordinary layout rules.
   Native hidden and closed-dialog states take precedence over component display rules. */
@layer od-layout {
  [hidden]:not([hidden="until-found" i]) { display: none !important; }
  dialog:not([open]) { display: none !important; }

  :where(.od-stack,.od-row,.od-row-top,.od-cluster,.od-grid,.od-field,.od-stat,.od-cell,.od-tile) > :where(*) { min-width: 0; }

  /* containers */
  .od-stack   { display: flex; flex-direction: column; gap: var(--od-gap, 8px); }
  .od-row     { display: flex; align-items: center; gap: var(--od-gap, 8px); }
  .od-row-top { display: flex; align-items: flex-start; gap: var(--od-gap, 8px); }
  .od-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--od-gap, 8px); }
  .od-fill    { flex: 1 1 0; min-width: 0; }
  .od-fixed   { flex: none; }
  .od-grid    { display: grid; gap: var(--od-gap, 12px); grid-template-columns: repeat(var(--od-cols, 3), minmax(0, 1fr)); }

  /* stacked information: each piece is its own line — never sibling inline spans */
  .od-stat, .od-field, .od-cell { display: grid; gap: var(--od-gap, 2px); }
  :where(.od-stat,.od-field,.od-cell) > :where(*) { display: block; }
  .od-tile { display: grid; grid-template-rows: auto 1fr; }
  :where(.od-tile) > :where(*) { display: block; }

  /* media keeps its intrinsic ratio by default; never a distorted or cropped
     cover by accident. height:auto lets the ratio win over an <img height="…">
     attribute. Cropping to a uniform box is an explicit opt-in: set --od-ratio
     AND add .od-media-cover together (per the core rule, only where a crop is
     deliberate — tile thumbs, decorative fills — never on full-frame content). */
  .od-media { display: block; width: 100%; height: auto; aspect-ratio: var(--od-ratio, auto); }
  .od-media-cover { object-fit: cover; }

  /* functional inline SVG icons opt into bounded geometry; content SVGs keep their own */
  .od-icon { display: inline-block; inline-size: var(--od-icon-size, 1em); block-size: var(--od-icon-size, 1em); flex: none; }

  /* data text only — authored copy is rewritten to its budget instead */
  .od-truncate { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .od-clamp-2, .od-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .od-clamp-2 { -webkit-line-clamp: 2; }
  .od-clamp-3 { -webkit-line-clamp: 3; }
  .od-lines-2 { min-height: calc(2 * 1.4em); }   /* block-level reservation for a shared baseline */
  .od-nowrap  { white-space: nowrap; }           /* número+unidad · fecha+día */
  .od-keep    { word-break: keep-all; overflow-wrap: anywhere; }

  /* screen skeleton (optional): bars take their own space, the middle scrolls — no padding guessed for chrome */
  .od-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
  .od-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }

  /* horizontal rail: the next item peeks at the edge; trailing room survives overflow */
  .od-rail { display: flex; gap: var(--od-gap, 8px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
             padding-inline: var(--od-rail-pad, 16px); scroll-padding-inline: var(--od-rail-pad, 16px); }
  .od-rail::-webkit-scrollbar { display: none; }
  :where(.od-rail) > :where(*) { flex: none; scroll-snap-align: start; }
  :where(.od-rail) > :where(:last-child) { margin-inline-end: var(--od-rail-pad, 16px); }

  .od-spacer { flex: none; visibility: hidden; pointer-events: none; }
  .od-touch  { min-width: 44px; min-height: 44px; }
}
:root [hidden]:where(:not([hidden="until-found" i])) { display: none; }
/* /OD-LAYOUT-PRIMITIVES v1 */

/* ─── fuentes ─────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Archivo Expanded';
  src: url('../fonts/archivo-exp-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Archivo Expanded';
  src: url('../fonts/archivo-exp-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jbmono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jbmono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ─── tokens ──────────────────────────────────────────────────────────── */
:root {
  /* superficies y texto */
  --bg: #f6f9fc;
  --surface: #ffffff;
  --sunken: #eef3f7;
  --ink: #0a131a;
  --fg: #0a131a;
  --muted: #565f65;
  --rule: #d6dcdf;
  --rule-strong: #7d878e;

  /* acento de casa: azul Factor 18 */
  --accent: #3275b4;
  --accent-ink: #134f83;
  --accent-lift: #8fbce6;
  --accent-soft: color-mix(in srgb, var(--accent) 7%, var(--surface));

  /* inversos sobre tinta */
  --inv-text: #f6f9fc;
  --inv-muted: color-mix(in srgb, #ffffff 64%, var(--ink));
  --inv-rule: color-mix(in srgb, #ffffff 20%, var(--ink));

  /* estados */
  --danger: #a01b13;
  --danger-soft: color-mix(in srgb, var(--danger) 8%, var(--surface));
  --ok: #0f6b45;
  --ok-soft: color-mix(in srgb, var(--ok) 8%, var(--surface));

  /* acentos de división */
  --div-nomina: #7961ae;
  --div-nomina-ink: #543e7f;
  --div-nomina-soft: color-mix(in srgb, var(--div-nomina) 8%, var(--surface));
  --div-limpieza: #008284;
  --div-limpieza-ink: #00595a;
  --div-limpieza-soft: color-mix(in srgb, var(--div-limpieza) 8%, var(--surface));

  /* tono activo: la casa por defecto, la división dentro de su página */
  --tone: var(--accent);
  --tone-ink: var(--accent-ink);
  --tone-soft: var(--accent-soft);

  /* tipografía */
  --font-display: 'Archivo Expanded', 'Archivo', system-ui, sans-serif;
  --font-tight: 'Archivo', 'Archivo Expanded', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-display: clamp(2.35rem, 4.2vw, 3.5rem);
  --fs-h1: clamp(2.05rem, 4.3vw, 3.4rem);
  --fs-h2: clamp(1.6rem, 2.85vw, 2.35rem);
  --fs-h3: clamp(1.06rem, 1.45vw, 1.3rem);
  --fs-lead: clamp(1.05rem, 1.3vw, 1.2rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-mono: 0.75rem;

  /* retícula y espacio (múltiplos de 4) */
  --wrap: 1200px;
  --gut: clamp(20px, 3.6vw, 40px);
  --measure: 66ch;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 88px;
  --section: clamp(56px, 7vw, 104px);

  /* radios y movimiento */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 320ms;

  --nav-h: 72px;
  --mbar-h: 64px;
}

[data-tone="nomina"] {
  --tone: var(--div-nomina);
  --tone-ink: var(--div-nomina-ink);
  --tone-soft: var(--div-nomina-soft);
}
[data-tone="limpieza"] {
  --tone: var(--div-limpieza);
  --tone-ink: var(--div-limpieza-ink);
  --tone-soft: var(--div-limpieza-soft);
}
.tone-nomina {
  --tone: var(--div-nomina);
  --tone-ink: var(--div-nomina-ink);
  --tone-soft: var(--div-nomina-soft);
}
.tone-limpieza {
  --tone: var(--div-limpieza);
  --tone-ink: var(--div-limpieza-ink);
  --tone-soft: var(--div-limpieza-soft);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

body[data-tone] { background: var(--bg); }

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

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -0.025em; }

h3 {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

p { text-wrap: pretty; }

a { color: var(--accent-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }

strong, b { font-weight: 600; }

small { font-size: var(--fs-small); }

::selection {
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
  color: var(--fg);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.band :focus-visible,
.footer :focus-visible,
.close-band :focus-visible {
  outline-color: var(--accent-lift);
}

/* ─── utilidades ──────────────────────────────────────────────────────── */
.ico-16 { --od-icon-size: 16px; }
.ico-19 { --od-icon-size: 19px; }
.ico-20 { --od-icon-size: 20px; }
.ico-22 { --od-icon-size: 22px; }

.wrap {
  width: min(var(--wrap), calc(100% - (var(--gut) * 2)));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: var(--s5);
  top: -80px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s4);
  background: var(--ink);
  color: var(--inv-text);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip:focus { top: var(--s3); color: var(--inv-text); }

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
[data-tone] .kicker { color: var(--tone-ink); }
.kicker::before {
  content: "";
  flex: none;
  width: 24px;
  height: 1px;
  background: currentColor;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
}

.muted { color: var(--muted); }

.note {
  max-width: var(--measure);
  border-top: 1px solid var(--rule-strong);
  padding-top: var(--s4);
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.6;
}
.note b { color: var(--fg); }

.section { padding-block: var(--section); }
.section--surface { background: var(--surface); }
.section--line { border-top: 1px solid var(--rule); }
.section--flush { padding-top: 0; }

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--s5) var(--s8);
  align-items: end;
  margin-bottom: clamp(32px, 4.4vw, 56px);
}
.sec-head > div > h2 { margin-top: var(--s4); max-width: 22ch; }
.sec-head .lead { max-width: 44ch; }

/* ─── barra de navegación ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
[data-tone] .nav { background: var(--tone-soft); }

.nav-in {
  display: flex;
  align-items: center;
  gap: var(--s5);
  width: min(var(--wrap), calc(100% - (var(--gut) * 2)));
  margin-inline: auto;
  min-height: var(--nav-h);
}

.brand { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.brand img { display: block; width: auto; height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s5);
  margin-left: auto;
}
.nav-links > a:not(.btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-block: var(--s2);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.nav-links > a:not(.btn):hover { color: var(--tone-ink); border-bottom-color: var(--tone); }
.nav-links > a[aria-current="page"] { border-bottom-color: var(--tone); }

.nav-cta { margin-left: var(--s3); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  color: var(--fg);
  cursor: pointer;
}
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-open { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: inline-block; }

.nav-panel {
  display: none;
  width: min(var(--wrap), calc(100% - (var(--gut) * 2)));
  margin-inline: auto;
  padding-bottom: var(--s4);
  border-top: 1px solid var(--rule);
}
.nav-panel a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
}
.nav-panel a:not(.btn)[aria-current="page"] { color: var(--tone-ink); }
.nav-panel .btn { margin-top: var(--s4); border-bottom: 0; justify-content: center; }

/* ─── botones ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s5);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 0 var(--s4); font-size: 0.9rem; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--surface); }

.btn-tone {
  background: var(--tone);
  border-color: var(--tone);
  color: var(--surface);
}
.btn-tone:hover { background: var(--tone-ink); border-color: var(--tone-ink); color: var(--surface); }

.btn-ghost {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--fg); background: var(--sunken); color: var(--fg); }

.btn-inverse {
  background: var(--inv-text);
  border-color: var(--inv-text);
  color: var(--ink);
}
.btn-inverse:hover { background: var(--accent-lift); border-color: var(--accent-lift); color: var(--ink); }

.btn-outline-inverse {
  background: transparent;
  border-color: var(--inv-rule);
  color: var(--inv-text);
}
.btn-outline-inverse:hover { border-color: var(--inv-text); color: var(--inv-text); background: color-mix(in srgb, var(--surface) 8%, transparent); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.62; cursor: progress; }

/* ─── hero de la home ─────────────────────────────────────────────────── */
.hero { padding-block: clamp(32px, 4.6vw, 64px) var(--section); }

.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(28px, 4vw, 52px);
}
.hero-top p {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-top p b { color: var(--fg); font-weight: 500; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: clamp(28px, 4.6vw, 64px);
  align-items: start;
}

.hero h1 {
  font-size: var(--fs-display);
  margin-block: var(--s5) 0;
  letter-spacing: -0.035em;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent-ink);
}
.hero .lead { margin-top: var(--s5); max-width: 46ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* foto enmarcada, a marco completo */
.foto { margin: 0; }
.foto-frame {
  border: 1px solid var(--rule-strong);
  padding: 6px;
  background: var(--surface);
  border-radius: var(--r-xs);
}
.foto-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1px;
}
.foto-cap {
  margin-top: var(--s3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* mini ficha del hero */
.hero-sheet {
  margin-top: var(--s5);
  border-top: 2px solid var(--ink);
}
.hero-sheet .row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: var(--s3);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule);
}
.hero-sheet dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
.hero-sheet dd { font-size: var(--fs-small); font-weight: 500; }
.hero-sheet dd small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* ─── banda de tinta ──────────────────────────────────────────────────── */
.band {
  background: var(--ink);
  color: var(--inv-text);
}
.band .kicker { color: var(--accent-lift); }
.band .lead { color: var(--inv-muted); }
.band a:not(.btn) { color: var(--inv-text); }
.band a:not(.btn):hover { color: var(--accent-lift); }

/* franja de registro */
.reg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-block: clamp(28px, 3.6vw, 44px);
}
.reg-cell {
  padding-inline: clamp(12px, 2.2vw, 28px);
  border-left: 1px solid var(--inv-rule);
}
.reg-cell:first-child { border-left: 0; padding-left: 0; }
.reg-n {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.reg-n--word { font-size: clamp(1.35rem, 2.3vw, 1.85rem); letter-spacing: -0.01em; padding-top: 0.24em; }
.reg-l {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.45;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--inv-muted);
}

/* ─── díptico de divisiones ───────────────────────────────────────────── */
.doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule-strong);
}
.door {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.2vw, 40px) clamp(20px, 2.8vw, 40px) clamp(24px, 3vw, 36px);
  color: var(--fg);
  text-decoration: none;
  transition: background-color var(--t-base) var(--ease);
}
.door:first-child { padding-left: 0; }
.door:last-child { padding-right: 0; border-left: 1px solid var(--rule); }
.door:hover { background: var(--tone-soft); color: var(--fg); }

.door-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--tone);
}
.door-n {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--tone-ink);
}
.door-name {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tone-ink);
}
.door h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-top: var(--s5);
  max-width: 18ch;
}
.door-list {
  margin-top: var(--s5);
  display: grid;
  gap: var(--s3);
}
.door-list li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: var(--s3);
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.55;
}
.door-list li::before {
  content: "";
  width: 10px;
  height: 1px;
  margin-top: 0.72em;
  background: var(--tone);
}
.door-go {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tone-ink);
}
.door-go .arrow { transition: transform var(--t-base) var(--ease); }
.door:hover .door-go .arrow { transform: translateX(5px); }

/* ─── tesis: un solo patrón ───────────────────────────────────────────── */
.thesis {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.thesis-claim h2 { margin-top: var(--s4); max-width: 16ch; }
.thesis-claim .lead { margin-top: var(--s5); max-width: 38ch; }
.thesis-claim .note { margin-top: var(--s6); }

.ledger { border-top: 2px solid var(--rule-strong); }
.ledger-row {
  display: grid;
  grid-template-columns: minmax(96px, 132px) minmax(0, 1fr);
  gap: var(--s4) var(--s5);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--rule);
}
.ledger-k {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tone-ink);
  padding-top: 3px;
}
.ledger-v p { font-size: var(--fs-small); color: var(--muted); line-height: 1.58; }
.ledger-v p + p { margin-top: var(--s2); }
.ledger-v p:first-child { color: var(--fg); font-size: var(--fs-body); font-weight: 500; }

/* ─── pasos ───────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule-strong);
}
.step {
  padding: var(--s5) clamp(16px, 2vw, 28px) var(--s5) 0;
  border-right: 1px solid var(--rule);
}
.step:last-child { border-right: 0; }
.step-n {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--tone-ink);
}
.step h3 { margin-top: var(--s5); }
.step p:last-child {
  margin-top: var(--s3);
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.58;
}

/* ─── clientes ────────────────────────────────────────────────────────── */
.clients {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2) var(--s4);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule);
}
.clients span {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.clients b {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.clients .dot { color: var(--rule-strong); }

/* ─── cierre ──────────────────────────────────────────────────────────── */
.close-band { padding-block: clamp(48px, 6vw, 88px); }
.close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 4.6vw, 64px);
  align-items: start;
}
.close-grid h2 { max-width: 20ch; }
.close-grid .lead { margin-top: var(--s4); max-width: 40ch; }
.close-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}
.close-channels {
  display: grid;
  border-top: 1px solid var(--inv-rule);
}
.close-channels a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 56px;
  padding-block: var(--s3);
  border-bottom: 1px solid var(--inv-rule);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.close-channels a span:first-child {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--inv-muted);
}
.close-channels a span:last-child { text-align: right; }

/* ─── cabecera de página interior ─────────────────────────────────────── */
.page-hero {
  padding-block: clamp(36px, 4.6vw, 68px) clamp(28px, 3.6vw, 48px);
  border-bottom: 1px solid var(--rule);
}
[data-tone] .page-hero {
  background: var(--tone-soft);
  border-bottom-color: var(--rule);
}
.page-hero h1 { margin-top: var(--s4); max-width: 24ch; }
.page-hero .lead { margin-top: var(--s4); max-width: 52ch; }
.page-hero .hero-meta { border-top: 1px solid var(--rule-strong); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s5);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:hover { color: var(--fg); text-decoration: underline; }
.crumbs span { color: var(--muted); }
.crumbs .sep { color: var(--rule-strong); }

/* ─── hoja de datos (hero de nómina) ──────────────────────────────────── */
.sheet {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--tone);
  border-radius: var(--r-xs);
  padding: var(--s5) clamp(18px, 2.2vw, 28px) var(--s3);
}
.sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tone-ink);
}
.sheet-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: var(--s3) var(--s4);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule);
}
.sheet-row:last-child { border-bottom: 0; }
.sheet-k {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}
.sheet-v {
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.4;
}
.sheet-v small {
  display: block;
  margin-top: 3px;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
}

/* ─── parte de turno (hero de limpieza) ───────────────────────────────── */
.turno {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--tone);
  border-radius: var(--r-xs);
  padding: var(--s5) clamp(18px, 2.2vw, 28px);
}
.turno-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tone-ink);
}
.turno-time {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.2vw, 4.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  margin-top: var(--s4);
  font-variant-numeric: tabular-nums;
}
.turno-label {
  margin-top: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.turno-rows {
  margin-top: var(--s5);
  border-top: 1px solid var(--rule-strong);
}
.turno-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule);
  font-size: var(--fs-small);
}
.turno-row b { font-weight: 500; }
.turno-row span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tone-ink);
}
.turno-foot {
  margin-top: var(--s4);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── riesgo (art. 992) ───────────────────────────────────────────────── */
.risk { padding-block: clamp(48px, 5.6vw, 80px); }
.risk-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.risk-code {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 4.2rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.04em;
}
.risk-code small {
  display: block;
  margin-top: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--inv-muted);
}
.risk-points p {
  font-size: var(--fs-body);
  line-height: 1.62;
  color: var(--inv-muted);
  max-width: 56ch;
}
.risk-points p + p { margin-top: var(--s4); }
.risk-points p:first-child { color: var(--inv-text); }
.risk-points b { color: var(--inv-text); font-weight: 600; }

/* ─── modalidades ─────────────────────────────────────────────────────── */
.mods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 36px);
}
.mod { border-top: 1px solid var(--rule-strong); padding-top: var(--s4); }
.mod-n {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--tone-ink);
}
.mod h3 { margin-top: var(--s4); }
.mod p {
  margin-top: var(--s3);
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.58;
}
.mod .for {
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}
.mod .for b {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tone-ink);
}

/* ─── factores de costo ───────────────────────────────────────────────── */
.factors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  border-top: 2px solid var(--rule-strong);
}
.factor {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--s4);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--rule);
}
.factor .n {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--tone-ink);
  padding-top: 4px;
}
.factor p {
  margin-top: var(--s2);
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.58;
}

/* ─── tabla de sectores ───────────────────────────────────────────────── */
.table-wrap { border-top: 2px solid var(--rule-strong); }
.sector-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.sector-table th {
  padding: var(--s3) var(--s4) var(--s3) 0;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.sector-table td {
  padding: var(--s4) var(--s4) var(--s4) 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--fs-small);
  vertical-align: top;
}
.sector-table td:last-child, .sector-table th:last-child { padding-right: 0; }
.sector-table .k { font-weight: 500; color: var(--fg); }
.sector-table .t {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--tone-ink);
  white-space: nowrap;
}

/* ─── cumplimiento ────────────────────────────────────────────────────── */
.stacks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  border-top: 2px solid var(--rule-strong);
}
.stack {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: var(--s4);
  padding-block: var(--s4);
  border-bottom: 1px solid var(--rule);
}
.stack dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--tone-ink);
  padding-top: 2px;
}
.stack dd { font-size: var(--fs-small); color: var(--muted); line-height: 1.55; }
.stack dd a { display: inline-flex; align-items: center; min-height: 44px; }

/* ─── qué incluye ─────────────────────────────────────────────────────── */
.includes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  border-top: 2px solid var(--rule-strong);
}
.include {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--s4);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--rule);
}
.include .n {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--tone-ink);
  padding-top: 4px;
}
.include b { display: block; font-weight: 500; font-size: var(--fs-body); }
.include p { margin-top: var(--s2); font-size: var(--fs-small); color: var(--muted); line-height: 1.58; }

/* ─── seis sectores ───────────────────────────────────────────────────── */
.sectors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid var(--rule-strong);
}
.sector {
  padding: var(--s5) clamp(16px, 2.4vw, 32px);
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.sector:nth-child(3n) { border-right: 0; padding-right: 0; }
.sector:nth-child(3n + 1) { padding-left: 0; }
.sector h3 { font-size: 1.05rem; }
.sector p { margin-top: var(--s2); font-size: var(--fs-small); color: var(--muted); line-height: 1.55; }

/* ─── levantamiento ───────────────────────────────────────────────────── */
.measure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
  border-top: 2px solid var(--rule-strong);
  padding-top: var(--s5);
}
.measure-col h3 { font-size: 1rem; }
.measure-col ul { margin-top: var(--s4); display: grid; gap: 0; }
.measure-col li {
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule);
  font-size: var(--fs-small);
  color: var(--muted);
}
.measure-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding-top: var(--s5);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--tone-ink);
}

/* ─── cifras ──────────────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--rule-strong);
}
.stat { padding: var(--s5) clamp(16px, 2.4vw, 36px); border-right: 1px solid var(--rule); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; padding-right: 0; }
.stat-n {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}
.stat-n--word { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.01em; padding-top: 0.3em; }
.stat-l {
  margin-top: var(--s2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── preguntas frecuentes ────────────────────────────────────────────── */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(24px, 4.6vw, 64px);
  align-items: start;
}
.faq-layout > div > h2 { margin-top: var(--s4); max-width: 16ch; }
.faq-layout .lead { margin-top: var(--s4); }

.faq { border-top: 2px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: var(--s4);
  min-height: 60px;
  padding-block: var(--s4);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--tone-ink); }
.faq .plus {
  position: relative;
  width: 14px;
  height: 14px;
  justify-self: end;
}
.faq .plus::before,
.faq .plus::after {
  content: "";
  position: absolute;
  background: var(--tone-ink);
  transition: transform var(--t-base) var(--ease);
}
.faq .plus::before { top: 6px; left: 0; width: 14px; height: 1.5px; }
.faq .plus::after { top: 0; left: 6px; width: 1.5px; height: 14px; }
.faq details[open] .plus::after { transform: scaleY(0); }
.faq .a { padding-bottom: var(--s5); max-width: 62ch; }
.faq .a p { font-size: var(--fs-small); color: var(--muted); line-height: 1.6; }

/* ─── contacto y canales ──────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(28px, 4.6vw, 64px);
  align-items: start;
}

.channels { border-top: 1px solid var(--rule-strong); }
.channel {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: var(--s4);
  min-height: 64px;
  padding-block: var(--s4);
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
  text-decoration: none;
}
a.channel:hover { color: var(--fg); background: var(--tone-soft); }
.channel svg { color: var(--tone-ink); margin-top: 2px; }
.channel b {
  display: block;
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.channel small {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.channels-note {
  margin-top: var(--s5);
  border-top: 1px solid var(--rule-strong);
  padding-top: var(--s4);
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--muted);
}
.channels-note b { color: var(--fg); font-weight: 600; }

/* ─── formulario ──────────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--tone);
  border-radius: var(--r-xs);
  padding: clamp(20px, 2.8vw, 32px);
}
.form-card h2, .form-card h3 { font-size: 1.25rem; font-family: var(--font-tight); letter-spacing: -0.01em; }
.form-note {
  margin-top: var(--s2);
  margin-bottom: var(--s5);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4);
}
.field { display: grid; gap: var(--s2); }
.field > label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.input, .select {
  width: 100%;
  min-height: 48px;
  padding: 10px var(--s3);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-xs);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input:hover, .select:hover { border-color: var(--muted); }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}
.input:user-invalid, .select:user-invalid {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.select-wrap { position: relative; }
.select { appearance: none; padding-right: var(--s7); cursor: pointer; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  top: calc(50% - 3px);
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.form-foot { margin-top: var(--s5); }
.form-msg {
  min-height: 0;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--danger);
}
.form-msg:empty { display: none; }
.form-msg:not(:empty) {
  margin-bottom: var(--s4);
  padding: var(--s3) var(--s4);
  background: var(--danger-soft);
  border-left: 0;
  border-top: 1px solid var(--danger);
}
.form-legal {
  margin-top: var(--s4);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.form-ok {
  padding: var(--s5);
  background: var(--ok-soft);
  border-top: 3px solid var(--ok);
}
.form-ok .kicker { color: var(--ok); }
.form-ok h3 { margin-top: var(--s3); font-family: var(--font-tight); font-size: 1.3rem; }
.form-ok p:last-child { margin-top: var(--s3); font-size: var(--fs-small); color: var(--muted); line-height: 1.6; }

/* ─── la otra división ────────────────────────────────────────────────── */
.other { padding-block: clamp(40px, 5vw, 64px); background: var(--surface); border-top: 1px solid var(--rule); }
.other-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--s4) var(--s6);
  padding-top: var(--s5);
  border-top: 2px solid var(--tone);
  color: var(--fg);
  text-decoration: none;
}
.other-card:hover { color: var(--fg); }
.other-name {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tone-ink);
}
.other-card h2 {
  grid-column: 1;
  margin-top: var(--s3);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  max-width: 22ch;
}
.other-card p {
  grid-column: 1;
  margin-top: var(--s3);
  font-size: var(--fs-small);
  color: var(--muted);
  max-width: 56ch;
}
.other-go {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tone-ink);
}
.other-card .arrow { transition: transform var(--t-base) var(--ease); }
.other-card:hover .other-go .arrow { transform: translateX(5px); }

/* ─── pie ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: var(--inv-text);
  padding-block: clamp(40px, 5vw, 64px) var(--s5);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px);
}
.footer .brand img { height: 28px; }
.footer p {
  margin-top: var(--s4);
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--inv-muted);
  max-width: 34ch;
}
.foot-addr {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.foot-h {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--inv-muted);
}
.footer ul { margin-top: var(--s3); }
.footer li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-small);
  color: var(--inv-text);
  text-decoration: none;
}
.footer li a:hover { text-decoration: underline; }
.foot-sub { color: var(--inv-muted); }

.sello {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s4);
  padding: 8px var(--s3);
  border: 1px solid var(--inv-rule);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--inv-text);
}
.sello svg { color: var(--accent-lift); }

.foot-data { margin-top: var(--s3); display: grid; }
.foot-data a, .foot-data span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-small);
  color: var(--inv-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.foot-data span { color: var(--inv-muted); min-height: 32px; }
.foot-data a:hover { text-decoration: underline; }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3) var(--s5);
  margin-top: clamp(28px, 3.4vw, 44px);
  padding-top: var(--s4);
  border-top: 1px solid var(--inv-rule);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--inv-muted);
}
.foot-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--inv-text);
  text-decoration: none;
}
.foot-bottom a:hover { text-decoration: underline; }

/* ─── barra móvil ─────────────────────────────────────────────────────── */
.mbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: var(--surface);
  border-top: 1px solid var(--rule-strong);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--mbar-h);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.mbar .wa { background: var(--tone); color: var(--surface); }
.mbar .wa:hover { color: var(--surface); background: var(--tone-ink); }
.mbar .tel { color: var(--fg); }
.mbar .tel:hover { color: var(--fg); background: var(--sunken); }

/* ─── aviso de almacenamiento local ───────────────────────────────────── */
.cookies {
  position: fixed;
  left: var(--gut);
  bottom: var(--s5);
  z-index: 50;
  width: min(380px, calc(100% - (var(--gut) * 2)));
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--ink) 14%, transparent);
}
.cookies p { font-size: 0.8125rem; line-height: 1.55; color: var(--muted); }
.cookies p a { color: var(--accent-ink); }
.cookies-act { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.cookies-act .btn { flex: 1 1 auto; min-height: 44px; font-size: 0.875rem; }

/* ─── kit de artículo y listado (blog.html y artículos) ───────────────── */
.article { padding-block: clamp(32px, 4vw, 56px) var(--section); }
.article-head h1 { max-width: 26ch; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  margin-top: var(--s4);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-head .lead { margin-top: var(--s5); max-width: 52ch; }
.article-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 15rem);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  margin-top: clamp(28px, 3.6vw, 48px);
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--rule);
}
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--s4); }
.prose h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  margin-top: var(--s7);
  letter-spacing: -0.02em;
}
.prose h3 { margin-top: var(--s6); font-size: 1.14rem; }
.prose p, .prose li { font-size: 1.02rem; line-height: 1.68; color: var(--muted); }
.prose b, .prose strong { color: var(--fg); }
.prose ul, .prose ol { padding-left: var(--s5); }
.prose ul li { list-style: none; position: relative; padding-left: var(--s4); }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 8px;
  height: 1px;
  background: var(--tone);
}
.prose ol { list-style: decimal; }
.prose ol li::marker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--tone-ink);
}
.prose blockquote {
  border-top: 2px solid var(--tone);
  padding-top: var(--s4);
  font-family: var(--font-tight);
  font-size: 1.22rem;
  line-height: 1.45;
  color: var(--fg);
}
.prose figure { margin-block: var(--s6); }
.prose figcaption, .figcap {
  margin-top: var(--s3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--muted);
}
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.prose th, .prose td { padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--rule); text-align: left; }
.prose th {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--sunken);
  padding: 2px 5px;
  border-radius: var(--r-xs);
}

.toc {
  position: sticky;
  top: calc(var(--nav-h) + var(--s5));
  border-top: 2px solid var(--rule-strong);
  padding-top: var(--s3);
}
.toc h2 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol { margin-top: var(--s2); }
.toc a {
  display: block;
  padding-block: var(--s2);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
  text-decoration: none;
}
.toc a:hover { color: var(--tone-ink); text-decoration: underline; }

.callout {
  background: var(--tone-soft);
  padding: var(--s4) var(--s5);
  border-top: 2px solid var(--tone);
}
.callout p { font-size: var(--fs-small); color: var(--fg); }

.post-list { border-top: 2px solid var(--rule-strong); }
.post-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 128px;
  gap: var(--s4) var(--s5);
  align-items: baseline;
  min-height: 64px;
  padding-block: var(--s4);
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
  text-decoration: none;
}
.post-row:hover { color: var(--fg); background: var(--tone-soft); }
.post-date {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.post-title { display: block; font-family: var(--font-tight); font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.post-dek { display: block; margin-top: var(--s2); font-size: var(--fs-small); line-height: 1.55; color: var(--muted); }
.post-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  justify-self: end;
  text-align: right;
}

/* ─── revelado ────────────────────────────────────────────────────────── */
.reveal {
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(10px);
}
html.no-js .reveal { opacity: 1; transform: none; }

/* ─── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-panel:not([hidden]) { display: block; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { max-width: 34rem; }
  .sec-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .sec-head .lead { max-width: 52ch; }
  .doors { grid-template-columns: minmax(0, 1fr); }
  .door:first-child { padding-inline: 0; }
  .door:last-child {
    padding-inline: 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .thesis { grid-template-columns: minmax(0, 1fr); }
  .thesis-claim h2 { max-width: 22ch; }
  .close-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2n) { border-right: 0; padding-right: 0; }
  .step:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .mods { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sector:nth-child(3n) { border-right: 1px solid var(--rule); padding-right: clamp(16px, 2.4vw, 32px); }
  .sector:nth-child(3n + 1) { padding-left: clamp(16px, 2.4vw, 32px); }
  .sector:nth-child(2n) { border-right: 0; padding-right: 0; }
  .sector:nth-child(2n + 1) { padding-left: 0; }
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .risk-grid { grid-template-columns: minmax(0, 1fr); }
  .risk-code { font-size: clamp(2.4rem, 7vw, 3.4rem); }
  .article-body { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .other-card { grid-template-columns: minmax(0, 1fr); }
  .other-go { grid-column: 1; grid-row: auto; }
  .measure { grid-template-columns: minmax(0, 1fr); }
  .measure-arrow { padding: 0; justify-content: flex-start; }
  .measure-arrow::before { content: ""; }
}

@media (max-width: 900px) {
  body { padding-bottom: calc(var(--mbar-h) + env(safe-area-inset-bottom, 0)); }
  .mbar { display: grid; grid-template-columns: 1fr 1fr; }
  .cookies { bottom: calc(var(--mbar-h) + var(--s4) + env(safe-area-inset-bottom, 0)); }
}

@media (max-width: 760px) {
  :root { --nav-h: 64px; }
  .reg { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s5); }
  .reg-cell { border-left: 0; padding-inline: 0; }
  .reg-cell:nth-child(even) { padding-left: var(--s4); border-left: 1px solid var(--inv-rule); }
  .factors { grid-template-columns: minmax(0, 1fr); }
  .stacks { grid-template-columns: minmax(0, 1fr); }
  .includes { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat { padding-inline: 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .stat:last-child { border-bottom: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .sheet-row { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .hero-sheet .row { grid-template-columns: 72px minmax(0, 1fr); }
  .ledger-row { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .post-row { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .post-meta { justify-self: start; text-align: left; }
  .table-wrap { border-top: 1px solid var(--rule-strong); }
  .sector-table thead { display: none; }
  .sector-table, .sector-table tbody, .sector-table tr,
  .sector-table th, .sector-table td { display: block; width: 100%; }
  .sector-table tr {
    padding-block: var(--s4);
    border-bottom: 1px solid var(--rule);
  }
  .sector-table th.k {
    padding: 0 0 var(--s2);
    border: 0;
    font-size: 1.02rem;
    font-weight: 600;
    white-space: normal;
  }
  .sector-table td {
    padding: 2px 0;
    border: 0;
    display: flex;
    gap: var(--s4);
    justify-content: space-between;
  }
  .sector-table td::before {
    content: attr(data-l);
    flex: none;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 3px;
  }
  .sector-table td.t { white-space: normal; }
}

@media (max-width: 560px) {
  .hero-actions .btn, .close-actions .btn { width: 100%; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { border-right: 0; padding-right: 0; }
  .step + .step { border-top: 1px solid var(--rule); }
  .sectors { grid-template-columns: minmax(0, 1fr); }
  .sector, .sector:nth-child(3n), .sector:nth-child(2n) {
    padding-inline: 0;
    border-right: 0;
  }
  .factor { grid-template-columns: 32px minmax(0, 1fr); gap: var(--s3); }
  .include { grid-template-columns: 32px minmax(0, 1fr); gap: var(--s3); }
  .stack { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
  .sheet-row, .hero-sheet .row { grid-template-columns: minmax(0, 1fr); }
  .post-row { padding-block: var(--s4); }
  .cookies-act .btn { width: 100%; }
}

/* ─── movimiento reducido ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal:not(.is-in) { opacity: 1; transform: none; }
  .door:hover .door-go .arrow, .other-card:hover .other-go .arrow { transform: none; }
}

/* ─── WhatsApp flotante (solo escritorio; en móvil ya está .mbar) ───────── */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(10, 19, 26, 0.26);
  transition: transform 200ms cubic-bezier(.22,.61,.36,1), background-color 200ms;
}
.wa-float:hover { transform: translateY(-2px); background: var(--accent-ink); }
.wa-float:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
.wa-float svg { width: 24px; height: 24px; flex: none; }
.wa-float span { white-space: nowrap; }
@media (max-width: 900px) { .wa-float { display: none; } }
@media (prefers-reduced-motion: reduce) { .wa-float { transition: none; } }
