/* ── CON TU IA (ES /es/agentes-ia) ──────────────────────────────────────────
   La página que explica que Publicit se lleva hablando con tu asistente de IA.
   Sistema de la home (home.css) en su versión de noche: el fondo del globo,
   titulares a dos tonos con la Forma DJR Banner, medios redondeados, nada de
   iconos. El mini tutorial para conectarlo va en blanco, tras «Pídelo».

   1 · La historia (agents-story.js): a la izquierda se lee (el chat, que es
       Claude) y a la derecha se ve: cada punto del lienzo es una pantalla.
       El scroll es libre. Sin JS todo se lee en orden.
   2 · Pídelo · 3 · Cómo conectarlo (en blanco) · 4 · La última palabra
   5 · Sesión real · 6 · FAQ
   ──────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Forma DJR Text';
  src: url('/assets/fonts/FormaDJRText-Regular-Testing.woff2') format('woff2'),
       url('/assets/fonts/FormaDJRText-Regular-Testing.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Forma DJR Text';
  src: url('/assets/fonts/FormaDJRText-Medium-Testing.woff2') format('woff2'),
       url('/assets/fonts/FormaDJRText-Medium-Testing.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Forma DJR Text';
  src: url('/assets/fonts/FormaDJRText-Bold-Testing.woff2') format('woff2'),
       url('/assets/fonts/FormaDJRText-Bold-Testing.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Forma DJR Banner';
  src: url('/assets/fonts/FormaDJRBanner-Medium-Testing.woff2') format('woff2'),
       url('/assets/fonts/FormaDJRBanner-Medium-Testing.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ── Tokens (los de home.css, en noche) ── */
:root {
  --ink: #0a0a0a;
  --night: #060b16;
  --night: oklch(0.135 0.025 252);
  --t1: rgba(255, 255, 255, 0.94);
  --t2: rgba(255, 255, 255, 0.7);    /* cuerpo: 9:1 sobre la noche */
  --t3: rgba(255, 255, 255, 0.56);   /* texto pequeño: 6,4:1 */
  --mute: #7f8fb8;                   /* segunda voz de los titulares, como el globo */
  --line: rgba(255, 255, 255, 0.1);
  --soft: rgba(255, 255, 255, 0.05);
  --ice: #a8e4ff;
  --blue: #2b5fd9;
  --gutter: clamp(16px, 4.4vw, 56px);
  --maxw: 1240px;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'Forma DJR Banner', 'Forma DJR Text', system-ui, sans-serif;
  --text: 'Forma DJR Text', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
}
@media (min-width: 900px) {
  :root { --r-xl: 40px; --r-lg: 26px; --r-md: 20px; }
}

/* ── Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: clip; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  background: var(--night);
  color: var(--t1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video, canvas { display: block; }
main img, main video { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }
.start :focus-visible, #site-footer :focus-visible { outline-color: var(--blue); }
.a-skip {
  position: fixed; top: 12px; left: 12px; z-index: 4000;
  padding: 12px 18px; border-radius: 999px;
  background: #fff; color: var(--ink);
  font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
}
.a-skip:focus-visible { transform: none; }
main > section { scroll-margin-top: 88px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Piezas comunes ── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.sec { padding-block: clamp(96px, 12vw, 176px); }
.s-display {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.25rem, 1.15rem + 4.3vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
  color: #fff;
  text-wrap: balance;
}
.s-display .m { color: var(--mute); }
.lede {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--t2);
  max-width: 40ch;
  text-wrap: pretty;
}

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ════════════════════════════════════════════════════════════════════════
   1 · LA HISTORIA
   ════════════════════════════════════════════════════════════════════════ */
.story { position: relative; }
.story-stage { position: relative; }
.story-canvas, .story-visual, .story-labels { display: none; }

/* Con JS y WebGL: escenario fijo, una pantalla por escena. */
html.js .story.is-live:not(.is-fallback) { height: calc((var(--end) + 1) * 100svh); }
html.js .story.is-live:not(.is-fallback) .story-stage {
  position: sticky; top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
}
html.js .story.is-live:not(.is-fallback) .story-canvas {
  display: block;
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-out;
}
html.js .story.is-live.is-ready:not(.is-fallback) .story-canvas { opacity: 1; }
html.js .story.is-live:not(.is-fallback) .story-labels { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; }

