/* ==========================================================================
   /agentes-ia/voz/ : orbe de voz del hero, anatomía de una llamada (escenario fijo),
   teclado de capacidades, registro de llamadas en vivo.
   Solo transform/opacity animados. Sin JS o con reduced-motion todo queda estático y visible.
   ========================================================================== */

/* ---------- Hero: texto + orbe ---------- */
.hero--voz .container { max-width: var(--max); text-align: left; display: grid; gap: var(--s-6); grid-template-columns: 1fr; align-items: center; }
.hero--voz .lead { margin-inline: 0; }
.hero--voz .btn-row, .hero--voz .hero__checks { justify-content: flex-start; }
.hero--voz h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); }
@media (min-width: 960px) { .hero--voz .container { grid-template-columns: 1.02fr .98fr; gap: var(--s-6); } }

.orb { position: relative; width: 100%; max-width: 440px; margin-inline: auto; }
.orb__svg { display: block; width: 100%; height: auto; aspect-ratio: 1; overflow: visible; }
.orb__glow, .orb__core, .orb__pulse, .orb__bar { transform-box: fill-box; }
.orb__glow, .orb__core, .orb__pulse { transform-origin: center; }
.orb__glow { animation: orb-glow 4s ease-in-out infinite; }
.orb__core { animation: orb-core 2.4s ease-in-out infinite; }
.orb__pulse { opacity: 0; animation: orb-pulse 3.2s ease-out infinite; }
.orb__pulse--2 { animation-delay: 1.6s; }
.orb__bar { transform-origin: 50% 100%; animation: orb-bar 1.5s ease-in-out infinite; animation-delay: var(--d); }
@keyframes orb-glow { 0%, 100% { transform: scale(.94); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes orb-core { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes orb-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes orb-bar { 0%, 100% { transform: scaleY(.28); } 35% { transform: scaleY(1); } 65% { transform: scaleY(.5); } }

/* Frases que se turnan debajo del orbe (alto fijo: sin saltos) */
.orb__caps { position: relative; display: grid; margin-top: var(--s-4); min-height: 108px; }
.orb__cap { grid-area: 1 / 1; display: grid; gap: var(--s-2); align-content: start; opacity: 0; animation: orb-cap 12s ease-in-out infinite; animation-delay: calc(var(--i) * 4s); }
.orb__b { max-width: 92%; padding: var(--s-2) var(--s-4); border-radius: 16px; color: var(--c-white); font-size: var(--fs-sm); line-height: 1.45; }
.orb__b--c { justify-self: end; background: rgba(255, 10, 192, .1); border: 1px solid rgba(255, 10, 192, .5); border-bottom-right-radius: 4px; }
.orb__b--a { justify-self: start; background: rgba(19, 242, 242, .08); border: 1px solid rgba(19, 242, 242, .5); border-bottom-left-radius: 4px; opacity: 0; animation: orb-reply 12s ease-in-out infinite; animation-delay: calc(var(--i) * 4s); }
@keyframes orb-cap { 0% { opacity: 0; transform: translateY(8px); } 5%, 26% { opacity: 1; transform: none; } 30%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes orb-reply { 0%, 10% { opacity: 0; transform: translateY(8px); } 15%, 26% { opacity: 1; transform: none; } 30%, 100% { opacity: 0; } }
@media (max-width: 640px) { .orb__bar:nth-child(n) { animation-duration: 1.8s; } }

/* ==========================================================================
   Anatomía de una llamada: escenario sticky a la izquierda, pasos a la derecha (≥900px)
   ========================================================================== */
.anat { display: grid; gap: var(--s-7); }
.anat__sticky .section__head { margin: 0 auto var(--s-6); text-align: center; }
.anat__sticky .section__head .eyebrow::before { display: none; }
.anat__stage { display: none; }
.anat__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-7); }
.anat__step { position: relative; }
.anat__num { display: block; font: 700 2.6rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 1.5px var(--c-cyan); margin-bottom: var(--s-3); }
.anat__step h3 { margin-bottom: var(--s-2); }
.anat__step p { margin: 0; color: var(--c-text); max-width: 46ch; }
.anat__inline { margin-top: var(--s-4); }

/* Tarjetas de ejemplo (comunes al escenario y a la versión en línea) */
.ac { display: grid; gap: var(--s-4); align-content: center; justify-items: start; padding: var(--s-5); background: rgba(43, 43, 41, .78); border: 1px solid var(--c-border-ui); border-radius: 24px; box-shadow: var(--shadow-card); min-height: 190px; }
.ac__pill { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--c-cyan); border: 1px solid rgba(19, 242, 242, .5); border-radius: var(--radius-pill); padding: .2rem .75rem; }
.ac__big { font: 700 clamp(1.4rem, 1.1rem + 1vw, 1.9rem)/1.1 var(--font-display); color: var(--c-white); letter-spacing: .03em; }
.ac__bars { display: flex; align-items: center; gap: 3px; height: 44px; width: 100%; }
.ac__bars i { flex: 1; height: 100%; border-radius: 3px; background: linear-gradient(var(--c-cyan), var(--c-pink)); transform: scaleY(.2); animation: ac-bar 1.2s ease-in-out infinite; animation-delay: var(--d); }
@keyframes ac-bar { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }
.ac__tr { margin: 0; color: var(--c-white); font-size: var(--fs-lg); line-height: 1.5; }
.ac__cursor { display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; vertical-align: -.15em; background: var(--c-cyan); animation: ac-blink 1s steps(1) infinite; }
@keyframes ac-blink { 50% { opacity: 0; } }
.ac__chips, .ac__tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); width: 100%; }
.ac__chips li { padding: .45rem .9rem; border: 1px solid rgba(160, 111, 224, .6); background: rgba(160, 111, 224, .1); border-radius: var(--radius-pill); color: var(--c-white); font-size: var(--fs-sm); }
.ac__chips em { font-style: normal; color: var(--c-muted); margin-right: .35rem; font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; }
.ac__tasks { flex-direction: column; flex-wrap: nowrap; }
.ac__tasks li { position: relative; display: flex; align-items: center; gap: var(--s-3); color: var(--c-white); }
.ac__tasks li::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--c-border-ui); background: center / 12px no-repeat; transition: background-color .3s ease, border-color .3s ease; }
.ac__note { display: grid; gap: 2px; padding: var(--s-3) var(--s-4); border-left: 3px solid var(--c-pink); background: rgba(255, 10, 192, .08); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--c-white); }
.ac__note span { color: var(--c-text); font-size: var(--fs-sm); }

