/*
 * IACL Comms — landing. CSS a mano, sin build. Los colores salen de tokens.css (monocromo).
 *
 * Minimalista: la jerarquía se hace con espacio, tipografía, grises y líneas de 1 px. Las cajas
 * solo agrupan lo que de verdad va junto (los planes, el código). Todo el movimiento usa
 * transform y opacity, y se apaga con `prefers-reduced-motion` (D38-landing).
 */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-16)/1.6 var(--font-sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
code, pre, kbd { font-family: var(--font-mono); }
code { font-size: .9em; }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px;
  border-radius: var(--radius-control); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* El cambio de tema se funde en vez de saltar (app.js pone la clase un momento). */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, fill .35s ease, stroke .35s ease !important;
}

/* ── Cabecera ─────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
          backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: var(--fs-16); letter-spacing: -.01em;
  text-decoration: none; margin-right: auto; white-space: nowrap;
  min-height: 44px;
}
.brand-mark { width: 28px; height: 28px; flex: none; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav-links { display: none; align-items: center; gap: 2px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
  color: var(--text-muted); text-decoration: none; font-size: var(--fs-14); border-radius: var(--radius-control);
  transition: color .15s;
}
.nav-links a:hover { color: var(--text); }
@media (min-width: 1080px) { .nav-links { display: flex; } }

/* El cambio de público: de la portada (equipos) a desarrolladores y vuelta. Siempre a la vista
   salvo en móviles muy estrechos, donde el hero ya lleva el mismo enlace. */
.nav-switch {
  display: none; align-items: center; min-height: 40px; padding: 0 12px;
  color: var(--text); font-size: var(--fs-14); font-weight: 500; text-decoration: none; white-space: nowrap;
  border-radius: var(--radius-control);
}
.nav-switch:hover { text-decoration: underline; }
@media (min-width: 420px) { .nav-switch { display: inline-flex; } }
@media (min-width: 1080px) { .nav-links + .nav-switch { margin-left: 6px; padding-left: 16px; border-left: 1px solid var(--border); border-radius: 0; min-height: 24px; } }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: var(--radius-control);
  background: transparent; color: var(--text-muted); cursor: pointer; padding: 0;
}
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle [data-icon] { display: none; }
.theme-toggle[data-mode="auto"] [data-icon="auto"],
.theme-toggle[data-mode="light"] [data-icon="light"],
.theme-toggle[data-mode="dark"] [data-icon="dark"] { display: block; }

.lang-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  font-size: var(--fs-13); font-family: var(--font-mono); color: var(--text-muted); text-decoration: none;
}
.lang-link:hover { color: var(--text); }

.header-cta { display: none; }
@media (min-width: 560px) { .header-cta { display: inline-flex; } }

/* ── Botones ──────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 999px;
  font: 500 var(--fs-14)/1 var(--font-sans); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-13); }
.btn-lg { min-height: 50px; padding: 0 26px; font-size: var(--fs-16); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
@media (max-width: 559px) { .btn-block-sm { width: 100%; } }

.text-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--text); font-size: var(--fs-14); font-weight: 500; text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

/* ── Tipografía de sección ───────────────────────────────── */

section { padding: 80px 0; }
@media (min-width: 768px) { section { padding: 128px 0; } }
.rule { border-top: 1px solid var(--border); }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font: 500 var(--fs-12)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-subtle); margin-bottom: 20px;
}
.eyebrow .num { color: var(--text); }
h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, var(--fs-48)); letter-spacing: -.035em; }
h2 { font-size: clamp(1.875rem, 1.2rem + 2.4vw, 3rem); letter-spacing: -.035em; line-height: 1.06; max-width: 20ch; font-weight: 600; }
h3 { font-size: var(--fs-16); letter-spacing: -.01em; }
.lead { font-size: clamp(1.0625rem, 1rem + .4vw, var(--fs-20)); color: var(--text-muted); max-width: 60ch; margin-top: 20px; }
.section-intro { color: var(--text-muted); max-width: 60ch; margin-top: 20px; font-size: clamp(1rem, .96rem + .2vw, 1.0625rem); }
.section-head { margin-bottom: 56px; }
@media (min-width: 1000px) {
  .section-head.split-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: end; }
  .section-head.split-head .section-intro { margin-top: 0; }
}
.note { margin-top: 40px; color: var(--text-subtle); font-size: var(--fs-14); max-width: 72ch; }

