.sv-cinematic-trigger {
  cursor: zoom-in;
}

.sv-cinematic {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 40px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.sv-cinematic.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sv-cinematic[hidden] {
  display: none;
}

.sv-cinematic__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(7, 7, 7, 0.7) 0%, rgba(3, 3, 3, 0.9) 100%);
  backdrop-filter: blur(34px);
  -webkit-backdrop-filter: blur(34px);
}

.sv-cinematic__ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sv-cinematic__ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.09), transparent 30%),
    linear-gradient(180deg, rgba(8, 8, 8, 0.18) 0%, rgba(4, 4, 4, 0.56) 100%);
}

.sv-cinematic__ambient-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(34px) saturate(0.92) brightness(0.5);
  opacity: 0.8;
  transform: scale(1.08);
}

.sv-cinematic__stage {
  position: relative;
  z-index: 2;
  width: min(100%, 1720px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.sv-cinematic__figure {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.sv-cinematic.is-open .sv-cinematic__figure {
  transform: translateY(0) scale(1);
}

.sv-cinematic__image {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  object-position: center;
  transform-origin: center center;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.42);
  margin: 0 auto;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.sv-cinematic__caption {
  max-width: min(72ch, 100%);
  margin-top: 18px;
  text-align: center;
  font-size: 1.3rem;
  line-height: 1.75;
  color: rgba(250, 248, 244, 0.78);
}

.sv-cinematic__caption:empty {
  display: none;
}

.sv-cinematic__close {
  position: absolute;
  top: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 28px);
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.48);
  color: rgba(250, 248, 244, 0.92);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sv-cinematic__close:hover {
  transform: scale(1.04);
  background: rgba(22, 22, 22, 0.72);
  border-color: rgba(255, 255, 255, 0.3);
}

.sv-cinematic__rotate {
  position: absolute;
  top: clamp(16px, 3vw, 28px);
  left: clamp(16px, 3vw, 28px);
  z-index: 2;
  display: none;
  min-width: 74px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.48);
  color: rgba(250, 248, 244, 0.92);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sv-cinematic__rotate:hover {
  transform: scale(1.04);
  background: rgba(22, 22, 22, 0.72);
  border-color: rgba(255, 255, 255, 0.3);
}

.sv-cinematic__rotate[aria-pressed="true"] {
  background: rgba(196, 170, 130, 0.18);
  border-color: rgba(196, 170, 130, 0.42);
}

.sv-cinematic__hint {
  position: absolute;
  left: 50%;
  bottom: clamp(16px, 3vw, 28px);
  z-index: 2;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 248, 244, 0.46);
}

body.sv-cinematic-lock {
  overflow: hidden;
}

@media (max-width: 720px) {
  .sv-cinematic {
    padding: 12px;
  }

  .sv-cinematic__rotate:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sv-cinematic__image {
    max-height: calc(100vh - 108px);
  }

  .sv-cinematic__ambient-image {
    filter: blur(28px) saturate(0.92) brightness(0.46);
    transform: scale(1.12);
  }

  .sv-cinematic__caption {
    font-size: 1.2rem;
    line-height: 1.65;
    margin-top: 14px;
  }

  .sv-cinematic__hint {
    font-size: 0.66rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sv-cinematic,
  .sv-cinematic__ambient-image,
  .sv-cinematic__figure,
  .sv-cinematic__image,
  .sv-cinematic__rotate,
  .sv-cinematic__close {
    transition: none;
  }
}