/* ── Rótulos sobre el lienzo (agents-story.js los coloca) ── */
.lbl {
  position: absolute; left: 0; top: 0;
  visibility: hidden; opacity: 0;
  white-space: nowrap;
  font-size: 0.8125rem; font-weight: 600; line-height: 1.3;
  color: var(--t2);
  will-change: transform, opacity;
}
.lbl-pin { translate: 18px -50%; color: #fff; }
.lbl-pin::before {
  content: '';
  position: absolute; left: -12px; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85);
}
.lbl-hot { color: var(--ice); translate: -100% -50%; padding-right: 12px; }
.lbl-hot::before { left: auto; right: -2px; box-shadow: 0 0 0 1.5px var(--ice), 0 0 12px 2px rgba(168, 228, 255, 0.5); }
html.js .story.is-live:not(.is-fallback) .story-visual { display: block; position: absolute; pointer-events: none; }

/* ── Titulares de cada escena ── */
.story-copy { position: relative; z-index: 3; }
.cap p {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1875rem);
  line-height: 1.5;
  color: var(--t2);
  max-width: 40ch;
  text-wrap: pretty;
  margin-top: clamp(12px, 1.4vw, 18px);
}
.cap .s-display { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.75rem); }
.cap-hero .s-display { font-size: clamp(2.375rem, 1.1rem + 3.2vw, 4.5rem); line-height: 0.98; }
.cap-hero .cap-lede { max-width: 42ch; }
/* ── Pista de scroll ──
   Al llegar y cada vez que alguien se queda parado a mitad de la historia:
   un círculo por el que pasan flechas hacia abajo, sin parar, y "Desliza".
   El aro late para que se vea sin gritar. La barra fina bajo la cabecera del
   chat dice además cuánto queda. */
.scroll-hint { display: none; }
html.js .story.is-live:not(.is-fallback) .scroll-hint {
  display: flex; align-items: center; gap: 12px;
  position: absolute; z-index: 5;
  font-size: 0.9375rem; font-weight: 600; line-height: 1;
  color: #fff;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
  pointer-events: none;
}
html.js .story.is-live.is-start:not(.is-fallback) .scroll-hint, html.js .story.is-live.is-idle:not(.is-fallback) .scroll-hint { opacity: 1; transform: none; }
.hint-ring {
  position: relative;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
/* El latido: un aro que crece y se apaga. */
.hint-ring::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(159, 226, 255, 0.7);
  animation: a-ring 2.4s cubic-bezier(0.2, 0, 0, 1) infinite;
}
/* Las flechas: dos, a medio ciclo, como una cinta que no para. */
.hint-ring i {
  position: absolute; left: 50%; top: 50%;
  width: 10px; height: 10px; margin: -7px 0 0 -5px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  border-radius: 1px;
  rotate: 45deg;
  animation: a-arrow 1.6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.hint-ring i + i { animation-delay: -0.8s; }
@keyframes a-arrow {
  0% { translate: 0 -11px; opacity: 0; }
  35%, 55% { translate: 0 0; opacity: 1; }
  100% { translate: 0 11px; opacity: 0; }
}
@keyframes a-ring { 0% { scale: 1; opacity: 1; } 70%, 100% { scale: 1.55; opacity: 0; } }
.chat-head::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, #4d6bff, #9fe2ff);
  transform: scaleX(var(--progress, 0)); transform-origin: left;
}

html.js .story.is-live:not(.is-fallback) .story-copy { position: absolute; }
/* Los que no tocan quedan transparentes pero en el árbol de accesibilidad:
   un lector de pantalla lee la historia entera sin depender del scroll. */
html.js .story.is-live:not(.is-fallback) .cap {
  position: absolute; left: 0; right: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.7s var(--ease-out);
}
html.js .story.is-live:not(.is-fallback) .cap.is-on {
  opacity: 1; transform: none;
  transition: opacity 0.6s ease 0.12s, transform 0.8s var(--ease-out) 0.12s;
}

/* ── El chat: como las apps de IA que todo el mundo conoce ──
   Ventana con sus tres puntos y el nombre del asistente, tus mensajes en
   burbuja gris a la derecha, las respuestas en texto con su avatar, el
   conector en uso como un chip ("Publicit · Buscando pantallas…") y la caja de
   escribir de siempre, con el conector activado debajo. Gris grafito neutro,
   no azulado. */