/* ── Hero ────────────────────────────────────────────────── */

.hero { position: relative; isolation: isolate; overflow: hidden; padding: 56px 0 72px; }
@media (min-width: 768px) { .hero { padding: 88px 0 104px; } }

/* Un halo neutro detrás de la escena: luz, no decoración. */
.hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 46%; width: min(1500px, 150vw); height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--halo), transparent);
}

.hero-copy { max-width: 1060px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px;
  color: var(--text-muted); font-size: var(--fs-13);
}
.hero-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.hero-kicker .sep { color: var(--border-strong); }
.hero h1 {
  font-size: clamp(2.6rem, 1.1rem + 5.6vw, 5.25rem);
  line-height: 1; letter-spacing: -.052em; font-weight: 650;
  text-wrap: balance;
}
.hero h1 .h1-a { color: var(--text-subtle); }
.hero h1 .h1-b { color: var(--text); }
@media (min-width: 900px) { .hero h1 span { display: block; } }
.hero .lead { margin: 26px auto 0; max-width: 62ch; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; width: 100%; }
.hero-note { margin-top: 20px; font-size: var(--fs-13); color: var(--text-subtle); }
.hero-note .nw { white-space: nowrap; }
.hero-note [aria-hidden] { margin: 0 8px; }
.hero-switch { margin-top: 12px; }
.hero-switch .text-link { display: inline-block; padding: 10px 0; line-height: 1.5; text-wrap: balance; color: var(--text-muted); font-weight: 400; }
.hero-switch .text-link:hover { color: var(--text); }

