/* ==========================================================================
   THE MISCREANT STUDIOS - THE ARSENAL & SYSTEM ARCHITECTURE
   3D Cover-Flow Focus Carousel with Live Animated HUD Cards
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ARSENAL SECTION CONTAINER
   -------------------------------------------------------------------------- */
.arsenal-section {
  position: relative;
  z-index: 20;
  min-height: 100vh;
  height: auto;
  padding: clamp(60px, 8vh, 100px) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: 
    /* 1. Fine Dot-Matrix Points (Light shade grill dots) */
    radial-gradient(circle at 1px 1px, rgba(192, 132, 252, 0.16) 1.2px, transparent 1.6px),
    /* 2. Fine Horizontal Grill Lines */
    linear-gradient(rgba(139, 92, 246, 0.045) 1px, transparent 1px),
    /* 3. Fine Vertical Grill Lines */
    linear-gradient(90deg, rgba(139, 92, 246, 0.045) 1px, transparent 1px),
    /* 4. Left Corner Ambient Spotlight */
    radial-gradient(circle at 12% 20%, rgba(139, 92, 246, 0.18) 0%, rgba(6, 182, 212, 0.06) 32%, transparent 60%),
    /* 5. Right Corner Ambient Spotlight */
    radial-gradient(circle at 88% 20%, rgba(192, 132, 252, 0.16) 0%, rgba(139, 92, 246, 0.05) 32%, transparent 60%),
    /* 6. Base Deep Studio Gradient */
    linear-gradient(180deg, 
      #05030e 0%, 
      rgba(8, 6, 22, 0.98) 25%, 
      rgba(10, 8, 28, 0.99) 60%, 
      #05030e 100%);
  background-size: 
    48px 48px,
    48px 48px,
    48px 48px,
    100% 100%,
    100% 100%,
    100% 100%;
  overflow: visible;
  border-top: 1px solid rgba(139, 92, 246, 0.16);
  box-sizing: border-box;
}

.arsenal-section .app-container {
  height: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 24px;
  gap: clamp(24px, 4vh, 36px);
  box-sizing: border-box;
}

/* Ambient Radial Glow Spots */
.arsenal-section::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 1300px;
  height: 650px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.06) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.arsenal-section::after {
  content: '';
  position: absolute;
  bottom: 8%;
  right: 8%;
  width: 800px;
  height: 550px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.08) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   2. SECTION HEADER
   -------------------------------------------------------------------------- */
.arsenal-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.arsenal-title {
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.arsenal-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   4. DUAL-ENGINE ARSENAL GRID
   -------------------------------------------------------------------------- */
.arsenal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 500px));
  justify-content: center;
  align-items: stretch;
  gap: 32px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  opacity: 1 !important;
  visibility: visible !important;
}

/* --------------------------------------------------------------------------
   5. ARSENAL CARD ARCHITECTURE (Interactive Cyberpunk Showcase)
   -------------------------------------------------------------------------- */
.arsenal-card {
  --card-accent: #c084fc;
  --card-glow: rgba(192, 132, 252, 0.35);

  position: relative;
  width: 100%;
  min-height: 480px;
  opacity: 1 !important;
  visibility: visible !important;
  background: rgba(14, 11, 28, 0.85);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.75),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), 
              border-color 0.35s ease, 
              box-shadow 0.35s ease;
  will-change: transform;
  cursor: pointer;
  z-index: 1;
}

/* Unified Cyberpunk Purple / Violet Brand Accent & Glow on All Cards */
.arsenal-card,
.arsenal-card[data-tech="unity"],
.arsenal-card[data-tech="cpp"] {
  --card-accent: #c084fc;
  --card-glow: rgba(192, 132, 252, 0.45);
}

/* Card Hover Elevation + Glowing Perimeter */
.arsenal-card:hover {
  border-color: var(--card-accent);
  box-shadow: 
    0 35px 75px -15px rgba(0, 0, 0, 0.92),
    0 0 38px var(--card-glow),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Rotating Border Beam on Hover */
.arsenal-card:hover::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1px;
  background: conic-gradient(
    from var(--beam-angle, 0deg),
    transparent 0%,
    transparent 65%,
    var(--card-accent) 85%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: rotateBeam 4s linear infinite;
  z-index: 10;
}

@keyframes rotateBeam {
  to {
    --beam-angle: 360deg;
  }
}

@property --beam-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* --------------------------------------------------------------------------
   6. CARD MEDIA VIEWPORT & SCANLINE
   -------------------------------------------------------------------------- */
.arsenal-card-media {
  height: 165px;
  position: relative;
  overflow: hidden;
  background: #090718;
}

.arsenal-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.arsenal-card:hover .arsenal-card-media img,
.arsenal-card.active-card:hover .arsenal-card-media img {
  transform: scale(1.06);
}

.arsenal-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, 
    rgba(14, 11, 28, 1) 0%, 
    rgba(14, 11, 28, 0.4) 55%, 
    rgba(14, 11, 28, 0.1) 100%);
  pointer-events: none;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   7. CARD BODY & ANIMATED HUD DIAGNOSTICS
   -------------------------------------------------------------------------- */
