/* ─────────────────────────────────────────────────────────────────────────
   landing.css — P-01, lo que TFP pone en la portada del núcleo: el carrusel
   (landing_visual) y «Cómo funciona» con sus dos tarjetas (landing_body).

   Medidas de design/views/public/landing-portada.html (y del prototipo para
   las tres diapositivas que la vista no enseña). Las miniaturas del visor son
   siempre oscuras y su papel siempre blanco, en los dos temas, como el visor
   de verdad (tokens --viewer-*); lo demás va con los tokens de la página.
   ───────────────────────────────────────────────────────────────────────── */

/* ── El carrusel ─────────────────────────────────────────────────────── */
/* Su marco (fondo, borde, esquinas de 18 y relleno de 14 de la vista) es el
   de la columna del núcleo (.zt-l-visual): dentro, sin otro. */
.tf-landing-carousel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  /* La columna del núcleo (.zt-l-visual, en su rejilla de 1fr) crece hasta
     lo más ancho que no se puede partir de dentro (el chip, el enlace de la
     diapositiva 4): a 375 px, la página entera se salía de lado. Con la
     contención en línea, el carrusel no empuja su columna y ocupa la que
     le dan. */
  contain: inline-size;
}
.tf-landing-stage {
  height: 320px;
  /* Deslizar con el dedo: el navegador sigue haciendo el desplazamiento
     vertical y nos deja el horizontal (landing.js). */
  touch-action: pan-y;
}
.tf-landing-slide { height: 100%; }
.tf-landing-slide:not([hidden]) { animation: tf-landing-in .35s ease-out; }
@keyframes tf-landing-in { from { opacity: 0; } to { opacity: 1; } }

/* El visor en miniatura (diapositivas 1 y 2). */
.tf-landing-viewer {
  height: 100%;
  border-radius: 14px;
  background: var(--viewer-bg);
  color: var(--viewer-ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tf-landing-viewer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  background: var(--viewer-bar);
  border-bottom: 1px solid var(--viewer-line);
  font-size: 11px;
}
/* :root delante (0,2,0): el núcleo pone a toda imagen y todo svg de su
   columna (.zt-l-visual img, svg: 0,1,1) el ancho entero y esquinas
   redondas, como a una captura; las de las miniaturas llevan su medida. */
:root .tf-landing-viewer-mark { display: block; flex-shrink: 0; width: 16px; height: 16px; border-radius: 0; }
.tf-landing-viewer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-landing-viewer-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--viewer-control);
  white-space: nowrap;
}
.tf-landing-viewer-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.tf-landing-viewer-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px; }

