/* ============================================
   GAMING RIG — sección animada
   ============================================ */
.rig {
  position: relative;
  z-index: 2;
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 8vw, 120px);
  border-top: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(184,255,58,0.05), transparent 70%),
    var(--bg);
}

.rig-header {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: end;
  margin-bottom: clamp(48px, 7vw, 96px);
}

@media (max-width: 760px) {
  .rig-header { grid-template-columns: 1fr; }
}

/* ---------- STAGE ---------- */
.rig-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 720px;
  perspective: 1400px;
  perspective-origin: 50% 60%;
}

@media (max-width: 760px) {
  .rig-stage { aspect-ratio: 4 / 5; }
}

.rig-floor {
  position: absolute;
  bottom: 0;
  left: -10%;
  right: -10%;
  height: 35%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(184,255,58,0.04) 60%, rgba(184,255,58,0.08) 100%),
    repeating-linear-gradient(90deg, transparent 0 60px, rgba(255,255,255,0.04) 60px 61px),
    repeating-linear-gradient(0deg, transparent 0 60px, rgba(255,255,255,0.04) 60px 61px);
  transform: rotateX(72deg);
  transform-origin: bottom;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000);
}

.rig-glow {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 30%;
  background: radial-gradient(ellipse at 50% 50%, rgba(184,255,58,0.22), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
  animation: rigGlowPulse 4s ease-in-out infinite;
}

@keyframes rigGlowPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ---------- MONITOR ---------- */
.rig-monitor {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  width: 58%;
  z-index: 4;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.6));
}

.rig-monitor-bezel {
  background: linear-gradient(180deg, #1a1c14 0%, #0d0e0c 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 10px 18px;
  position: relative;
}

.rig-monitor-bezel::after {
  content: 'CX';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--fg-3);
}

.rig-monitor-screen {
  background: #07080a;
  border-radius: 4px;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 40px rgba(184,255,58,0.06),
    inset 0 0 0 1px rgba(184,255,58,0.1);
}

.rig-screen-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(13,14,12,0.85);
  border-bottom: 1px solid rgba(184,255,58,0.12);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-3);
}

.rig-screen-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.rd-r { background: #ff5f56; }
.rd-y { background: #ffbd2e; }
.rd-g { background: #27c93f; }

.rig-screen-title {
  margin-left: 6px;
  color: var(--fg-2);
}
.rig-screen-meta {
  margin-left: auto;
  color: var(--fg-3);
}

.rig-screen-body {
  font-family: var(--font-mono);
  font-size: clamp(8px, 0.85vw, 11px);
  line-height: 1.7;
  padding: 10px 18px 28px;
  color: var(--fg-2);
  height: calc(100% - 48px);
  overflow: hidden;
  position: relative;
}

.rig-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  white-space: nowrap;
  overflow: hidden;
  animation: rigLineIn 0.18s ease-out;
}

@keyframes rigLineIn {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

.rig-line-prefix {
  color: var(--accent);
  width: 12px;
  flex-shrink: 0;
}

.rig-line-txt {
  color: var(--fg-2);
  overflow: hidden;
  text-overflow: ellipsis;
}

.rig-cmd .rig-line-prefix { color: var(--accent); }
.rig-cmd .rig-line-txt { color: var(--fg); }

.rig-ok .rig-line-prefix { color: var(--accent); }
.rig-warn .rig-line-prefix { color: var(--warn); }
.rig-warn .rig-line-txt { color: #ffb98a; }

.rig-pct {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  padding-right: 8px;
}

.rig-pct-label {
  color: var(--accent);
  font-size: 0.85em;
}

.rig-pct-bar {
  flex: 1;
  height: 8px;
  background: rgba(184,255,58,0.08);
  border: 1px solid rgba(184,255,58,0.18);
  position: relative;
  overflow: hidden;
}

.rig-pct-fill {
  height: 100%;
  background:
    repeating-linear-gradient(90deg,
      var(--accent) 0 6px,
      rgba(184,255,58,0.55) 6px 8px);
  transition: width 60ms linear;
  box-shadow: 0 0 8px var(--accent);
}

.rig-pct-num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-size: 0.85em;
}

.rig-screen-statusbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 14px;
  padding: 5px 12px;
  background: rgba(13,14,12,0.95);
  border-top: 1px solid rgba(184,255,58,0.15);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-3);
}

.rig-screen-statusbar > span:first-child {
  color: #ff5f56;
  animation: blink 1.4s steps(2) infinite;
}
.rig-status-ok {
  margin-left: auto;
  color: var(--accent);
}

.rig-screen-glare {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.04) 50%, transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(184,255,58,0.025) 2px 3px);
  pointer-events: none;
  animation: rigGlare 8s linear infinite;
  mix-blend-mode: screen;
}

