:root {
  color-scheme: dark;
  --alwael-navy: #0c0b23;
  --alwael-gold: #e4c054;
  --hero-object-position: center center;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--alwael-navy);
}

body {
  overflow-x: hidden;
}

main {
  width: 100%;
}

.hero {
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  min-height: 420px;
  overflow: hidden;
  background: var(--alwael-navy);
  color: var(--alwael-gold);
  touch-action: pan-y;
}

.hero__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--alwael-navy);
}

.hero__opening-poster,
.hero__poster,
.hero__video,
.hero__veil,
.hero__buffer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__quotes {
  position: absolute;
  z-index: 6;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__quote {
  position: absolute;
  margin: 0;
  color: rgba(245, 243, 236, 0.92);
  font-family: var(--headline-serif, Georgia, "Times New Roman", serif);
  font-weight: 400;
  line-height: 1.26;
  letter-spacing: -0.018em;
  text-wrap: balance;
  text-shadow: 0 1px 18px rgba(6, 6, 23, 0.42);
  will-change: opacity;
}

.hero__quote--opening {
  left: clamp(36px, 6.5vw, 104px);
  bottom: clamp(92px, 13svh, 150px);
  width: min(520px, 42vw);
  font-size: clamp(23px, 1.85vw, 32px);
  opacity: var(--hero-opening-quote-opacity, 0);
}

.hero__quote--final {
  left: 50%;
  bottom: clamp(190px, 20svh, 220px);
  width: min(520px, 62vw);
  color: rgba(245, 243, 236, 0.88);
  font-size: clamp(18px, 1.35vw, 24px);
  text-align: center;
  opacity: var(--hero-final-quote-opacity, 0);
  transform: translateX(-50%);
}

.hero__opening-poster,
.hero__poster {
  z-index: 2;
  display: block;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms linear;
}

.hero__poster {
  z-index: 4;
}

.hero__opening-poster img,
.hero__poster img,
.hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-object-position);
  background: var(--alwael-navy);
}

.hero__video {
  z-index: 3;
  opacity: 0;
  border: 0;
  outline: 0;
  pointer-events: none;
  transition: opacity 1ms linear;
}

.hero__veil {
  z-index: 5;
  background: var(--alwael-navy);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms linear;
}

.hero__buffer {
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 1px;
  background: #9f873f;
  background: color-mix(in srgb, var(--alwael-gold) 70%, transparent);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 120ms linear;
}

.hero__play {
  position: absolute;
  z-index: 7;
  top: auto;
  bottom: 48px;
  bottom: clamp(36px, 7svh, 64px);
  left: 50%;
  display: grid;
  width: 72px;
  height: 72px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(228, 192, 84, 0.58);
  border-radius: 50%;
  background: rgba(12, 11, 35, 0.46);
  color: var(--alwael-gold);
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 120ms linear, border-color 120ms linear;
  -webkit-tap-highlight-color: transparent;
}

.hero__glyph {
  display: block;
  width: 24px;
  height: auto;
}

.hero__glyph--play {
  margin-left: 3px;
}

.hero__glyph--replay {
  display: none;
  width: 26px;
}

.hero[data-state="ENDED_POSTER"] .hero__glyph--play {
  display: none;
}

.hero[data-state="ENDED_POSTER"] .hero__glyph--replay {
  display: block;
}

.hero__play:hover {
  opacity: 1;
  border-color: rgba(228, 192, 84, 0.9);
}

.hero__play:focus-visible {
  outline: 1px solid var(--alwael-gold);
  outline-color: color-mix(in srgb, var(--alwael-gold) 78%, white);
  outline-offset: 8px;
}

.hero__play:disabled {
  cursor: default;
  opacity: 0;
  pointer-events: none;
}

.hero[data-state="IDLE_POSTER"]:not([data-autoplay-mode="reduced-motion"]) .hero__opening-poster,
.hero[data-state="PREPARING"] .hero__opening-poster {
  opacity: 1;
}

