/* PüLU · landing (MitaLabs). Tokens de docs/design_system.md §3–§6 (los mismos que pulu_ui::tema y PuluLicencias):
   un tema oscuro, acento turquesa petróleo + ámbar, trazos de 1 px, radios 2 (controles) y 3 (paneles), retícula de 4 px,
   Inter (UI) + IBM Plex Mono (valores). Sin degradados, glow, partículas ni animaciones permanentes. Móvil primero.
   Estructura (2026-10-12): columna de notas fechadas en orden descendente (la nueva arriba) + carrusel de láminas. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fuentes/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fuentes/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fuentes/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fuentes/IBMPlexMono-Regular.woff2") format("woff2"); }

:root {
  --bg: #0c0f14; --surface: #12161d; --surface-raised: #191f28; --surface-sunken: #090b0f;
  --border: #252c37; --border-strong: #3a4454; --grid: #1c222c;
  --text: #e7eaef; --text-2: #939cab; --text-3: #5d6675;
  --accent: #35a89f; --accent-strong: #6fd3ca; --accent-dim: rgb(53 168 159 / 18%);
  --amber: #d29922;
  --font-ui: "Inter", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --radio-ctl: 2px; --radio-panel: 3px; --trazo: 1px;
  --cabecera-h: 56px; --ancho: 1200px; --margen: var(--s5);
  --lamina-max: min(76vh, 760px);           /* alto máximo de una lámina 4:5 en pantallas anchas */
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100%; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: var(--trazo) solid var(--accent); outline-offset: 3px; }
h1, h2, p, dl, dd, ul, figure { margin: 0; }
b { font-weight: 600; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.etiqueta { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
/* Indicador de marca: pequeño, mismo color que el texto, sin alterar el interlineado ni la grafía «PüLU»; fuera del nombre
   accesible (aria-hidden) porque la nota legal del pie ya lo explica. ™ y no ®: solicitudes en trámite ante INAPI. */
.tm { font-size: max(9px, 0.55em); font-weight: 400; line-height: 0; vertical-align: baseline; position: relative; top: -0.6em; margin-left: 0.1em; color: inherit; letter-spacing: 0; }
.sep { display: inline-block; width: 1px; height: 12px; background: var(--border-strong); vertical-align: -1px; margin: 0 var(--s2); }
.in { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 var(--margen); }
.visualmente-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- cabecera --- */
.cabecera { height: var(--cabecera-h); border-bottom: var(--trazo) solid var(--border); background: var(--bg); }
.cabecera .in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.marca { display: inline-flex; align-items: center; gap: var(--s3); color: var(--text); }
.marca:hover { text-decoration: none; }
.marca .kultrun { color: var(--accent); flex: none; }
.marca .nombre { font-size: 17px; letter-spacing: 0.005em; line-height: 1; }
.marca .sinusoide { color: var(--text-3); display: none; }
@media (min-width: 480px) { .marca .sinusoide { display: block; } }
/* .nav y .btn: sin uso desde el 2026-10-12 (el botón «Registro» de la cabecera está oculto); se conservan para reabrir el acceso. */
.nav { display: flex; align-items: center; gap: var(--s2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 32px; padding: 0 var(--s4);
  background: var(--surface-raised); color: var(--text); border: var(--trazo) solid var(--border-strong); border-radius: var(--radio-ctl);
  font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--text-2); text-decoration: none; }
.btn.primario { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-dim); }
.btn.primario:hover { border-color: var(--accent-strong); }

/* --- contenido: notas + carrusel --- */
main { flex: 1; }
.contenido { display: grid; grid-template-areas: "notas" "carrusel"; gap: var(--s7); padding-top: var(--s6); padding-bottom: var(--s7); align-content: start; }
.notas { grid-area: notas; display: grid; gap: var(--s6); max-width: 560px; }
.carrusel { grid-area: carrusel; }

/* Nota fechada: cabecera (etiqueta + fecha en mono, --text-3, sin iconos), titular, lámina opcional, texto. Las notas se separan con un trazo. */
.nota { display: grid; gap: var(--s4); }
.nota + .nota { padding-top: var(--s6); border-top: var(--trazo) solid var(--border); }
.nota-cab { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin-bottom: calc(-1 * var(--s1)); line-height: 1.4; }
.nota-cab .sep { height: 10px; }
.fecha { font-size: 11px; letter-spacing: 0.04em; color: var(--text-3); white-space: nowrap; }
h1 { font-size: clamp(27px, 5.5vw, 42px); font-weight: 500; line-height: 1.15; letter-spacing: -0.012em; text-wrap: balance; }
.nota h2 { font-size: clamp(27px, 5.5vw, 42px); font-weight: 500; line-height: 1.15; letter-spacing: -0.012em; text-wrap: balance; }
.para-quien { color: var(--text-2); font-size: 16px; max-width: 46ch; }
.productos { display: grid; margin-top: var(--s2); border-top: var(--trazo) solid var(--border); }
.producto { display: grid; gap: var(--s1); padding: var(--s3) 0; border-bottom: var(--trazo) solid var(--border); }
.producto dt { font-size: 15px; color: var(--text); }
.producto dd { color: var(--text-2); font-size: 14px; max-width: 52ch; }
@media (min-width: 560px) {
  .producto { grid-template-columns: 124px 1fr; gap: var(--s4); align-items: baseline; }
}
.tuwun { display: flex; align-items: flex-start; gap: var(--s2); color: var(--text-2); font-size: 13px; line-height: 1.45; }
.tuwun .kultrun { color: var(--amber); flex: none; margin-top: 2px; }
.tuwun .mono { color: var(--text); }
.acceso { font-size: 14px; }
.acceso a { display: inline-flex; align-items: center; gap: var(--s2); }

/* Nota «Primer círculo · cierre» (2026-10-12): el texto literal del cierre en tres pasos de presencia, como en la lámina: --text,
   --text-2 para los errores, --accent-strong para la frase que mira adelante («se vienen cositas» en IBM Plex Mono entre comillas
   latinas) y --text-3 para la línea seca. Sin imagen propia: la lámina 4:5 abre el carrusel al lado (el fundador quitó la historia 9:16
   el 12/10 por redundante). `.nota-lamina` queda para notas futuras que lleven una pieza (patrón comentado en index.html). */
.nota-lamina { width: 100%; max-width: calc(var(--lamina-max) * 0.8); margin-top: var(--s2); }
.nota-lamina img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; background: var(--surface); border: var(--trazo) solid var(--border); border-radius: var(--radio-panel); }
.nota-texto { display: grid; gap: var(--s3); }
.nota-texto p { font-size: 16px; max-width: 46ch; }
.nota-texto .secundario { font-size: 15px; color: var(--text-2); }
.nota-texto .frase { margin-top: var(--s2); font-size: 18px; color: var(--accent-strong); }
.nota-texto .frase .mono { font-size: 0.92em; }
.nota-texto .seca { margin-top: calc(-1 * var(--s2)); font-size: 13px; color: var(--text-3); }
/* «Una nota al margen» (segunda lámina del cierre, la 02b, última del carrusel): mismo texto literal, un escalón por debajo del titular.
   El titular es la frase ajena citada: IBM Plex Mono 400 (único peso embebido) entre comillas latinas, como en la lámina. */
