/* =========================
   DESIGN SYSTEM
========================= */

:root {
  --color-accent: #3269FF;
  --color-white: #F6F5F1;
  --color-dark: #1C2445;

  --color-black: #000000;
  --color-video-ui: #FFFFFF;

  --font-heading:
    "Source Sans 3",
    sans-serif;

  --font-body:
    "DM Sans",
    sans-serif;

  --font-ui:
    "Manrope",
    sans-serif;
}


/* =========================
   GLOBAL
========================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  overflow-x: hidden;
}

html {
  background: var(--color-white);
}

body {
  min-height: 400vh;

  background: var(--color-white);
  color: var(--color-dark);

  font-family: var(--font-body);
  font-weight: 400;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}


/* =========================
   TYPOGRAPHY
========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;

  font-family: var(--font-heading);
  color: var(--color-dark);
}

p {
  font-family: var(--font-body);
}

button,
input,
a,
nav,
label {
  font-family: var(--font-ui);
}


/* =========================
   ACCESSIBILITY
========================= */

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}


/* =========================
   INTRO
========================= */

.sequence {
  position: fixed;
  inset: 0;

  overflow: hidden;

  background: var(--color-black);

  z-index: 100;
}


/* =========================
   SCROLL HINT
========================= */

#scrollHint {
  position: fixed;

  left: 50%;
  bottom: 28px;

  transform: translateX(-50%);

  z-index: 50;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 4px;

  color: var(--color-white);

  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;

  letter-spacing: 0.16em;
  text-transform: uppercase;

  opacity: 0.72;

  pointer-events: none;

  transition: opacity 0.4s ease;
}

.scroll-arrow {
  font-size: 18px;
  line-height: 1;

  letter-spacing: 0;

  opacity: 0.7;

  animation: scrollArrow 1.8s ease-in-out infinite;
}

@keyframes scrollArrow {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  50% {
    transform: translateY(4px);
    opacity: 0.9;
  }
}


/* =========================
   THEATER
========================= */

#scene {
  position: absolute;

  left: 50%;
  top: 50%;

  width:
    max(
      100vw,
      calc(100vh * 16 / 9)
    );

  height:
    max(
      100vh,
      calc(100vw * 9 / 16)
    );

  transform-origin: 50% 39%;

  will-change: transform;
}

.theater {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: fill;

  pointer-events: none;

  transition: opacity 0.8s ease;
}

#lit {
  opacity: 1;
}

#dim {
  opacity: 0;
}

#screenGuide {
  position: absolute;

  left: 20.2%;
  top: 15%;

  width: 59.6%;
  height: 50.8%;
}


/* =========================
   CINEMA SCREEN
========================= */

#screen {
  position: fixed;

  overflow: hidden;

  background: var(--color-black);

  z-index: 10;
}

#title,
#video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;

  background: var(--color-black);
}

#title {
  opacity: 1;

  z-index: 3;

  transition: opacity 0.65s ease;
}

#video {
  opacity: 0;

  z-index: 2;

  transition: opacity 0.65s ease;
}


/* =========================
   PLAY FALLBACK
========================= */

#playGate {
  position: absolute;
  inset: 0;

  z-index: 20;

  display: none;

  align-items: center;
  justify-content: center;
}

#playGateButton {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 13px 22px;

  border:
    1px solid
    rgba(255,255,255,.42);

  border-radius: 999px;

  background:
    rgba(8,8,8,.72);

  backdrop-filter: blur(12px);

  color: var(--color-video-ui);

  font-family: var(--font-ui);

  font-size: 14px;
  font-weight: 500;

  cursor: pointer;

  transition:
    background .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

#playGateButton:hover {
  background: rgba(0,0,0,.9);

  border-color: var(--color-accent);

  transform: scale(1.02);
}


/* =========================
   CLOSE BUTTON
========================= */

#closeHotspot {
  position: absolute;

  top: 0;
  left: 0;

  width: 110px;
  height: 110px;

  z-index: 30;

  display: none;
}

#closeButton {
  position: absolute;

  top: 18px;
  left: 18px;

  width: 38px;
  height: 38px;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 0;

  border:
    1px solid
    rgba(255,255,255,.18);

  border-radius: 50%;

  background:
    rgba(0,0,0,.35);

  backdrop-filter: blur(10px);

  color: var(--color-video-ui);

  font-family: var(--font-ui);

  cursor: pointer;

  opacity: 0;

  transition:
    opacity .22s ease,
    background .2s ease,
    transform .2s ease;
}

#closeHotspot:hover #closeButton {
  opacity: 1;
}

#closeButton:hover {
  background: rgba(0,0,0,.68);

  transform: scale(1.05);
}


/* =========================
   VIDEO CONTROLS
========================= */

#controls {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  z-index: 25;

  display: none;

  padding: 70px 22px 18px;

  background:
    linear-gradient(
      to top,
      rgba(0,0,0,.78),
      rgba(0,0,0,.34) 45%,
      rgba(0,0,0,0)
    );

  opacity: 0;

  transition: opacity .3s ease;

  pointer-events: none;

  font-family: var(--font-ui);
}

#controls.visible {
  opacity: 1;

  pointer-events: auto;
}

.progress-row {
  display: flex;

  align-items: center;

  gap: 12px;

  margin-bottom: 10px;
}

#scrubber {
  flex: 1;

  height: 4px;

  appearance: none;
  -webkit-appearance: none;

  border-radius: 999px;

  background:
    rgba(255,255,255,.28);

  cursor: pointer;
}