.chat {
  --c-panel: #1f1f21;
  --c-surface: #2e2e31;
  --c-ink: #ececec;
  --c-ink-2: #dcdcdc;
  --c-mute: #a1a1a6;          /* 6,6:1 sobre el panel */
  --c-line: rgba(255, 255, 255, 0.08);
  --c-ok: #86efac;
  position: relative; z-index: 4;
  display: flex; flex-direction: column;
  border-radius: 20px;
  background: var(--c-panel);
  color: var(--c-ink);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.09),
    0 40px 90px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.chat-head {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 46px; padding: 0 14px;
  border-bottom: 1px solid var(--c-line);
}
/* Los tres asistentes, en círculos solapados como en la home; el chat es Claude. */
.ai-stack { display: inline-flex; align-items: center; }
.ai-stack img {
  width: 26px; height: 26px; padding: 4px;
  border-radius: 50%; background: #fff; object-fit: contain;
  box-shadow: 0 0 0 2px var(--c-panel);
}
.ai-stack img + img { margin-left: -8px; }
.ai-stack img:nth-child(2) { position: relative; z-index: 1; }
.chat-model {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: 2px;
  font-size: 0.9375rem; font-weight: 600; color: var(--c-ink);
}
.chat-model::after {
  content: '';
  width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.6px solid var(--c-mute); border-bottom: 1.6px solid var(--c-mute);
  transform: rotate(45deg);
}
.chat-alt { margin-left: auto; font-size: 0.75rem; color: var(--c-mute); white-space: nowrap; }
/* La "cara" del asistente: una esfera del globo en pequeño. */
.chat-orb {
  flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #8b96ff 0%, #2b39dd 34%, #18197a 66%, #0a0930 100%);
  box-shadow: 0 0 0 1px rgba(168, 228, 255, 0.25);
}

.chat-viewport { position: relative; flex: 1; min-height: 0; }
.chat-thread {
  list-style: none;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 16px 10px;
}
.chat-empty { display: none; }

/* Mensajes: lo tuyo en burbuja, lo de la IA en texto con su avatar. */
.msg p { font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.msg-me {
  align-self: flex-end;
  max-width: 82%;
  padding: 9px 15px;
  border-radius: 20px;
  background: var(--c-surface);
  color: #fff;
}
.msg-ai, .msg-typing { position: relative; padding-left: 32px; }
.msg-ai { max-width: 100%; color: var(--c-ink-2); }
.msg-ai::before, .msg-typing::before {
  content: '';
  position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff url('/assets/images/home/ai-claude.png') center / 72% no-repeat;
}
.msg-ai b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.msg-typing { display: flex; align-items: center; gap: 5px; min-height: 22px; align-self: flex-start; }
.msg-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-mute);
  animation: a-typing 1.1s ease-in-out infinite;
}
.msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes a-typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-3px); opacity: 1; } }