/* Entrada del hero: escalonada, una sola vez. */
.motion .hero-copy > * { opacity: 0; transform: translateY(14px); animation: rise .9s cubic-bezier(.16, 1, .3, 1) forwards; }
.motion .hero-copy > :nth-child(2) { animation-delay: .08s; }
.motion .hero-copy > :nth-child(3) { animation-delay: .18s; }
.motion .hero-copy > :nth-child(4) { animation-delay: .28s; }
.motion .hero-copy > :nth-child(5) { animation-delay: .34s; }
.motion .hero-copy > :nth-child(6) { animation-delay: .4s; }
.motion .stage { opacity: 0; transform: translateY(28px) scale(.985); animation: rise 1.2s cubic-bezier(.16, 1, .3, 1) .35s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── La escena del hero: una llamada de venta con la IA ─────────────────────────────── */
/*
 * Sin JS, o con movimiento reducido, se ve el fotograma final completo (el HTML ya trae
 * `is-in`, `is-ended` y `is-open`). app.js cuenta la historia en bucle cambiando solo clases y
 * texto; todo se mueve con transform y opacity dentro de cajas de tamaño fijo (CLS 0).
 */

.stage { margin: 64px auto 0; max-width: 1160px; }

.stage-frame {
  position: relative;
  border: 1px solid var(--border-strong); border-radius: 18px;
  background: var(--surface); overflow: hidden;
  box-shadow: var(--shadow-demo);
  font-size: 14px; line-height: 1.5; text-align: left;
  transition: opacity .45s ease;
}
.stage.is-resetting .stage-frame { opacity: 0; }

.stage-bar {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.stage-title { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stage-title span { color: var(--text-subtle); font-weight: 400; }
.stage-status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--text-muted); font-size: 12.5px; }
.stage-status .rec { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); transition: opacity .3s; }
.stage.is-running:not(.is-ended) .stage-status .rec { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.swap { display: grid; }
.swap > * { grid-area: 1 / 1; transition: opacity .35s ease; white-space: nowrap; }
.stage .s-ended { opacity: 0; }
.stage.is-ended .s-live { opacity: 0; }
.stage.is-ended .s-ended { opacity: 1; }
.stage.is-ended .stage-status .rec { opacity: 0; }

.stage-body { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .stage-body { grid-template-columns: minmax(0, 1fr) 300px; height: 470px; } }
@media (min-width: 1000px) { .stage-body { grid-template-columns: minmax(0, 1fr) 360px; height: 520px; } }

/* La llamada */
.call {
  display: grid; grid-template-rows: auto auto; gap: 16px; padding: 20px; min-width: 0;
  transition: opacity .6s ease, transform .8s cubic-bezier(.16, 1, .3, 1); transform-origin: 50% 40%;
}
@media (min-width: 720px) { .call { grid-template-rows: minmax(0, 1fr) auto; } }
@media (min-width: 720px) { .stage .wrapup { grid-template-rows: auto auto; align-content: center; } }
@media (min-width: 1000px) { .call { padding: 24px; } }
.stage.focus-assist .call { opacity: .42; transform: scale(.985); }

/* El cliente ocupa el escenario; tú, en miniatura en la esquina, como en una llamada de verdad. */
.people { position: relative; min-height: 0; }
.person {
  position: relative; border-radius: 12px; overflow: hidden;
  background: var(--surface-2); display: grid; place-items: end center;
  transition: box-shadow .3s ease, opacity .5s ease;
}
.person[data-who="client"] { aspect-ratio: 16 / 10; }
@media (min-width: 720px) { .person[data-who="client"] { aspect-ratio: auto; height: 100%; } }
.person[data-who="you"] {
  position: absolute; right: 12px; bottom: 12px; z-index: 1;
  width: 30%; max-width: 220px; aspect-ratio: 4 / 3;
  background: var(--surface-3); box-shadow: 0 0 0 1px var(--border-strong), 0 12px 32px -12px rgb(0 0 0 / .35);
}
.person .sil { width: 46%; max-width: 260px; fill: var(--sil); transition: transform .5s cubic-bezier(.16, 1, .3, 1); transform-origin: 50% 100%; }
.person[data-who="you"] .sil { width: 52%; fill: var(--border-strong); }
.person .label { position: absolute; left: 14px; bottom: 12px; right: 14px; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person[data-who="you"] .label { left: 10px; bottom: 8px; font-size: 11.5px; }
.person .label em { font-style: normal; color: var(--text-subtle); margin-left: 6px; }
.person .wave { position: absolute; right: 12px; top: 12px; display: flex; gap: 3px; align-items: flex-end; height: 14px; opacity: 0; transition: opacity .2s; }
.person .wave i { width: 3px; height: 14px; border-radius: 2px; background: var(--text); transform-origin: bottom; transform: scaleY(.3); }
.person[data-who="client"].is-speaking { box-shadow: inset 0 0 0 1.5px var(--text); }
.person[data-who="you"].is-speaking { box-shadow: 0 0 0 1.5px var(--text), 0 12px 32px -12px rgb(0 0 0 / .35); }
.person.is-speaking .wave { opacity: 1; }
.person.is-speaking .sil { transform: scale(1.02); }
.stage.is-running .person.is-speaking .wave i { animation: wave .8s ease-in-out infinite; }
.stage.is-running .person.is-speaking .wave i:nth-child(2) { animation-delay: -.2s; }
.stage.is-running .person.is-speaking .wave i:nth-child(3) { animation-delay: -.4s; }
.stage.is-running .person.is-speaking .wave i:nth-child(4) { animation-delay: -.6s; }
@keyframes wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.stage.is-ended .person { opacity: .4; }

/* Subtítulos en directo: una frase cada vez, en la misma celda (nada se recoloca). */
.captions { display: grid; align-items: end; min-height: 76px; padding: 0 4px; }
.line { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .45s cubic-bezier(.16, 1, .3, 1); }
.line.is-in { opacity: 1; transform: none; }
.line b { display: block; font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: 4px; }
.line [data-type] { font-size: 16px; color: var(--text); letter-spacing: -.01em; }
@media (min-width: 720px) { .line [data-type] { font-size: 17px; line-height: 1.4; } }
@media (min-width: 1000px) { .line [data-type] { font-size: 19px; } }
.line.is-typing [data-type]::after {
  content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -2px;
  background: var(--text); animation: caret .8s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* El panel privado de ayuda (AiLivePanel): sin cajas, con líneas. */
.assist {
  display: grid; grid-template-rows: auto auto minmax(0, 1fr); padding: 20px 22px; min-width: 0;
  border-top: 1px solid var(--border); background: var(--surface);
  transition: opacity .6s ease;
}
@media (min-width: 720px) { .assist { border-top: 0; border-left: 1px solid var(--border); } }
@media (min-width: 1000px) { .assist { padding: 24px; } }
.stage.focus-call .assist { opacity: .5; }
.assist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.assist-title { font-weight: 600; font-size: 13.5px; }
.assist-private { color: var(--text-subtle); font-size: 12px; }
.listening { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; color: var(--text-subtle); font-size: 12px; height: 18px; }
.listening .bars { display: flex; gap: 2px; align-items: center; height: 10px; }
.listening .bars i { width: 2px; height: 10px; border-radius: 1px; background: var(--text-subtle); transform: scaleY(.4); }
.stage.is-running.is-hearing .listening .bars i { animation: wave .9s ease-in-out infinite; }
.stage.is-running.is-hearing .listening .bars i:nth-child(2) { animation-delay: -.3s; }
.stage.is-running.is-hearing .listening .bars i:nth-child(3) { animation-delay: -.6s; }
.stage.is-ended .listening { opacity: 0; }

.feed { list-style: none; display: grid; align-content: start; }
.hint {
  padding: 16px 0; border-top: 1px solid var(--border);
  opacity: 0; transform: translateY(12px);
  transition: opacity .45s ease, transform .6s cubic-bezier(.16, 1, .3, 1);
  transform-origin: 0 0;
}
.hint.is-in { opacity: 1; transform: none; }
.hint.is-focus { transform: scale(1.035); }
.stage.focus-assist .hint.is-in:not(.is-focus) { opacity: .4; }
.hint-kind { display: flex; align-items: center; gap: 8px; font: 500 10.5px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-subtle); }
.hint-kind::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.hint.is-alert .hint-kind { color: var(--warning); }
.hint.is-alert .hint-kind::before { background: var(--warning); }
.hint-text { margin-top: 8px; font-size: 16.5px; line-height: 1.4; letter-spacing: -.01em; color: var(--text); font-weight: 500; }
.hint-src { margin-top: 8px; color: var(--text-muted); font-size: 12.5px; }
.evt { display: inline-block; margin-top: 8px; font: 400 11px/1.4 var(--font-mono); color: var(--text-subtle); }
.evt::before { content: "→ "; }
/* En la portada (equipos) la escena no enseña los nombres de los eventos de la API. */
.stage-plain .evt, .stage-plain .evts { display: none; }

/* El cierre: sube sobre la llamada al colgar. */
.wrapup {
  position: absolute; inset: 0; z-index: 2;
  display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 22px;
  padding: 22px; background: var(--surface);
  transform: translateY(101%); transition: transform .8s cubic-bezier(.16, 1, .3, 1);
}
@media (min-width: 1000px) {
  .wrapup { right: 360px; padding: 32px 34px; border-right: 1px solid var(--border); }
}
.stage.is-open .wrapup { transform: none; }
.wrapup-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.wrapup-head .kicker { font: 500 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--text-subtle); }
.wrapup-head strong { font-size: 18px; letter-spacing: -.02em; }
.wrapup-head .evt { margin: 0 0 0 auto; }
.wrapup-grid { display: grid; gap: 18px; align-content: start; min-height: 0; }
@media (min-width: 640px) { .wrapup-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; } }
.wrapup h4 { margin: 0 0 6px; font: 500 10.5px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-subtle); }
.wrapup p { color: var(--text); font-size: 13.5px; }
.wrapup .wu-col { display: grid; gap: 16px; align-content: start; }
.wrapup .task { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13.5px; }
.wrapup .task span:last-child { color: var(--text-muted); white-space: nowrap; }

