/* Animated hero visuals for AI-agent pages. Illustrative scenarios, not live data or customer transcripts. */
.ah {
  --ah-panel: #0b192c;
  --ah-head: #14253d;
  --ah-line: #2a3e58;
  --ah-edge: #385374;
  --ah-text: #f0f5fb;
  --ah-muted: #aebfd5;
  --ah-ok: #9fe6cc;
  --ah-ease: cubic-bezier(.23, 1, .32, 1);
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  color: var(--ah-text);
  font-size: 13px;
  line-height: 1.4;
}
.ah::before {
  content: '';
  position: absolute;
  inset: -10% 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(5, 15, 32, .9), rgba(5, 15, 32, .55) 62%, transparent);
}
.ah p { margin: 0; max-width: none; color: inherit; font-size: inherit; line-height: inherit; }
.ah img { display: block; }
.ah-window {
  width: min(100%, 470px);
  overflow: hidden;
  border: 1px solid var(--ah-edge);
  border-radius: 16px;
  background: var(--ah-panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .38), 0 0 60px rgba(40, 114, 245, .1);
}
.ah-head { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 9px 16px; background: var(--ah-head); border-bottom: 1px solid var(--ah-line); }
.ah-head .ah-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.ah-head-text { display: grid; gap: 2px; }
.ah-head-text strong { font-size: 15px; font-weight: 700; }
.ah-head-text span { display: flex; align-items: center; gap: 6px; color: var(--ah-muted); font-size: 12px; }
.ah-live { width: 7px; height: 7px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 0 rgba(61, 220, 151, .5); }
.ah.is-playing .ah-live { animation: ah-live 1.8s ease-out infinite; }
.ah-channel { display: flex; align-items: center; gap: 7px; margin-left: auto; font-size: 12px; font-weight: 700; }
.ah-channel img { width: 26px; height: 26px; }
.ah-ok { color: var(--ah-ok); }
.ah-check { flex: 0 0 auto; width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Timeline gate: hidden steps only while the animation may actually run. */
.ah [data-at] { transition: opacity 320ms ease, transform 420ms var(--ah-ease); }
.ah.is-live [data-at]:not(.is-on) { opacity: 0; transform: translateY(8px); }

/* A — conversation with a visible work log */
.ah-chat { gap: 10px; }
.ah-body { position: relative; min-height: 352px; padding: 14px 16px 16px; }
.ah-scene { display: flex; flex-direction: column; gap: 10px; }
.ah-scene[hidden] { display: none; }
.ah-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px 12px 12px 4px; background: #203550; }
.ah-out { align-self: flex-end; background: #225cba; border-radius: 14px 14px 4px 14px; }
.ah-file { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ah-file img { width: 26px; height: 26px; object-fit: contain; padding: 3px; border-radius: 6px; background: #f0f5fc; }
.ah-file span { display: grid; gap: 1px; min-width: 0; }
.ah-file strong { font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.ah-file small { color: #d5e4f6; font-size: 11px; }
.ah-work { padding: 10px 12px; border: 1px solid var(--ah-line); border-radius: 12px; background: #0f2036; }
.ah-work-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; color: var(--ah-muted); font-size: 12px; }
.ah-bar { flex: 0 0 96px; height: 4px; overflow: hidden; border-radius: 4px; background: #1d3352; }
.ah-bar b { display: block; height: 100%; background: linear-gradient(90deg, #2872f5, #68a3ff); transform-origin: left; transition: transform 600ms var(--ah-ease); }
.ah-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ah-steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 16px; align-items: center; gap: 9px; color: #d5e2f2; font-size: 12.5px; }
.ah-steps li > img { width: 20px; height: 20px; object-fit: contain; }
.ah-state { width: 16px; height: 16px; border: 2px solid var(--ah-line); border-radius: 50%; }
.ah-steps li.is-on .ah-state { border-color: #68a3ff; border-right-color: transparent; }
.ah.is-playing .ah-steps li.is-on:not(.is-done) .ah-state { animation: ah-spin 800ms linear infinite; }
.ah-steps li.is-done .ah-state,
.ah:not(.is-live) .ah-state { border: 0; background: #18a879 url('/assets/icons/agent-hero-check.svg') center / 10px no-repeat; }
.ah-actions { display: flex; gap: 6px; margin-top: 9px; }
.ah-actions span { position: relative; padding: 5px 11px; border: 1px solid #3a5270; border-radius: 8px; color: #c2d2e5; font-size: 12px; font-weight: 650; }
.ah-actions .ah-primary { border-color: #2872f5; background: #2872f5; color: #fff; transition: background-color 200ms, box-shadow 200ms; }
.ah-actions .ah-primary:has(.ah-cursor.is-done) { background: #1a55c4; box-shadow: 0 0 0 4px rgba(40, 114, 245, .25); }
.ah-cursor { position: absolute; right: -6px; bottom: -9px; width: 20px; height: 20px; pointer-events: none; }
.ah-cursor svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.ah.is-live .ah-cursor:not(.is-on) { transform: translate(34px, 26px); }
.ah-cursor.is-done svg { animation: ah-click 380ms ease-out; }
.ah-sent { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12px; }
.ah-tabs { display: flex; justify-content: center; gap: 6px; }
.ah-tabs[hidden] { display: none; }
.ah-tabs button { min-height: 32px; padding: 5px 12px; border: 1px solid #3a5270; border-radius: 8px; background: #0d1c30; color: #c2d2e5; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background-color 160ms, border-color 160ms, color 160ms; }
.ah-tabs button[aria-pressed="true"] { border-color: #75a9ee; background: #21497c; color: #fff; }
.ah-tabs button:hover { border-color: #75a9ee; background: #23538d; color: #fff; }
.ah-tabs button:focus-visible { outline: 2px solid #a6ceff; outline-offset: 3px; }

/* B — the agent in the centre of company systems */
.ah-hub { width: min(100%, 540px); aspect-ratio: 520 / 440; }
.ah-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ah-wire { fill: none; stroke: rgba(104, 163, 255, .22); stroke-width: 1.5; stroke-dasharray: 4 6; transition: stroke 300ms ease; }
.ah-wire.is-hot { stroke: rgba(125, 183, 255, .8); stroke-dasharray: none; }
.ah-pulse { fill: #d8e8ff; filter: drop-shadow(0 0 5px #68a3ff) drop-shadow(0 0 10px #2872f5); }
.ah-core { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 23%; aspect-ratio: 1; border: 1px solid #3a5f92; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #1d3f70, #0b192c 72%); box-shadow: 0 0 0 8px rgba(40, 114, 245, .07), 0 0 50px rgba(40, 114, 245, .3); transform: translate(-50%, -50%); transition: box-shadow 400ms ease; }
.ah-core::before { content: ''; position: absolute; inset: -11px; border: 1.5px dashed rgba(104, 163, 255, .45); border-radius: 50%; }
.ah.is-playing .ah-core::before { animation: ah-spin 18s linear infinite; }
.ah-core img { width: 80%; height: 80%; border-radius: 50%; object-fit: cover; }
.ah-core.is-busy { box-shadow: 0 0 0 10px rgba(40, 114, 245, .12), 0 0 80px rgba(104, 163, 255, .55); }
.ah-caption { position: absolute; left: 50%; top: 66.5%; z-index: 2; padding: 4px 11px; border: 1px solid var(--ah-line); border-radius: 999px; background: rgba(11, 25, 44, .94); color: #d9e7f8; font-size: 12px; white-space: nowrap; transform: translateX(-50%); }
.ah-node { position: absolute; display: grid; justify-items: center; gap: 6px; width: 18%; transform: translate(-50%, -50%); }
.ah-node i { display: grid; place-items: center; width: min(100%, 62px); aspect-ratio: 1; border: 1px solid var(--ah-line); border-radius: 16px; background: rgba(20, 37, 61, .94); transition: border-color 260ms ease, box-shadow 260ms ease, transform 360ms var(--ah-ease); }
.ah-node img { width: 54%; height: 54%; object-fit: contain; }
.ah-node span { color: var(--ah-muted); font-size: 11.5px; font-weight: 600; transition: color 260ms ease; }
.ah-node.is-hot i { border-color: #7db7ff; box-shadow: 0 0 0 4px rgba(40, 114, 245, .16), 0 0 30px rgba(104, 163, 255, .5); transform: scale(1.08); }
.ah-node.is-hot span { color: #fff; }
.ah-n-mail { left: 13.5%; top: 25%; }
.ah-n-tg { left: 9.5%; top: 50%; }
.ah-n-max { left: 13.5%; top: 75%; }
.ah-n-1c { left: 86.5%; top: 25%; }
.ah-n-excel { left: 90.5%; top: 50%; }
.ah-n-pdf { left: 86.5%; top: 75%; }
.ah-chip { position: absolute; left: 50%; display: flex; align-items: center; gap: 8px; max-width: 74%; padding: 8px 13px; border-radius: 12px; font-size: 13px; transform: translateX(-50%); transition: opacity 320ms ease, transform 420ms var(--ah-ease); }
.ah-chip small { display: block; color: #d5e4f6; font-size: 11px; }
.ah-chip strong { display: block; font-weight: 650; }
.ah-task { top: 0; background: #225cba; box-shadow: 0 12px 30px rgba(34, 92, 186, .35); }
.ah-result { bottom: 0; border: 1px solid rgba(61, 220, 151, .55); background: rgba(13, 52, 44, .94); color: #e9fff6; }
.ah.is-live .ah-chip:not(.is-on) { opacity: 0; transform: translate(-50%, 8px); }

/* C — task board that the agent clears */
.ah-board .ah-window { width: min(100%, 520px); }
.ah-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; height: 318px; padding: 12px; }
.ah-col { display: flex; flex-direction: column; gap: 7px; min-width: 0; overflow: hidden; padding: 8px; border: 1px solid #1f3350; border-radius: 12px; background: rgba(13, 28, 48, .7); }
.ah-col-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 2px; color: #8ea6c4; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ah-col-title b { min-width: 18px; padding: 1px 6px; border-radius: 999px; background: #1d3352; color: #d5e2f2; font-size: 10px; text-align: center; }
.ah-col-list { display: grid; align-content: start; gap: 7px; }
.ah-card { display: grid; gap: 5px; padding: 8px 9px; border: 1px solid var(--ah-line); border-radius: 10px; background: #14253d; }
.ah-card-top { display: flex; align-items: center; gap: 6px; color: var(--ah-muted); font-size: 10.5px; }
.ah-card-top img { width: 16px; height: 16px; object-fit: contain; }
.ah-card strong { font-size: 12px; font-weight: 650; line-height: 1.3; }
.ah-card-doing, .ah-card-done { display: none; font-size: 11px; }
.ah-card-doing { color: #b9d4f6; }
.ah-card-doing i { display: block; height: 3px; margin-top: 5px; overflow: hidden; border-radius: 3px; background: #1d3352; }
.ah-card-doing i::after { content: ''; display: block; height: 100%; background: linear-gradient(90deg, #2872f5, #68a3ff); transform-origin: left; }
.ah-card-done { align-items: center; gap: 5px; color: var(--ah-ok); }
[data-col="doing"] .ah-card { border-color: #3d6db3; box-shadow: 0 0 0 3px rgba(40, 114, 245, .12); }
[data-col="doing"] .ah-card-doing { display: block; }
[data-col="done"] .ah-card-done { display: flex; }
.ah.is-live [data-col="doing"] .ah-card-doing i::after { animation: ah-progress 2.6s linear both; animation-play-state: paused; }
.ah.is-playing [data-col="doing"] .ah-card-doing i::after { animation-play-state: running; }

/* Proof screenshots that open full size: an icon instead of an explanatory caption. */
.zoom-link { position: relative; display: block; }
.zoom-link::after { content: ''; position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; background: rgba(7, 16, 31, .78) url('/assets/icons/zoom.svg') center / 18px no-repeat; transition: transform 200ms ease, background-color 200ms ease; }
.zoom-link:hover::after { background-color: rgba(40, 114, 245, .92); transform: scale(1.08); }

@keyframes ah-spin { to { transform: rotate(1turn); } }
@keyframes ah-live { 70% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }
@keyframes ah-click { 40% { transform: scale(.82); } 100% { transform: none; } }
@keyframes ah-progress { from { transform: scaleX(.06); } to { transform: scaleX(1); } }

@media (max-width: 900px) {
  .ah { margin-inline: auto; }
}
@media (max-width: 560px) {
  .ah-body { min-height: 0; padding: 12px; }
  .ah-head { min-height: 50px; padding: 7px 12px; }
  .ah-msg { max-width: 94%; }
  .ah-steps li { font-size: 12px; }
  .ah-node span { font-size: 10px; }
  .ah-node i { width: min(100%, 44px); border-radius: 12px; }
  .ah-node img { width: 58%; height: 58%; }
  .ah-chip { max-width: 68%; padding: 6px 10px; font-size: 12px; }
  .ah-chip small { font-size: 10px; }
  .ah-caption { font-size: 11px; }
  .ah-cols { gap: 6px; height: 300px; padding: 8px; }
  .ah-col { padding: 6px; }
  .ah-col-title { font-size: 10px; letter-spacing: .03em; }
  .ah-card { padding: 7px; }
  .ah-card strong { font-size: 11px; }
  .ah-card-top span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ah *, .ah *::before, .ah *::after { animation: none !important; transition: none !important; }
}
