/* Product film in the landing-page hero (ansogningshjaelpen.dk). Same player as the app's login pages:
   a silent 12 s loop of real product moments with ONE play icon; a click opens the full film with sound
   in a <dialog> theater. The loop only runs on desktop (>= 1024px) and never for reduced motion or
   Save-Data; phones and tablets get the still poster with the same play icon. */

.hv-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #0A2530;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 10px 20px rgba(0, 0, 0, 0.06),
    0 25px 50px rgba(0, 0, 0, 0.1);
}

.hv-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(20, 32, 45, 0.08);
  pointer-events: none;
}

.hv-loop,
.hv-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* the whole picture is the play button; the icon sits exactly in the middle */
.hv-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: radial-gradient(circle at 50% 50%, rgba(8, 26, 33, 0.3) 0%, rgba(8, 26, 33, 0.1) 45%, rgba(8, 26, 33, 0.05) 100%);
  cursor: pointer;
}

.hv-play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.55);
  transition: transform 0.18s ease;
}

/* triangle ~37 % of the circle; its centroid is the viewBox centre, so no margin nudge */
.hv-play-icon svg {
  width: 34px;
  height: 34px;
  fill: #2a9fc0;
  stroke: #2a9fc0;
}

.hv-play:hover .hv-play-icon {
  transform: scale(1.07);
}

.hv-play:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}

.hv-play:focus-visible .hv-play-icon {
  box-shadow: 0 0 0 4px #2a9fc0, 0 14px 34px -10px rgba(0, 0, 0, 0.55);
}

.hv-pause {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 26, 33, 0.5);
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.hv-pause:hover,
.hv-pause:focus-visible {
  opacity: 1;
}

.hv-pause:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hv-pause svg {
  width: 13px;
  height: 13px;
  fill: #fff;
}

.hv-pause .i-play {
  stroke: #fff;
}

.hv-pause .i-play,
.hv-pause[aria-pressed="true"] .i-pause {
  display: none;
}

.hv-pause[aria-pressed="true"] .i-play {
  display: block;
}

.hv-stage.is-still .hv-pause {
  display: none;
}

/* the poster is a real <img> (responsive WebP, the LCP element); the loop video sits on top and only
   exists visually where it plays */
.hv-stage.is-still .hv-loop {
  display: none;
}

/* 30px icon, 44px touch/click target */
.hv-pause::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
}

/* ===== THEATER ===== */
.hv-theater:not([open]) {
  display: none;
}

.hv-theater {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.hv-theater::backdrop {
  background: rgba(9, 18, 25, 0.84);
}

.hv-theater-inner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1120px, calc(100vw - 48px), calc((100vh - 140px) * 16 / 9));
  transform: translate(-50%, -50%);
}

.hv-theater-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.hv-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.hv-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hv-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.hv-close svg {
  width: 20px;
  height: 20px;
}

.hv-film {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.65);
}

.hv-film::cue {
  font-size: 22px;
  background: rgba(10, 18, 24, 0.82);
}

@media (max-width: 767px) {
  .hv-theater-inner {
    width: min(calc(100vw - 24px), calc((100vh - 120px) * 16 / 9));
  }

  .hv-film::cue {
    font-size: 15px;
  }

  .hv-play-icon {
    width: 64px;
    height: 64px;
  }

  .hv-play-icon svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hv-theater-head {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    margin: 0;
  }

  .hv-theater-inner {
    width: min(calc(100vw - 24px), calc((100vh - 16px) * 16 / 9));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hv-play-icon,
  .hv-pause {
    transition: none;
  }

  .hv-play:hover .hv-play-icon {
    transform: none;
  }
}

/* ===== Layout on the homepage hero (approved mockup "A", 27 Sep 2026): the film card takes the product
   picture's place on the right; tablets and phones (which hid the picture) show it under the buttons. ===== */

.hero .hero-visual.hv-a {
  display: block;
}

@media (min-width: 1024px) {
  .hv-a .hv-stage {
    max-width: 576px;
    margin-left: auto;
  }
}

@media (max-width: 1023px) {
  .hero .hero-visual.hv-a {
    display: block;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  .hero .hero-visual.hv-a::before {
    display: none;
  }
}