.quote { min-width: 0; }
.quote-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.quote-head .state { font-size: 11.5px; color: var(--text-subtle); }
.quote table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; }
.quote td { padding: 7px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.quote td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-muted); }
.quote tr.total td { border-bottom: 0; padding-top: 10px; font-weight: 600; color: var(--text); font-size: 15px; }
.quote .evts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
@media (min-width: 1000px) {
  .wrapup p, .wrapup .task { font-size: 15px; }
  .wrapup .wu-col { gap: 22px; }
  .quote table { font-size: 14px; }
  .quote td { padding: 10px 0; }
  .quote tr.total td { font-size: 17px; padding-top: 14px; }
  .wrapup-head strong { font-size: 20px; }
}

/* Las piezas del cierre entran escalonadas (solo con la animación en marcha). */
.stage.is-running .wrapup [data-step] { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.stage.is-running.is-open .wrapup [data-step] { opacity: 1; transform: none; }
.stage.is-running.is-open .wrapup [data-step="2"] { transition-delay: .15s; }
.stage.is-running.is-open .wrapup [data-step="3"] { transition-delay: .3s; }
.stage.is-running.is-open .wrapup [data-step="4"] { transition-delay: .45s; }
.stage.is-running.is-open .wrapup [data-step="5"] { transition-delay: .6s; }
.stage.is-running.is-open .wrapup [data-step="6"] { transition-delay: .75s; }
.stage.is-running.is-open .wrapup [data-step="7"] { transition-delay: .9s; }

/* Móvil y tablet: la llamada arriba, la ayuda debajo, con alturas fijas. */
@media (max-width: 719px) {
  .assist { height: 320px; }
  .wrapup { inset: 0; }
}
@media (max-width: 639px) {
  .stage-frame { border-radius: 14px; font-size: 13px; }
  .stage-bar { padding: 12px 14px; }
  .call { padding: 14px; gap: 12px; }
  .person .label { font-size: 11.5px; left: 10px; bottom: 8px; }
  .person .label em { display: none; }
  .person[data-who="you"] { right: 8px; bottom: 8px; width: 34%; }
  .person[data-who="you"] .label { font-size: 10.5px; left: 7px; bottom: 5px; }
  .person[data-who="you"] .wave { right: 7px; top: 7px; }
  .captions { min-height: 84px; }
  .line [data-type] { font-size: 15px; }
  .assist { padding: 14px 16px; height: 330px; }
  .stage-title span { display: none; }
  .hint { padding: 12px 0; }
  .hint-text { font-size: 15px; }
  .wrapup { padding: 16px; gap: 14px; }
  .wrapup-head .evt { display: none; }
  .wrapup .wu-col { gap: 12px; }
  .quote .evts { display: none; }
}

/* Pie de la escena: los capítulos, la pausa y la nota de que es una ilustración. */
.stage-caption { display: grid; grid-template-columns: 1fr auto; gap: 14px 16px; align-items: start; margin-top: 22px; }
.chapters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.chapter {
  position: relative; display: grid; gap: 4px; padding: 12px 0 0; min-height: 44px;
  border: 0; background: none; color: var(--text-subtle); cursor: pointer; text-align: left;
  font: 500 var(--fs-14)/1.25 var(--font-sans); transition: color .3s;
}
.chapter::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--border-strong); }
.chapter .bar { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--text); transform-origin: left; transform: scaleX(var(--p, 0)); }
.chapter .n { font: 500 11px/1 var(--font-mono); letter-spacing: .08em; }
.chapter:hover, .chapter[aria-current="step"] { color: var(--text); }
@media (min-width: 900px) { .chapter { font-size: var(--fs-16); } }
.stage-pause {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-muted); cursor: pointer; padding: 0;
}
.stage-pause:hover { color: var(--text); border-color: var(--text); }
.stage-pause svg { width: 15px; height: 15px; }
.stage-pause .i-play { display: none; }
.stage-pause[aria-pressed="true"] .i-pause { display: none; }
.stage-pause[aria-pressed="true"] .i-play { display: block; }
.stage-note { grid-column: 1 / -1; color: var(--text-subtle); font-size: var(--fs-12); text-align: center; }
.stage-note code { color: var(--text-muted); }
.stage:not(.is-running) .chapters, .stage:not(.is-running) .stage-pause { display: none; }
@media (max-width: 559px) {
  .chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .chapter { font-size: var(--fs-13); }
}