/* La hoja: blanca en los dos temas (es el papel del documento). */
.tf-landing-paper {
  position: relative;
  width: 150px;
  aspect-ratio: 210 / 297;
  background: #ffffff;
  border-radius: 2px;
  padding: 16px 13px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.tf-landing-paper-title { height: 6px; width: 60%; border-radius: 3px; background: #cfd8e3; }
.tf-landing-paper-lines { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.tf-landing-paper-lines span { display: block; height: 4px; border-radius: 2px; background: #e2e9f0; }
.tf-landing-paper-lines span:nth-child(2) { width: 92%; }
.tf-landing-paper-lines span:nth-child(3) { width: 96%; }
.tf-landing-paper-lines span:nth-child(4) { width: 70%; }
.tf-landing-paper-lines span:nth-child(5) { margin-top: 6px; }
.tf-landing-paper-lines span:nth-child(6) { width: 88%; }
.tf-landing-wm {
  position: absolute;
  inset: -60%;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 10px 14px;
  transform: rotate(-30deg);
  pointer-events: none;
}
.tf-landing-wm span { font-size: 5px; font-weight: 500; white-space: nowrap; color: rgba(22, 38, 58, .16); } /* sobre el papel blanco: igual en los dos temas */

/* Diapositiva 2: la hoja se borra y queda el aviso del visor. */
.tf-landing-gone { position: relative; display: grid; place-items: center; }
.tf-landing-paper-blur { filter: blur(6px); opacity: .25; }
.tf-landing-gone-note {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  width: 200px;
}
.tf-landing-gone-note strong { font-size: 12px; font-weight: 700; }
.tf-landing-gone-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  /* El visor es oscuro en los dos temas: su gris de borde no tiene token. */
  border: 1px dashed #6d7f95;
  color: var(--viewer-muted);
  display: grid;
  place-items: center;
}

/* Diapositivas 3 y 4: tarjetas de la interfaz del remitente. */
.tf-landing-panel {
  height: 100%;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px;
}
.tf-landing-timeline { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.tf-landing-event { display: flex; gap: 10px; align-items: flex-start; }
.tf-landing-event-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--pri-fill);
  color: var(--pri-text);
  display: grid;
  place-items: center;
}
.tf-landing-event-icon .tf-icon { font-size: 15px; }
.tf-landing-event-live { background: var(--pri); color: #ffffff; }
.tf-landing-event-warn { background: var(--warn-fill); color: var(--warn); }
.tf-landing-event-text { display: flex; flex-direction: column; min-width: 0; }
.tf-landing-event-text strong { font-size: 12px; font-weight: 700; }
.tf-landing-event-text span { font-size: 11px; color: var(--muted); }

.tf-landing-share { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; }
.tf-landing-share-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1 1 180px; }
.tf-landing-share-label { font-size: 11px; font-weight: 700; color: var(--muted); }
.tf-landing-share-link {
  /* En bloque (no flex) para que, si no cabe, acabe en «…». */
  display: block;
  height: 32px;
  line-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tf-landing-share-code {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: var(--panel);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 3px;
  font-variant-numeric: tabular-nums;
}
/* El QR, tinta sobre blanco en los dos temas (se escanea igual). */
.tf-landing-share-qr {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  padding: 5px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
}
:root .tf-landing-share-qr svg { display: block; width: 100%; height: 100%; border-radius: 0; shape-rendering: crispEdges; }

/* El nombre de la diapositiva y los mandos. */
.tf-landing-caption { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.tf-landing-controls { display: flex; align-items: center; justify-content: center; gap: 2px; }
.tf-landing-nav {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tf-landing-nav:hover { background: var(--hover-fill); border-color: var(--hover-line); }
.tf-landing-pause { color: var(--muted); margin-inline: 4px; }
.tf-landing-next { margin-inline-start: 4px; }
.tf-landing-dot {
  width: 30px;
  height: 26px;
  border: 0;
  padding: 0;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tf-landing-dot span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pri) 22%, var(--line));
  transition: width .3s;
}
.tf-landing-dot:hover span { background: color-mix(in srgb, var(--pri) 45%, var(--line)); }
.tf-landing-dot.is-active span { width: 26px; background: var(--pri); }

/* ── «Cómo funciona» ─────────────────────────────────────────────────── */
.tf-landing-how {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}
.tf-landing-how-title { margin: 0 0 18px; font-size: 22px; font-weight: 700; }
.tf-landing-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.tf-landing-step {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tf-landing-step-n {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pri);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.tf-landing-step h3 { margin: 0; font-size: 16px; font-weight: 700; }
.tf-landing-step p { margin: 0; font-size: 14px; line-height: 21px; color: var(--muted); }

/* ── Fichero protegido y Windows ─────────────────────────────────────── */
.tf-landing-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.tf-landing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.tf-landing-card-icon { display: block; width: 48px; height: 48px; }
.tf-landing-card-title { margin: 0; font-size: 19px; line-height: 25px; font-weight: 700; }
.tf-landing-card-text { margin: 0; font-size: 14.5px; line-height: 22px; color: var(--muted); text-wrap: pretty; }
.tf-landing-card-foot { display: flex; margin-top: auto; }
.tf-landing-open-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 700; }
/* El núcleo pinta todo enlace con --pri (body.app-shell a: 0,1,2), que en
   oscuro sigue siendo el azul de relleno (2,6:1 sobre la tarjeta); el texto de
   TFP va en --pri-text (7,4:1 en oscuro; en claro es el mismo azul). El color,
   puesto aquí y no en --zt-link: al pasar por encima el núcleo cambia --zt-link
   a un azul más oscuro, que en oscuro tampoco se lee. */
:root a.tf-landing-open-link { color: var(--pri-text); }
.tf-landing-win-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--pri-fill);
  color: var(--pri-text);
  display: grid;
  place-items: center;
}
.tf-landing-win-icon .tf-icon { font-size: 26px; }
.tf-landing-win-row { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: auto; }
/* El botón de la tarjeta es el del núcleo, con las medidas de la tarjeta. */
.tf-landing-win-cta { padding-inline: 18px; font-size: 14px; box-shadow: none; }
.tf-landing-win-cta .tf-icon { font-size: 19px; }
.tf-landing-win-meta { font-size: 12.5px; color: var(--muted); }
/* «Próximamente» en el sitio del botón (sin la app de Windows), en azul de aviso. */
.tf-landing-win-soon { background: var(--info-fill); border-color: var(--info-line); }
.tf-landing-win-soon > .tf-icon { color: var(--pri-text); }

/* ── Móvil ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  /* Objetivos de 44 px para el dedo. */
  .tf-landing-nav { width: 44px; height: 44px; }
  .tf-landing-dot { height: 44px; }
  .tf-landing-pause { margin-inline: 2px; }
  .tf-landing-next { margin-inline-start: 2px; }
}
@media (max-width: 520px) {
  .tf-landing-panel { padding: 16px; }
  .tf-landing-how { padding: 22px 18px; }
  .tf-landing-card { padding: 22px 20px; }
}

/* ── Sin movimiento ──────────────────────────────────────────────────── */
/* La carcasa del núcleo no apaga las animaciones de cada herramienta: la
   diapositiva entra sin fundido y el punto cambia sin crecer. */
@media (prefers-reduced-motion: reduce) {
  .tf-landing-slide:not([hidden]) { animation: none; }
  .tf-landing-dot span { transition: none; }
}
