.hero-scroll-cue {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 104px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.42);
  font: 500 8px "DM Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.hero-scroll-cue > i {
  width: 22px;
  height: 34px;
  display: block;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
}

.hero-scroll-cue b {
  width: 3px;
  height: 7px;
  margin: 6px auto;
  display: block;
  border-radius: 4px;
  background: var(--lime);
  animation: scrollCue 1.8s var(--ease) infinite;
}

@keyframes scrollCue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translateY(13px); }
}

.engine-section {
  position: relative;
  height: 320vh;
  color: var(--white);
  background: #06100c;
}

.engine-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 760px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 55%, rgba(80,141,89,.15), transparent 31%),
    linear-gradient(145deg, #050c09, #091710);
}

.engine-grid-bg {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(184,244,110,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,244,110,.08) 1px, transparent 1px);
  background-size: 58px 58px;
  transform: translateY(calc(var(--engine-progress, 0) * -40px));
  mask-image: radial-gradient(ellipse at center, #000, transparent 78%);
}

.engine-heading {
  position: absolute;
  z-index: 4;
  top: clamp(92px, 10vh, 120px);
  left: 50%;
  display: grid;
  grid-template-columns: 1fr .55fr;
  gap: 80px;
  align-items: end;
  transform: translateX(-50%);
}