.arsenal-card-body {
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.arsenal-category-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--card-accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.arsenal-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #ffffff;
  margin-bottom: 4px;
}

.arsenal-card-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Live Animated HUD Diagnostic Box */
.arsenal-live-widget {
  background: rgba(6, 4, 16, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--card-accent);
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #94a3b8;
}

.widget-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.widget-val {
  color: var(--card-accent);
  font-weight: 700;
}

/* Visual Animations per Card */

/* 1. Nanite / Lumen Waveform (UE5) */
.hud-wave-wrap {
  width: 100%;
  height: 26px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hud-wave-svg {
  width: 100%;
  height: 100%;
}

.wave-line {
  stroke: var(--card-accent);
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: wavePulse 2.8s linear infinite;
}

@keyframes wavePulse {
  0% { stroke-dashoffset: 200; }
  100% { stroke-dashoffset: 0; }
}

/* 2. DOTS Multi-Thread Burst Bars (Unity 6) */
.dots-thread-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 24px;
}

.thread-bar {
  flex: 1;
  background: rgba(56, 189, 248, 0.2);
  border-radius: 4px;
  height: 40%;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.thread-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, #38bdf8 0%, #06b6d4 100%);
  animation: threadBurst 1.8s ease-in-out infinite alternate;
}

.thread-bar:nth-child(1) .thread-bar-fill { animation-delay: 0.1s; }
.thread-bar:nth-child(2) .thread-bar-fill { animation-delay: 0.4s; }
.thread-bar:nth-child(3) .thread-bar-fill { animation-delay: 0.2s; }
.thread-bar:nth-child(4) .thread-bar-fill { animation-delay: 0.6s; }

@keyframes threadBurst {
  0% { transform: translateY(60%); }
  50% { transform: translateY(10%); }
  100% { transform: translateY(30%); }
}

/* 3. Blender Geometry Nodes Graph */
.geo-node-visualizer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 24px;
}

.node-point {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fb923c;
  box-shadow: 0 0 8px #fb923c;
  animation: nodeGlow 1.8s ease-in-out infinite alternate;
}

.node-wire {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #fb923c, rgba(251, 146, 60, 0.2), #fb923c);
  background-size: 200% 100%;
  animation: wireStream 2.2s linear infinite;
}

@keyframes nodeGlow {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

@keyframes wireStream {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 4. Houdini Thermal Simulation Meter */
.thermal-sim-bar {
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  overflow: hidden;
}

.thermal-sim-fill {
  height: 100%;
  width: 85%;
  background: linear-gradient(90deg, #f43f5e 0%, #fb923c 60%, #facc15 100%);
  animation: thermalShift 2.5s ease-in-out infinite alternate;
}

@keyframes thermalShift {
  0% { width: 65%; }
  100% { width: 94%; }
}

/* 5. Wwise Live Equalizer Spectrum Bars */
.audio-spectrum-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 24px;
}

.audio-eq-bar {
  flex: 1;
  background: #34d399;
  border-radius: 3px;
  height: 30%;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
  animation: eqBounce 1.2s ease-in-out infinite alternate;
}

.audio-eq-bar:nth-child(1) { animation-delay: 0.1s; animation-duration: 0.9s; }
.audio-eq-bar:nth-child(2) { animation-delay: 0.3s; animation-duration: 1.3s; }
.audio-eq-bar:nth-child(3) { animation-delay: 0.05s; animation-duration: 0.8s; }
.audio-eq-bar:nth-child(4) { animation-delay: 0.4s; animation-duration: 1.1s; }
.audio-eq-bar:nth-child(5) { animation-delay: 0.2s; animation-duration: 1.4s; }
.audio-eq-bar:nth-child(6) { animation-delay: 0.5s; animation-duration: 1.0s; }
.audio-eq-bar:nth-child(7) { animation-delay: 0.15s; animation-duration: 1.2s; }

@keyframes eqBounce {
  0% { height: 18%; }
  50% { height: 88%; }
  100% { height: 35%; }
}

/* 6. C++ Bare Metal Hex Assembly Stream */
.hex-opcode-stream {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #a78bfa;
  overflow: hidden;
  white-space: nowrap;
}

.hex-stream-text {
  animation: hexFlicker 3s steps(4) infinite;
}

@keyframes hexFlicker {
  0% { opacity: 0.8; }
  50% { opacity: 1; color: #ffffff; }
  100% { opacity: 0.85; }
}

/* Spec Matrix List */
.arsenal-spec-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  margin-bottom: 8px;
}

.arsenal-spec-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #cbd5e1;
}

.arsenal-spec-item span {
  color: var(--card-accent);
}

/* Card Footer */
.arsenal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
}

.arsenal-metric-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #64748b;
  text-transform: uppercase;
}

.arsenal-metric-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--card-accent);
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .arsenal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .arsenal-card {
    min-height: 440px;
  }

  .arsenal-card-media {
    height: 140px;
  }
}

@media (max-width: 768px) {
  .arsenal-section {
    padding: 0;
  }

  .arsenal-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    gap: 24px;
  }

  .arsenal-card {
    min-height: auto;
  }

  .arsenal-card-media {
    height: 140px;
  }

  .arsenal-card-body {
    padding: 14px 18px 16px;
  }
}