/* ── Integra en minutos ──────────────────────────────────── */

.integrate-grid { display: grid; gap: 48px; }
@media (min-width: 1000px) { .integrate-grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 72px; align-items: start; } }
.mini-steps { list-style: none; counter-reset: ms; display: grid; margin-top: 36px; }
.mini-steps li {
  counter-increment: ms; display: grid; grid-template-columns: 36px 1fr; gap: 8px;
  padding: 16px 0; border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-14);
}
.mini-steps li:last-child { border-bottom: 1px solid var(--border); }
.mini-steps li::before { content: counter(ms, decimal-leading-zero); font: 500 12px/1.9 var(--font-mono); color: var(--text-subtle); }
.mini-steps strong { color: var(--text); font-weight: 600; }
.integrate-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 36px; }

.tabs { min-width: 0; }
.tablist { display: none; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.js .tablist { display: flex; }
.tablist [role="tab"] {
  position: relative; min-height: 44px; padding: 0; border: 0; background: transparent;
  color: var(--text-subtle); font: 500 var(--fs-14)/1 var(--font-sans); cursor: pointer; white-space: nowrap;
}
.tablist [role="tab"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.tablist [role="tab"]:hover { color: var(--text); }
.tablist [role="tab"][aria-selected="true"] { color: var(--text); }
.tablist [role="tab"][aria-selected="true"]::after { transform: scaleX(1); }
/* Con JS, los dos paneles comparten celda (la altura es la del mayor: nada salta al cambiar). */
.tabpanels { display: grid; gap: 16px; }
.js .tabpanels { gap: 0; }
.js .tabpanels > .tabpanel { grid-area: 1 / 1; }
.js .tabpanels > .tabpanel:not(.is-active) { visibility: hidden; }

/* El código «se escribe» una vez al entrar: se destapa línea a línea, sin tocar el texto. */
.motion .tabpanel pre { clip-path: inset(0 0 100% 0); }
.motion .tabs.is-visible .tabpanel pre { animation: type-in 1.6s steps(22, end) .15s forwards; }
@keyframes type-in { to { clip-path: inset(0 0 0 0); } }

/* Garantías: cuatro columnas con una línea encima, sin cajas. */
.facts { list-style: none; display: grid; gap: 32px 40px; margin-top: 88px; }
@media (min-width: 640px) { .facts-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .facts-4 { grid-template-columns: repeat(4, 1fr); } }
.facts li { padding-top: 20px; border-top: 1px solid var(--border-strong); color: var(--text-muted); font-size: var(--fs-14); }
.facts strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 8px; font-size: var(--fs-16); letter-spacing: -.01em; }

/* ── Columnas editoriales (en lugar de tarjetas) ─────────── */

.cols { display: grid; gap: 40px; }
@media (min-width: 720px) { .cols-3 { grid-template-columns: repeat(2, 1fr); } .cols-2 { grid-template-columns: repeat(2, 1fr); } .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cols-3 { grid-template-columns: repeat(3, 1fr); gap: 48px; } .cols-4 { grid-template-columns: repeat(4, 1fr); gap: 40px; } }
.col { padding-top: 24px; border-top: 1px solid var(--border-strong); }
.col h3 { font-size: var(--fs-20); letter-spacing: -.02em; margin-bottom: 12px; }
.col p, .col li { color: var(--text-muted); font-size: var(--fs-16); }
.col ul { list-style: none; display: grid; gap: 8px; margin: 4px 0 14px; }
.col ul li { padding-left: 18px; position: relative; font-size: var(--fs-14); }
.col ul li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--text-subtle); }
.col .num { display: block; font: 500 var(--fs-12)/1 var(--font-mono); color: var(--text-subtle); letter-spacing: .08em; margin-bottom: 28px; }
.col-icon { width: 28px; height: 28px; color: var(--text); margin-bottom: 28px; }
.col-icon svg { width: 28px; height: 28px; }

