/* ============================================
   Cinematic intro — film title over the still
   ============================================ */

:root {
  --cin-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html.cin-pending,
html.cin-playing {
  overflow: hidden !important;
}

html.cin-pending body,
html.cin-playing body {
  overflow: hidden !important;
  background: #000;
}

html.cin-pending body > *:not(script):not(.rain-cinema) {
  opacity: 0;
}

html.cin-playing body > .cin-root,
html.cin-playing body > .rain-cinema {
  opacity: 1;
}

html.cin-playing body > *:not(script):not(.rain-cinema):not(.cin-root) {
  opacity: 0 !important;
  pointer-events: none;
}

html.cin-complete #site-header,
html.cin-complete #site-logo,
html.cin-complete main,
html.cin-complete #site-footer,
html.cin-complete .header,
html.cin-complete .footer {
  opacity: 1;
  animation: cin-ui-in 0.9s var(--cin-ease);
}

@keyframes cin-ui-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

html.cin-playing body {
  cursor: default;
}

.cin-root {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: auto;
  isolation: isolate;
  background: transparent;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.cin-skip {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 30;
  padding: 0.55rem 0.9rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  transition: color 0.3s ease, border-color 0.3s ease, opacity 0.6s var(--cin-ease) 1.1s;
}

html.cin-playing .cin-skip {
  opacity: 1;
}

.cin-skip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.cin-skip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.cin-letterbox {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 8;
  height: 11vh;
  background: #000;
  pointer-events: none;
  transform-origin: center;
  transition: height 1.1s var(--cin-ease), opacity 0.9s ease;
}

.cin-letterbox-top {
  top: 0;
}

.cin-letterbox-bottom {
  bottom: 0;
}

.cin-root.is-release .cin-letterbox {
  height: 0;
  opacity: 0;
}

.cin-titles {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: end start;
  padding: 0 8vw 16vh;
  pointer-events: none;
}

.cin-kicker,
.cin-title,
.cin-tagline {
  margin: 0;
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  filter: blur(8px);
}

.cin-kicker {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.85rem;
}

.cin-title {
  font-size: clamp(3.2rem, 9vw, 7.2rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 0.9;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
}

.cin-tagline {
  margin-top: 1.1rem;
  max-width: 26rem;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.cin-root.is-title .cin-kicker,
.cin-root.is-title .cin-title {
  opacity: 1;
  transform: none;
  filter: none;
  animation: cin-title-in 1.15s var(--cin-ease) both;
}

.cin-root.is-title .cin-title {
  animation-delay: 0.18s;
}

.cin-root.is-tag .cin-tagline {
  opacity: 1;
  transform: none;
  filter: none;
  animation: cin-title-in 1s var(--cin-ease) both;
}

.cin-root.is-release .cin-kicker,
.cin-root.is-release .cin-title,
.cin-root.is-release .cin-tagline {
  animation: cin-title-out 0.7s ease forwards;
}

@keyframes cin-title-in {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes cin-title-out {
  to {
    opacity: 0;
    transform: translate3d(0, -8px, 0);
    filter: blur(6px);
  }
}

.cin-fade {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #000;
  opacity: 1;
  pointer-events: none;
  transition: opacity 1.4s var(--cin-ease);
}

.cin-root.is-reveal .cin-fade {
  opacity: 0;
}

.cin-root.is-done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

@media (max-width: 768px) {
  .cin-titles {
    place-items: end center;
    padding: 0 1.4rem 18vh;
    text-align: center;
  }

  .cin-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .cin-title {
    letter-spacing: 0.12em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cin-root,
  .cin-kicker,
  .cin-title,
  .cin-tagline,
  .cin-letterbox,
  .cin-fade {
    animation: none !important;
    transition: none !important;
  }
}
