/* Hero artwork and optional video, independent from the game and site navigation. */
.hero-media { position: absolute; inset: 0; pointer-events: none; }
.hero-picture { display: block; position: absolute; inset: 0; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
.hero-media .hero-overlay { z-index: 1; }
.home-page .hero-baseline { z-index: 2; }
.hero-video[hidden], .hero-motion-toggle[hidden] { display: none !important; }
.hero-motion-toggle {
  position: absolute; z-index: 4; right: var(--site-gutter); bottom: 105px;
  display: inline-flex; gap: 10px; align-items: center; min-height: 44px;
  max-width: calc(100% - 2 * var(--site-gutter)); padding: 10px 15px;
  border: 1px solid #d6c9f36b; border-radius: 2px;
  background: #080f20c9; color: #f0ecf8; font: 11px/1.5 sans-serif; cursor: pointer;
}
.hero-motion-toggle::before { content: 'Ⅱ'; font-size: 15px; }
.hero-motion-toggle[data-state='paused']::before { content: '▷'; }
.hero-motion-toggle:focus-visible { outline: 2px solid #c6b4fa; outline-offset: 5px; }

@media (min-width: 701px) and (max-width: 960px) {
  .hero-picture, .hero-video {
    left: auto; right: 0; width: auto; height: 100%; max-width: 100%;
    aspect-ratio: var(--hero-portrait-ratio,9/16);
    mask-image: linear-gradient(90deg,transparent 0%,#000 22%);
  }
  .home-page .hero-art, .home-page .hero-video { object-fit: contain; object-position: right bottom; }
  .home-page .hero-overlay {
    background: linear-gradient(90deg,#050b16 3%,#050b16e0 29%,#050b165e 56%,transparent 76%),linear-gradient(0deg,#050b16,transparent 16%);
  }
}

@media (max-width: 700px) {
  .home-page .hero { display: grid; grid-template-columns: minmax(0,1fr); align-content: start; min-height: 0; overflow: hidden; }
  .home-page .hero-media { position: relative; inset: auto; grid-area: 1 / 1; margin-top: 76px; width: 100%; height: auto; aspect-ratio: var(--hero-portrait-ratio,9/16); }
  .home-page .hero-art, .home-page .hero-video { object-fit: contain; object-position: center; }
  .home-page .hero-overlay {
    background: linear-gradient(180deg,#050b1645 0%,#050b1629 29%,transparent 45%,transparent 86%,#050b16 100%);
  }
  .home-page .hero-copy { display: contents; }
  .home-page .hero-intro {
    position: relative; z-index: 2; grid-area: 1 / 1; align-self: start;
    width: calc(100% - 2 * var(--site-gutter)); margin: 127px auto 0;
  }
  .home-page .hero-eyebrow { margin-bottom: 19px; color: #e0d8f2; }
  .home-page .hero-copy h1 { margin-bottom: 0; text-shadow: 0 2px 25px #0205138c; }
  .home-page .hero-details {
    position: relative; z-index: 2; grid-area: 2 / 1;
    width: calc(100% - 2 * var(--site-gutter)); margin: 25px auto 0; padding-bottom: 121px;
  }
  .home-page .hero-en { color: #d8d3e2; }
  .home-page .possibility-copy { margin-top: 21px; color: #cbd2df; font-size: 13px; }
  .home-page .hero-actions { margin-top: 28px; }
  .home-page .hero-baseline { bottom: 25px; }
  .hero-motion-toggle { top: auto; bottom: auto; position: relative; grid-area: 3 / 1; justify-self: start; left: var(--site-gutter); right: auto; margin: -103px 0 79px; }
  .home-page .hero:has(.hero-motion-toggle:not([hidden])) .hero-details { padding-bottom: 161px; }
}

@media (max-width: 400px) {
  .home-page .hero-intro { margin-top: 118px; }
  .home-page .hero-eyebrow { margin-bottom: 17px; }
  .home-page .hero-copy h1 { font-size: 34px; }
  html[lang='ja'] .home-page .hero-copy h1 { font-size: 32px; }
  .home-page .hero-details { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video, .hero-motion-toggle { display: none !important; }
}
