/* ============================================================
   FX Studio AI — Linha de montagem 3D (explicador visual)
   Visual "3D soft" via luz/sombra/profundidade. Sem JS.
   ============================================================ */
.assembly-sec .al-intro { max-width: 60ch; }

.al-stage {
  position: relative;
  height: 300px;
  margin: 40px 0 8px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(157,170,188,0.16), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.18));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(160,168,181,0.08), 0 26px 54px rgba(0,0,0,0.24);
  overflow: hidden;
  perspective: 900px;
}
/* piso / sombra ambiente */
.al-stage::after {
  content: ""; position: absolute; left: 6%; right: 6%; top: 196px; height: 60px;
  background: radial-gradient(60% 100% at 50% 0%, rgba(0,0,0,0.45), transparent 70%);
  filter: blur(6px); pointer-events: none;
}

/* ---- Esteira ---- */
.al-belt {
  position: absolute; left: 8%; right: 8%; top: 188px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(180deg, #2A3647, #1B2330);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.14), 0 16px 28px rgba(0,0,0,0.5);
}
.al-belt::before { /* borda frontal (espessura) */
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px;
  background: linear-gradient(180deg, #12171F, #0A0E14);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 18px rgba(0,0,0,0.45);
}
.al-belt::after { /* esteira em movimento */
  content: ""; position: absolute; inset: 0; border-radius: 8px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0 16px, transparent 16px 32px);
  animation: al-belt-run 1.1s linear infinite;
}
@keyframes al-belt-run { to { background-position-x: 32px; } }

/* roldanas nas pontas */
.al-roller { position: absolute; top: 184px; width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a4658, #11161f);
  box-shadow: inset 0 2px 3px rgba(255,255,255,0.18), 0 10px 18px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.10);
}
.al-roller::before { content: ""; position: absolute; inset: 14px; border-radius: 50%;
  border: 2px dashed rgba(145,176,218,0.5); animation: al-spin 1.1s linear infinite; }
.al-roller-l { left: calc(8% - 19px); }
.al-roller-r { right: calc(8% - 19px); }
@keyframes al-spin { to { transform: rotate(360deg); } }

