/* mktn.es · Índice de casos (dirección A de Claude Design: mosaico de tamaños variables)
   Rejilla de 12 columnas. Las cinco tarjetas con peso (.k-f: 01, 02, 03, 15, 19) llevan el tono oscuro del par de color de su
   proyecto como fondo (variables --kbg, --kink, --kcat, --ksv, --kul, --khb en cada <li>); las otras 14 son neutras.
   Sin degradados ni sombras. Tarjetas con peso verticales (01, 02) u horizontales (03, 15, 19); neutras verticales (desde 1024 px) o fila con miniatura (móvil y tableta). Generado por tools/indice-casos.py. Márgenes y ancho como el resto del v2. */

.ci { --px: 20px; background: #F4F3EF; color: #161616; font-size: 16px; line-height: 1.5; }
.ci ul { list-style: none; margin: 0; padding: 0; }

/* ── Hero ────────────────────────────────────────────────── */
.ci-hero { padding: 0 var(--px); }
.ci-hero-in { max-width: 1312px; margin: 0 auto; padding: 128px 0 40px; display: flex; flex-direction: column; gap: 20px; }
.ci-hero-l { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ci-eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #5E5D58; }
.ci-hero h1 { margin: 0; font-size: 46px; line-height: .92; font-weight: 600; letter-spacing: -.05em; text-wrap: balance; }
.ci-hero h1 span { display: block; }
.ci-lead { margin: 0; font-size: 17px; line-height: 1.45; max-width: 30em; text-wrap: pretty; }

/* ── Lista: móvil, una columna ───────────────────────────── */
.ci-list { padding: 0 var(--px) 72px; }
.ci-list ul { max-width: 1312px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.k { display: flex; min-width: 0; }
.k a {
  display: grid; width: 100%; box-sizing: border-box; text-decoration: none; color: #161616; background: transparent;
  grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: 'img cat' 'img name' 'frase frase' 'stat stat' 'link link';
  grid-template-rows: auto 1fr auto auto auto; column-gap: 16px; row-gap: 8px; padding: 16px; background: #E9E7E1; border: 1px solid #D8D6CF; border-radius: 6px;
  transition: background-color .15s, color .15s;
}
.k a:hover { background: #DDDBD3; border-color: #BDBAB1; }
.k a:hover .k-t { text-decoration-thickness: 3px; }
.k a:hover .k-link::after { transform: translateX(4px); }
.k a:focus-visible { outline: 2px solid #161616; outline-offset: 4px; }
.k img { box-sizing: border-box; grid-area: img; display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 4px; background: #E9E7E1; align-self: start; }
.k:not(.k-f) img { border: 1px solid #D8D6CF; }
.k-cat { grid-area: cat; margin: 0; font-size: 12px; line-height: 1.35; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5E5D58; }
.k-name { grid-area: name; margin: 0; font-size: 20px; line-height: 1.08; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.k-sub { font-weight: 500; font-size: .62em; letter-spacing: -.01em; }
.k-fr { grid-area: frase; margin: 0; font-size: 15px; line-height: 1.5; color: #3E3D3A; text-wrap: pretty; max-width: 36em; }
.k-stat { grid-area: stat; margin: 10px 0 0; display: flex; flex-direction: row; align-items: baseline; gap: 12px; }
.k-stat strong { font-size: 32px; line-height: 1; font-weight: 600; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-stat span { font-size: 15px; line-height: 1.4; color: #5E5D58; text-wrap: pretty; }
.k-link { grid-area: link; justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: none; }
.k-t { text-decoration: underline; text-decoration-color: #1F3A30; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.k-link::after { content: "→" / ""; margin-left: 8px; display: inline-block; transition: transform .15s; }

/* tarjetas con peso (móvil: panel vertical de color) */
.k-f { margin: 8px 0; }
.k-f a {
  background: var(--kbg); color: var(--kink); border-color: var(--kbg); padding: 24px; row-gap: 10px;
  grid-template-columns: minmax(0, 1fr); grid-template-areas: 'img' 'cat' 'name' 'frase' 'stat' 'link'; grid-template-rows: auto auto auto 1fr auto auto;
}
.k-f a:hover { color: var(--kink); background: var(--khb); border-color: var(--khb); outline: 2px solid var(--kul); outline-offset: -2px; }
.k-f a:focus-visible { outline-color: #161616; }
.k-f img { border-radius: 6px; margin-bottom: 12px; }
.k-f .k-cat { font-size: 13px; color: var(--kcat); }
.k-f .k-name { font-size: 30px; line-height: 1.08; }
.k-f .k-fr { font-size: 16px; color: var(--kink); }
.k-f .k-stat { margin-top: 20px; flex-direction: column; gap: 6px; }
.k-f .k-stat strong { font-size: 60px; color: var(--ksv); }
.k-f .k-stat span { font-size: 16px; color: var(--kink); }
.k-f .k-link { font-size: 16px; }
.k-f .k-t { text-decoration-color: var(--kul); }
.k-f.k-f a:focus-visible { outline-color: var(--kink); }

/* ── Cierre (texto, enlaces y botones de la página real) ──── */
.ci-cta { background: #111111; color: #ECEAE4; padding: 72px var(--px) 80px; }
.ci-cta-in { max-width: 1312px; margin: 0 auto; display: flex; flex-direction: column; gap: 36px; }
.ci-cta h2 { margin: 0; font-size: 46px; line-height: .95; font-weight: 600; letter-spacing: -.05em; text-wrap: balance; max-width: 7em; }
.ci-cta h2 em { font-style: normal; color: #D7EDE8; }
.ci-cta-r { display: flex; flex-direction: column; gap: 28px; max-width: 34em; }
.ci-cta-r p { margin: 0; font-size: 18px; line-height: 1.55; color: #B9B6AE; text-wrap: pretty; }
.ci-cta-r p a { color: #ECEAE4; text-decoration: underline; text-decoration-color: #F8E5AB; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ci-cta-act { display: flex; flex-wrap: wrap; gap: 12px; }
.ci-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: var(--r-btn); background: #ECEAE4; color: #111111; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid #ECEAE4; }
.ci-btn.ghost { background: transparent; color: #ECEAE4; border-color: #6B6963; }
.ci-btn:hover { background: #F8E5AB; border-color: #F8E5AB; color: #111111; }
.ci-btn:focus-visible, .ci-cta a:focus-visible { outline: 2px solid #F8E5AB; outline-offset: 3px; }

/* ── Tableta ancha: imagen a la izquierda en las tarjetas con peso ── */
@media (min-width: 640px) {
  .ci-hero h1 { font-size: 72px; }
  .ci-lead { font-size: 18px; }
  .ci-cta h2 { font-size: 64px; }
  .k-f a {
    padding: 32px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 32px; row-gap: 12px;
    grid-template-areas: 'img cat' 'img name' 'img frase' 'img stat' 'img link'; grid-template-rows: auto auto auto 1fr auto;
  }
  .k-f img { margin-bottom: 0; }
  .k-f .k-name { font-size: 32px; }
}

/* ── Escritorio medio (1024): rejilla de 12 columnas ─────── */
@media (min-width: 1024px) {
  .ci { --px: 64px; }
  .ci-hero-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: end; padding: 160px 0 72px; }
  .ci-hero h1 { font-size: 80px; }
  .ci-lead { font-size: 19px; }
  .ci-list { padding-bottom: 120px; }
  .ci-list ul { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px 20px; border-bottom: 0; }
  .k { grid-column: span 6; }
  .k:is(.k-08, .k-09, .k-10, .k-16, .k-17, .k-18) { grid-column: span 4; }
  .k:is(.k-01, .k-15, .k-19) { grid-column: span 12; }
  /* neutras: vertical, sin miniatura lateral */
  .k:not(.k-f) a { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'img' 'cat' 'name' 'frase' 'stat' 'link'; grid-template-rows: auto auto auto 1fr auto auto; row-gap: 10px; padding: 0 0 8px; overflow: hidden; }
  .k:not(.k-f) img { border-radius: 0; border-width: 0 0 1px; margin-bottom: 6px; }
  .k:not(.k-f) :is(.k-cat, .k-name, .k-fr, .k-stat, .k-link) { margin-left: 16px; margin-right: 16px; }
  .k:not(.k-f) .k-cat { font-size: 13px; }
  .k:not(.k-f) .k-name { font-size: 21px; }
  .k:not(.k-f) .k-fr { font-size: 16px; }
  .k:not(.k-f) .k-stat { flex-direction: column; gap: 6px; margin-top: 10px; }
  .k:not(.k-f) .k-stat strong { font-size: 44px; }
  /* con peso */
  .k-f { margin: 0; }
  .k:not(.k-f) .k-link { margin-bottom: 0; }
  .k-f a { padding: 32px; }
  .k-f .k-fr { font-size: 18px; }
  .k-f .k-stat strong { font-size: 72px; }
  .k:is(.k-01, .k-15, .k-19) a { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .k:is(.k-01, .k-15, .k-19) .k-name { font-size: 40px; }
  .k:is(.k-02, .k-03) a { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'img' 'cat' 'name' 'frase' 'stat' 'link'; grid-template-rows: auto auto auto 1fr auto auto; row-gap: 10px; }
  .k:is(.k-02, .k-03) img { margin-bottom: 12px; }
  .k:is(.k-02, .k-03) .k-name { font-size: 32px; }
  .ci-cta { padding: 96px var(--px) 104px; }
  .ci-cta-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: end; }
  .ci-cta h2 { font-size: 72px; }
}

/* ── Escritorio grande (1280 y más) ──────────────────────── */
@media (min-width: 1280px) {
  .ci-hero-in { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); padding: 160px 0 88px; }
  .ci-hero h1 { font-size: 104px; }
  .ci-lead { font-size: 20px; }
  .ci-list ul { gap: 56px 24px; }
  .k { grid-column: span 3; }
  .k:is(.k-08, .k-09, .k-10, .k-16, .k-17, .k-18) { grid-column: span 4; }
  .k:is(.k-03, .k-19) { grid-column: span 12; }
  .k.k-01 { grid-column: span 7; }
  .k.k-02 { grid-column: span 5; }
  .k:not(.k-f) .k-name { font-size: 22px; }
  .k:not(.k-f) .k-stat strong { font-size: 40px; }
  .k-f a { padding: 40px; }
  .k-f .k-stat strong { font-size: 96px; }
  .k:is(.k-03, .k-15, .k-19) a { column-gap: 48px; }
  .k:is(.k-03, .k-19) .k-name { font-size: 52px; }
  .k.k-15 .k-name { font-size: 52px; }
  .k-01 a, .k-02 a { padding: 40px; }
  .k.k-03 a { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: 'img cat' 'img name' 'img frase' 'img stat' 'img link'; grid-template-rows: auto auto auto 1fr auto; column-gap: 48px; row-gap: 12px; }
  .k.k-03 img { margin-bottom: 0; }
  .k.k-01 a, .k.k-02 a { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'img' 'cat' 'name' 'frase' 'stat' 'link'; grid-template-rows: auto auto auto 1fr auto auto; row-gap: 10px; }
  .k.k-01 img, .k.k-02 img { margin-bottom: 12px; }
  .k.k-01 .k-name { font-size: 44px; }
  .k.k-02 .k-name { font-size: 36px; }
  .ci-cta h2 { font-size: 92px; }
}

@media (prefers-reduced-motion: reduce) { .k a { transition: none; } }