/* El conector en uso: el chip que enseñan las apps cuando la IA usa una herramienta. */
.msg-status {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: 32px;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem; line-height: 1.3;
  color: var(--c-mute);
}
.tool-name {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; color: var(--c-ink);
}
.tool-name::before, .chat-conn i {
  content: '';
  width: 18px; height: 18px; border-radius: 5px;
  background: #fff url('/assets/images/agents/publicit-mark.png') center / 13px no-repeat;
}
.tool-name::after { content: '·'; color: var(--c-mute); font-weight: 400; }
.st-run {
  background: linear-gradient(90deg, #8a8a8f 0%, #8a8a8f 40%, #fff 50%, #8a8a8f 60%, #8a8a8f 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: a-shimmer 1.8s linear infinite;
}
@keyframes a-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.st-ok { display: none; }
.msg-status.is-done .st-run { display: none; }
.msg-status.is-done .st-ok { display: inline; color: var(--c-ink-2); }
.card-paid::before, .ad-meta span::before {
  content: '';
  display: inline-block; vertical-align: middle;
  width: 6px; height: 6px; margin: -2px 8px 0 1px;
  border-radius: 50%; background: var(--c-ok);
}

/* Tarjetas, al ritmo de las respuestas (con su sangría). */
.msg-card {
  margin-left: 32px;
  border-radius: 14px;
  background: var(--c-surface);
  padding: 13px 15px;
  font-size: 0.8125rem;
}
.pay-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pay-row span { color: var(--c-mute); font-size: 0.875rem; }
.pay-row b { font-family: var(--display); font-weight: 500; font-size: 1.5rem; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.card-note { margin-top: 6px; color: var(--c-mute); }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.fake-btn {
  display: inline-flex; align-items: center;
  min-height: 32px; padding: 0 14px;
  border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: var(--c-ink-2);
}
.fake-yes { background: #fff; color: #000; box-shadow: none; }
.card-paid { display: none; margin-top: 10px; color: var(--c-ok); font-weight: 600; }
.card-pay.is-done .card-actions, .card-pay.is-done .card-note { display: none; }
.card-pay.is-done .card-paid { display: block; }
.card-ad { display: flex; align-items: center; gap: 12px; padding: 8px; align-self: flex-start; }
.ad-thumb {
  width: 96px; height: 54px; flex-shrink: 0;
  border-radius: 6px;
  background: #24140d;
  outline: 1px solid rgba(255, 255, 255, 0.1); outline-offset: -1px;
}
.ad-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-right: 8px; }
.ad-meta b { font-size: 0.875rem; font-weight: 600; color: #fff; }
.ad-meta span { color: var(--c-mute); }
.ad-meta span::before { margin-right: 7px; }
.msg-divider {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.75rem; font-weight: 600; color: var(--c-mute);
  padding: 4px 0;
}
.msg-divider::before, .msg-divider::after { content: ''; flex: 1; height: 1px; background: var(--c-line); }

/* La caja de escribir de siempre: texto arriba; "+", el conector y enviar abajo. */
.chat-composer {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  margin: 8px 12px 0;
  padding: 12px 10px 10px 14px;
  border-radius: 22px;
  background: var(--c-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.cmp-text { position: relative; min-height: 22px; padding-right: 4px; }
.chat-input { display: block; font-size: 0.9375rem; line-height: 1.45; color: #fff; }
.chat-input.is-typing::after {
  content: '';
  display: inline-block; vertical-align: -3px;
  width: 1.5px; height: 1.1em; margin-left: 1px;
  background: #fff;
  animation: a-caret 1s steps(1) infinite;
}
@keyframes a-caret { 50% { opacity: 0; } }
.chat-ph { position: absolute; left: 0; top: 0; font-size: 0.9375rem; line-height: 1.45; color: #8e8e93; pointer-events: none; }
.chat-input.is-typing + .chat-ph { display: none; }
.cmp-bar { display: flex; align-items: center; gap: 8px; }
.cmp-plus {
  position: relative;
  width: 32px; height: 32px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.cmp-plus::before, .cmp-plus::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 12px; height: 1.6px; margin: -0.8px 0 0 -6px;
  border-radius: 2px; background: var(--c-ink-2);
}
.cmp-plus::after { transform: rotate(90deg); }
/* El conector activado, como en las apps. Se ilumina cuando se explica. */
.chat-conn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px 0 7px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-size: 0.8125rem; font-weight: 600; color: var(--c-ink-2);
  transition: box-shadow 0.5s ease, background-color 0.5s ease, color 0.5s ease;
}
.chat-conn i { display: inline-block; width: 18px; height: 18px; }
.chat-conn.is-on {
  background: rgba(43, 95, 217, 0.25);
  box-shadow: inset 0 0 0 1px rgba(120, 160, 255, 0.6), 0 0 24px rgba(64, 104, 255, 0.55);
  color: #fff;
}
.chat-send {
  flex-shrink: 0; margin-left: auto;
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: #5b5b60; color: var(--c-surface);
  transition: background-color 0.25s, color 0.25s;
}
.chat-send svg { width: 15px; height: 15px; }
.chat-send.is-ready { background: #fff; color: #000; }
.chat-note { padding: 8px 16px 11px; font-size: 0.75rem; color: var(--c-mute); text-align: center; }
.chat-composer, .card-actions { cursor: default; user-select: none; }

/* Con JS: la conversación se va revelando con el scroll. */
html.js .story.is-live:not(.is-fallback) .chat-thread {
  position: absolute; left: 0; right: 0; top: 0;
  transition: transform 0.65s var(--ease-out);
  will-change: transform;
}
/* Lo que aún no ha llegado se oculta a la vista, no al lector de pantalla. */
html.js .story.is-live:not(.is-fallback) .chat-thread > li[data-at]:not(.is-in),
html.js .story.is-live:not(.is-fallback) .chat-thread > li[data-from]:not(.is-on) {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
html.js .story.is-live:not(.is-fallback) .chat-thread > .msg-typing:not(.is-on) { display: none; }
html.js .story.is-live:not(.is-fallback) .chat-thread > li.is-in { animation: a-msg 0.55s var(--ease-out) both; }
html.js .story.is-live:not(.is-fallback) .chat-thread > .msg-me.is-in { animation-name: a-msg-me; }
/* Con GSAP, las entradas y el desplazamiento los anima agents-story.js. */
html.js .story.has-gsap .chat-thread > li.is-in { animation: none; }
html.js .story.has-gsap .chat-thread { transition: none; }
@keyframes a-msg { from { opacity: 0; transform: translateY(10px); } }
@keyframes a-msg-me { from { opacity: 0; transform: translateY(8px) scale(0.97); transform-origin: right bottom; } }
html.js .story.is-live:not(.is-fallback) .chat-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 28px);
          mask-image: linear-gradient(transparent, #000 28px);
}
html.js .story.is-live:not(.is-fallback) .chat-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  position: absolute; inset: 0;
  text-align: center;
  transition: opacity 0.4s ease, transform 0.6s var(--ease-out);
}
.empty-t { font-family: var(--display); font-weight: 500; font-size: 1.625rem; line-height: 1.1; color: #fff; }
.empty-logo {
  width: 44px; height: 44px; margin-bottom: 10px; border-radius: 50%;
  background: #fff url('/assets/images/home/ai-claude.png') center / 64% no-repeat;
}
.empty-s { font-size: 0.875rem; color: var(--c-mute); }
html.js .story.is-chatting .chat-empty { opacity: 0; transform: translateY(-10px); pointer-events: none; }
html.js .story.is-live:not(.is-fallback) .chat-composer { margin-top: 0; }

/* ── Escritorio: chat a la izquierda, lienzo a la derecha, titular debajo ── */
@media (min-width: 1024px) {
  .story { --chat-w: clamp(340px, 26vw, 400px); --side: clamp(20px, 2vw, 32px); }
  html.js .story.is-live:not(.is-fallback) .chat {
    position: absolute; z-index: 4;
    left: var(--side); top: 88px; bottom: var(--side);
    width: var(--chat-w);
  }
  html.js .story.is-live:not(.is-fallback) .story-visual {
    left: calc(var(--side) + var(--chat-w) + clamp(32px, 4vw, 72px));
    right: clamp(24px, 4vw, 64px);
    top: 100px; bottom: max(37svh, 290px);
    transition: bottom 0.8s var(--ease-out);
  }
  html.js .story.is-live.is-chatting:not(.is-fallback) .story-visual { bottom: max(22svh, 190px); }
  html.js .story.is-live:not(.is-fallback) .story-copy {
    left: calc(var(--side) + var(--chat-w) + clamp(40px, 5vw, 96px));
    right: calc(clamp(24px, 4vw, 64px) + 150px); /* sitio para la pista de scroll */
    bottom: clamp(36px, 6svh, 64px);
  }
  html.js .story.is-live:not(.is-fallback) .cap { bottom: 0; }
  html.js .story.is-live:not(.is-fallback) .scroll-hint { right: clamp(32px, 4.5vw, 72px); bottom: clamp(36px, 6svh, 64px); }
}

/* ── Móvil y tableta: titular arriba, lienzo en medio, chat abajo ── */
@media (max-width: 1023px) {
  html.js .story.is-live:not(.is-fallback) .story-copy { left: var(--gutter); right: var(--gutter); top: 80px; }
  html.js .story.is-live:not(.is-fallback) .cap { top: 0; }
  html.js .story.is-live:not(.is-fallback) .cap .s-display { font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.75rem); }
  html.js .story.is-live:not(.is-fallback) .cap-hero .s-display { font-size: clamp(2.25rem, 1.3rem + 4vw, 3.75rem); }
  html.js .story.is-live:not(.is-fallback) .cap p { font-size: 0.9375rem; margin-top: 10px; }
  html.js .story.is-live:not(.is-fallback) .story-visual {
    left: 12px; right: 12px;
    top: 46svh; bottom: 196px;
    transition: top 0.7s var(--ease-out), bottom 0.7s var(--ease-out);
  }
  html.js .story.is-live.is-chatting:not(.is-fallback) .story-visual { top: calc(84px + 9rem); bottom: calc(44svh + 68px); }
  /* El panel tiene siempre su tamaño final; antes de la conversación solo se
     ve la caja de escribir (recorte, no altura: no recalcula el layout). */
  html.js .story.is-live:not(.is-fallback) .chat {
    position: absolute;
    left: 10px; right: 10px; bottom: 10px;
    height: 44svh;
    clip-path: inset(calc(100% - 128px) 0 0 0 round 20px);
    transition: clip-path 0.7s var(--ease-out);
  }
  html.js .story.is-live.is-chatting:not(.is-fallback) .chat { clip-path: inset(0 round 20px); }
  html.js .story.is-live:not(.is-fallback) .chat-note { padding: 0 12px 8px; }
  html.js .story.is-live:not(.is-fallback) .chat-composer { margin: 0 10px 6px; }
  html.js .story.is-live:not(.is-fallback) .chat-empty { display: none; }
  html.js .story.is-live:not(.is-fallback) .scroll-hint { left: 50%; bottom: 146px; translate: -50% 0; }
  html.js .story.is-live.is-chatting:not(.is-fallback) .scroll-hint { bottom: calc(44svh + 16px); }
  .msg p { font-size: 0.875rem; }
  .chat-thread { gap: 10px; padding: 14px 12px 6px; }
}
@media (max-width: 1023px) and (min-width: 640px) {
  html.js .story.is-live:not(.is-fallback) .chat { left: auto; width: min(460px, 60vw); right: 12px; }
}

/* Sin JS o sin WebGL: todo en orden, sin escenario fijo. */
html:not(.js) .story, .story.is-fallback { padding: 120px var(--gutter) 40px; }
html:not(.js) .cap, .story.is-fallback .cap { max-width: 720px; margin: 0 auto 40px; }
html:not(.js) .chat, .story.is-fallback .chat { max-width: 520px; margin: 24px auto 0; }
.story.is-fallback .chat-composer, html:not(.js) .chat-composer, .story.is-fallback .msg-typing, html:not(.js) .msg-typing { display: none; }
.story.is-fallback .st-run, html:not(.js) .st-run { display: none; }
.story.is-fallback .st-ok, html:not(.js) .st-ok { display: inline; }

/* ════════════════════════════════════════════════════════════════════════
   2 · PÍDELO
   ════════════════════════════════════════════════════════════════════════ */
/* Fondo de líneas de pantalla (opción 9 de fondos.html), en algunas secciones:
   una línea clara cada 4 px, que se apaga arriba y abajo para no cortar en seco. */
.scan { position: relative; isolation: isolate; }
.scan::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 4px);
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
          mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  pointer-events: none;
}
.asks { overflow-x: clip; }
.asks-head { display: grid; gap: clamp(20px, 2.4vw, 28px); margin-bottom: clamp(48px, 6vw, 80px); }
.asks-head .s-display { max-width: 15ch; }
.asks-rows { display: grid; gap: 14px; }
.a-marquee {
  --gap: 12px;
  display: flex; gap: var(--gap);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.a-marquee-track {
  display: flex; align-items: center; gap: var(--gap); flex-shrink: 0;
  list-style: none;
  will-change: transform;
}
.a-marquee li {
  padding: 15px 24px;
  border-radius: 999px;
  background: var(--soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem);
  color: var(--t1);
  white-space: nowrap;
}
.a-marquee.is-rev li { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--t2); }

/* ════════════════════════════════════════════════════════════════════════
   4 · MANDAS TÚ
   ════════════════════════════════════════════════════════════════════════ */
.safety { padding-top: clamp(48px, 6vw, 96px); }
.safety-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 5vw, 64px); }
.rules { list-style: none; display: grid; gap: 0; }
.rule { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.rule h3 { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem); line-height: 1.1; color: #fff; margin-bottom: 10px; }
.rule p { font-size: 1.0625rem; line-height: 1.55; color: var(--t2); max-width: 40ch; }
@media (min-width: 1024px) {
  .safety-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: clamp(48px, 7vw, 120px); }
  .safety-grid > .s-display { position: sticky; top: 112px; align-self: start; }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(28px, 3.5vw, 48px); }
}

/* ════════════════════════════════════════════════════════════════════════
   5 · SESIÓN REAL
   ════════════════════════════════════════════════════════════════════════ */
.film { padding-top: 0; }
.film-title { max-width: 16ch; margin-bottom: clamp(40px, 5vw, 64px); }
.film-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #05050a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.film-frame video { width: 100%; height: 100%; object-fit: cover; }
.film-ctrls {
  position: absolute; right: clamp(12px, 2vw, 24px); bottom: clamp(12px, 2vw, 24px);
  display: flex; gap: 8px;
}
.film-sound, .film-play {
  min-height: 40px; padding: 0 16px;
  border: 0; border-radius: 999px;
  background: rgba(8, 12, 26, 0.72); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out);
}
.film-sound:active, .film-play:active { transform: scale(0.96); }
.film-sound .on, .film-sound.is-on .off, .film-play .on, .film-play.is-on .off { display: none; }
.film-sound.is-on .on, .film-play.is-on .on { display: inline; }

