/* Hero animation (hero-anim.js). The world is laid out in world px and
   scaled by the camera, so sizes here are at zoomed-in terminal scale. */
.hero-anim {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius-lg);
  background: #101012;
}
.ha-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
/* Overnight clock and session count, drawn at stage scale over the zoomed-out fleet */
.ha-hud {
  position: absolute;
  left: 16px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  pointer-events: none;
}
.ha-hud b { font-size: clamp(1.125rem, 2.4vw, 1.625rem); font-weight: 600; color: #ece6f5; letter-spacing: -0.01em; }
.ha-hud span { font-size: clamp(0.6875rem, 1.2vw, 0.75rem); line-height: 1.35; color: #a5a0ad; }
.ha-fade {
  position: absolute;
  inset: 0;
  background: #101012;
  pointer-events: none;
}

/* Flow from each teammate up to the cloud */
.ha-flow {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
}
.ha-line { fill: none; stroke: #3d2c58; stroke-width: 9; }
.ha-line-alarm { stroke: #6b2f2f; }
.ha-dot-alarm { fill: #ff6b62; }
.ha-line-accent { stroke: #b78bff; stroke-opacity: 0.75; stroke-width: 11; }
.ha-dot { fill: #8a72b8; }
.ha-dot-accent { fill: #d6a8ff; }

.ha-cloud {
  --glow: 0;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  background: rgba(183, 139, 255, 0.07);
  border: 11px solid var(--accent);
  border-radius: 64px;
  box-shadow: 0 0 calc(40px + var(--glow) * 260px) calc(var(--glow) * 40px) rgba(183, 139, 255, calc(0.12 + var(--glow) * 0.35));
  font-family: var(--font-body);
  font-size: 150px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ece6f5;
  white-space: nowrap;
}
.ha-cloud img { width: 170px; height: 170px; }

/* macOS-style terminal windows, 56 columns by 16 rows */
.ha-win {
  position: absolute;
  width: 480px;
  height: 352px;
  overflow: hidden;
  background: #1b1b1f;
  border-radius: 10px;
  box-shadow: 0 0 0 1px #34343b, 0 24px 60px rgba(0, 0, 0, 0.55);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 19px;
  color: #e8e6ec;
}
.ha-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  background: #2a2a30;
  border-bottom: 1px solid #121214;
}
.ha-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.ha-bar i:nth-child(2) { background: #febc2e; }
.ha-bar i:nth-child(3) { background: #28c840; }
.ha-bar span {
  position: absolute;
  left: 70px;
  right: 70px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  color: #a5a0ad;
  white-space: nowrap;
  overflow: hidden;
}
.ha-body {
  display: flex;
  flex-direction: column;
  height: 324px;
  padding: 10px 14px 12px;
}
.ha-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  white-space: pre;
}
.ha-blk { margin-top: 8px; }
.ha-input {
  margin-top: 8px;
  padding: 3px 9px;
  border: 1px solid #5a5a63;
  border-radius: 6px;
  white-space: pre;
}
.ha-dim { color: #8f8a98; }
.ha-dim span { color: #6d6875; }
.ha-user { color: #a8a3b0; }
.ha-spin { color: #d77757; }
.ha-ok { color: #4eba65; }
.ha-run { color: #8f8a98; }
.ha-say { color: #e8e6ec; }
.ha-off { visibility: hidden; }
.ha-log b { font-weight: 700; }
.ha-log em { font-style: normal; color: var(--accent-link); }
.ha-caret { background: #e8e6ec; }

/* Everyone else: text suggested by bars, slowly scrolling */
.ha-fake {
  display: flex;
  gap: 14px;
  height: 100%;
  overflow: hidden;
}
.ha-side { flex: 0 0 90px; margin: -10px 0 -12px -14px; background: #202025; }
.ha-fake-col { flex: 1; animation: ha-scroll 18s linear infinite; }
.ha-l { height: 9px; margin: 0 0 10px; border-radius: 2px; background: #45434d; }
.ha-l-ok { background: #3b6e48; }
.ha-l-hi { background: #5e4a86; }
.ha-l-bad { background: #7a3b3b; }
@keyframes ha-scroll { to { transform: translateY(-50%); } }
.hero-anim.is-paused .ha-fake-col,
.hero-anim.is-still .ha-fake-col { animation-play-state: paused; }

/* Name and agent under each window, sized for the zoomed-out view */
.ha-tag {
  position: absolute;
  width: 560px;
  text-align: center;
  font-family: var(--font-body);
  line-height: 1.15;
  color: #8a7ea0;
}
.ha-tag b { display: block; font-size: 104px; font-weight: 500; }
.ha-tag span { display: block; font-family: var(--font-mono); font-size: 72px; }
.ha-tag-lead { color: #ece6f5; }
.ha-tag-alarm b { color: #ff7b72; }
.ha-tag-alarm span { color: #e5534b; }

/* Failing sessions pulse red; sizes are large because the zoomed-out camera scales the world down about 8x */
.ha-win.ha-alarm { animation: ha-alarm 1.4s ease-in-out infinite; }
.ha-win.ha-alarm::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #e5534b;
  pointer-events: none;
  animation: ha-alarm-fill 1.4s ease-in-out infinite;
  animation-delay: inherit;
}
@keyframes ha-alarm {
  0%, 100% { box-shadow: 0 0 0 1px #34343b, 0 24px 60px rgba(0, 0, 0, 0.55); }
  50% { box-shadow: 0 0 0 18px #e5534b, 0 0 260px 70px rgba(229, 83, 75, 0.6); }
}
@keyframes ha-alarm-fill { 0%, 100% { opacity: 0.04; } 50% { opacity: 0.26; } }
.hero-anim.is-paused .ha-alarm, .hero-anim.is-paused .ha-alarm::after,
.hero-anim.is-still .ha-alarm, .hero-anim.is-still .ha-alarm::after,
.team-anim.is-paused .ha-alarm, .team-anim.is-paused .ha-alarm::after,
.team-anim.is-still .ha-alarm, .team-anim.is-still .ha-alarm::after { animation-play-state: paused; }
/* The worst finding's ID in your terminal */
.ha-log s { text-decoration: none; color: #ff7b72; font-weight: 700; }
.ha-tag-lead b { font-weight: 600; }
.ha-tag-lead span { color: var(--accent-link); }
