/* ==========================================================================
   Homepage hero cinema
   The default Aloha hero is unchanged until a visitor explicitly starts the
   90-second film. JavaScript adds the ready/open classes used below.
   ========================================================================== */

body.video-page .video-container.hg-hero-cinema-ready {
  background-color: #000;
  /*
   * Unlike overflow:hidden, overflow:clip cannot become a programmatically
   * scrolled container when a browser reveals its native media controls.
   * That keeps every cinema layer anchored to the hero at all breakpoints.
   */
  overflow: clip;
}

body.video-page .goUS-header {
  transition:
    opacity 320ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

body.video-page .goUS-header.hg-hero-cinema-header-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 320ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 320ms;
}

@media (max-width: 1023px) {
  body.video-page #hawaii-top {
    transition: margin-top 320ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  body.video-page #hawaii-top.hg-hero-cinema-active {
    /*
     * At the compact breakpoint the masthead occupies its own 60px row above
     * the hero. Pull that now-empty row closed while the masthead is hidden so
     * the film starts directly beneath the still-visible OS utility bar.
     */
    margin-top: -60px;
  }
}

body.video-page .video-container.hg-hero-cinema-ready #bg-head-video,
body.video-page .video-container.hg-hero-cinema-ready p.single-slide-full-text.solo-entry-text,
body.video-page .video-container.hg-hero-cinema-ready .hg-hero-islands,
body.video-page .video-container.hg-hero-cinema-ready .hg-hero-video-control {
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.video-page .video-container.hg-hero-cinema-ready p.single-slide-full-text.solo-entry-text {
  opacity: 0.95;
  transform: translateY(0);
  animation: none;
}

body.video-page .video-container.hg-hero-cinema-ready .hg-hero-islands,
body.video-page .video-container.hg-hero-cinema-ready .hg-hero-video-control {
  opacity: 1;
}

body.video-page .video-container.hg-hero-cinema-is-open #bg-head-video {
  opacity: 0;
  filter: blur(4px) saturate(0.75);
}

body.video-page .video-container.hg-hero-cinema-is-open p.single-slide-full-text.solo-entry-text {
  opacity: 0 !important;
  filter: blur(5px);
  transform: translateY(12px) scale(0.985);
  pointer-events: none;
}

body.video-page .video-container.hg-hero-cinema-is-open .hg-hero-islands {
  opacity: 0;
  filter: blur(6px);
  transform: scale(0.965);
  pointer-events: none;
}

body.video-page .video-container.hg-hero-cinema-is-open .hg-hero-video-control {
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
}

body.video-page .hg-hero-cinema {
  position: absolute;
  z-index: 1200;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(24, 102, 180, 0.12), transparent 44%),
    #020403;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 460ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 460ms;
}

body.video-page .hg-hero-cinema[hidden] {
  display: none !important;
}

body.video-page .video-container.hg-hero-cinema-is-open .hg-hero-cinema {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 460ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

body.video-page .video-container .hg-hero-cinema-video {
  --hg-hero-cinema-controls-lift: -38px;
  position: absolute;
  z-index: 1;
  inset: 0;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  transform: none;
  object-fit: contain;
  object-position: center;
  background: #000;
}

/*
 * The decorative wave overlaps the bottom of the film, where WebKit places
 * its native control panel. Lift that familiar native panel instead of
 * replacing it with custom controls or shortening the footage. Safari and
 * Chromium-based browsers honor this pseudo-element; other browsers retain
 * their normal native controls as a safe fallback.
 */
body.video-page .video-container .hg-hero-cinema-video::-webkit-media-controls-panel {
  transform: translateY(var(--hg-hero-cinema-controls-lift));
}

/*
 * Desktop cinema keeps the responsive 16:9 stage. Compact layouts override
 * this below so the film fills the same picture height as the original hero
 * while the Back control floats over a soft top scrim.
 */
body.video-page #hawaii-top.hg-hero-cinema-active .single-slide-top .bg-image-top {
  /*
   * Give the active 16:9 film a matching stage. The extra three pixels
   * account for the hero's bottom border, keeping the usable video area
   * exactly 16:9 at normal phone, tablet, and desktop heights.
   */
  height: min(calc(56.25vw + 3px), 85vh);
  transition: height 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
  body.video-page .video-container .hg-hero-cinema-video {
    /*
     * This only comes into play on unusually short landscape viewports where
     * the 85vh cap prevents an exact 16:9 stage.
     */
    object-fit: cover;
  }
}

