/* clip, not hidden: hidden would also cut the floating cards and the tilt shadow at the hero's bottom edge. */
.hero-stage { overflow-x: clip; background-image: radial-gradient(circle at calc(100% - 190px) 130px, rgba(181, 32, 37, 0.14) 0, rgba(181, 32, 37, 0) 395px); }

.call-stage { position: relative; max-width: 600px; margin-left: auto; }
/* min-height holds the chips' height before the script adds them, so the hero does not jump on load. */
.call-stage .scenes { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; min-height: 34px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.call-stage .scenes::-webkit-scrollbar { display: none; }
.call-stage .scenes-lbl { flex-shrink: 0; white-space: nowrap; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-light); font-weight: 700; margin-right: 2px; }
.call-stage .scene-chip { position: relative; overflow: hidden; flex-shrink: 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: #444; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.call-stage .scene-chip::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: var(--crimson); transition: width 0.4s linear; }
.call-stage .scene-chip.active { border-color: var(--crimson); color: var(--crimson); background: var(--crimson-light); }
.call-stage .scene-chip:hover { border-color: var(--crimson); }

.call-stage .call-wrap { position: relative; }
.call-stage .tilt { position: relative; transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.25s ease-out; }
.call-stage .call { position: relative; height: 500px; display: flex; flex-direction: column; border-radius: 26px; padding: 18px 20px 20px; color: #eee; background: radial-gradient(120% 70% at 50% 0%, #2e2e2e 0%, #1d1d1d 60%, #171717 100%); box-shadow: 0 50px 90px -40px rgba(33, 33, 33, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.05); overflow: hidden; }
.call-stage .call-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-right: 68px; font-size: 0.74rem; letter-spacing: 0.07em; text-transform: uppercase; color: #9a9a9a; }
.call-stage .status { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.call-stage .status .st { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-stage .status .dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; }
.call-stage .call.ringing .status .dot { animation: csLive 1s ease-out infinite; }
.call-stage .call.ended .status .dot { background: #666; }
.call-stage .timer { flex-shrink: 0; font-variant-numeric: tabular-nums; color: #ccc; }
.call-stage .ctrls { position: absolute; top: 12px; right: 16px; z-index: 2; display: flex; gap: 6px; }
.call-stage .ctl { width: 30px; height: 30px; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.08); color: #bbb; font-size: 0.95rem; cursor: pointer; transition: background 0.2s, color 0.2s; }
.call-stage .ctl:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.call-stage .ctl.on { background: var(--crimson); color: #fff; }
.call-stage.paused .call *, .call-stage.paused .call *::before, .call-stage.paused .call *::after { animation-play-state: paused; }

.call-stage .parties { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; margin: 22px 0 4px; }
.call-stage .party { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 104px; text-align: center; }
.call-stage .avatar { position: relative; width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; transition: box-shadow 0.35s, filter 0.35s; }
.call-stage .avatar.caller { background: #3a3a3a; color: #ddd; }
.call-stage .avatar.ai { background: radial-gradient(circle at 35% 30%, #e0464b, #b52025 55%, #7e1418); color: #fff; font-size: 1.4rem; }
.call-stage .call.ringing .avatar.ai { filter: grayscale(0.7) brightness(0.6); }
.call-stage .avatar.caller::before, .call-stage .avatar.caller::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(229, 72, 77, 0.7); opacity: 0; }
.call-stage .call.ringing .avatar.caller::before { animation: csRipple 1.4s ease-out infinite; }
.call-stage .call.ringing .avatar.caller::after { animation: csRipple 1.4s ease-out 0.7s infinite; }
.call-stage .call.talk-agent .avatar.ai { box-shadow: 0 0 0 8px rgba(181, 32, 37, 0.2), 0 0 36px 8px rgba(181, 32, 37, 0.45); }
.call-stage .call.talk-caller .avatar.caller { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08); }
.call-stage .pname { font-size: 0.82rem; color: #e6e6e6; font-weight: 600; line-height: 1.2; }
.call-stage .pmeta { font-size: 0.7rem; color: #888; white-space: nowrap; }
.call-stage .wire { position: relative; height: 2px; margin-top: 28px; background: repeating-linear-gradient(90deg, #444 0 6px, transparent 6px 12px); }
.call-stage .call.live .wire, .call-stage .call.talk-agent .wire, .call-stage .call.talk-caller .wire { background: linear-gradient(90deg, #5a5a5a, #b52025); }
.call-stage .wire::after { content: ""; position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; opacity: 0; }
.call-stage .call.talk-caller .wire::after { opacity: 1; background: #fff; animation: csFlowR 0.9s linear infinite; }
.call-stage .call.talk-agent .wire::after { opacity: 1; background: #ff6b6f; box-shadow: 0 0 10px 2px rgba(255, 107, 111, 0.7); animation: csFlowL 0.9s linear infinite; }

.call-stage .viz { display: flex; align-items: center; justify-content: center; gap: 3px; height: 40px; margin-top: 8px; }
.call-stage .viz span { width: 3px; height: 3px; border-radius: 2px; background: #444; transition: height 0.09s linear, background 0.3s; }
.call-stage .call.talk-agent .viz span { background: #e0464b; }
.call-stage .call.talk-caller .viz span { background: #bdbdbd; }
.call-stage .viz-lbl { text-align: center; font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; color: #777; height: 14px; }

.call-stage .feed { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; margin-top: 10px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30%); mask-image: linear-gradient(to bottom, transparent 0, #000 30%); }
.call-stage .b { max-width: 84%; padding: 9px 13px; border-radius: 16px; font-size: 0.9rem; line-height: 1.45; animation: csRise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.call-stage .b.caller { align-self: flex-start; background: #333; color: #eee; border-bottom-left-radius: 5px; }
.call-stage .b.agent { align-self: flex-end; background: rgba(181, 32, 37, 0.2); border: 1px solid rgba(224, 70, 75, 0.45); color: #fff; border-bottom-right-radius: 5px; }
.call-stage .b .who { display: block; font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: #9a9a9a; margin-bottom: 2px; font-weight: 700; }
.call-stage .b.agent .who { color: #f08a8d; }
.call-stage .caret { display: inline-block; width: 2px; height: 1em; background: currentColor; margin-left: 2px; vertical-align: -2px; animation: csBlink 0.8s steps(1) infinite; }
.call-stage .tool { align-self: center; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 0.74rem; color: var(--gold); border: 1px dashed rgba(212, 168, 67, 0.5); background: rgba(212, 168, 67, 0.07); animation: csRise 0.3s both; }
.call-stage .tool .spin { display: inline-block; animation: csSpin 0.8s linear infinite; }
.call-stage .tool.done { border-style: solid; }

.call-stage .fcs { position: absolute; inset: 0; pointer-events: none; transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0); transition: transform 0.25s ease-out; }
.call-stage .fc { position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: 0 26px 50px -22px rgba(33, 33, 33, 0.45); opacity: 0; transform: translateY(16px) scale(0.94); transition: opacity 0.45s, transform 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.2); }
.call-stage .fc.show { opacity: 1; transform: none; }
.call-stage .fc-cal { top: 102px; right: -44px; }
.call-stage .fc-mail { bottom: -66px; left: -48px; }
.call-stage .calbox { width: 46px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); text-align: center; flex-shrink: 0; }
.call-stage .calbox .m { background: var(--crimson); color: #fff; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; padding: 2px 0; }
.call-stage .calbox .d { font-size: 1.25rem; font-weight: 800; line-height: 1.6; color: var(--dark); }
.call-stage .fc .k { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--crimson); }
.call-stage .fc .v { font-size: 0.92rem; font-weight: 700; line-height: 1.25; color: var(--dark); }
.call-stage .fc .s { font-size: 0.78rem; color: var(--gray); }
.call-stage .mailic { width: 42px; height: 42px; border-radius: 12px; background: var(--crimson-light); color: var(--crimson); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
/* Sits below the mail card's overhang so the card never covers the "Sample call" label. */
.call-stage .stage-note { margin: 76px 0 0; font-size: 0.78rem; color: var(--gray-light); text-align: center; }

@media (max-width: 1299px) { .call-stage .fc-cal { right: -14px; } .call-stage .fc-mail { left: -14px; } }
@media (max-width: 991px) { .call-stage { margin: 8px auto 0; } }
@media (max-width: 575px) {
  .call-stage .call { height: 480px; padding: 16px 14px; }
  .call-stage .ctrls { top: 10px; right: 10px; }
  .call-stage .call-top { font-size: 0.68rem; letter-spacing: 0.04em; }
  .call-stage .party { width: 84px; }
  .call-stage .fcs { position: static; display: grid; gap: 10px; margin-top: 12px; transform: none; }
  .call-stage .fc { position: relative; inset: auto; }
  /* The cards sit in the flow here; two reserved lines stop the page below from jumping when a scene's line wraps. */
  .call-stage .fc-mail .s { min-height: 3em; }
  .call-stage .stage-note { margin-top: 14px; }
}

@keyframes csLive { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(229, 72, 77, 0); } }
@keyframes csRipple { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes csRise { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes csSpin { to { transform: rotate(360deg); } }
@keyframes csBlink { 50% { opacity: 0; } }
@keyframes csFlowR { from { left: 0; } to { left: calc(100% - 8px); } }
@keyframes csFlowL { from { left: calc(100% - 8px); } to { left: 0; } }
@media (prefers-reduced-motion: reduce) { .call-stage *, .call-stage *::before, .call-stage *::after { animation: none !important; transition: none !important; } }
