/* ===========================================================================
   AlloTech.AI — team stage, work events, Boss Brain flow, approval demo (v1)
   Vanilla CSS/JS, not Framer Motion/Three.js: no 3D asset exists to justify a
   WebGL scene (checked the repo), and this static page has no React runtime
   to host Framer Motion without reintroducing the hydration risk /reserver/
   just recovered from. Motion tokens match the brief: 150-250ms micro,
   300-450ms card, 450-700ms section reveal, 4-8s idle cycle.
   =========================================================================== */

/* .flow-hub (Boss Brain flow section, further down this file) still uses
   this keyframe -- kept even though the new stage below no longer does. */
@keyframes breathe { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-8px) scale(1.015); } }

/* ------------------------------------------------------- team stage (v2) */
/* Continuous vertical loop, all avatars the same size. Reuses the same
   seamless-marquee technique as .ticker in allotech-motion.v3.css (render
   the list twice, animate translateY 0 -> -50%) rather than a new idiom. */
.stage {
  position: relative; height: 380px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
}
.stage-track {
  display: flex; flex-direction: column; gap: 16px;
  animation: stage-loop 28s linear infinite;
  will-change: transform;
}
.stage:hover .stage-track, .stage:focus-within .stage-track { animation-play-state: paused; }
@keyframes stage-loop {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
.stage-item {
  display: flex; align-items: center; gap: 14px;
  width: min(320px, 92%); margin: 0 auto;
  background: rgba(15,23,42,.6); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 10px 18px 10px 10px;
  box-shadow: 0 16px 36px rgba(0,0,0,.4);
  transition: transform .3s cubic-bezier(.22,1,.36,1), border-color .3s ease;
}
.stage-item:hover { transform: translateX(4px); border-color: rgba(0,200,255,.4); }
.stage-item picture, .stage-item img {
  width: 68px; height: 68px; border-radius: 14px; flex-shrink: 0;
  object-fit: cover; object-position: 50% 15%; display: block;
  border: 1px solid rgba(0,200,255,.35);
}
.stage-cap b { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.stage-cap span {
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
  font-size: 12.5px; color: var(--muted);
}
.stage-cap span i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex-shrink: 0; display: inline-block; }

@media (max-width: 860px) {
  .stage { height: 300px; }
  .stage-item { width: 100%; }
}

/* ------------------------------------------------------------- work chips */
.workline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.workline .evt {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: rgba(15,23,42,.6); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; display: inline-flex; align-items: center; gap: 6px;
}
.workline .evt.done { color: var(--ok); border-color: rgba(52,211,153,.35); }
.workline .evt.wait { color: var(--warn); border-color: rgba(251,191,36,.35); }
.workline .arrow { color: var(--muted); font-size: 12px; align-self: center; }

/* --------------------------------------------------------- Boss Brain flow */
.flow { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 0 8px; }
.flow-goal {
  background: rgba(15,23,42,.7); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 20px; font-size: 15px; font-style: italic; color: var(--text);
  max-width: 420px; text-align: center;
}
.flow-arrow-v { width: 2px; height: 30px; background: linear-gradient(var(--line), var(--cyan)); }
.flow-hub {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,200,255,.12); border: 2px solid var(--cyan); font-size: 26px;
  box-shadow: 0 0 40px rgba(0,200,255,.25); animation: breathe 6s ease-in-out infinite;
}
.flow-branches {
  display: flex; gap: 40px; margin: 10px 0; flex-wrap: wrap; justify-content: center;
}
.flow-branches .node { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 108px; }
.flow-branches .node img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; border: 1px solid var(--line); }
.flow-branches .node span { font-size: 13px; font-weight: 600; text-align: center; }
.flow-branches .node small { font-size: 11.5px; color: var(--muted); text-align: center; }
.flow-result {
  margin-top: 8px; background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.35);
  color: var(--ok); border-radius: 999px; padding: 8px 18px; font-size: 13.5px; font-weight: 700;
}
@media (max-width: 620px) { .flow-branches { gap: 20px; } }

/* ------------------------------------------------------------ approval demo */
.approval-demo {
  max-width: 440px; background: rgba(15,23,42,.6); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 auto;
}
.approval-demo .who { font-size: 14.5px; color: var(--muted); margin-bottom: 4px; }
.approval-demo .what { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.approval-demo .field { background: rgba(6,11,20,.6); border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px; font-size: 13.5px; color: var(--text); margin-bottom: 10px; }
.approval-demo .field b { color: var(--muted); font-weight: 600; display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.approval-demo .risk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--warn); margin-bottom: 16px; }
.approval-demo .risk i { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); display: inline-block; }
.approval-demo .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.approval-demo .actions .btn { flex: 1; padding: 9px 12px; font-size: 13.5px; text-align: center; min-width: 100px; }
.approval-demo .confirmed {
  display: none; align-items: center; gap: 8px; color: var(--ok); font-weight: 700; font-size: 14px;
  padding: 10px 0 0;
}
.approval-demo.confirmed-state .actions { display: none; }
.approval-demo.confirmed-state .confirmed { display: flex; }

/* -------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .flow-hub { animation: none; }
  .stage-track { animation: none; transform: none; }
  .stage-item[aria-hidden="true"] { display: none; }
  .stage-item { transition: none; }
}

/* --------------------------------------------------------- trust badge */
.trust-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--cyan-dim);
  background: rgba(0,200,255,.08); border: 1px solid rgba(0,200,255,.25);
  border-radius: 999px; padding: 6px 14px; margin-bottom: 16px;
}
@media (max-width: 480px) { .trust-badge { font-size: 12px; padding: 5px 11px; } }

/* --------------------------------------------------- hero refinement (v4) */
/* Scoped overrides only -- loads after home.v2.css/visual.v3.css so these
   win by cascade order without touching sitewide base stylesheets (both are
   shared by all 138 pages; this file is hero-page-only). */
.hero { padding: 108px 0 76px; }
.hero .wrap { grid-template-columns: .96fr 1.04fr; }
.hero h1 { font-size: clamp(36px, 5.6vw, 66px); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