.hero[data-state="PREPARING"] .hero__video,
.hero[data-state="PLAYING"] .hero__video,
.hero[data-state="PAUSED_BY_CONTEXT"] .hero__video {
  opacity: 1;
}

.hero[data-state="PLAYING"] .hero__opening-poster,
.hero[data-state="PAUSED_BY_CONTEXT"] .hero__opening-poster,
.hero[data-state="ENDED_POSTER"] .hero__opening-poster,
.hero[data-state="ERROR"] .hero__opening-poster,
.hero[data-autoplay-mode="reduced-motion"] .hero__opening-poster {
  opacity: 0;
}

.hero[data-state="PLAYING"] .hero__veil,
.hero[data-state="PAUSED_BY_CONTEXT"] .hero__veil,
.hero[data-state="ENDED_POSTER"] .hero__veil {
  opacity: 0;
}

.hero[data-state="PLAYING"] .hero__play,
.hero[data-state="PREPARING"] .hero__play {
  opacity: 0;
  pointer-events: none;
}

.hero[data-state="PAUSED_BY_CONTEXT"] .hero__play,
.hero[data-state="ENDED_POSTER"] .hero__play,
.hero[data-state="ERROR"] .hero__play,
.hero[data-autoplay-mode="reduced-motion"][data-state="IDLE_POSTER"] .hero__play {
  opacity: 1;
  pointer-events: auto;
}

@media (min-aspect-ratio: 2 / 1) {
  .hero {
    display: grid;
    place-items: center;
  }

  .hero__stage {
    position: relative;
    inset: auto;
    width: min(100vw, calc(100svh * 1916 / 1080));
    height: min(100svh, calc(100vw * 1080 / 1916));
    aspect-ratio: 1916 / 1080;
  }

  .hero__opening-poster img,
  .hero__poster img,
  .hero__video {
    object-fit: contain;
  }

  .hero__play {
    top: 87.4074%;
    bottom: auto;
  }
}

.hero[data-state="ENDED_POSTER"] .hero__poster,
.hero[data-state="ERROR"] .hero__poster,
.hero[data-autoplay-mode="reduced-motion"][data-state="IDLE_POSTER"] .hero__poster {
  opacity: 1;
}

.hero[data-state="ERROR"] .hero__video,
.hero[data-state="IDLE_POSTER"] .hero__video {
  opacity: 0;
}

.hero--buffering .hero__buffer {
  opacity: 1;
}

@media (orientation: portrait) {
  .hero {
    display: grid;
    place-items: center;
  }

  .hero__stage {
    position: relative;
    inset: auto;
    width: min(100vw, calc(100svh * 9 / 16));
    height: min(100svh, calc(100vw * 16 / 9));
    aspect-ratio: 9 / 16;
  }

  .hero__opening-poster img,
  .hero__poster img,
  .hero__video {
    object-fit: contain;
  }

  .hero__play {
    top: 81.25%;
    bottom: auto;
  }

  .hero__quote--opening {
    left: 9%;
    bottom: 17.5%;
    width: 70%;
    max-width: none;
    font-size: clamp(17px, 4.7vw, 21px);
    line-height: 1.3;
  }

  .hero__quote--final {
    top: 70.5%;
    bottom: auto;
    width: 76%;
    max-width: none;
    font-size: clamp(15px, 3.9vw, 19px);
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  .hero__quote--opening {
    left: auto;
    right: 18%;
    bottom: 7.2%;
    width: 70%;
    text-align: right;
  }
}

@media (min-width: 901px) and (max-height: 900px) {
  .hero__quote--final {
    top: 76%;
    bottom: auto;
  }

  .hero[data-state="ENDED_POSTER"] .hero__play {
    top: 85%;
    bottom: auto;
    transform: translateX(-50%);
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 600px) {
  .hero__play {
    width: 64px;
    height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__opening-poster,
  .hero__poster,
  .hero__video,
  .hero__veil,
  .hero__buffer,
  .hero__play {
    transition-duration: 1ms !important;
  }
}
