/* ============================================================
   HOMEPAGE REDESIGN — "interrogation room / surveillance file"
   Scoped to index.html only (loaded via extra_css). Does not
   affect shared nav/footer chrome or any other page.
   ============================================================ */

.room-hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #08080a;
  overflow: hidden;
  text-align: center;
  padding: 60px 24px;
}

/* soften the bottom edge into the section below instead of a hard cutoff */
.room-hero::after {
  content: '';
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 260px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* stage curtains framing the sides — pulled back and tied, not straight panels */
.room-curtain {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 0;
  width: clamp(56px, 13vw, 240px);
  pointer-events: none;
  clip-path: polygon(
    0% 0%, 100% 0%,
    97% 9%,
    92% 19%,
    84% 29%,
    74% 39%,
    65% 49%,
    69% 59%,
    78% 69%,
    87% 79%,
    93% 89%,
    97% 97%,
    0% 100%
  );
  background:
    repeating-linear-gradient(
      100deg,
      rgba(0, 0, 0, 0.45) 0px,
      rgba(0, 0, 0, 0.15) 10px,
      rgba(0, 0, 0, 0.45) 20px
    ),
    linear-gradient(to right, #1c0606 0%, #2e0909 55%, rgba(24, 5, 5, 0.35) 88%, transparent 100%);
  box-shadow: inset -40px 0 60px rgba(0, 0, 0, 0.6);
}
.room-curtain::after {
  content: '';
  position: absolute;
  left: 12%;
  top: 53%;
  width: 34%;
  height: 3px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.55), transparent);
  border-radius: 2px;
}
.room-curtain-right {
  left: auto;
  right: 0;
  transform: scaleX(-1);
}
@media (max-width: 700px) {
  .room-curtain { display: none; }
}

/* huge ambient glow behind the bulb, washing over the content below */
.room-glow {
  position: absolute;
  z-index: 0;
  top: -390px;
  left: 50%;
  width: 1500px;
  height: 1500px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: room-flicker 4.2s steps(1, end) infinite;
}

/* cord + bulb assembly, swaying from the ceiling */
.room-bulb-rig {
  position: relative;
  z-index: 2;
  width: 2px;
  height: 16vh;
  margin: 0 auto;
  transform-origin: top center;
  animation: room-sway 8s ease-in-out infinite;
}

.room-cord {
  width: 1.5px;
  height: 100%;
  margin: 0 auto;
  background: linear-gradient(to bottom, transparent, #4a4a4a);
}

.room-bulb {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 26px;
  border-radius: 50% 50% 45% 45% / 55% 55% 45% 45%;
  background: #ffffff;
  box-shadow:
    0 0 24px 6px rgba(255, 255, 255, 0.55),
    0 0 90px 30px rgba(255, 255, 255, 0.25);
  animation: room-flicker 4.2s steps(1, end) infinite;
}

@keyframes room-flicker {
  0%   { opacity: 1;    }
  8%   { opacity: 0.3;  }
  10%  { opacity: 1;    }
  24%  { opacity: 1;    }
  26%  { opacity: 0.15; }
  30%  { opacity: 0.9;  }
  55%  { opacity: 0.9;  }
  58%  { opacity: 0.35; }
  62%  { opacity: 1;    }
  85%  { opacity: 1;    }
  88%  { opacity: 0.2;  }
  92%  { opacity: 0.95; }
  100% { opacity: 1;    }
}

@keyframes room-sway {
  0%, 100% { transform: rotate(-1deg); }
  50%      { transform: rotate(1deg); }
}

.room-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  width: 100%;
  margin-top: 28px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.room-video-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  margin: 0 auto 40px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 255, 255, 0.08);
  opacity: 0;
  animation: room-fade-in 0.8s ease forwards;
  animation-delay: 0.9s;
}

.room-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.room-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: room-fade-in 0.8s ease forwards;
  animation-delay: 1.7s;
}

@keyframes room-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .room-glow, .room-bulb, .room-bulb-rig,
  .room-video-wrap, .room-actions {
    animation: none;
    opacity: 1;
  }
}