.split { display: grid; gap: 48px; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 80px; align-items: start; } }

/* Casos de uso: filas con línea, el sector a la izquierda y lo que hace la IA a la derecha. */
.cases { list-style: none; border-bottom: 1px solid var(--border); }
.case { display: grid; gap: 16px 40px; padding: 32px 0; border-top: 1px solid var(--border); }
@media (min-width: 900px) { .case { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1fr); padding: 40px 0; } }
.case-head { display: flex; align-items: center; gap: 18px; }
.case-head h3 { font-size: var(--fs-20); letter-spacing: -.02em; }
.case-icon { width: 44px; height: 44px; flex: none; color: var(--text); }
.case-icon svg { width: 44px; height: 44px; overflow: visible; }
.case dl { display: contents; }
.case dl > div { display: grid; gap: 6px; align-content: start; }
.case dt { font: 500 var(--fs-12)/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-subtle); }
.case dd { margin: 0; color: var(--text-muted); }

/* Los trazos de los iconos se dibujan al aparecer; luego cada uno respira a su manera. */
.draw path, .draw line, .draw polyline, .draw circle, .draw rect { stroke-dasharray: 1; stroke-dashoffset: 0; }
.motion .draw path, .motion .draw line, .motion .draw polyline, .motion .draw circle, .motion .draw rect { stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s cubic-bezier(.65, 0, .35, 1); }
.motion .is-visible .draw path, .motion .is-visible .draw line, .motion .is-visible .draw polyline, .motion .is-visible .draw circle, .motion .is-visible .draw rect { stroke-dashoffset: 0; }
.motion .is-visible .draw > :nth-child(2) { transition-delay: .15s; }
.motion .is-visible .draw > :nth-child(3) { transition-delay: .3s; }
.motion .is-visible .draw > :nth-child(4) { transition-delay: .45s; }
.motion .is-visible .draw > :nth-child(5) { transition-delay: .6s; }
.motion .is-visible .draw .pulse { animation: soft-pulse 2.8s ease-in-out 1.4s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes soft-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Programadores */
.checklist { list-style: none; display: grid; margin-top: 36px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-14); }
.checklist li:last-child { border-bottom: 1px solid var(--border); }
.checklist svg { width: 18px; height: 18px; margin-top: 2px; color: var(--text); }
.checklist strong { color: var(--text); font-weight: 600; }
.keys { display: grid; gap: 0; }
.key { padding: 28px 0; border-top: 1px solid var(--border-strong); }
.key:last-of-type { border-bottom: 1px solid var(--border); }
.key h3 { font-size: var(--fs-20); letter-spacing: -.02em; margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.key h3 code { font-size: var(--fs-14); font-weight: 400; color: var(--text-muted); }
.key p { color: var(--text-muted); }
.dev-code-link { margin-top: 12px; }

/* ── Código ──────────────────────────────────────────────── */

.code-block { margin: 0; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); overflow: hidden; min-width: 0; }
.code-block figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 6px 6px 16px; border-bottom: 1px solid var(--border);
  font: 500 var(--fs-12)/1 var(--font-mono); color: var(--text-muted);
}
.code-block pre { margin: 0; padding: 18px; overflow-x: auto; font-size: 12.5px; line-height: 1.7; color: var(--text); tab-size: 2; }
.copy {
  min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-muted); font: 500 var(--fs-12)/1 var(--font-sans); cursor: pointer;
}
.copy:hover { color: var(--text); border-color: var(--text); }

