:root {
  --core-red: #a42a36;
  --core-red-bright: #c1646d;
  --core-black: #070708;
  --core-white: #f7f7f5;
}

.engine-hero {
  position: relative;
  min-height: calc(100svh - 84px);
  overflow: hidden;
  isolation: isolate;
  background: var(--core-black);
  color: var(--core-white);
}

.engine-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(7,7,8,.98) 0%, rgba(7,7,8,.92) 34%, rgba(7,7,8,.38) 62%, rgba(7,7,8,.78) 100%),
    radial-gradient(circle at 78% 44%, rgba(164,42,54,.14), transparent 35%);
}

.engine-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .55;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 100%);
}

.engine-aura {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 3%;
  width: min(62vw, 930px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(164,42,54,.19), rgba(164,42,54,.055) 31%, transparent 67%);
  filter: blur(18px);
  animation: core-aura 5s ease-in-out infinite;
}

#product-core-canvas {
  position: absolute;
  inset: 0 0 70px;
  z-index: 1;
  width: 100%;
  height: calc(100% - 70px);
  pointer-events: none;
}

.engine-shell {
  position: relative;
  z-index: 3;
  min-height: calc(100svh - 154px);
  display: grid;
  grid-template-columns: minmax(480px, .92fr) minmax(520px, .88fr);
  gap: clamp(40px, 5vw, 92px);
  align-items: center;
  padding: 72px 0 110px;
}

.engine-copy { max-width: 750px; }

.engine-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.55);
  font: 600 10px/1 var(--mono);
  letter-spacing: .14em;
}

.engine-kicker i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39dc83;
  box-shadow: 0 0 0 6px rgba(57,220,131,.1), 0 0 18px rgba(57,220,131,.55);
  animation: engine-online 1.8s ease-in-out infinite;
}

.engine-copy h1 {
  margin: 28px 0 28px;
  max-width: 760px;
  font-size: clamp(66px, 6.7vw, 112px);
  line-height: .83;
  letter-spacing: -.078em;
  font-weight: 650;
}

.engine-copy h1 em {
  color: var(--core-red);
  font-style: normal;
}

.engine-copy h1 span { color: var(--core-white); }

.engine-copy > p {
  max-width: 655px;
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: 16px;
  line-height: 1.75;
}

.engine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 31px;
}

.engine-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
}

.engine-proof > span {
  min-width: 132px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.025);
  backdrop-filter: blur(12px);
}

.engine-proof b {
  color: var(--core-red-bright);
  font: 700 22px/1 var(--mono);
  text-shadow: 0 0 16px rgba(164,42,54,.6);
}

.engine-proof small {
  color: rgba(255,255,255,.47);
  font: 600 7px/1.4 var(--mono);
  letter-spacing: .09em;
}

.core-stage {
  --core-x: 0px;
  --core-y: 0px;
  position: relative;
  justify-self: end;
  width: min(100%, 640px);
  aspect-ratio: 1;
  transform: translate3d(var(--core-x), var(--core-y), 0);
  transition: transform .35s ease-out;
}

.core-stage::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(164,42,54,.13), rgba(7,7,8,.58) 36%, transparent 67%),
    repeating-radial-gradient(circle at center, transparent 0 38px, rgba(255,255,255,.035) 39px 40px);
  box-shadow: inset 0 0 90px rgba(164,42,54,.06), 0 0 100px rgba(0,0,0,.5);
}

.core-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 10%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 62%, rgba(164,42,54,.18) 68%, transparent 74%);
  animation: core-scan 7s linear infinite;
}

.core-ring {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-outer {
  width: 83%;
  aspect-ratio: 1;
  border-color: rgba(164,42,54,.38);
  border-style: dashed;
  animation: core-spin 38s linear infinite;
}

.ring-middle {
  width: 61%;
  aspect-ratio: 1;
  border-color: rgba(255,255,255,.22);
  animation: core-spin-reverse 26s linear infinite;
}

.ring-inner {
  width: 38%;
  aspect-ratio: 1;
  border-color: rgba(164,42,54,.58);
  box-shadow: 0 0 35px rgba(164,42,54,.12), inset 0 0 35px rgba(164,42,54,.08);
  animation: core-breathe 3.2s ease-in-out infinite;
}

.core-ring i {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid var(--core-red-bright);
  border-radius: 50%;
  background: var(--core-black);
  box-shadow: 0 0 12px var(--core-red);
}

.ring-outer i:nth-child(1) { left: 14%; top: 18%; }
.ring-outer i:nth-child(2) { right: -1%; top: 47%; }
.ring-outer i:nth-child(3) { left: 47%; bottom: -1%; }
.ring-outer i:nth-child(4) { left: -1%; top: 51%; }
.ring-middle i:nth-child(1) { left: 11%; top: 19%; }
.ring-middle i:nth-child(2) { right: 5%; bottom: 23%; }
.ring-middle i:nth-child(3) { left: 29%; bottom: 3%; }

.core-center {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 168px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 42% 35%, #2f0d12, #2f0d12 47%, #070708 75%);
  box-shadow: 0 0 0 12px rgba(164,42,54,.035), 0 0 60px rgba(164,42,54,.28), inset 0 0 38px rgba(164,42,54,.15);
  animation: core-float 4s ease-in-out infinite;
}

.core-center span {
  color: var(--core-red-bright);
  font-size: 67px;
  line-height: .7;
  font-weight: 800;
  letter-spacing: -.09em;
  text-shadow: 0 0 25px rgba(164,42,54,.6);
}

.core-center strong {
  margin-top: 15px;
  color: rgba(255,255,255,.72);
  font: 700 8px/1.35 var(--mono);
  letter-spacing: .18em;
}

.core-center i {
  position: absolute;
  right: 25px;
  bottom: 28px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39dc83;
  box-shadow: 0 0 13px #39dc83;
}

.core-node {
  position: absolute;
  z-index: 6;
  min-width: 62px;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(7,7,8,.88);
  color: rgba(255,255,255,.68);
  font: 600 7px/1 var(--mono);
  letter-spacing: .08em;
  box-shadow: 0 8px 22px rgba(0,0,0,.36);
  animation: core-node-float 3.6s ease-in-out infinite;
}

.core-node::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--core-red);
  box-shadow: 0 0 12px var(--core-red);
}