.nota-margen { display: grid; gap: var(--s3); margin-top: var(--s4); }
.nota-margen .etiqueta { margin-bottom: calc(-1 * var(--s1)); }
.nota-margen h3 { margin: 0; font-size: clamp(20px, 3.4vw, 26px); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.nota-margen h3.mono { font-size: clamp(18px, 3vw, 23px); font-weight: 400; letter-spacing: 0; line-height: 1.3; }
.nota-margen p { font-size: 16px; max-width: 46ch; }
.nota-margen .secundario { font-size: 15px; color: var(--text-2); }
.nota-margen .frase { margin-top: var(--s2); font-size: 18px; font-weight: 600; color: var(--accent-strong); }

/* --- carrusel --- */
.carrusel { display: grid; gap: var(--s3); width: 100%; max-width: calc(var(--lamina-max) * 0.8); justify-self: center; }
.pista {
  list-style: none; padding: 0; display: flex; gap: var(--s3); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: var(--radio-panel);
}
.pista::-webkit-scrollbar { display: none; }
.pista:focus-visible { outline-offset: 4px; }
.lamina { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.lamina img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; background: var(--surface);
  border: var(--trazo) solid var(--border); border-radius: var(--radio-panel);
}
.controles { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "pie botones" "ind ind"; gap: var(--s3) var(--s4); align-items: center; }
.pie-lamina { grid-area: pie; font-size: 12.5px; color: var(--text-2); min-height: 20px; }
.pie-lamina .mono { color: var(--text); }
.indicadores { grid-area: ind; display: flex; gap: 3px; }
.indicadores button {
  flex: 1 1 0; height: 14px; padding: 0; margin: 0; background: transparent; border: 0; cursor: pointer; position: relative;
}
.indicadores button::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--border-strong); }
.indicadores button:hover::before { background: var(--text-2); }
.indicadores button[aria-current="true"]::before { background: var(--accent); }
.indicadores button:focus-visible { outline-offset: 0; }
.botones { grid-area: botones; display: flex; gap: var(--s1); }
.ctl {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  background: var(--surface-raised); color: var(--text-2); border: var(--trazo) solid var(--border-strong); border-radius: var(--radio-ctl); cursor: pointer;
}
.ctl:hover { color: var(--text); border-color: var(--text-2); }
.ctl .ico-play { display: none; }
.ctl[aria-pressed="true"] .ico-pausa { display: none; }
.ctl[aria-pressed="true"] .ico-play { display: block; }
.ctl[aria-pressed="true"] { color: var(--accent-strong); border-color: var(--accent); }
.sin-js .controles { display: none; }        /* sin JavaScript la pista se desplaza con el dedo o la rueda; nada que no funcione */
@media (prefers-reduced-motion: no-preference) { .pista { scroll-behavior: smooth; } }