/* ════════════════════════════════════════════════════════════════════════
   7 · FAQ
   ════════════════════════════════════════════════════════════════════════ */
.faq { padding-top: 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 48px); }
.faq-title { font-size: clamp(2rem, 1.2rem + 3vw, 3.75rem); max-width: 12ch; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 22px 48px 22px 0;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--t1);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before,
.faq-item summary::after {
  content: '';
  position: absolute; right: 6px; top: 50%;
  width: 14px; height: 1.6px; margin-top: -0.8px;
  background: var(--t1);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}
.faq-item summary::after { transform: rotate(90deg); }
.faq-item[open] summary::after { transform: rotate(0deg); opacity: 0; }
@media (hover: hover) { .faq-item summary:hover { color: var(--ice); } }
.faq-q { font: inherit; margin: 0; letter-spacing: inherit; color: inherit; }
.faq-item p { padding: 0 0 24px; font-size: 1.0625rem; line-height: 1.6; color: var(--t2); max-width: 62ch; }
@media (min-width: 1024px) {
  .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: clamp(48px, 7vw, 120px); }
  .faq-head { position: sticky; top: 112px; align-self: start; }
}

/* ════════════════════════════════════════════════════════════════════════
   3 · CÓMO CONECTARLO: mini tutorial en tres pasos, en blanco, antes de
   "La última palabra es tuya". Cada paso lleva una miniatura de lo que vas a
   ver (en el grafito del chat).
   ════════════════════════════════════════════════════════════════════════ */