.engine-heading .section-label { margin-bottom: 12px; }
.engine-heading h2 {
  margin: 0;
  font-size: clamp(40px, 4.4vw, 68px);
  line-height: .92;
  letter-spacing: -.07em;
  font-weight: 600;
}
.engine-heading h2 em { color: var(--lime); font-family: Georgia, serif; font-weight: 400; }
.engine-heading-copy > p { max-width: 520px; margin: 0; color: rgba(255,255,255,.48); font-size: 12px; line-height: 1.7; }
.engine-phase { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.engine-phase span { color: rgba(255,255,255,.25); font: 500 7px "DM Mono", monospace; letter-spacing: .12em; }
.engine-phase strong { color: var(--lime); font: 500 8px "DM Mono", monospace; letter-spacing: .08em; }

.engine-stage {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 55%;
  width: min(94vw, 1400px);
  height: min(63vh, 650px);
  min-height: 500px;
  transform: translate(-50%, -43%);
}

.engine-connections { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.engine-path {
  fill: none;
  stroke: rgba(184,244,110,.12);
  stroke-width: 1.1;
  stroke-dasharray: 5 8;
  vector-effect: non-scaling-stroke;
  transition: stroke .35s, stroke-width .35s;
}
.engine-path.active { stroke: rgba(184,244,110,.7); stroke-width: 1.8; animation: engineDash .75s linear infinite; filter: url(#engineGlow); }
@keyframes engineDash { to { stroke-dashoffset: -26; } }

.engine-inputs,
.engine-outputs {
  position: absolute;
  inset: 0 auto 0 0;
  width: 255px;
  display: grid;
  align-content: space-between;
}
.engine-outputs { right: 0; left: auto; }

.engine-card {
  min-height: 74px;
  padding: 11px;
  display: grid;
  grid-template-columns: 35px 1fr 22px;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 11px;
  background: rgba(255,255,255,.045);
  box-shadow: 0 15px 40px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  opacity: .32;
  transition: opacity .45s, transform .45s var(--ease), border-color .45s, background .45s;
}
.engine-card.active { opacity: 1; border-color: rgba(184,244,110,.42); transform: translateX(5px); background: rgba(255,255,255,.075); }
.engine-output { opacity: .12; transform: translateX(-10px); }
.engine-output.active { opacity: 1; transform: none; }
.engine-card-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 8px; color: white; background: #773d37; font-size: 11px; font-weight: 800; }
.engine-card-icon.facebook { background: #3974c8; }
.engine-card-icon.whatsapp { background: #39a966; }
.engine-card-icon.sheet { color: #263f33; background: #b9cbbc; }
.engine-card-icon.note { color: #62471d; background: #e8bb66; }
.engine-card-icon.success { color: var(--ink); background: var(--lime); box-shadow: 0 0 18px rgba(184,244,110,.12); }
.engine-card p { margin: 0; min-width: 0; }
.engine-card small { display: block; color: rgba(255,255,255,.3); font: 500 6px "DM Mono", monospace; letter-spacing: .1em; }
.engine-card strong { display: block; margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.engine-card em { display: block; color: rgba(255,255,255,.35); font-size: 6px; font-style: normal; }
.engine-card > b { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #d77a6e; background: rgba(215,122,110,.1); font-size: 7px; }
.engine-output > b { color: #6fb14e; background: rgba(184,244,110,.12); }

.engine-core {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 390px;
  min-height: 440px;
  padding: 18px;
  border: 1px solid rgba(184,244,110,.24);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(19,41,32,.96), rgba(8,20,15,.98));
  box-shadow: 0 45px 100px rgba(0,0,0,.42), 0 0 90px rgba(184,244,110,.07);
  transform: translate(-50%, -50%) scale(calc(.88 + var(--engine-core-scale, 0) * .12));
}
.engine-core::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(184,244,110,.06), transparent 70%);
  background-size: 200% 100%;
  animation: engineSheen 4s linear infinite;
  pointer-events: none;
}
@keyframes engineSheen { to { background-position: -200% 0; } }
.engine-core-rings i { position: absolute; inset: -30px; border: 1px solid rgba(184,244,110,.08); border-radius: 29px; }
.engine-core-rings i:nth-child(2) { inset: -60px; opacity: .55; }
.engine-core-rings i:nth-child(3) { inset: -90px; opacity: .25; }
.engine-core > header { position: relative; display: flex; align-items: center; gap: 10px; }
.engine-core header p { margin: 0; }
.engine-core header small { display: block; color: var(--lime); font: 500 6px "DM Mono", monospace; letter-spacing: .12em; }
.engine-core header strong { display: block; margin-top: 3px; font-size: 10px; }
.engine-core header > em { margin-left: auto; padding: 6px 8px; border: 1px solid rgba(184,244,110,.16); border-radius: 20px; color: var(--lime); font: 500 6px "DM Mono", monospace; font-style: normal; }
.engine-core header > em i { display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: var(--lime); animation: pulse 1.4s infinite; }

.engine-processor { position: relative; height: 205px; margin-top: 10px; display: grid; place-items: center; }
.processor-orbit { position: absolute; width: 185px; height: 185px; border: 1px solid rgba(184,244,110,.12); border-radius: 50%; animation: spin 18s linear infinite; }
.processor-orbit::before { content: ""; position: absolute; inset: 21px; border: 1px dashed rgba(184,244,110,.13); border-radius: 50%; }
.processor-orbit span { position: absolute; min-width: 35px; padding: 5px; border: 1px solid rgba(184,244,110,.2); border-radius: 5px; color: var(--lime); background: #0e2119; text-align: center; font: 500 5px "DM Mono", monospace; }
.processor-orbit span:nth-child(1) { left: 50%; top: -10px; transform: translateX(-50%); }
.processor-orbit span:nth-child(2) { right: -16px; top: 50%; transform: translateY(-50%) rotate(90deg); }
.processor-orbit span:nth-child(3) { left: 50%; bottom: -10px; transform: translateX(-50%) rotate(180deg); }
.processor-orbit span:nth-child(4) { left: -13px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.processor-centre { position: relative; z-index: 2; width: 112px; height: 112px; padding: 25px 17px; display: flex; align-items: center; flex-direction: column; border: 1px solid rgba(184,244,110,.3); border-radius: 50%; background: radial-gradient(circle, rgba(184,244,110,.13), #0a1a14 70%); box-shadow: 0 0 45px rgba(184,244,110,.08); }
.processor-centre small { color: rgba(255,255,255,.35); font: 500 5px "DM Mono", monospace; letter-spacing: .12em; }
.processor-centre strong { margin: 5px 0; color: var(--lime); font-size: 20px; }
.processor-centre > i { width: 62px; height: 3px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.08); }
.processor-centre > i b { width: var(--engine-percent, 0%); height: 100%; display: block; background: var(--lime); box-shadow: 0 0 8px var(--lime); }

.engine-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.engine-modules span { padding: 8px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; color: rgba(255,255,255,.32); background: rgba(255,255,255,.025); font-size: 6px; transition: color .3s, border-color .3s, background .3s; }
.engine-modules span.active { color: white; border-color: rgba(184,244,110,.25); background: rgba(184,244,110,.07); }
.engine-modules i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.14); }
.engine-modules span.active i { background: var(--lime); box-shadow: 0 0 7px var(--lime); }
.engine-console { margin-top: 10px; padding: 9px; display: grid; grid-template-columns: 55px 1fr 5px; gap: 8px; align-items: center; border-radius: 6px; color: rgba(255,255,255,.42); background: #040a07; font: 400 6px "DM Mono", monospace; }
.engine-console span { color: var(--lime); }
.engine-console p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.engine-console > i { width: 4px; height: 9px; background: var(--lime); animation: blink 1s steps(1) infinite; }

.engine-packet { position: absolute; z-index: 6; padding: 5px 7px; border: 1px solid rgba(184,244,110,.3); border-radius: 5px; color: var(--lime); background: #0b1c15; box-shadow: 0 0 18px rgba(184,244,110,.08); font: 500 5px "DM Mono", monospace; opacity: 0; }

.engine-footer {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 280px 160px;
  gap: 22px;
  align-items: center;
  transform: translateX(-50%);
}
.engine-footer p { margin: 0; color: rgba(255,255,255,.4); font: 400 7px "DM Mono", monospace; }
.engine-footer p span { width: 5px; height: 5px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.engine-progress { height: 2px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.08); }
.engine-progress i { width: var(--engine-percent, 0%); height: 100%; display: block; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.engine-footer strong { color: var(--lime); text-align: right; font: 500 7px "DM Mono", monospace; letter-spacing: .08em; }

.demo-pipeline-card {
  margin-top: 11px;
  padding: 19px;
  border: 1px solid #dde2dd;
  border-radius: 10px;
  background: white;
}
.pipeline-total { color: #5b9b49; font-size: 7px; }
.demo-pipeline { margin-top: 17px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.demo-pipeline > div { padding: 11px; border: 1px solid #e7ebe7; border-radius: 8px; background: #fafbf9; }
.demo-pipeline header { display: flex; align-items: center; justify-content: space-between; color: #89928d; font: 500 6px "DM Mono", monospace; }
.demo-pipeline header b { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #527745; background: #e5f2dd; }
.demo-pipeline > div > i { width: 100%; height: 3px; margin: 9px 0 11px; display: block; overflow: hidden; border-radius: 4px; background: #e9ede9; }
.demo-pipeline > div > i::after { content: ""; width: var(--pipeline-width); height: 100%; display: block; background: linear-gradient(90deg, #a4e16e, #76bb51); transform-origin: left; animation: pipelineGrow .8s var(--ease) both; }
@keyframes pipelineGrow { from { transform: scaleX(0); } }
.demo-pipeline p { margin: 0; display: grid; grid-template-columns: 24px 1fr auto; gap: 7px; align-items: center; }
.demo-pipeline p em { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: #456957; background: #e2ebe5; font-size: 6px; font-style: normal; font-weight: 700; }
.demo-pipeline p strong { font-size: 7px; }
.demo-pipeline p small { color: #79837e; font-size: 6px; }

@media (max-width: 1100px) {
  .engine-heading { grid-template-columns: 1fr .7fr; gap: 40px; }
  .engine-stage { width: 1100px; transform: translate(-50%, -43%) scale(.82); }
}

@media (max-width: 760px) {
  .hero-scroll-cue { display: none; }
  .engine-section { height: auto; padding: 90px 0; }
  .engine-sticky { position: relative; height: auto; min-height: 0; overflow: visible; }
  .engine-grid-bg { position: absolute; }
  .engine-heading { position: relative; top: auto; left: auto; grid-template-columns: 1fr; gap: 20px; transform: none; }
  .engine-heading h2 { font-size: 47px; }
  .engine-stage { position: relative; left: auto; top: auto; width: calc(100% - 28px); height: auto; min-height: 0; margin: 55px auto 0; display: grid; grid-template-columns: 1fr; gap: 24px; transform: none; }
  .engine-connections, .engine-packet, .engine-core-rings { display: none; }
  .engine-inputs, .engine-outputs { position: relative; inset: auto; width: auto; grid-template-columns: 1fr 1fr; gap: 8px; }
  .engine-card { min-height: 67px; opacity: 1; }
  .engine-inputs .engine-card:last-child, .engine-outputs .engine-card:last-child { grid-column: 1 / -1; }
  .engine-core { position: relative; left: auto; top: auto; width: 100%; min-height: 430px; transform: none; }
  .engine-output { opacity: 1; transform: none; }
  .engine-footer { position: relative; left: auto; bottom: auto; width: calc(100% - 28px); margin: 32px auto 0; grid-template-columns: 1fr; transform: none; }
  .engine-footer strong { text-align: left; }
  .demo-pipeline { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .engine-section { height: auto; padding: 100px 0; }
  .engine-sticky { position: relative; height: auto; min-height: 850px; }
  .engine-card, .engine-output { opacity: 1; transform: none; }
  .engine-path { stroke: rgba(184,244,110,.28); }
  .engine-progress i, .processor-centre > i b { width: 100%; }
  .hero-scroll-cue b, .engine-core::before, .processor-orbit { animation: none; }
}