/* ── Planes ──────────────────────────────────────────────── */

.notice { display: flex; gap: 10px; align-items: flex-start; margin: -24px 0 32px; color: var(--text-muted); font-size: var(--fs-14); }
.notice strong { color: var(--text); }
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--warning); }

.plans { display: grid; gap: 16px; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1120px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan {
  display: flex; flex-direction: column; gap: 20px; position: relative;
  padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface);
  transition: border-color .25s, transform .4s cubic-bezier(.16, 1, .3, 1);
}
.plan:hover { border-color: var(--border-strong); }
.plan.featured { border-color: var(--text); }
.plan .badge { position: absolute; top: 28px; right: 28px; font: 500 var(--fs-12)/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.plan h3 { font-size: var(--fs-16); }
.plan-head p { color: var(--text-muted); font-size: var(--fs-14); margin-top: 6px; min-height: 3.2em; }
.plan .price { font-size: 2.5rem; font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.plan .price small { font-size: var(--fs-14); font-weight: 400; color: var(--text-muted); letter-spacing: 0; }
.plan ul { list-style: none; flex: 1; display: grid; gap: 10px; align-content: start; }
.plan li { padding-left: 18px; position: relative; color: var(--text-muted); font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.plan li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--text-subtle); }
.plan .btn { width: 100%; }
/* La barra que se dibuja: el volumen de minutos de reunión de cada plan, a escala. */
.meter { height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(var(--v, 0)); }
.motion .meter i { transform: scaleX(0); transition: transform 1.4s cubic-bezier(.16, 1, .3, 1) .2s; }
.motion .is-visible .meter i { transform: scaleX(var(--v, 0)); }

.table-wrap { margin-top: 56px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
caption { text-align: left; padding: 0 0 12px; font-weight: 600; font-size: var(--fs-16); }
th, td { padding: 14px 16px 14px 0; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { font: 500 var(--fs-12)/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-subtle); border-bottom-color: var(--border-strong); }
tbody th { font-weight: 500; color: var(--text); }
td { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.compare { min-width: 680px; }
.compare td, .compare thead th:not(:first-child) { text-align: right; padding-right: 0; padding-left: 16px; }

.overage { display: grid; gap: 48px; margin-top: 56px; }
@media (min-width: 900px) { .overage { grid-template-columns: 1fr 1fr; gap: 72px; } }
.overage .table-wrap { margin-top: 0; }

/* FAQ: una lista con líneas. */
.faq { display: grid; border-top: 1px solid var(--border-strong); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; min-height: 44px; font-weight: 500;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 var(--fs-20)/1 var(--font-mono); color: var(--text-subtle); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; color: var(--text-muted); font-size: var(--fs-14); max-width: 70ch; }
.faq details > div p + p { margin-top: 8px; }

/* ── Formulario ──────────────────────────────────────────── */

.form-card { max-width: 760px; }
.form { display: grid; gap: 20px; }
.row { display: grid; gap: 20px; }
@media (min-width: 640px) { .row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
label { font-size: var(--fs-14); font-weight: 500; }
.hint { font-size: var(--fs-13); color: var(--text-subtle); }
input:not([type="checkbox"]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-control);
  font: 400 var(--fs-16)/1.4 var(--font-sans);
  transition: border-color .15s;
}
textarea { min-height: 128px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--text-subtle); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; border-color: var(--text); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.error { color: var(--danger); font-size: var(--fs-13); min-height: 0; }
.error:empty { display: none; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.check label { font-weight: 400; color: var(--text-muted); }
.result { margin-top: 24px; }
.result h3 { margin-bottom: 8px; }
.result p { color: var(--text-muted); margin-bottom: 12px; }
.result pre { white-space: pre-wrap; word-break: break-word; font-size: var(--fs-12); background: var(--surface-2); padding: 12px; border-radius: var(--radius-control); }
.result summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }

/* ── CTA final y pie ─────────────────────────────────────── */

.cta-band { text-align: center; padding: 120px 0 128px; }
@media (min-width: 768px) { .cta-band { padding: 168px 0 176px; } }
.cta-band h2 { margin: 0 auto; max-width: 18ch; font-size: clamp(2.25rem, 1.2rem + 4vw, 4rem); line-height: 1.02; letter-spacing: -.05em; }
.cta-band .section-intro { margin: 24px auto 0; }
.cta-band .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }

.site-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; color: var(--text-muted); font-size: var(--fs-14); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); } }
.footer-grid h2 { font: 500 var(--fs-12)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-subtle); margin-bottom: 14px; max-width: none; }
.footer-grid ul { list-style: none; display: grid; gap: 4px; }
.footer-grid a { text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: var(--fs-13); color: var(--text-subtle); }