@keyframes rigGlare {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 0 0, 0 60px; }
}

.rig-monitor-stand {
  width: 14%;
  height: 6%;
  background: linear-gradient(180deg, #1a1c14, #0d0e0c);
  margin: -2px auto 0;
  border-left: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.06);
}

.rig-monitor-base {
  width: 28%;
  height: 1.8%;
  background: linear-gradient(180deg, #1a1c14, #0a0b08);
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

/* ---------- TOWER ---------- */
.rig-tower {
  position: absolute;
  top: 56%;
  right: 2%;
  width: 12%;
  aspect-ratio: 0.5;
  z-index: 3;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.7));
}

.rig-keyboard {
  position: absolute;
  bottom: 4%;
  left: 22%;
  width: 42%;
  height: 12%;
  background: linear-gradient(180deg, #14150f, #0a0b08);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 3px;
  transform: perspective(800px) rotateX(28deg);
  transform-origin: bottom;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

.rig-mouse {
  position: absolute;
  bottom: 6%;
  left: 66%;
  width: 4%;
  aspect-ratio: 0.6;
  background: linear-gradient(180deg, #14150f 0%, #0a0b08 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 50% 50% 30% 30% / 60% 60% 40% 40%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.rig-tower-glass {
  position: relative;
  width: 100%;
  height: 90%;
  background:
    linear-gradient(135deg, rgba(184,255,58,0.04), rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.04)),
    #0a0b08;
  border: 1px solid rgba(184,255,58,0.18);
  border-radius: 4px;
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.rig-pcb {
  position: absolute;
  inset: 8% 6% 14% 6%;
  background:
    repeating-linear-gradient(0deg, transparent 0 8px, rgba(184,255,58,0.08) 8px 9px),
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(184,255,58,0.06) 8px 9px),
    linear-gradient(180deg, #0d3a18 0%, #0a2b12 100%);
  border-radius: 2px;
}

.rig-gpu {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 38%;
  height: 22%;
  background: linear-gradient(180deg, #14150f, #0a0b08);
  border: 1px solid rgba(184,255,58,0.12);
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 6%;
  padding: 0 6%;
  z-index: 2;
}

.rig-gpu-label {
  position: absolute;
  top: -10px;
  left: 8%;
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--accent);
  letter-spacing: 0.15em;
}

.rig-gpu-fan {
  width: 38%;
  aspect-ratio: 1;
  position: relative;
}

.rig-gpu-led {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    #ff3b3b 0%, #ffbd2e 25%, var(--accent) 50%, #2eb8ff 75%, #ff3bff 100%);
  background-size: 200% 100%;
  animation: rgbFlow 4s linear infinite;
  filter: blur(0.5px);
}

@keyframes rgbFlow {
  to { background-position: 200% 0; }
}

.rig-ram {
  position: absolute;
  top: 16%;
  right: 8%;
  display: flex;
  gap: 4px;
  height: 18%;
  z-index: 2;
}

.rig-ram-stick {
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #1a1c14, #0a0b08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}

.rig-ram-stick span {
  position: absolute;
  top: 10%;
  left: 0;
  right: 0;
  height: 8%;
  background: var(--accent);
  box-shadow: 0 0 4px var(--accent);
  animation: ramPulse 1.6s ease-in-out infinite;
}

.rig-ram-stick:nth-child(2) span { animation-delay: 0.4s; }

@keyframes ramPulse {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(2px); }
}

.rig-cooler {
  position: absolute;
  top: 14%;
  left: 14%;
  width: 32%;
  aspect-ratio: 1;
  z-index: 2;
}

.rig-cables {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rig-cables path {
  fill: none;
  stroke: rgba(184,255,58,0.25);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  animation: cableDash 12s linear infinite;
}

@keyframes cableDash {
  to { stroke-dashoffset: -100; }
}

.rig-rgb-strip {
  position: absolute;
  left: 4%;
  right: 4%;
  height: 1.5px;
  background: linear-gradient(90deg,
    #ff3b3b 0%, #ffbd2e 20%, var(--accent) 40%, #2eb8ff 60%, #ff3bff 80%, #ff3b3b 100%);
  background-size: 200% 100%;
  animation: rgbFlow 5s linear infinite;
  filter: blur(0.4px);
  box-shadow: 0 0 8px rgba(184,255,58,0.4);
}

.rrs-top { top: 4%; }
.rrs-bottom { bottom: 12%; }

.rig-tower-front {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8%;
  background: linear-gradient(180deg, #14150f, #0a0b08);
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none;
  border-radius: 0 0 4px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
}

.rig-power-led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.rig-disk-led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: diskBlink 0.4s steps(2) infinite;
}

@keyframes diskBlink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0.1; }
}

.rig-tower-brand {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 6px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
}

/* ---------- FAN SVG ---------- */
.rig-fan {
  width: 100%;
  height: 100%;
  animation: fanSpin 1.2s linear infinite;
  transform-origin: center;
}

.rig-fan-ring {
  fill: rgba(0,0,0,0.4);
  stroke: rgba(184,255,58,0.25);
  stroke-width: 1;
}

.rig-fan-hub {
  fill: var(--accent);
  filter: drop-shadow(0 0 4px var(--accent));
}

.rig-fan-blade {
  fill: rgba(184,255,58,0.22);
  stroke: rgba(184,255,58,0.4);
  stroke-width: 0.5;
}

@keyframes fanSpin {
  to { transform: rotate(360deg); }
}

/* ---------- KEYBOARD (legacy override) ---------- */
.rig-key {
  background: rgba(184,255,58,0.08);
  border: 1px solid rgba(184,255,58,0.15);
  border-radius: 1.5px;
  animation: keyGlow 2.4s ease-in-out infinite;
  position: relative;
}

@keyframes keyGlow {
  0%, 100% { background: rgba(184,255,58,0.05); box-shadow: none; }
  20%      { background: rgba(184,255,58,0.45); box-shadow: 0 0 6px var(--accent); }
  40%      { background: rgba(184,255,58,0.1); }
}

.rig-mouse-led {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 4%;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: mousePulse 2s ease-in-out infinite;
}

@keyframes mousePulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ---------- HEADSET ---------- */
.rig-headset {
  position: absolute;
  top: 60%;
  left: 2%;
  width: 11%;
  aspect-ratio: 1;
  z-index: 3;
}

.rig-headset-band {
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 60%;
  border: 3px solid #1a1c14;
  border-bottom: none;
  border-radius: 50% 50% 0 0;
}

.rig-headset-cup {
  position: absolute;
  bottom: 0;
  width: 38%;
  height: 50%;
  background: linear-gradient(180deg, #1a1c14, #0a0b08);
  border: 1px solid rgba(184,255,58,0.2);
  border-radius: 30%;
  box-shadow: 0 0 12px rgba(184,255,58,0.15);
}

.hc-l { left: 0; }
.hc-r { right: 0; }

.rig-headset-cup::after {
  content: '';
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  filter: blur(4px);
  animation: headsetPulse 2s ease-in-out infinite;
}

@keyframes headsetPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* ---------- HUD overlays ---------- */
.rig-hud {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-3);
  z-index: 5;
  pointer-events: none;
  opacity: 0.85;
}

.rig-hud-tl { top: 0; left: 0; }
.rig-hud-tr { top: 0; right: 0; text-align: right; }
.rig-hud-bl { bottom: 4px; left: 16%; }
.rig-hud-br { bottom: 4px; right: 17%; text-align: right; }

.rhk {
  letter-spacing: 0.1em;
  color: var(--fg-3);
}

.rhv {
  font-size: 16px;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.rig-hud::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 4px;
  opacity: 0.6;
}

.rig-hud-tr::before, .rig-hud-br::before { margin-left: auto; }

/* small screens */
@media (max-width: 760px) {
  .rig-tower { width: 22%; right: 2%; bottom: 18%; }
  .rig-keyboard { width: 60%; left: 8%; }
  .rig-mouse { left: 72%; width: 6%; }
  .rig-headset { display: none; }
  .rig-hud { font-size: 8px; }
  .rhv { font-size: 12px; }
  .rig-screen-meta { display: none; }
}

/* ---------- TELEMETRY PANEL (left) ---------- */
.rig-telemetry,
.rig-diag {
  position: absolute;
  width: 17%;
  background: rgba(13,14,12,0.72);
  border: 1px solid rgba(184,255,58,0.18);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-2);
  z-index: 5;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 24px rgba(184,255,58,0.05);
  overflow: hidden;
}

.rig-telemetry {
  top: 4%;
  left: 1%;
  width: 15%;
  max-height: 50%;
}

.rig-diag {
  top: 4%;
  right: 1%;
  width: 15%;
  max-height: 50%;
}

.rt-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--fg-3);
  letter-spacing: 0.12em;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(184,255,58,0.14);
}