@media (max-width: 899px), (max-height: 760px) { .anat__step .ac__tasks li::before { background-color: var(--c-cyan); border-color: var(--c-cyan); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1D1B' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); } }

@media (min-width: 900px) and (min-height: 761px) {
	.anat { grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: start; }
	.anat__inline { display: none; }
	.anat__steps { gap: 0; }
	.anat__step { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; opacity: .5; transition: opacity .4s ease; }
	.anat__step.is-active { opacity: 1; }
	.anat__sticky { position: sticky; top: calc(var(--header-h) + var(--s-6)); display: grid; gap: var(--s-6); align-content: start; }
	.anat__sticky .section__head { margin: 0; text-align: left; }
	.anat__sticky .section__head .eyebrow::before { display: inline-block; }
	.anat__sticky h2 { font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.3rem); }
	.anat__stage { display: grid; gap: var(--s-5); }
	.anat__dots { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; position: relative; }
	.anat__dots::before { content: ""; position: absolute; left: 24px; right: 24px; top: 23px; height: 2px; background: var(--c-line); }
	.anat__dots::after { content: ""; position: absolute; left: 24px; right: 24px; top: 23px; height: 2px; background: var(--grad); transform-origin: left; transform: scaleX(var(--f, 0)); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
	.anat__dot { position: relative; z-index: 1; display: grid; justify-items: center; gap: var(--s-2); width: 56px; }
	.anat__dot span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--c-surface); border: 1.5px solid var(--c-line); color: var(--c-muted); transition: color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s ease; }
	.anat__dot em { font-style: normal; font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); transition: color .3s ease; }
	.anat__dot.is-done span { color: var(--c-cyan); border-color: var(--c-cyan); }
	.anat__dot.is-active span { color: var(--c-ink); background: var(--c-cyan); border-color: var(--c-cyan); box-shadow: var(--shadow-glow); transform: scale(1.1); }
	.anat__dot.is-active em { color: var(--c-white); }
	.anat__cards { display: grid; }
	.anat__card { grid-area: 1 / 1; min-height: 270px; opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none; transition: opacity .45s ease, transform .45s ease; }
	.anat__card.is-active { opacity: 1; transform: none; }
	/* Las tareas se tachan una a una al activarse el paso 4 */
	.anat__card.is-active .ac__tasks li::before { background-color: var(--c-cyan); border-color: var(--c-cyan); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1D1B' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); transition-delay: calc(var(--k, 0) * .45s); }
	.anat__card .ac__tasks li:nth-child(1)::before { --k: 1; } .anat__card .ac__tasks li:nth-child(2)::before { --k: 2; } .anat__card .ac__tasks li:nth-child(3)::before { --k: 3; } .anat__card .ac__tasks li:nth-child(4)::before { --k: 4; }
	.anat__card .ac__tasks li:nth-child(n)::before { transition-delay: calc(var(--k) * .45s); }
}

/* ==========================================================================
   Teclado: cada tecla enseña una capacidad
   ========================================================================== */