/* --- pie --- */
.pie { padding: var(--s5) 0 var(--s6); color: var(--text-2); font-size: 13px; }
.gemil { height: 9px; margin-bottom: var(--s5); background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='9' viewBox='0 0 18 9'><path d='M9 0.5h1v1h1v1h1v1h1v1h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h1v-1h1v-1h1z' fill='none' stroke='%233a4454' stroke-width='0.75'/></svg>") repeat-x left center; }
.pie-filas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3) var(--s5); }
.firma b { color: var(--text); font-weight: 500; }
.enlaces { display: flex; flex-wrap: wrap; gap: var(--s4); }
.enlaces a { color: var(--text-2); }
.enlaces a:hover { color: var(--text); }
.legal { margin-top: var(--s4); font-size: 11.5px; line-height: 1.5; color: var(--text-3); }
.legal .mono { font-size: 11px; }

/* --- comparativa --- */
.comparativa { padding: var(--s7) 0; background: var(--surface-sunken); }
.comparativa h2 { font-size: clamp(27px, 5.5vw, 42px); font-weight: 500; line-height: 1.15; letter-spacing: -0.012em; text-wrap: balance; margin-bottom: var(--s4); }
.comparativa .intro { font-size: 16px; line-height: 1.5; color: var(--text-2); max-width: 72ch; margin-bottom: var(--s6); }
.comparativa .intro b { color: var(--text); font-weight: 600; }
.tabla-wrapper {
  overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: var(--s5);
  position: relative; border-radius: var(--radio-panel);
}
/* Sombra a la derecha en móvil para indicar scroll horizontal */
@media (max-width: 959px) {
  .tabla-wrapper::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 48px;
    background: linear-gradient(to right, transparent, var(--surface-sunken));
    pointer-events: none; transition: opacity 0.2s;
  }
  .tabla-wrapper[data-scrolled="end"]::after { opacity: 0; }
}
.tabla-wrapper::-webkit-scrollbar { height: 8px; }
.tabla-wrapper::-webkit-scrollbar-track { background: var(--surface); }
.tabla-wrapper::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.tabla-wrapper::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
.tabla-comp { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; min-width: 760px; }
.tabla-comp thead th { background: var(--surface); color: var(--text); font-weight: 600; text-align: left; padding: var(--s3); border: var(--trazo) solid var(--border); }
.tabla-comp thead th:first-child { width: 20%; min-width: 140px; }
.tabla-comp thead th:not(:first-child) { width: 20%; min-width: 180px; }
.tabla-comp tbody th { background: var(--surface); color: var(--text-2); font-weight: 500; text-align: left; padding: var(--s3); border: var(--trazo) solid var(--border); vertical-align: top; }
.tabla-comp tbody td { background: var(--bg); color: var(--text-2); padding: var(--s3); border: var(--trazo) solid var(--border); vertical-align: top; }
.tabla-comp tbody td b { color: var(--text); font-weight: 600; }
.tabla-comp tbody tr:nth-child(even) th { background: var(--surface-raised); }
.tabla-comp tbody tr:nth-child(even) td { background: var(--surface-sunken); }
.notas-tabla { list-style: disc; padding-left: var(--s5); margin: 0; color: var(--text-3); font-size: 13px; line-height: 1.5; max-width: 72ch; }
.notas-tabla li { margin-bottom: var(--s2); }
.notas-tabla li:last-child { margin-bottom: 0; }
@media (min-width: 960px) {
  .comparativa { padding: var(--s8) 0; }
  .comparativa h2 { margin-bottom: var(--s5); }
  .tabla-comp { font-size: 15px; }
}

