/* Reproducción FIEL de la pantalla Captura/IA de la app (estado vacío) + animación:
   se teclea en lenguaje natural, se captura, y la tarea aparece "encima" (donde
   estaba el saludo), como en la app real. Medidas/estilos calcados de la app
   (src/ui.js + styles.css). Vars con fallback para no depender de las del landing. */
.capdemo {
  position: relative;
  max-width: 600px; margin: 44px auto 52px;   /* aire arriba (hacia el subtítulo) y abajo (hacia los botones) */
  font-family: var(--serif, 'Newsreader', Georgia, serif);
  text-align: center;
}

/* --- Zona superior: saludo (vacío) o tarea creada, con cross-fade --- */
.capdemo-stage {
  position: relative; min-height: 214px;
  display: flex; align-items: center; justify-content: center;
}
.capdemo-empty {
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 24px;
  transition: opacity .4s ease, transform .4s ease;
}
.capdemo.is-done .capdemo-empty { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.capdemo-empty-avatar {
  width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgb(176, 161, 87); box-sizing: border-box;
}
.capdemo-empty-title { font-size: 30px; font-weight: 500; color: var(--ink, #1a1a1a); line-height: 1.15; }
.capdemo-empty-sub {
  font-size: 19px; font-weight: 350; font-style: italic; letter-spacing: -.005em;
  color: var(--ink-4, #b8b8b2); line-height: 1.5; max-width: 460px;
}

/* --- Tarea creada: aparece "encima", donde estaba el saludo --- */
.capdemo-result {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -40%);
  width: min(430px, 94%); text-align: left;
  padding: 16px 18px; border: 1px solid var(--line-strong, rgba(26, 26, 26, .16));
  border-radius: 16px; background: var(--paper, #fafaf6);
  box-shadow: 0 22px 48px -22px rgba(26, 26, 26, .38);
  opacity: 0; pointer-events: none;
  transition: opacity .45s cubic-bezier(.22, .61, .36, 1), transform .45s cubic-bezier(.22, .61, .36, 1);
}
.capdemo.is-done .capdemo-result { opacity: 1; transform: translate(-50%, -50%); }
.capdemo-task { display: flex; align-items: center; gap: 10px; }
.capdemo-task .circle { width: 16px; height: 16px; flex: 0 0 auto; border: 1.5px solid var(--ink-3, #8b8b86); border-radius: 50%; }
.capdemo-task .ttl { font-size: 17px; color: var(--ink, #1a1a1a); }
.capdemo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.capdemo-chip {
  font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; padding: 5px 9px; border-radius: 6px;
  border: 1px solid var(--line-strong, rgba(26, 26, 26, .16)); color: var(--ink-2, #4a4a48);
  opacity: 0; transform: translateY(4px); transition: opacity .35s ease, transform .35s ease;
}
.capdemo.is-done .capdemo-chip { opacity: 1; transform: none; }
.capdemo.is-done .capdemo-chip:nth-child(2) { transition-delay: .09s; }
.capdemo.is-done .capdemo-chip:nth-child(3) { transition-delay: .18s; }
.capdemo-chip.accent { border-color: var(--ink, #1a1a1a); color: var(--ink, #1a1a1a); }

/* --- Composer (calcado de .captura-*) --- */
.capdemo-composer { display: flex; align-items: flex-end; gap: 8px; text-align: left; margin-top: 4px; }
.capdemo-inputbox {
  flex: 1; min-height: 104px; display: flex; align-items: flex-start;
  padding: 18px; border: 1px solid var(--line-strong, rgba(26, 26, 26, .16));
  border-radius: 20px; background: var(--paper-2, #f4f4ef); transition: border-color .14s ease;
}
.capdemo.is-focus .capdemo-inputbox { border-color: var(--ink-3, #8b8b86); }
.capdemo-text { font-family: inherit; font-size: 17px; line-height: 1.45; color: var(--ink, #1a1a1a); white-space: pre-wrap; }
.capdemo-text.placeholder { color: var(--ink-3, #8b8b86); }
.capdemo-caret {
  display: inline-block; width: 1px; height: 1.2em; margin-left: 1px;
  background: var(--ink, #1a1a1a); vertical-align: -.18em; animation: capdemo-blink 1s steps(1) infinite;
}
.capdemo.is-sending .capdemo-caret, .capdemo.is-thinking .capdemo-caret, .capdemo.is-done .capdemo-caret { display: none; }
@keyframes capdemo-blink { 50% { opacity: 0; } }

/* --- Acciones: Floaty + candado + SIEMPRE IA arriba, enviar debajo --- */
.capdemo-actions { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; position: relative; }
.capdemo-actions-top { display: flex; align-items: center; gap: 6px; position: relative; }
.capdemo-floaty, .capdemo-send {
  width: 44px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong, rgba(26, 26, 26, .16)); border-radius: 14px;
  background: var(--paper-2, #f4f4ef); padding: 0; transition: border-color .14s ease;
}
.capdemo-floaty { overflow: hidden; }
.capdemo-floaty img { width: 100%; height: 100%; object-fit: cover; display: block; }
.capdemo.is-active .capdemo-floaty { border-color: var(--ink, #1a1a1a); }
.capdemo-send { font-size: 16px; color: var(--ink-2, #4a4a48); line-height: 1; }
.capdemo-lock { width: 22px; height: 48px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink, #1a1a1a); }
.capdemo-lock svg { display: block; }
.capdemo-always-ai {
  position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 5px;
  white-space: nowrap; pointer-events: none;
  font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 8px; letter-spacing: .08em; color: var(--ink-4, #b8b8b2);
}

/* --- Pista + flecha hacia Floaty (absolutas, sobre las acciones) --- */
.capdemo-floaty-hint {
  position: absolute; bottom: calc(100% + 30px); left: 75px;
  font-family: var(--serif, 'Newsreader', Georgia, serif); font-style: italic; font-size: 14px;
  line-height: 1.25; color: var(--ink-4, #b8b8b2); white-space: nowrap; text-align: left; pointer-events: none;
}
.capdemo-floaty-arrow {
  position: absolute; left: 10px; bottom: calc(100% - 2px);
  width: 56px; height: 50px; color: var(--ink-4, #b8b8b2); opacity: .85; pointer-events: none;
}
.capdemo-floaty-arrow svg { display: block; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  .capdemo-caret { animation: none; display: none; }
  .capdemo-empty, .capdemo-result, .capdemo-chip { transition: none; }
}

/* Entrada del titular del hero al cargar, estilo Apple: "entra en foco"
   (blur → nítido) + fundido, con un asentamiento de escala mínimo y SIN
   desplazamiento vertical. Puro CSS: sin FOUC (backwards fill), sin JS. */
.hero-title {
  animation: heroTitleIn 1.05s cubic-bezier(.22, .61, .36, 1) both;
  will-change: filter, opacity, transform;
}
@keyframes heroTitleIn {
  from { opacity: 0; filter: blur(12px); transform: scale(1.03); }
  to   { opacity: 1; filter: blur(0);    transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-title { animation: none; }
}

/* Trazo de rotulador HECHO A MANO (SVG curvo e irregular) que se traza de
   izquierda a derecha sin deformar la forma (clip-path). En "mentir" del hero
   (al cargar) y en los énfasis negrita+cursiva de los titulares (al bajar). */
.hero-title .hl,
.tour-head h2 strong,
.assistant-band h2 strong,
.audience h2 strong { position: relative; }
.hero-title .hl::after,
.tour-head h2 strong::after,
.assistant-band h2 strong::after,
.audience h2 strong::after {
  content: '';
  position: absolute; pointer-events: none; mix-blend-mode: multiply;
  left: -0.09em; right: -0.09em; bottom: 0.04em; height: 0.66em;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20240%2030'%20preserveAspectRatio='none'%3E%3Cpath%20d='M4,9%20C62,3%20120,8%20180,5%20C212,3.5%20229,7%20237,4%20L238,24%20C198,29%20138,24%2082,27%20C46,28.5%2023,26%204,25%20Z'%20fill='%23D6C574B3'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
}
@keyframes markSweep {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
/* "mentir": se traza al cargar, tras la entrada en foco del titular. */
.hero-title .hl::after { animation: markSweep .6s cubic-bezier(.65, 0, .35, 1) 1.15s both; }
/* Titulares: se traza al entrar en el viewport (clase .mark-in por JS). */
.tour-head h2 strong.mark-in::after,
.assistant-band h2 strong.mark-in::after,
.audience h2 strong.mark-in::after { animation: markSweep .6s cubic-bezier(.65, 0, .35, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .hero-title .hl::after,
  .tour-head h2 strong::after,
  .assistant-band h2 strong::after,
  .audience h2 strong::after { animation: none; clip-path: inset(0 0 0 0); }
}

/* El h2 del asistente no fijaba peso (salía bold por defecto): lo pongo ligero
   para que "No hables solo" quede sin negrita y solo el <strong> sea la negrita. */
.assistant-band h2 { font-weight: 400; }
/* Énfasis marcado de los titulares: negrita + cursiva. */
.tour-head h2 strong,
.assistant-band h2 strong,
.audience h2 strong { font-weight: 600; font-style: italic; color: var(--ink); }

/* CTA "Empieza ahora.": la palabra "Empieza" recibe el mismo tratamiento
   (negrita+cursiva + trazo de rotulador al entrar en pantalla). */
.cta-band h2 strong {
  font-weight: 600; font-style: italic; color: var(--ink); position: relative;
}
.cta-band h2 strong::after {
  content: '';
  position: absolute; pointer-events: none; mix-blend-mode: multiply;
  left: -0.09em; right: -0.09em; bottom: 0.04em; height: 0.66em;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20240%2030'%20preserveAspectRatio='none'%3E%3Cpath%20d='M4,9%20C62,3%20120,8%20180,5%20C212,3.5%20229,7%20237,4%20L238,24%20C198,29%20138,24%2082,27%20C46,28.5%2023,26%204,25%20Z'%20fill='%23D6C574B3'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
}
.cta-band h2 strong.mark-in::after { animation: markSweep .6s cubic-bezier(.65, 0, .35, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .cta-band h2 strong::after { animation: none; clip-path: inset(0 0 0 0); }
}

/* Vídeo (Kanban) dentro de un step-shot: mismo encuadre que las imágenes. */
.step-shot video { display: block; width: 100%; height: auto; }

/* Carrusel de capturas (la misma vista en lista y en calendario). */
.shot-carousel { position: relative; }
.shot-carousel-viewport { overflow: hidden; border-radius: inherit; transition: height .5s cubic-bezier(.22, .61, .36, 1); }
.shot-carousel-track { display: flex; align-items: flex-start; transition: transform .5s cubic-bezier(.22, .61, .36, 1); }
.shot-slide { flex: 0 0 100%; min-width: 100%; }
.shot-slide img { display: block; width: 100%; height: auto; }
.shot-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 1px solid var(--line-strong, rgba(26, 26, 26, .16)); border-radius: 50%;
  background: rgba(250, 250, 246, .92); color: var(--ink, #1a1a1a);
  font-size: 20px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s ease;
}
.shot-carousel:hover .shot-arrow, .shot-carousel:focus-within .shot-arrow { opacity: 1; }
.shot-prev { left: 10px; }
.shot-next { right: 10px; }
.shot-dots { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.shot-dot {
  width: 8px; height: 8px; padding: 0; border-radius: 50%;
  border: 1px solid var(--ink-3, #8b8b86); background: transparent; cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.shot-dot.is-active { background: var(--ink, #1a1a1a); border-color: var(--ink, #1a1a1a); }
@media (prefers-reduced-motion: reduce) { .shot-carousel-track { transition: none; } }
@media (hover: none) { .shot-arrow { opacity: 1; } }  /* siempre visibles en táctil */

/* Teaser de API en el landing (bloque de código + texto + enlace). */
.api-teaser { max-width: 720px; margin: 0 auto; text-align: center; }
.api-teaser-code {
  text-align: left; background: var(--ink, #1a1a1a); color: #f2f2ec; border-radius: 14px;
  padding: 18px 20px; overflow-x: auto; font-family: var(--mono, monospace);
  font-size: 13px; line-height: 1.7; margin: 0;
}
.api-teaser-code .c { color: #9a9a92; display: block; margin-bottom: 6px; }
.api-teaser-text { color: var(--ink-3, #5a5a55); font-size: 17px; line-height: 1.6; margin: 22px auto 20px; }
