:root {
  --bg: #04101f;
  --gold: #ffcc33;
  --rose: #ff8fa3;
  --orange: #ff7b00;
  --blue: #3a7bff;
  --crimson: #d1002f;
  --amber: #ffb347;
  --magenta: #ff3ea5;
  --wine: #8b0014;
  --deepred: #b30000;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* GLOBAL BLUEPRINT BACKGROUND + SCANLINES + NOISE */

body {
  background: var(--bg);
  background-image: url("../bg/heist-blueprint-bg.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  color: var(--gold);
  font-family: "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  position: relative;
}

/* Scanlines */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 200, 255, 0.12) 0px,
    rgba(0, 200, 255, 0.12) 2px,
    transparent 2px,
    transparent 4px
  );
  animation: scanMove 4s linear infinite;
  mix-blend-mode: screen;
}

@keyframes scanMove {
  0% { transform: translateY(-10%); }
  100% { transform: translateY(10%); }
}

/* Noise + micro-grid */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='5'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E"),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 200px 200px, 40px 40px, 40px 40px;
  opacity: 0.2;
  mix-blend-mode: screen;
}

/* APP LAYOUT */

.app {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  height: 100vh;
}

/* LEFT PANEL */

.left {
  padding: 3.5rem 4vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border-right: none;
  backdrop-filter: none;
}

/* System header */

.system-header {
  margin-bottom: 2rem;
}

.system-title {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.system-sub {
  margin-top: 0.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--rose);
}

.title-main {
  font-size: clamp(3.4rem, 4.8vw, 4.6rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--gold);
}

.title-sub {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
}

/* Index */

.index {
  list-style: none;
  margin-top: 1.5rem;
}

.index-item {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: 0.7rem 0;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  transition: 0.25s ease;
  color: var(--rose);
}

.index-item.active {
  background: rgba(255,255,255,0.1);
  color: var(--gold);
}

.index-item span.num {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  min-width: 3rem;
}

.index-item span.label {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
}

/* Meta / footer */

.meta {
  margin-top: 2rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.meta-sub {
  margin-top: 0.4rem;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
}

/* RIGHT PANEL */

.right {
  position: relative;
  overflow: visible;
}

/* Module bar */

.module-bar {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2.5rem 4vw 1.5rem 0;
}

.module-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.module-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.module-name {
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ⭐ MODULE DESCRIPTION (top-right) */

.module-desc {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 0.4rem;
  max-width: 420px;
  line-height: 1.5;
}

/* Telemetry */

.telemetry {
  display: flex;
  gap: 1.8rem;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.t-label {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.t-value {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.9);
}

/* Rotating blueprint rings */

.right::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(0,200,255,0.25) 0%, transparent 70%),
    url("../bg/heist-blueprint-bg.svg");
  background-size: 140% 140%;
  background-position: center;
  opacity: 0.45;
  animation: ringRotate 30s linear infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

@keyframes ringRotate {
  0% { transform: rotate(0deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1.1); }
}

/* ARTWORK */

.artwork {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

.artwork.active {
  opacity: 1;
  transform: translateX(0);
}

.art-inner {
  position: relative;
  width: 70%;
  height: 70%;
}

/* Glow */

.art-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(255,200,200,0.25), transparent 60%);
  animation: bgPulse 6s ease-in-out infinite;
}

@keyframes bgPulse {
  0% { opacity: 0.3; }
  50% { opacity: 0.7; }
  100% { opacity: 0.3; }
}

/* Shape */

.shape {
  width: 65%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 25px rgba(255, 204, 51, 0.45));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(-14px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.9; }
}

/* ⭐ ART CAPTION (bottom-left inside artwork) */

.art-caption {
  position: absolute;
  left: 10%;
  bottom: 10%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.art-caption-title {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.art-caption-desc {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  max-width: 320px;
  line-height: 1.4;
}

/* BOOT-UP OVERLAY */

.boot-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.7), rgba(0,0,0,0.96));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  animation: bootFade 1.4s ease-out forwards;
}

.boot-inner {
  max-width: 640px;
  padding: 2rem 2.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
}

.boot-line {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.5rem;
}

.boot-line.status {
  margin-top: 0.8rem;
  color: var(--gold);
}

@keyframes bootFade {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* MOBILE LAYOUT */

@media (max-width: 900px) {

  .app {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .left {
    width: 100%;
    padding: 2.5rem 6vw;
    order: 1;
  }

  .right {
    width: 100%;
    height: 70vh;
    order: 2;
    overflow: visible;
  }

  .module-bar {
    padding: 1.5rem 6vw 1rem 6vw;
    flex-direction: column;
    gap: 1rem;
  }

  .telemetry {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .art-inner {
    width: 90%;
    height: 90%;
  }

  .shape {
    width: 80%;
  }

  .art-caption {
    left: 8%;
    bottom: 8%;
  }
}

/* MOBILE STACK FIX */

@media (max-width: 900px) {

  .app {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .left {
    width: 100%;
    padding: 2.5rem 6vw;
    order: 1;
  }

  .right {
    width: 100%;
    height: 70vh;
    order: 2;
    overflow: visible;
  }

  .artwork {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
  }

  .art-inner {
    width: 90%;
    height: 90%;
  }

  .shape {
    width: 80%;
  }
}