#scrubber::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;

  width: 12px;
  height: 12px;

  border: 0;

  border-radius: 50%;

  background: var(--color-video-ui);
}

#scrubber::-moz-range-thumb {
  width: 12px;
  height: 12px;

  border: 0;

  border-radius: 50%;

  background: var(--color-video-ui);
}

#timeLabel {
  min-width: 78px;

  color:
    rgba(255,255,255,.76);

  font-family: var(--font-ui);

  font-size: 11px;
  font-weight: 400;

  text-align: right;

  white-space: nowrap;
}

.controls-row {
  display: flex;

  align-items: center;

  gap: 10px;
}

.icon-button {
  width: 36px;
  height: 36px;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 0;

  border: 0;

  border-radius: 50%;

  background: transparent;

  color: var(--color-video-ui);

  cursor: pointer;

  opacity: .88;
}

.icon-button:hover {
  opacity: 1;

  background:
    rgba(255,255,255,.1);
}

.icon-button svg {
  width: 19px;
  height: 19px;

  fill: none;

  stroke: currentColor;

  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}

#volumeSlider {
  width: 82px;

  appearance: none;
  -webkit-appearance: none;

  height: 3px;

  border-radius: 999px;

  background:
    rgba(255,255,255,.32);
}

#volumeSlider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;

  width: 10px;
  height: 10px;

  border-radius: 50%;

  border: 0;

  background: var(--color-video-ui);
}


/* =========================
   END SCREEN
========================= */

#screenEnd {
  position: absolute;
  inset: 0;

  z-index: 18;

  display: none;

  align-items: flex-end;
  justify-content: center;

  padding-bottom:
    clamp(
      36px,
      8vh,
      90px
    );

  pointer-events: none;
}

#screenEnd.visible {
  display: flex;

  pointer-events: auto;
}

.screen-end-inner {
  display: flex;

  align-items: center;

  gap: 8px;

  padding: 8px;

  border:
    1px solid
    rgba(255,255,255,.16);

  border-radius: 999px;

  background:
    rgba(0,0,0,.56);

  backdrop-filter: blur(14px);
}

.end-button {
  padding: 11px 19px;

  border: 0;

  border-radius: 999px;

  background: transparent;

  color:
    rgba(255,255,255,.86);

  font-family: var(--font-ui);

  font-size: 13px;
  font-weight: 500;

  cursor: pointer;

  transition:
    background .2s ease,
    color .2s ease,
    transform .2s ease;
}

.end-button:hover {
  background:
    rgba(255,255,255,.1);

  color: var(--color-video-ui);
}

.end-button.primary {
  background: var(--color-accent);

  color: var(--color-white);
}

.end-button.primary:hover {
  background: var(--color-accent);

  color: var(--color-white);

  transform: scale(1.02);
}


/* =========================
   SITE CONTENT
========================= */

#siteContent {
  min-height: 100vh;

  background: var(--color-white);

  color: var(--color-dark);
}


/* =========================
   BRAND UTILITIES
========================= */

.text-accent {
  color: var(--color-accent);
}

.text-dark {
  color: var(--color-dark);
}

.text-white {
  color: var(--color-white);
}

.bg-accent {
  background: var(--color-accent);
}

.bg-dark {
  background: var(--color-dark);
}

.bg-white {
  background: var(--color-white);
}

/* =========================
   SITE HEADER
========================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;

  z-index: 200;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 24px 36px;

  background: transparent;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(-8px);

  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    visibility 0.5s;
}

.site-header.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translateY(0);
}

.site-logo {
  display: block;

  width: 150px;

  transform-origin: center;

  transition:
    transform 180ms cubic-bezier(.2, .8, .2, 1);
}

.site-logo img {
  display: block;

  width: 100%;
  height: auto;
}

.site-logo:hover {
  transform: rotate(-2deg);
}

.site-nav {
  display: flex;
  align-items: center;

  gap: 30px;
}

.nav-link {
  display: inline-flex;
  align-items: center;

  color: var(--color-video-ui);

  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;

  opacity: 1;

  transition:
    opacity 180ms ease;
}

.nav-link > span {
  display: inline-block;

  transform-origin: center;

  transition:
    transform 180ms cubic-bezier(.2, .8, .2, 1);
}

.nav-link:hover {
  opacity: 1;
}

.nav-link.tilt-left:hover > span {
  transform: rotate(-4deg);
}

.nav-link.tilt-right:hover > span {
  transform: rotate(4deg);
}

.imdb-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  opacity: 1;

  transition:
    opacity 180ms ease,
    transform 180ms cubic-bezier(.2, .8, .2, 1);
}

.imdb-link:hover {
  opacity: 1;
  transform: rotate(-3deg);
}

.imdb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 38px;
  height: 20px;

  padding: 0 5px;

  border-radius: 3px;

  background: #F5C518;
  color: #000000;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}


/* =========================
   HEADER MOBILE
========================= */

@media (max-width: 700px) {
  .site-header {
    padding: 18px 20px;
  }

  .site-logo {
    width: 108px;
  }

  .site-nav {
    gap: 13px;
  }

  .nav-link {
    font-size: 12px;
  }

  .imdb-badge {
    min-width: 34px;
    height: 18px;
    font-size: 12px;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 16px;
  }

  .site-logo {
    width: 92px;
  }

  .site-nav {
    gap: 9px;
  }

  .nav-link {
    font-size: 10.5px;
  }

  .imdb-badge {
    min-width: 31px;
    height: 17px;
    font-size: 11px;
  }
}