/* --- pantallas anchas: notas a la izquierda, carrusel fijo a la derecha mientras se leen las notas --- */
@media (min-width: 960px) {
  :root { --cabecera-h: 60px; --margen: var(--s7); }
  .contenido { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "notas carrusel"; gap: var(--s5) var(--s8); align-items: start; padding-top: var(--s7); padding-bottom: var(--s8); }
  .notas { max-width: 520px; gap: var(--s7); }
  .nota + .nota { padding-top: var(--s7); }
  .nota-lamina { max-width: 300px; }
  .carrusel { justify-self: end; position: sticky; top: calc(var(--cabecera-h) + var(--s5)); }
  .producto { grid-template-columns: 116px 1fr; }
}
@media (min-width: 1280px) {
  .contenido { gap: var(--s5) 96px; }
  .notas { max-width: 560px; }
}

/* --- 404 --- */
.vacio { display: grid; gap: var(--s3); align-content: start; }

/* Acerca de Mitalabs: lectura editorial con los tokens y fuentes de la landing. */
.cabecera .nav-acerca { flex-shrink: 0; }
.nav-acerca a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 500; }
.acerca { padding: var(--s7) 0; border-top: var(--trazo) solid var(--border); scroll-margin-top: var(--s5); }
.acerca-texto { max-width: 72ch; }
.acerca h2 { margin: var(--s3) 0 var(--s5); font-size: clamp(27px, 5.5vw, 42px); font-weight: 500; line-height: 1.15; letter-spacing: -0.012em; text-wrap: balance; }
.acerca h3 { margin: var(--s6) 0 var(--s4); font-size: clamp(20px, 3.4vw, 26px); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.acerca p, .acerca li { font-size: 16px; line-height: 1.7; color: var(--text-2); }
.acerca p { margin-bottom: var(--s5); }
.acerca strong { color: var(--text); font-weight: 600; }
.acerca ul { padding-left: var(--s5); margin-bottom: var(--s6); }
.acerca li + li { margin-top: var(--s3); }
.acerca .etiqueta { font-size: 11px; line-height: 1.4; margin-bottom: 0; }
.acerca-texto > p:last-child { margin-bottom: 0; }
@media (min-width: 960px) { .acerca { padding: var(--s8) 0; } }
@media (max-width: 359px) {
  .cabecera { height: auto; min-height: var(--cabecera-h); }
  .cabecera .in { flex-wrap: wrap; gap: 0 var(--s3); padding-top: var(--s2); padding-bottom: var(--s2); }
}