.node-strategy { left: 12%; top: 17%; animation-delay: -.4s; }
.node-design { left: 43%; top: 4%; animation-delay: -1.3s; }
.node-web { right: 9%; top: 20%; animation-delay: -2.1s; }
.node-mobile { right: 1%; top: 49%; animation-delay: -.8s; }
.node-ai { right: 16%; bottom: 13%; animation-delay: -1.8s; }
.node-security { left: 42%; bottom: 3%; animation-delay: -.1s; }
.node-devops { left: 8%; bottom: 18%; animation-delay: -2.7s; }
.node-data { left: 0; top: 47%; animation-delay: -1.1s; }

.core-module,
.core-readout {
  position: absolute;
  z-index: 8;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(7,7,8,.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(0,0,0,.42);
}

.core-module {
  width: 170px;
  padding: 14px;
}

.module-input { left: -3%; top: 29%; }
.module-output { right: -4%; bottom: 25%; border-color: rgba(164,42,54,.42); }

.core-module small,
.core-readout small {
  display: block;
  color: rgba(255,255,255,.35);
  font: 600 7px/1 var(--mono);
  letter-spacing: .09em;
}

.core-module b {
  display: block;
  margin: 9px 0 13px;
  font-size: 12px;
  letter-spacing: -.01em;
}

.core-module span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.48);
  font: 600 7px/1 var(--mono);
}

.core-module span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #39dc83;
  box-shadow: 0 0 10px #39dc83;
}

.core-readout { padding: 10px 13px; }
.core-readout b { display: block; margin-top: 6px; color: var(--core-red-bright); font: 700 9px/1 var(--mono); }
.readout-top { right: 8%; top: 8%; }
.readout-bottom { left: 20%; bottom: 7%; }

.engine-stream {
  position: absolute;
  z-index: 9;
  inset: auto 0 0;
  height: 70px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.14);
  background: var(--core-red);
}

.engine-stream > div {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
  animation: engine-stream 25s linear infinite;
  font: 700 9px/1 var(--mono);
  letter-spacing: .1em;
}

.engine-stream i { color: rgba(255,255,255,.5); font-style: normal; }

@keyframes engine-online { 50% { box-shadow: 0 0 0 10px rgba(57,220,131,0), 0 0 25px rgba(57,220,131,.8); } }
@keyframes core-aura { 50% { opacity: .72; transform: translateY(-50%) scale(1.06); } }
@keyframes core-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes core-spin-reverse { to { transform: translate(-50%, -50%) rotate(-360deg); } }
@keyframes core-breathe { 50% { transform: translate(-50%, -50%) scale(1.08); opacity: .7; } }
@keyframes core-scan { to { transform: rotate(360deg); } }
@keyframes core-float { 50% { transform: translate(-50%, calc(-50% - 8px)); } }
@keyframes core-node-float { 50% { transform: translateY(-8px); border-color: rgba(164,42,54,.48); color: #fff; } }
@keyframes engine-stream { to { transform: translateX(-50%); } }

@media (max-width: 1180px) {
  .engine-shell { grid-template-columns: minmax(420px, 1fr) minmax(430px, .82fr); gap: 34px; }
  .engine-copy h1 { font-size: clamp(60px, 6vw, 82px); }
  .core-stage { width: min(100%, 520px); }
  .core-module { width: 145px; }
}

@media (max-width: 900px) {
  .engine-hero { min-height: auto; }
  .engine-shell { min-height: auto; grid-template-columns: 1fr; padding: 80px 0 145px; }
  .engine-copy { max-width: 690px; }
  .engine-copy h1 { font-size: clamp(58px, 10vw, 82px); }
  .core-stage { justify-self: center; width: min(88vw, 560px); margin-top: 15px; }
  #product-core-canvas { opacity: .68; }
}

@media (max-width: 600px) {
  .engine-shell { padding: 62px 0 125px; }
  .engine-copy h1 { margin-top: 24px; font-size: clamp(48px, 15vw, 68px); line-height: .88; }
  .engine-copy > p { font-size: 14px; }
  .engine-actions { align-items: stretch; flex-direction: column; }
  .engine-actions .v3-button { width: 100%; }
  .engine-proof > span { flex: 1 1 30%; min-width: 96px; padding: 10px; }
  .engine-proof small { font-size: 6px; }
  .core-stage { width: min(96vw, 420px); }
  .core-center { width: 126px; }
  .core-center span { font-size: 50px; }
  .core-node { min-width: 51px; padding: 7px 6px; font-size: 6px; }
  .core-module { width: 126px; padding: 11px; }
  .module-input { left: 0; }
  .module-output { right: 0; }
  .core-readout { display: none; }
  .engine-stream { height: 58px; }
  #product-core-canvas { bottom: 58px; height: calc(100% - 58px); }
}

@media (prefers-reduced-motion: reduce) {
  .engine-aura,
  .core-ring,
  .core-stage::after,
  .core-center,
  .core-node,
  .engine-stream > div,
  .engine-kicker i { animation-duration: 40s; }
}
