

/* =========================================================
   Extracted from views/engine.ejs on 20260604-100858
========================================================= */

:root {
      --bg: #050507;
      --panel: rgba(255, 255, 255, 0.045);
      --line: rgba(255, 255, 255, 0.10);
      --muted: #a1a1aa;
      --indigo: #6366f1;
      --violet: #a855f7;
      --cyan: #22d3ee;
      --emerald: #34d399;
      --amber: #fbbf24;
      --rose: #fb7185;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      color: white;
      font-family: Inter, system-ui, sans-serif;
      overflow-x: hidden;
      background:
        radial-gradient(circle at 12% 8%, rgba(99,102,241,0.25), transparent 34rem),
        radial-gradient(circle at 88% 10%, rgba(168,85,247,0.20), transparent 30rem),
        radial-gradient(circle at 48% 116%, rgba(34,211,238,0.10), transparent 34rem),
        var(--bg);
    }

    .font-display { font-family: 'Space Grotesk', Inter, system-ui, sans-serif; }
    .metric { font-variant-numeric: tabular-nums; }

    .glass {
      background: var(--panel);
      border: 1px solid var(--line);
      backdrop-filter: blur(22px);
      box-shadow: 0 24px 80px rgba(0,0,0,0.35);
    }

    .nova-gradient {
      background: linear-gradient(90deg, #93c5fd, #818cf8, #c084fc, #22d3ee);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .grid-bg {
      background-image:
        linear-gradient(rgba(99,102,241,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.07) 1px, transparent 1px);
      background-size: 64px 64px;
      mask-image: linear-gradient(to bottom, black, transparent 82%);
    }

    .noise-layer {
      position: fixed;
      inset: 0;
      pointer-events: none;
      opacity: .15;
      z-index: 1;
      background-image:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.06) 0 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,.04) 0 1px, transparent 1px);
      background-size: 32px 32px, 44px 44px;
      mix-blend-mode: overlay;
    }

    .orb {
      position: absolute;
      border-radius: 999px;
      filter: blur(54px);
      pointer-events: none;
      opacity: .56;
    }
    .orb-one { width: 340px; height: 340px; background: #6366f1; top: 90px; right: 7%; }
    .orb-two { width: 280px; height: 280px; background: #a855f7; top: 600px; left: -100px; }
    .orb-three { width: 240px; height: 240px; background: #22d3ee; top: 1180px; right: -80px; opacity: .34; }

    .pulse-dot {
      width: 8px; height: 8px; border-radius: 99px;
      background: var(--emerald);
      box-shadow: 0 0 0 rgba(52,211,153,0.55);
      animation: pulse 2s infinite;
    }
    @keyframes pulse {
      0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.55); }
      70% { box-shadow: 0 0 0 12px rgba(52,211,153,0); }
      100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
    }

    .hover-lift { transition: transform .25s ease, border-color .25s ease, background .25s ease; }
    .hover-lift:hover { transform: translateY(-6px); border-color: rgba(129,140,248,0.45); background: rgba(255,255,255,0.065); }

    .nova-brand-logo {
      position: relative;
      width: 100px;
      height: 100px;
      border-radius: 999px;
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: visible;
      filter: drop-shadow(0 0 16px rgba(99,102,241,0.65)) drop-shadow(0 0 30px rgba(168,85,247,0.28));
    }
    .nova-brand-orb, .nova-brand-eyes {
      position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block;
    }
    .nova-brand-orb { z-index: 1; animation: novaOrbSpin 40s linear infinite; transform-origin: center center; }
    .nova-brand-eyes { z-index: 2; animation: novaEyesBlink 5.8s infinite; transform-origin: center center; }
    @keyframes novaOrbSpin { to { transform: rotate(360deg); } }
    @keyframes novaEyesBlink {
      0%, 86%, 100% { transform: scale(0.78, 0.78); opacity: 1; }
      88% { transform: scale(0.78, 0.08); opacity: 0.75; }
      90% { transform: scale(0.78, 0.78); opacity: 1; }
      94% { transform: scale(0.78, 0.08); opacity: 0.75; }
      96% { transform: scale(0.78, 0.78); opacity: 1; }
    }

    /* Hero engine animation */
    .engine-stage {
      position: relative;
      min-height: 650px;
      perspective: 1400px;
      overflow: hidden;
      isolation: isolate;
    }
    .engine-stage::before {
      content: "";
      position: absolute;
      inset: -2px;
      background:
        radial-gradient(circle at 50% 48%, rgba(99,102,241,.22), transparent 22rem),
        radial-gradient(circle at 54% 52%, rgba(34,211,238,.12), transparent 30rem),
        linear-gradient(135deg, rgba(255,255,255,.08), transparent 45%, rgba(168,85,247,.08));
      z-index: -2;
    }
    .engine-stage::after {
      content: "";
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
      background-size: 42px 42px;
      transform: rotateX(64deg) translateY(185px) scale(1.25);
      transform-origin: center bottom;
      opacity: .38;
      mask-image: radial-gradient(circle at center, black, transparent 75%);
      z-index: -1;
    }

    .engine-machine {
      position: absolute;
      inset: 0;
      transform-style: preserve-3d;
      animation: engineFloat 7s ease-in-out infinite;
    }
    @keyframes engineFloat {
      0%,100% { transform: translateY(0) rotateX(0deg); }
      50% { transform: translateY(-12px) rotateX(2deg); }
    }

    .pipeline-ring {
      position: absolute;
      left: 50%; top: 50%;
      width: min(78vw, 560px); height: min(78vw, 560px);
      border-radius: 999px;
      border: 1px solid rgba(129,140,248,.28);
      transform: translate(-50%, -50%) rotateX(64deg) rotateZ(-18deg);
      transform-style: preserve-3d;
      box-shadow: inset 0 0 50px rgba(99,102,241,.10), 0 0 60px rgba(34,211,238,.06);
    }
    .pipeline-ring.r2 { width: min(65vw, 460px); height: min(65vw, 460px); animation: rotatePipeline 18s linear infinite reverse; border-color: rgba(34,211,238,.26); }
    .pipeline-ring.r3 { width: min(50vw, 350px); height: min(50vw, 350px); animation: rotatePipeline 13s linear infinite; border-color: rgba(168,85,247,.28); }
    @keyframes rotatePipeline {
      to { transform: translate(-50%, -50%) rotateX(64deg) rotateZ(342deg); }
    }

    .engine-core {
      position: absolute;
      left: 50%; top: 50%;
      width: 190px; height: 190px;
      transform: translate(-50%, -50%) translateZ(70px);
      border-radius: 46px;
      display: flex;
      align-items: center;
      justify-content: center;
      background:
        radial-gradient(circle at 50% 45%, rgba(34,211,238,.26), transparent 55%),
        linear-gradient(135deg, rgba(99,102,241,.35), rgba(168,85,247,.18)),
        rgba(255,255,255,.06);
      border: 1px solid rgba(255,255,255,.18);
      box-shadow:
        0 32px 100px rgba(0,0,0,.52),
        inset 0 0 40px rgba(129,140,248,.18),
        0 0 70px rgba(99,102,241,.32);
      overflow: hidden;
    }
    .engine-core::before {
      content: "";
      position: absolute;
      inset: -45%;
      background: conic-gradient(from 0deg, transparent, rgba(34,211,238,.25), transparent, rgba(168,85,247,.24), transparent);
      animation: coreSweep 7s linear infinite;
      opacity: .8;
    }
    .engine-core::after {
      content: "";
      position: absolute;
      inset: 18px;
      border-radius: 34px;
      border: 1px solid rgba(255,255,255,.18);
      box-shadow: inset 0 0 30px rgba(34,211,238,.12);
    }
    @keyframes coreSweep { to { transform: rotate(360deg); } }

    .engine-nova {
      position: relative;
      z-index: 3;
      width: 112px;
      height: 112px;
      filter: drop-shadow(0 0 18px rgba(34,211,238,.35));
    }
    .engine-nova img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
    .engine-nova .orb-img { animation: novaOrbSpin 22s linear infinite; }
    .engine-nova .eyes-img { transform: scale(.78); animation: novaEyesBlink 5.4s infinite; }

    .engine-node {
      position: absolute;
      width: 132px;
      min-height: 76px;
      border-radius: 24px;
      background: rgba(255,255,255,.055);
      border: 1px solid rgba(255,255,255,.14);
      backdrop-filter: blur(18px);
      box-shadow: 0 18px 50px rgba(0,0,0,.32), inset 0 0 22px rgba(129,140,248,.07);
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      padding: 14px;
      transform-style: preserve-3d;
      animation: nodePulse 4.2s ease-in-out infinite;
    }
    .engine-node i { color: #93c5fd; }
    .engine-node span { font-size: 12px; color: #d4d4d8; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
    .engine-node small { color: #71717a; font-size: 11px; line-height: 1.2; }
    .node-1 { left: 8%; top: 14%; animation-delay: 0s; }
    .node-2 { right: 9%; top: 18%; animation-delay: .45s; }
    .node-3 { right: 7%; bottom: 20%; animation-delay: .9s; }
    .node-4 { left: 9%; bottom: 17%; animation-delay: 1.35s; }
    .node-5 { left: 50%; top: 5%; transform: translateX(-50%); animation-delay: 1.8s; }
    .node-6 { left: 50%; bottom: 4%; transform: translateX(-50%); animation-delay: 2.25s; }
    @keyframes nodePulse {
      0%,100% { box-shadow: 0 18px 50px rgba(0,0,0,.32), 0 0 0 rgba(129,140,248,0); border-color: rgba(255,255,255,.14); }
      50% { box-shadow: 0 18px 54px rgba(0,0,0,.34), 0 0 34px rgba(129,140,248,.18); border-color: rgba(129,140,248,.38); }
    }

    .data-beam {
      position: absolute;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(34,211,238,.75), rgba(168,85,247,.62), transparent);
      transform-origin: left center;
      opacity: .78;
      overflow: hidden;
    }
    .data-beam::after {
      content: "";
      position: absolute;
      top: -2px;
      left: -20%;
      width: 24%;
      height: 5px;
      border-radius: 99px;
      background: rgba(255,255,255,.75);
      filter: blur(2px);
      animation: packetMove 2.6s linear infinite;
    }
    .beam-a { width: 310px; left: 23%; top: 31%; transform: rotate(20deg); }
    .beam-b { width: 310px; right: 20%; top: 32%; transform: rotate(158deg); }
    .beam-c { width: 315px; left: 24%; bottom: 33%; transform: rotate(-22deg); }
    .beam-d { width: 315px; right: 19%; bottom: 34%; transform: rotate(202deg); }
    .beam-e { width: 260px; left: 50%; top: 19%; transform: translateX(-50%) rotate(90deg); }
    .beam-f { width: 260px; left: 50%; bottom: 20%; transform: translateX(-50%) rotate(90deg); }
    @keyframes packetMove { to { left: 110%; } }

    .scan-plane {
      position: absolute;
      left: 50%; top: 50%;
      width: min(80vw, 620px);
      height: min(80vw, 620px);
      transform: translate(-50%, -50%) rotateX(64deg) rotateZ(-18deg);
      border-radius: 999px;
      background: conic-gradient(from 0deg, transparent 0 20%, rgba(34,211,238,.10) 22%, transparent 32%, transparent 100%);
      animation: radarSpin 5.8s linear infinite;
      mask-image: radial-gradient(circle, transparent 0 18%, black 19% 70%, transparent 74%);
    }
    @keyframes radarSpin { to { transform: translate(-50%, -50%) rotateX(64deg) rotateZ(342deg); } }

    .code-card {
      position: absolute;
      right: 5%;
      bottom: 6%;
      width: min(92vw, 330px);
      border-radius: 28px;
      background: rgba(6,7,12,.78);
      border: 1px solid rgba(255,255,255,.13);
      backdrop-filter: blur(18px);
      box-shadow: 0 26px 80px rgba(0,0,0,.45);
      overflow: hidden;
    }
    .code-line {
      display: flex;
      justify-content: space-between;
      gap: 18px;
      padding: 9px 14px;
      border-top: 1px solid rgba(255,255,255,.06);
      color: #d4d4d8;
      font-size: 12px;
    }

    .step-line {
      position: relative;
      overflow: hidden;
    }
    .step-line::before {
      content: "";
      position: absolute;
      left: 28px;
      top: 62px;
      bottom: -12px;
      width: 1px;
      background: linear-gradient(to bottom, rgba(129,140,248,.5), rgba(34,211,238,.15), transparent);
    }

    .mini-terminal {
      background: rgba(4,5,10,.82);
      border: 1px solid rgba(255,255,255,.11);
      border-radius: 30px;
      overflow: hidden;
      box-shadow: 0 24px 80px rgba(0,0,0,.38);
    }

    .terminal-row {
      display: grid;
      grid-template-columns: 90px 1fr auto;
      gap: 14px;
      align-items: center;
      padding: 13px 16px;
      border-top: 1px solid rgba(255,255,255,.07);
      font-size: 13px;
    }

    .mobile-panel { display: none; }
    .mobile-panel.open { display: block; }

    @media (max-width: 980px) {
      .engine-stage { min-height: 720px; }
      .engine-node { width: 124px; }
      .node-1 { left: 3%; top: 12%; }
      .node-2 { right: 3%; top: 14%; }
      .node-3 { right: 3%; bottom: 23%; }
      .node-4 { left: 3%; bottom: 21%; }
      .node-5 { top: 3%; }
      .node-6 { bottom: 3%; }
      .beam-a,.beam-b,.beam-c,.beam-d,.beam-e,.beam-f { opacity: .45; }
      .code-card { position: relative; right: auto; bottom: auto; margin: 520px auto 24px; }
      .terminal-row { grid-template-columns: 70px 1fr; }
      .terminal-row .row-score { grid-column: 2; }
    }

    @media (max-width: 640px) {
      .nova-brand-logo { width: 78px; height: 78px; }
      .engine-stage { min-height: 760px; }
      .engine-core { width: 152px; height: 152px; border-radius: 38px; }
      .engine-nova { width: 92px; height: 92px; }
      .engine-node { width: 112px; min-height: 70px; padding: 11px; border-radius: 20px; }
      .engine-node span { font-size: 10px; }
      .engine-node small { display: none; }
      .node-1 { left: 2%; top: 16%; }
      .node-2 { right: 2%; top: 17%; }
      .node-3 { right: 2%; bottom: 27%; }
      .node-4 { left: 2%; bottom: 27%; }
      .node-5 { top: 6%; }
      .node-6 { bottom: 12%; }
      .pipeline-ring { width: 360px; height: 360px; }
      .pipeline-ring.r2 { width: 295px; height: 295px; }
      .pipeline-ring.r3 { width: 220px; height: 220px; }
      .scan-plane { width: 390px; height: 390px; }
      .code-card { margin-top: 530px; }
    }
