:root {
  --black: #050505;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--black);
  color: #fff;
}

body {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  overflow: hidden;
}

.fade-black {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  opacity: 1;
  pointer-events: none;
  transition: opacity 620ms ease;
}

body.ready .fade-black {
  opacity: 0;
}

.scene14 {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 20px 12px calc(142px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 28% 32%, rgba(240, 187, 82, 0.17), transparent 44%),
    radial-gradient(circle at 66% 68%, rgba(213, 215, 221, 0.12), transparent 50%),
    #020202;
}

.scene-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1.02);
  z-index: 3;
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2rem, 8vw, 6rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 236, 214, 0.96);
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.2),
    0 0 32px rgba(244, 201, 118, 0.16);
  opacity: 0;
  filter: blur(10px);
}

body.ready .scene-title {
  animation: cinematicFadeIn 1.65s ease-out forwards;
}

body.show-overlay .scene-title {
  animation: titleExit 640ms ease forwards;
  pointer-events: none;
}

.final-overlay {
  width: min(95vw, 780px);
  height: min(68vh, calc(100vh - 210px));
  border-radius: 16px;
  border: 1px solid rgba(245, 224, 171, 0.25);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(18px);
  filter: blur(5px);
  pointer-events: none;
  overflow: hidden;
}

body.show-overlay .final-overlay {
  animation: overlayReveal 700ms ease forwards;
  pointer-events: auto;
}

.final-content {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 16px 14px 18px;
  display: grid;
  gap: 14px;
}

.final-content::-webkit-scrollbar {
  width: 8px;
}

.final-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.final-cover {
  width: min(100%, 340px);
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(245, 224, 171, 0.34);
  background: #050505;
}

.final-copy {
  margin: 0;
  text-align: center;
  color: rgba(246, 240, 224, 0.94);
  font-size: 0.95rem;
  line-height: 1.6;
}

.final-actions {
  display: grid;
  gap: 10px;
}

.final-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.66rem;
  color: #f8efd8;
  border: 1px solid rgba(245, 224, 171, 0.58);
  background: linear-gradient(120deg, rgba(30, 23, 9, 0.95), rgba(78, 63, 30, 0.92), rgba(55, 56, 60, 0.9));
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.52),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.final-cta-trailer {
  border-color: rgba(205, 214, 232, 0.48);
  background: linear-gradient(120deg, rgba(12, 16, 25, 0.95), rgba(29, 44, 72, 0.92), rgba(70, 84, 110, 0.9));
}

.final-cta:hover {
  transform: translateY(-1px);
}

.final-cta:focus-visible {
  outline: 2px solid rgba(255, 234, 184, 0.94);
  outline-offset: 2px;
}

.cue-next {
  position: absolute;
  left: 50%;
  bottom: calc(164px + env(safe-area-inset-bottom, 0px));
  z-index: 16;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(243, 243, 236, 0.9);
  font-size: 0.73rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 520ms ease;
  pointer-events: none;
}

.cue-next.is-visible {
  opacity: 0.86;
  animation: cuePulse 2.6s ease-in-out infinite;
}

body.show-overlay .cue-next {
  opacity: 0;
  animation: none;
}

.vignette,
.grain,
.breath {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vignette {
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.84) 100%);
}

.grain {
  inset: -45%;
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 255, 255, 0.95) 0.45px, transparent 0.45px);
  background-size: 4px 4px;
  animation: grainMove 1.2s steps(2, end) infinite;
}

.breath {
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.055), transparent 56%);
  opacity: 0.28;
  animation: breathe 7.5s ease-in-out infinite;
}

@keyframes grainMove {
  0% { transform: translate(0, 0); }
  25% { transform: translate(11%, -9%); }
  50% { transform: translate(-10%, 10%); }
  75% { transform: translate(8%, 6%); }
  100% { transform: translate(0, 0); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.22; }
  50% { opacity: 0.34; }
}

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

@keyframes cinematicFadeIn {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translate(-50%, -50%) scale(1.02);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes titleExit {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 14px)) scale(0.98);
    filter: blur(8px);
  }
}

@keyframes overlayReveal {
  0% {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.001ms !important;
  }

  .fade-black {
    display: none;
  }

  .scene-title {
    opacity: 0;
  }

  .final-overlay {
    opacity: 1;
    transform: none;
    filter: none;
    pointer-events: auto;
  }

  .cue-next {
    display: none;
  }
}

@media (min-width: 760px) {
  .scene14 {
    padding-bottom: calc(156px + env(safe-area-inset-bottom, 0px));
  }

  .final-overlay {
    width: min(88vw, 920px);
    height: min(72vh, calc(100vh - 220px));
  }

  .final-content {
    padding: 24px;
    gap: 18px;
  }

  .final-cover {
    width: min(100%, 430px);
  }

  .final-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .final-overlay {
    width: 96vw;
    height: min(62vh, calc(100vh - 250px));
  }

  .final-content {
    padding: 14px 12px 16px;
  }

  .cue-next {
    top: max(14px, env(safe-area-inset-top, 0px));
    bottom: auto;
    font-size: 0.62rem;
    padding: 6px 12px;
  }
}