.keys { display: grid; gap: var(--s-6); grid-template-columns: 1fr; max-width: 980px; margin-inline: auto; align-items: center; }
@media (min-width: 860px) { .keys { grid-template-columns: 1fr 1fr; gap: var(--s-8); } }
.keys__display { position: relative; min-height: 250px; display: grid; align-content: center; gap: var(--s-3); padding: var(--s-6); border: 1px solid var(--c-border-ui); border-radius: 24px; background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--kc, #13F2F2) 14%, transparent), transparent 60%), rgba(43, 43, 41, .78); box-shadow: var(--shadow-card); overflow: hidden; }
.keys__num { font: 700 4.5rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 2px var(--kc, var(--c-cyan)); }
.keys__title { margin: 0; font: 600 var(--fs-lg)/1.25 var(--font-display); color: var(--c-white); }
.keys__text { margin: 0; color: var(--c-text); max-width: 40ch; }
.keys__display.is-swap .keys__title, .keys__display.is-swap .keys__text, .keys__display.is-swap .keys__num { animation: keys-in .45s cubic-bezier(.2, .7, .2, 1) both; }
.keys__display.is-swap .keys__text { animation-delay: .06s; }
@keyframes keys-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.keys__pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); max-width: 360px; width: 100%; margin-inline: auto; }
.keys__key { all: unset; box-sizing: border-box; position: relative; aspect-ratio: 1; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; padding: var(--s-2); cursor: pointer; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 20px; color: var(--c-muted); text-align: center; transition: transform .18s ease, border-color .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease; }
.keys__key:hover { border-color: var(--kc); color: var(--c-white); }
.keys__key:active { transform: scale(.94); }
.keys__key:focus-visible { outline: 2px solid var(--c-white); outline-offset: 3px; }
.keys__key.is-active { border-color: var(--kc); background: color-mix(in srgb, var(--kc) 16%, var(--c-surface)); color: var(--c-white); box-shadow: 0 0 24px color-mix(in srgb, var(--kc) 40%, transparent); transform: translateY(-3px); }
.keys__n { font: 700 1.35rem/1 var(--font-display); }
.keys__ico { color: var(--kc); display: grid; }
.keys__l { font-size: var(--fs-xs); letter-spacing: .04em; }

/* ==========================================================================
   Registro de llamadas en vivo (alto fijo: entran filas arriba y salen por abajo)
   ========================================================================== */
.calls { background: rgba(43, 43, 41, .78); border: 1px solid var(--c-border-ui); border-radius: 24px; padding: var(--s-5); box-shadow: var(--shadow-card); width: 100%; max-width: 560px; justify-self: end; }
.calls__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: var(--s-3); border-bottom: 1px solid var(--c-line); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); }
.calls__live { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--c-white); }
.calls__live i { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: chat-pulse 2s infinite; }
.calls__list { list-style: none; margin: 0; padding: 0; height: 340px; overflow: hidden; }
.calls__row { display: grid; grid-template-columns: 3.2rem 1fr auto; grid-template-areas: "t w d" "t r r"; gap: 2px var(--s-3); align-items: center; height: 68px; padding: var(--s-3) 0; border-bottom: 1px solid var(--c-line); }
.calls__row.is-new { animation: calls-in .55s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes calls-in { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
.calls__row time { grid-area: t; font: 600 var(--fs-sm)/1 var(--font-display); color: var(--c-white); font-variant-numeric: tabular-nums; }
.calls__what { grid-area: w; color: var(--c-white); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calls__dur { grid-area: d; color: var(--c-muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.calls__res { grid-area: r; justify-self: start; padding: .1rem .6rem; border-radius: var(--radius-pill); font-size: var(--fs-xs); letter-spacing: .05em; text-transform: uppercase; color: var(--c-ink); background: var(--c-cyan); }
.calls__res--2 { background: #7C8CFF; }
.calls__res--3 { background: var(--c-pink); }
.calls__res--4 { background: #A06FE0; }
.calls__note { margin: var(--s-3) 0 0; font-size: var(--fs-xs); color: var(--c-muted); text-align: center; }
@media (max-width: 859px) { .calls { justify-self: stretch; max-width: none; } }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
	.orb__glow, .orb__core, .orb__pulse, .orb__bar, .ac__bars i, .ac__cursor, .calls__live i { animation: none; }
	.orb__bar { transform: scaleY(.6); }
	.orb__pulse { opacity: .35; }
	.ac__bars i { transform: scaleY(.6); }
	.orb__caps { min-height: 0; gap: var(--s-4); }
	.orb__cap { grid-area: auto; opacity: 1; animation: none; }
	.orb__cap:nth-child(n+2) { display: none; }
	.orb__b--a { opacity: 1; animation: none; }
	.calls__row.is-new, .keys__display.is-swap .keys__title, .keys__display.is-swap .keys__text, .keys__display.is-swap .keys__num { animation: none; }
	.anat__step { opacity: 1; transition: none; }
	.anat__card, .anat__dots::after { transition: none; }
}