.start {
  --t1: #0a0a0a; --t2: #3c424e; --t3: #5f6571; --mute: #868c98; --line: rgba(10, 10, 10, 0.1); --soft: #f3f5f8;
  background: #fff; color: var(--t1);
  border-radius: var(--r-xl);
  margin: clamp(48px, 6vw, 96px) clamp(8px, 1vw, 16px);
}
.start .s-display { color: var(--t1); }
.start-head { display: grid; justify-items: center; gap: clamp(18px, 2vw, 24px); text-align: center; margin-bottom: clamp(48px, 6vw, 80px); }
.start-head .s-display { font-size: clamp(2.5rem, 1.3rem + 4.6vw, 5.5rem); max-width: 14ch; }
.start-head .lede { max-width: 46ch; }
.howto { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 3vw, 40px); }
.how { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; min-width: 0; }
.how-shot {
  display: grid; place-items: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 10px;
  border-radius: var(--r-lg);
  background: radial-gradient(90% 80% at 50% 30%, #ffffff 0%, var(--soft) 70%);
  box-shadow: inset 0 0 0 1px rgba(10, 10, 10, 0.05);
  overflow: hidden;
}
.how-n { font-size: 0.875rem; font-weight: 600; color: var(--blue); }
.how h3 { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem); line-height: 1.1; color: var(--t1); }
.how p { font-size: 1.0625rem; line-height: 1.55; color: var(--t2); max-width: 38ch; }
.how p b { color: var(--t1); font-weight: 600; }
/* Las miniaturas: una ventanita del asistente, sin marca de nadie. */
.mock {
  display: grid; gap: 8px;
  width: 82%;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: #1f1f21;
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.06), 0 24px 50px -24px rgba(10, 20, 40, 0.55);
  color: #ececec;
  font-size: 0.75rem;
  text-align: start;
}
.mock-center { justify-items: center; text-align: center; padding-block: 22px 18px; }
.mock-title { font-size: 0.875rem; font-weight: 600; color: #fff; margin-bottom: 4px; }
.mock-center .mock-title { max-width: 22ch; line-height: 1.35; margin: 6px 0 8px; }
.mock-label { color: #a1a1a6; }
.mock-field {
  position: relative;
  display: block;
  padding: 9px 11px;
  border-radius: 9px;
  background: #2e2e31;
  font-family: var(--mono); font-size: 0.6875rem; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mock-field.is-active { box-shadow: 0 0 0 2px var(--blue); }
.mock-field i { display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; vertical-align: -2px; background: #fff; animation: a-caret 1s steps(1) infinite; }
.mock-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.mock-center .mock-btns { justify-content: center; }
.mock-btns b, .mock-btns s {
  display: inline-flex; align-items: center;
  min-height: 30px; padding: 0 14px;
  border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.mock-btns b { background: #fff; color: #000; }
.mock-btns s { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); color: #dcdcdc; }
.mock-mark {
  width: 48px; height: 48px; border-radius: 12px;
  background: #fff url('/assets/images/agents/publicit-mark.png') center / 70% no-repeat;
}
.url-box {
  display: flex; align-items: center; gap: 10px;
  max-width: 100%;
  padding: 6px 6px 6px 16px;
  border-radius: 999px;
  background: var(--soft);
  box-shadow: inset 0 0 0 1px rgba(10, 10, 10, 0.05);
  margin-top: 4px;
}
.url-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 0.8125rem; color: var(--t1); }
.copy-btn {
  flex-shrink: 0;
  min-height: 38px; padding: 0 16px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background-color 0.2s;
}
.copy-btn:active { transform: scale(0.96); }
.copy-btn.is-done { background: #15803d; }
.start-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(48px, 6vw, 72px); }
.a-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px; border: 0;
  font-family: var(--text); font-size: 1rem; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.25s var(--ease-out), background-color 0.2s ease, box-shadow 0.2s ease;
}
.a-btn:active { transform: scale(0.96); }
.a-btn-dark { background: var(--ink); color: #fff; }
.a-btn-line { background: transparent; color: var(--t1); box-shadow: inset 0 0 0 1.5px rgba(10, 10, 10, 0.18); }
@media (hover: hover) {
  .a-btn:hover { transform: translateY(-2px); }
  .a-btn-dark:hover { background: #262a33; }
  .a-btn-line:hover { box-shadow: inset 0 0 0 1.5px rgba(10, 10, 10, 0.4); }
  .copy-btn:hover { background: #262a33; }
}
@media (min-width: 900px) {
  .howto { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ════════════════════════════════════════════════════════════════════════
   FOOTER (el de la home)
   ════════════════════════════════════════════════════════════════════════ */
#site-footer { position: relative; z-index: 1; background: #fff; color: #111; margin-top: clamp(8px, 1vw, 14px); }
.ft-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.85) 22%, rgba(59, 130, 246, 0.55) 50%, rgba(37, 99, 235, 0.85) 78%, transparent 100%);
  background-size: 200% 100%;
  animation: ft-sep-shimmer 6s linear infinite;
}
@keyframes ft-sep-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.ft-inner { max-width: 1100px; margin: 0 auto; padding: 64px 6% 48px; }
.ft-links-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px 32px; margin-bottom: 52px; }
.ft-logo { height: 16px; opacity: 0.92; display: block; margin-bottom: 20px; }
.ft-tagline { font-size: 0.78rem; color: rgba(17, 17, 17, 0.52); line-height: 1.8; max-width: 220px; }
.ft-col-title { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(17, 17, 17, 0.38); margin-bottom: 18px; }
.ft-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ft-links a { font-size: 0.82rem; color: rgba(17, 17, 17, 0.62); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s; letter-spacing: -0.01em; }
.ft-links a:hover { color: #0c1442; }
.ft-socials { display: flex; gap: 8px; margin-top: 24px; }
.ft-social-icon { width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, 0.1); display: flex; align-items: center; justify-content: center; color: rgba(17, 17, 17, 0.45); text-decoration: none; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.ft-social-icon:hover { border-color: rgba(43, 95, 217, 0.35); color: #2b5fd9; background: rgba(43, 95, 217, 0.06); }
.ft-funding { display: flex; justify-content: center; padding: 8px 0 32px; }
.ft-funding img { max-width: 100%; width: 720px; height: auto; display: block; opacity: 0.92; }
.ft-tcf-badge { display: block; width: auto; height: 48px; margin-top: 18px; }
.ft-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; border-top: 1px solid rgba(0, 0, 0, 0.08); flex-wrap: wrap; gap: 10px; }
.ft-copy, .ft-made { font-size: 0.71rem; color: rgba(17, 17, 17, 0.42); letter-spacing: 0.01em; }
.ft-copy a { color: inherit; }
@media (max-width: 900px) {
  .ft-links-grid { grid-template-columns: 2fr 1fr 1fr; }
  .ft-col:last-child { grid-column: span 3; }
}
@media (max-width: 768px) {
  .ft-inner { padding: 48px 5% 36px; }
  .ft-links-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .ft-col-brand { grid-column: span 2; }
  .ft-col:last-child { grid-column: auto; }
  .ft-funding { padding: 4px 0 24px; }
  .ft-funding img { width: 100%; }
}
@media (max-width: 420px) {
  .ft-links-grid { gap: 24px 14px; }
  .ft-tagline { max-width: 100%; }
  .ft-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── Movimiento reducido ── */
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .a-marquee { flex-wrap: wrap; justify-content: center; -webkit-mask-image: none; mask-image: none; }
  .a-marquee-track { flex-wrap: wrap; justify-content: center; transform: none !important; }
  .st-run { animation: none; color: var(--c-mute); background: none; }
  .msg-typing span, .hint-ring i, .hint-ring::before, .chat-input.is-typing::after, .ft-separator, .mock-field i { animation: none; }
  .hint-ring i + i { display: none; }
  html.js .story.is-live:not(.is-fallback) .chat-thread > li.is-in { animation: none; }
  html.js .story.is-live:not(.is-fallback) .chat-thread,
  html.js .story.is-live:not(.is-fallback) .cap,
  html.js .story.is-live:not(.is-fallback) .story-visual,
  html.js .story.is-live:not(.is-fallback) .chat { transition: none; }
}