/* ── Aparición al hacer scroll ───────────────────────────── */
/*
 * La clase `motion` la pone app.js solo con movimiento permitido, y antes marca como visible lo
 * que ya está en pantalla: sin JS todo se ve, y nada parpadea al cargar.
 */
.motion [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform 1s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i, 0) * 80ms); }
.motion [data-reveal].is-visible { opacity: 1; transform: none; }
@media print { .motion [data-reveal], .motion .hero-copy > *, .motion .stage { opacity: 1 !important; transform: none !important; animation: none !important; } .motion .tabpanel pre { clip-path: none !important; } }

/* ── Páginas legales ─────────────────────────────────────── */

.legal { padding: 56px 0 88px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem); margin-bottom: 8px; }
.legal .updated { color: var(--text-subtle); font-size: var(--fs-13); margin-bottom: 24px; }
.prose h2 { font-size: var(--fs-20); margin: 40px 0 12px; max-width: none; line-height: 1.2; letter-spacing: -.02em; }
.prose h3 { margin: 24px 0 8px; }
.prose p, .prose li { color: var(--text-muted); }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 20px; display: grid; gap: 6px; margin: 12px 0; }
.prose table { margin: 16px 0; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px 10px 0; }
.toc { list-style: none; padding: 0 !important; display: flex !important; flex-wrap: wrap; gap: 4px 20px !important; margin-bottom: 8px !important; }
.toc a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; font-size: var(--fs-13); color: var(--text-muted); }
.toc a:hover, .toc a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* 404 */
.not-found { min-height: 60vh; display: grid; align-content: center; gap: 16px; }
.not-found .code { font: 500 var(--fs-14)/1 var(--font-mono); color: var(--text-subtle); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