body.video-page .hg-hero-cinema-bar {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

body.video-page .hg-hero-cinema-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  max-width: min(480px, 60%);
  padding: 9px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.video-page .hg-hero-cinema-title .hg-play-triangle {
  display: inline-block;
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  transform: translateX(1px);
}

body.video-page .hg-hero-cinema-title small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f27a24;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

body.video-page .hg-hero-cinema-back {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #123a29;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 9px 25px rgba(0, 0, 0, 0.3);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

body.video-page .hg-hero-cinema-back:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.38);
}

body.video-page .hg-hero-cinema-back:focus-visible {
  outline: 4px solid rgba(242, 122, 36, 0.7);
  outline-offset: 4px;
}

@media (min-width: 1024px) {
  body.video-page .hg-hero-cinema-bar {
    top: clamp(106px, 7.4vw, 132px);
    right: clamp(22px, 3vw, 48px);
    left: clamp(22px, 3vw, 48px);
  }
}

/*
 * Phones and tablets: preserve the original hero's picture height and let the
 * film continue behind a fading top scrim. The Back control stays pinned just
 * below the 44px utility bar, including at the 1024px breakpoint where the
 * hero begins underneath that fixed bar. The film uses cover (never geometric
 * distortion), so removing the old 52px rail does not change its visible crop.
 */
@media (max-width: 1280px) {
  body.video-page .video-container .hg-hero-cinema-video {
    --hg-hero-cinema-controls-lift: -16px;
    inset: 0;
    height: 100%;
    object-fit: cover;
  }

  body.video-page .hg-hero-cinema-bar {
    position: fixed;
    top: 44px;
    right: 0;
    left: 0;
    min-height: 76px;
    padding: 8px clamp(10px, 2vw, 18px) 24px;
    justify-content: flex-start;
    background: linear-gradient(
      180deg,
      rgba(3, 24, 17, 0.72) 0%,
      rgba(3, 24, 17, 0.34) 52%,
      rgba(3, 24, 17, 0) 100%
    );
    border-bottom: 0;
  }

  body.video-page .hg-hero-cinema-title {
    display: none;
  }
}

@media (max-width: 641px) {
  body.video-page .video-container .hg-hero-cinema-video {
    --hg-hero-cinema-controls-lift: -11px;
  }

  body.video-page #hawaii-top.hg-hero-cinema-active .single-slide-top .bg-image-top {
    height: 350px;
  }
}

@media (min-width: 642px) and (max-width: 879px) {
  body.video-page #hawaii-top.hg-hero-cinema-active .single-slide-top .bg-image-top {
    height: min(600px, 55vh);
  }
}

@media (min-width: 880px) and (max-width: 1023px) {
  body.video-page #hawaii-top.hg-hero-cinema-active .single-slide-top .bg-image-top {
    height: min(700px, 55vh);
  }
}

@media (min-width: 1024px) and (max-width: 1280px) {
  body.video-page .video-container .hg-hero-cinema-video {
    --hg-hero-cinema-controls-lift: -38px;
  }

  body.video-page #hawaii-top.hg-hero-cinema-active .single-slide-top .bg-image-top {
    height: min(750px, 55vh);
  }
}

@media (max-width: 600px) {
  body.video-page .hg-hero-cinema-back {
    min-height: 44px;
    padding: 8px 11px;
    font-size: 12px;
  }

  body.video-page .hg-hero-cinema-back-context {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.video-page .video-container.hg-hero-cinema-ready #bg-head-video,
  body.video-page .video-container.hg-hero-cinema-ready p.single-slide-full-text.solo-entry-text,
  body.video-page .video-container.hg-hero-cinema-ready .hg-hero-islands,
  body.video-page .video-container.hg-hero-cinema-ready .hg-hero-video-control,
  body.video-page #hawaii-top,
  body.video-page #hawaii-top.hg-hero-cinema-active .single-slide-top .bg-image-top,
  body.video-page .goUS-header,
  body.video-page .hg-hero-cinema,
  body.video-page .hg-hero-cinema-back {
    transition: none;
  }
}