/* ---- Peças que percorrem a esteira (se transformam) ---- */
.al-item {
  position: absolute; top: 150px; left: 0; width: 46px; height: 40px;
  border-radius: 7px;
  background: linear-gradient(180deg, #E4ECF6, #A9B8CB);
  box-shadow: 0 10px 16px rgba(0,0,0,0.45), inset 0 2px 0 rgba(255,255,255,0.7);
  animation: al-run 8s linear infinite, al-morph 8s linear infinite;
  animation-delay: var(--d, 0s);
}
.al-item::before { /* rótulo/glyph na peça */
  content: ""; position: absolute; left: 9px; right: 9px; top: 9px; height: 4px; border-radius: 2px;
  background: rgba(20,28,40,0.55);
  box-shadow: 0 8px 0 rgba(20,28,40,0.4), 0 16px 0 rgba(20,28,40,0.28);
}
@keyframes al-run {
  0%   { left: 6%; }
  100% { left: calc(94% - 46px); }
}
/* matéria-prima (cinza) → processada (azul-aço) → pronta (verde-azulado) */
@keyframes al-morph {
  0%, 22%   { background: linear-gradient(180deg, #E4ECF6, #A9B8CB); }
  30%, 52%  { background: linear-gradient(180deg, #AFC7EA, #6E92C4); }
  60%, 80%  { background: linear-gradient(180deg, #8FB3E6, #4E78B6); }
  90%, 100% { background: linear-gradient(180deg, #79E0C4, #3FA98A); }
}

/* ---- Estações (máquinas) ---- */
.al-machine {
  position: absolute; top: 96px; left: var(--x); transform: translateX(-50%);
  width: 92px; height: 78px;
  display: flex; align-items: flex-start; justify-content: center;
}
.al-machine .al-head {
  width: 92px; height: 58px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(71,88,114,0.54), #1c2532);
  border: 1px solid rgba(194,204,218,0.34);
  box-shadow: 0 14px 26px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.12);
  position: relative;
}
.al-machine .al-head::before { /* luz/scanner pulsante */
  content: ""; position: absolute; left: 14px; right: 14px; top: 18px; height: 8px; border-radius: 6px;
  background: linear-gradient(90deg, transparent, #91B0DA, transparent);
  animation: al-scan 1.6s ease-in-out infinite;
}
.al-machine .al-head::after { /* feixe descendo até a esteira */
  content: ""; position: absolute; left: 50%; top: 100%; width: 56px; height: 64px; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(145,176,218,0.28), transparent 80%);
  clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%);
}
.al-machine .al-pillar { /* haste sobre a esteira */
  position: absolute; top: 58px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 30px; background: linear-gradient(180deg, #2a3646, #161d27);
  border-radius: 0 0 3px 3px;
}
@keyframes al-scan { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* legenda flutuante de cada estação */
.al-tag {
  position: absolute; top: 70px; left: var(--x); transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
  color: #F6F8FB; white-space: nowrap;
  background: rgba(16,22,32,0.84); border: 1px solid rgba(194,204,218,0.30);
  box-shadow: 0 8px 20px rgba(0,0,0,0.24);
  padding: 4px 9px; border-radius: 999px;
}

/* entrada e saída */
.al-end {
  position: absolute; top: 132px; width: 96px; text-align: center;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: #B9C7D9;
  text-shadow: 0 1px 0 rgba(0,0,0,0.45);
}
.al-end .al-puck {
  width: 58px; height: 58px; margin: 0 auto 8px; border-radius: 12px;
  display: grid; place-items: center;
  box-shadow: 0 14px 26px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.18);
}
.al-in  { left: 1%; }
.al-in .al-puck  { background: linear-gradient(180deg, #2A3647, #161d27); border: 1px solid rgba(255,255,255,0.12); }
.al-out { right: 1%; }
.al-out .al-puck { background: linear-gradient(180deg, #2E8F6F, #1f6b52); border: 1px solid rgba(121,224,196,0.4); }
.al-in .al-puck .al-glyph, .al-out .al-puck .al-glyph { width: 24px; height: 24px; }
.al-in .al-puck .al-glyph { color: #91B0DA; }
.al-out .al-puck .al-glyph { color: #eafff7; }

/* ---- Legenda em linguagem simples ---- */
.al-steps {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 26px;
}
.al-steps .al-s {
  background: var(--card-surface);
  border: 1px solid var(--card-border); border-radius: var(--card-radius); padding: 16px 16px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}
.al-steps .al-s::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 12px;
  background: linear-gradient(180deg, rgba(246,248,251,0.36), rgba(231,235,241,0.14) 58%, transparent 100%);
  pointer-events: none;
}
.al-steps .al-s .al-n {
  font-family: var(--font-mono); font-size: 11px; color: #111722; background: linear-gradient(180deg,#C2CCDA,#9DAABC);
  width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px; font-weight: 600;
}
.al-steps .al-s h4 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 5px; color: #F6F8FB; }
.al-steps .al-s p { color: #D6DEE8; font-size: 13px; line-height: 1.55; }
.al-steps .al-s.is-in  .al-n { background: linear-gradient(180deg,#46506180,#2a3340); color: #C2CCDA; }
.al-steps .al-s.is-out .al-n { background: linear-gradient(180deg,#79E0C4,#3FA98A); color: #07140f; }

@media (max-width: 860px) {
  .al-steps { grid-template-columns: 1fr 1fr; }
  .al-tag { font-size: 9.5px; padding: 3px 7px; }
}
@media (max-width: 560px) {
  .al-stage { height: 264px; }
  .al-steps { grid-template-columns: 1fr; }
  .al-end { width: 74px; font-size: 9px; }
  .al-in { left: 0; }
  .al-out { right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .al-belt::after, .al-roller::before, .al-item, .al-machine .al-head::before { animation: none; }
  .al-item:nth-child(odd) { left: 30%; } .al-item:nth-child(even) { left: 64%; }
}