.rt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

.rt-rec {
  margin-left: auto;
  color: #ff5f56;
  font-size: 8px;
  animation: blink 1.4s steps(2) infinite;
}

.rt-rec.ok {
  color: var(--accent);
  animation: none;
}

.rt-metric {
  margin-bottom: 8px;
}

.rt-metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  margin-bottom: 3px;
}

.rt-metric-label {
  color: var(--fg-3);
  letter-spacing: 0.06em;
}

.rt-metric-val {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.rt-metric-val.good {
  color: var(--accent);
}

.rt-metric-bar {
  height: 3px;
  background: rgba(184,255,58,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.rt-metric-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.6s ease;
  box-shadow: 0 0 6px rgba(184,255,58,0.4);
}

.rt-metric-fill.good {
  background: linear-gradient(90deg, var(--accent), #6e9a23);
}

.rt-spark {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(184,255,58,0.12);
}

.rt-spark svg {
  width: 100%;
  height: 30px;
  display: block;
}

.rt-spark-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 3px rgba(184,255,58,0.6));
}

.rt-spark-label {
  font-size: 8px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
}

.rd-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 9px;
  border-bottom: 1px dotted rgba(255,255,255,0.04);
}

.rd-row:last-of-type {
  border-bottom: none;
}

.rd-row .ok {
  color: var(--accent);
}

.rd-foot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(184,255,58,0.14);
  font-size: 8px;
  color: var(--fg-3);
  text-align: center;
  letter-spacing: 0.1em;
}

@media (max-width: 900px) {
  .rig-telemetry, .rig-diag { width: 22%; font-size: 8px; padding: 8px; }
  .rt-metric-row, .rd-row { font-size: 8px; }
}

@media (max-width: 760px) {
  .rig-telemetry, .rig-diag { display: none; }
}

/* ---------- CTA ---------- */
.rig-cta {
  margin-top: clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  padding: clamp(24px, 3vw, 40px);
  background: linear-gradient(135deg, rgba(184,255,58,0.06), rgba(184,255,58,0.01));
  border: 1px solid rgba(184,255,58,0.2);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.rig-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(184,255,58,0.15), transparent 60%);
  pointer-events: none;
  filter: blur(40px);
}

.rig-cta-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.rig-cta-desc {
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-wrap: balance;
  max-width: 32ch;
}

.rig-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

@media (max-width: 760px) {
  .rig-cta { grid-template-columns: 1fr; }
}
