.opening-cinematic {
  position: fixed;
  inset: 0;
  z-index: 760;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
  transition: opacity 420ms ease;
}

.opening-cinematic::before,
.opening-cinematic::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: clamp(58px, 9vh, 112px);
  background: #050505;
  z-index: 2;
}

.opening-cinematic::before {
  top: 0;
}

.opening-cinematic::after {
  bottom: 0;
}

.opening-cinematic__wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 52%, rgba(145, 119, 87, 0.1) 0 18%, rgba(2, 2, 3, 0.1) 76%),
    linear-gradient(180deg, rgba(14, 10, 8, 0.04), rgba(2, 3, 5, 0.08));
  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.28);
}

.opening-cinematic__trash {
  position: absolute;
  left: 50%;
  top: 55%;
  z-index: 1;
  width: clamp(250px, 36vw, 520px);
  height: clamp(100px, 17vw, 220px);
  opacity: 0;
  filter: saturate(0.65) contrast(1.15);
  transform: translate(-50%, -26%) scale(1.04);
  transition: opacity 260ms ease, transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.opening-cinematic--trash .opening-cinematic__trash {
  opacity: 0.88;
  transform: translate(-50%, -26%) scale(1);
}

.opening-cinematic__bag {
  position: absolute;
  display: block;
  width: 44%;
  height: 46%;
  border: 1px solid rgba(119, 123, 107, 0.32);
  border-radius: 48% 42% 54% 39%;
  background:
    radial-gradient(ellipse at 34% 25%, rgba(255, 255, 255, 0.12), transparent 22%),
    repeating-linear-gradient(116deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 7px),
    linear-gradient(145deg, #252923 0%, #11140f 54%, #050705 100%);
  box-shadow:
    inset -22px -18px 30px rgba(0, 0, 0, 0.72),
    inset 10px 7px 18px rgba(126, 131, 111, 0.08),
    0 16px 28px rgba(0, 0, 0, 0.62);
}

.opening-cinematic__bag::before {
  content: "";
  position: absolute;
  left: 48%;
  top: -10%;
  width: 13%;
  height: 22%;
  border-radius: 35% 35% 12% 12%;
  background: #0b0d0a;
  box-shadow: 5px 3px 0 #171b15;
  transform: rotate(13deg);
}

.opening-cinematic__bag::after {
  content: "";
  position: absolute;
  inset: 17% 12% 12% 10%;
  border-top: 1px solid rgba(171, 168, 140, 0.11);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.opening-cinematic__bag--left {
  left: 4%;
  bottom: 6%;
  transform: rotate(-9deg) skewX(-3deg);
}

.opening-cinematic__bag--right {
  right: 4%;
  bottom: 13%;
  width: 48%;
  height: 51%;
  transform: rotate(8deg) skewX(4deg);
}

.opening-cinematic__paper {
  position: absolute;
  display: block;
  width: 17%;
  height: 22%;
  background:
    linear-gradient(12deg, transparent 0 17%, rgba(90, 74, 51, 0.34) 18% 20%, transparent 21%),
    #8f8877;
  clip-path: polygon(4% 9%, 91% 0, 100% 82%, 12% 100%);
  box-shadow: 0 8px 13px rgba(0, 0, 0, 0.48);
  opacity: 0.76;
}

.opening-cinematic__paper--one {
  left: 38%;
  bottom: 3%;
  transform: rotate(18deg);
}

.opening-cinematic__paper--two {
  right: 20%;
  top: 8%;
  width: 12%;
  height: 18%;
  transform: rotate(-23deg);
  background-color: #615b4e;
}

.opening-cinematic__copy {
  position: absolute;
  z-index: 3;
  left: clamp(24px, 6vw, 96px);
  bottom: clamp(82px, 13vh, 154px);
  max-width: min(560px, 72vw);
  color: #ede7dc;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 260ms ease, transform 360ms ease;
  text-shadow: 0 2px 16px #000;
}

.opening-cinematic--copy .opening-cinematic__copy {
  opacity: 1;
  transform: translateY(0);
}

.opening-cinematic__eyebrow {
  margin-bottom: 8px;
  color: #b75646;
  font: 700 12px/1.2 "Courier New", monospace;
  letter-spacing: 0.34em;
}

.opening-cinematic__caption {
  font: 800 clamp(17px, 2.2vw, 30px)/1.02 "Arial Narrow", "Franklin Gothic Medium", sans-serif;
  letter-spacing: 0.075em;
}

.opening-cinematic__skip {
  position: absolute;
  right: clamp(18px, 4vw, 58px);
  bottom: clamp(20px, 3vh, 38px);
  z-index: 4;
  pointer-events: auto;
  border: 0;
  padding: 8px 10px;
  background: transparent;
  color: rgba(237, 231, 220, 0.48);
  font: 700 10px/1 "Courier New", monospace;
  letter-spacing: 0.18em;
  cursor: pointer;
}

.opening-cinematic__skip:hover,
.opening-cinematic__skip:focus-visible {
  color: #f0eae0;
  outline: 1px solid rgba(237, 231, 220, 0.4);
  outline-offset: 3px;
}

.opening-cinematic--leaving {
  opacity: 0;
}

body.opening-active #player-status,
body.opening-active #actionbar,
body.opening-active .inventory-hotbar,
body.opening-active #minimap-container,
body.opening-active #server-code,
body.opening-active #police-scanner {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* The authored wash already grades opening shots. Avoid stacking the global
   vignette over it, which previously hid actors placed near the frame edge. */
body.opening-active .game-vignette {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .opening-cinematic,
  .opening-cinematic__copy,
  .opening-cinematic__trash {
    transition-duration: 1ms;
  }
}

@media (max-width: 640px) {
  .opening-cinematic__trash {
    top: 49%;
    width: min(84vw, 430px);
  }

  .opening-cinematic__copy {
    bottom: 88px;
    max-width: calc(100vw - 48px);
  }
}
