/* The supplied 27:38 artwork is never cropped. Scope all changes to the hero. */
#home.hero-user-video {
  --hero-edge: clamp(20px, 5.6vw, 108px);
  --hero-gap: clamp(22px, 4vw, 72px);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: var(--hero-gap);
  height: auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(100px + env(safe-area-inset-top, 0px)) var(--hero-edge) 30px;
  isolation: isolate;
}
#home.hero-user-video .hero-bg {
  background: radial-gradient(ellipse at 72% 40%, #174e38 0%, transparent 52%),
              radial-gradient(ellipse at 6% 100%, #164938 0%, transparent 51%), #082920;
}
#home.hero-user-video .hero-media {
  --hero-media-width: min(100%, 460px);
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: var(--hero-media-width);
}
@supports (height: 1svh) {
  #home.hero-user-video .hero-media {
    --hero-media-width: min(100%, 460px, max(220px, calc((100svh - 158px) * 27 / 38)));
  }
}
#home.hero-user-video .hero-media-frame {
  position: relative;
  aspect-ratio: 27 / 38;
  background: #061c15;
  box-shadow: 0 0 0 1px #e9ba5140, 0 20px 64px #00130b80;
}
#home.hero-user-video .hero-motion-video {
  object-fit: contain;
  object-position: center;
}
#home.hero-user-video .hero-video-fallback {
  background: #061c15 url('./hero-maxrummy-20261112-poster.jpg') center / contain no-repeat;
}
#home.hero-user-video .hero-video-toggle {
  position: static;
  display: block;
  margin: 10px 0 0 auto;
}
#home.hero-user-video .hero-video-toggle[hidden] { display: none; }
#home.hero-user-video .hero-grid {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
}
#home.hero-user-video .hero-only-actions { position: static; padding: 0; }
#home.hero-user-video .hero-actions { flex-wrap: wrap; }

@media (min-width: 768px) {
  #home.hero-user-video .hero-bg {
    background: linear-gradient(90deg, #06291e60 0%, #06291e30 48%, #05241935 100%),
                url('./hero-casino-bg-left8.webp') center / cover no-repeat, #082920;
  }
  #home.hero-user-video .hero-media {
    justify-self: start;
    /* Start at the old centered position, move 8vw left, but keep 16px clear of the text column. */
    margin-inline-start: max(calc(16px - var(--hero-gap)), calc((100% - var(--hero-media-width)) / 2 - 8vw));
  }
}

@media (max-width: 767px) {
  #home.hero-user-video {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 18px;
    padding: calc(83px + env(safe-area-inset-top, 0px)) 18px calc(26px + env(safe-area-inset-bottom, 0px));
  }
  #home.hero-user-video .hero-media {
    grid-column: 1;
    grid-row: 1;
    width: min(100%, 370px);
    width: min(100%, 370px, max(206px, calc((100svh - 255px) * 27 / 38)));
  }
  #home.hero-user-video .hero-grid {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    width: min(100%, 520px);
    text-align: center;
  }
  #home.hero-user-video .hero-copy { align-items: center; }
  #home.hero-user-video .hero-subtitle { margin-inline: auto; }
  #home.hero-user-video .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 380px);
    max-width: none;
    gap: 8px;
  }
  #home.hero-user-video .hero-actions a {
    min-width: 0;
    padding-inline: 8px;
    text-align: center;
    white-space: normal;
  }
}

/* Keep the homepage actions clear of the existing bottom-right support tab. */
@media (max-width: 430px) {
  #home.hero-user-video .hero-actions {
    grid-template-columns: minmax(0, 1fr);
    width: min(220px, calc(100% - 124px));
  }
}
