:root {
  --skyline-poster: url("assets/skyline-poster.webp");
  --hero-right-ratio: .04;
  --hero-controls-top: calc(16px + env(safe-area-inset-top));
  --hero-campaign-border: #fff2c3;
}
:root:has(.hero[data-scene="night"]) {
  --skyline-poster: url("assets/skyline-night-poster.webp");
}

.hero {
  --hero-edge: #074281a8;
  --hero-sky: #1466c0;
  --hero-fade: #eaf8fe;
  --hero-campaign-fill: #2c4074;
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, #1161b1 5%, #42a6d8 51%, #b7e9fa 91%, #ecf8fc 100%);
}
.hero[data-scene="night"] {
  --hero-edge: #080f37b3;
  --hero-sky: #10143b;
  --hero-fade: #101b3a;
  background: linear-gradient(180deg, #11123c, #20235e 54%, #151f47 88%, #101b3a);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--hero-edge), transparent 28% 72%, var(--hero-edge)),
              var(--skyline-poster) center 64% / cover;
  opacity: .37;
}
@media (min-width: 681px) {
  body {
    background:
      linear-gradient(180deg, #101739aa, #081321c7),
      var(--skyline-poster) center 64% / cover no-repeat,
      var(--night);
    background-attachment: fixed;
  }
  .hero, .hero[data-scene="night"] { background: none; }
  .hero::before { display: none; }
}
.hero-stage {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: min(100%, var(--hero-stage-width));
  height: clamp(705px, 109svh, 990px);
  margin-inline: auto;
  overflow: hidden;
  color: #fff;
  background: var(--hero-sky);
  box-shadow: 0 0 60px #10386b42;
}
.hero-stage::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 75% 0 0;
  background: linear-gradient(to bottom, transparent, #0005 48%, #000c);
  pointer-events: none;
}
.hero-media, .hero-media::before, .hero-media::after, .city-video { position: absolute; inset: 0; }
.hero-media { z-index: -2; overflow: hidden; background: var(--skyline-poster) center 47% / cover; }
.city-video { width: 100%; height: 100%; object-fit: cover; object-position: center 47%; }
.hero[data-background-motion="poster"] .hero-media::before {
  content: "";
  z-index: 1;
  background: inherit;
  transform-origin: center 47%;
  animation: skyline-drift 7s ease-in-out infinite alternate;
}
.hero-media::after {
  z-index: 2;
  content: "";
  background: linear-gradient(180deg, #0041a643 0%, transparent 24% 84%, var(--hero-fade) 100%);
}
.site-social-x {
  position: fixed;
  z-index: 9;
  inset-block-start: var(--hero-controls-top);
  inset-inline-end: max(
    calc(100% * var(--hero-right-ratio)),
    calc((100% - var(--hero-stage-width)) / 2 + var(--hero-stage-width) * var(--hero-right-ratio)),
    env(safe-area-inset-right)
  );
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border: 1px solid var(--hero-campaign-border);
  border-radius: 9px;
  background: #000;
  box-shadow: 0 2px 8px #090c29a6;
}
.site-social-x::after {
  content: "";
  position: absolute;
  inset: -3px;
}
.site-social-x:hover { background: #171717; }
.site-social-x:focus-visible { outline-color: #b8eaff; }
.hero-intro {
  position: absolute;
  z-index: 3;
  inset: 5.4% calc(100% * var(--hero-right-ratio)) auto 6%;
  display: grid;
  gap: clamp(8px, 2cqw, 14px);
}
.hero-heading {
  position: relative;
  justify-self: start;
  margin: 0;
  color: #fffdf1;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  font-size: clamp(24px, 9.1cqw, 57px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.065em;
  line-height: 1.12;
  text-align: left;
  text-shadow: 0 2px 0 #3275bc, 0 0 10px #268ce8, 0 0 25px #0070c9;
  transform: rotate(-5deg);
}
.hero-heading span, .hero-heading em { display: block; white-space: nowrap; }
.hero-heading em { padding-inline-start: 12cqw; }
.hero-heading::before, .hero-heading::after {
  content: "✦";
  position: absolute;
  color: #fff4cd;
  font: normal .32em/1 serif;
}
.hero-heading::before { top: 10%; left: -.9em; }
.hero-heading::after { bottom: 12%; right: -1.6em; }
.hero-pv {
  justify-self: end;
  margin-block-start: clamp(8px, 2.5cqw, 14px);
  width: min(34cqw, 174px);
  padding: 3px;
  overflow: hidden;
  border: 1px solid var(--hero-campaign-border);
  border-radius: 9px;
  background: #0d2147;
  box-shadow: 0 0 16px #52c9ff50, 0 5px 14px #071938a8;
}
.hero[data-scene="night"] .hero-pv {
  background: #171b43;
  box-shadow: 0 0 16px #9d91ff6b, 0 5px 14px #071938a8;
}
.hero-pv-cover {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  background: #152551;
}
.hero-pv-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}
.hero-pv-play {
  position: absolute;
  z-index: 1;
  right: 4px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: clamp(18px, 5.8cqw, 28px);
  aspect-ratio: 1;
  border: 1px solid #e9f7ff;
  border-radius: 50%;
  background: #121e43db;
  box-shadow: 0 0 13px #8fdfff88, 0 2px 8px #0009;
}
.hero-pv-play::before {
  content: "";
  width: 34%;
  aspect-ratio: 1;
  translate: 13% 0;
  background: #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.hero-pv-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  padding: 4px 5px 3px;
  background: var(--hero-campaign-fill);
  color: #f6f9ff;
  font-size: clamp(10px, 2.9cqw, 14px);
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}
.hero-pv-label span { color: #b4ddff; }
.hero-pv:focus-visible, .pv-close:focus-visible, .pv-steam-link:focus-visible { outline-color: #b8eaff; }
@media (hover: hover) {
  .hero-pv:hover .hero-pv-cover img { transform: scale(1.08); }
}
.pv-dialog {
  width: min(calc(100% - 24px), 880px);
  max-height: calc(100dvh - 24px);
  padding: clamp(10px, 2.5vw, 20px);
  border: 1px solid #838fdf;
  border-radius: 16px;
  background: #111832;
  color: #fff;
}
.pv-dialog::backdrop { background: #070b1bd9; }
body:has(.pv-dialog[open]) { overflow: hidden; }
.pv-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.pv-dialog-header h2 { margin: 0; font-size: clamp(16px, 4vw, 22px); }
.pv-close {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border: 1px solid #a4acd3;
  border-radius: 50%;
  background: #222d53;
  font-size: 24px;
  line-height: 1;
}
.pv-video {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 144px);
  aspect-ratio: 16 / 9;
  background: #04070e;
}
.pv-steam-link {
  display: inline-block;
  margin-top: 8px;
  color: #c2dfff;
  font-size: 13px;
}
.hero-title-logo {
  position: absolute;
  z-index: 2;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(160px, 56cqw, 320px);
  height: auto;
  filter: drop-shadow(0 0 1px #fff)
          drop-shadow(0 0 3px #ffffffe0)
          drop-shadow(0 0 7px #e4f6ff80)
          drop-shadow(0 3px 7px #091e45a6);
}
.hero-cast { position: absolute; z-index: 1; inset: 0; pointer-events: none; filter: drop-shadow(0 7px 10px #164f7e62); }
.hero-figure { position: absolute; display: block; height: auto; }
.hero-fisher { top: 17%; left: -4%; width: min(61%, 415px); }
.hero-job-seeker {
  top: 49%;
  right: -17%;
  width: min(93%, 632px);
}
.hero-preorder {
  position: absolute;
  z-index: 4;
  bottom: 8.5%;
  left: 50%;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  width: min(76%, 440px);
  text-align: center;
}
.store-badge {
  --preorder-fill: linear-gradient(160deg, #fff 10%, #fffdf6 58%, #edf7ff 100%);
  --preorder-text: #173b77;
  --preorder-accent: #345788;
  --preorder-edge: #b9dfff;
  --preorder-outline: #396aa6;
  --preorder-depth: #24558f;
  --preorder-glow: #096fb080;
  --preorder-sparkle: #fff3c7;
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(63px, 17cqw, 98px);
  padding: .28em 1.16em .28em .65em;
  border: clamp(2px, .7cqw, 4px) solid var(--preorder-edge);
  border-radius: .9em;
  background: var(--preorder-fill);
  box-shadow: 0 0 0 1px var(--preorder-outline), 0 5px 0 1px var(--preorder-depth),
              0 9px 22px var(--preorder-glow), inset 0 0 0 1px #fff;
  color: var(--preorder-text);
  font-size: clamp(22px, 7.1cqw, 42px);
  text-decoration: none;
  animation: preorder-pulse 2.9s ease-in-out infinite;
}
.hero[data-scene="night"] .store-badge, .closing-preorder .store-badge {
  --preorder-fill: linear-gradient(160deg, #fff 10%, #fffcf6 56%, #f0efff 100%);
  --preorder-edge: #ccc9ff;
  --preorder-outline: #6475bc;
  --preorder-depth: #302f75;
  --preorder-glow: #6659e4a6;
}
:root[data-store="play"] .store-badge {
  --preorder-fill: linear-gradient(160deg, #fff 10%, #f6ffef 56%, #e0f5e4);
  --preorder-text: #103e36;
  --preorder-accent: #1f5b4a;
  --preorder-edge: #aff0d0;
  --preorder-outline: #73aa93;
  --preorder-depth: #226053;
  --preorder-glow: #34c99580;
}
:root[data-store="steam"] .store-badge {
  --preorder-fill: linear-gradient(155deg, #273650 8%, #182845 57%, #163f62);
  --preorder-text: #fff;
  --preorder-accent: #c0eeff;
  --preorder-edge: #86c3e9;
  --preorder-outline: #244e7e;
  --preorder-depth: #121b39;
  --preorder-glow: #439ee98c;
  box-shadow: 0 0 0 1px var(--preorder-outline), 0 5px 0 1px var(--preorder-depth),
              0 9px 22px var(--preorder-glow), inset 0 0 0 1px #d5efff35;
}
.store-steam-mark {
  width: 1.12em;
  height: auto;
  flex-shrink: 0;
}
.closing-store-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.store-badge::before, .store-badge::after {
  content: "✦";
  position: absolute;
  z-index: 1;
  left: 50%;
  translate: -50% 0;
  color: var(--preorder-sparkle);
  text-shadow: 0 1px 2px #9a7234, 0 0 7px var(--preorder-glow);
  font: .72em/1 serif;
}
.store-badge::before { top: -.56em; }
.store-badge::after { bottom: -.56em; }
.store-badge-label {
  display: flex;
  align-items: center;
  gap: .24em;
}
.store-apple-mark, .store-play-mark {
  width: 1.12em;
  height: auto;
}
.store-apple-mark {
  filter: invert(19%) sepia(39%) saturate(2422%) hue-rotate(194deg) brightness(91%);
}
.store-play-mark { flex-shrink: 0; }
.store-badge-copy { text-align: left; }
.store-badge strong, .store-badge small { display: block; white-space: nowrap; }
.store-badge strong { font: 900 1em/1.03 system-ui, sans-serif; letter-spacing: -.035em; }
.store-badge small { margin-top: 3px; font-size: .5em; font-weight: 900; line-height: 1.18; letter-spacing: .12em; color: var(--preorder-accent); }
.store-badge b {
  position: absolute;
  right: .48em;
  top: 50%;
  translate: 0 -50%;
  color: var(--preorder-accent);
  font: 900 1em/.8 serif;
}
.store-badge[href]:is(:hover, :focus-visible) {
  filter: brightness(1.04);
  animation-play-state: paused;
}
.store-badge[href]:active { filter: brightness(.97); }
.hero-prize {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: calc(100% - 13px);
  display: flex;
  align-items: end;
  justify-content: space-between;
  pointer-events: none;
  color: #fff;
  text-decoration: none;
}
.hero-prize img {
  width: clamp(82px, 26cqw, 148px);
  height: auto;
  pointer-events: auto;
  filter: drop-shadow(0 0 1px #ffffff66)
          drop-shadow(0 0 3px #ffffff33)
          drop-shadow(0 0 7px #e4f6ff00)
          drop-shadow(0 4px 5px #0a225a8c);
  animation: duo-highlight 3.8s ease-in-out infinite;
}
.hero-prize > span {
  margin: 0 7px 13px 0;
  padding: 5px 10px;
  border: 1px solid var(--hero-campaign-border);
  border-radius: .8em;
  background: var(--hero-campaign-fill);
  box-shadow: 0 3px 8px #15275366;
  pointer-events: auto;
  font-size: clamp(10px, 3.1cqw, 16px);
  font-weight: 900;
  line-height: 1.12;
}
.hero-prize small { color: #ffedbf; font-size: .79em; }
.hero-prize:hover > span, .hero-prize:focus-visible > span { background: #405797; }
.hero-prize:focus-visible { outline: 2px solid #fff3c7; outline-offset: 3px; }
.hero-store-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin-top: clamp(13px, 4cqw, 22px);
}
.hero-pending {
  margin: 0;
  padding: 3px 9px;
  border: 1px solid #d8f1ff9e;
  border-radius: 20px;
  color: #fff;
  background: #083e76d9;
  font-size: clamp(9px, 2.6cqw, 12px);
  font-weight: 800;
  letter-spacing: .05em;
  white-space: nowrap;
}
.hero-store-options .store-switch {
  padding-block: 3px;
  font-size: clamp(9px, 2.6cqw, 12px);
}
[data-store="play"] .hero-pending {
  background: #104a40;
  border-color: #a7edd3;
}
.scene-picker {
  position: absolute;
  z-index: 4;
  left: 3%;
  bottom: 3%;
  display: flex;
  padding: 3px;
  border: 1px solid #f1fcffbd;
  border-radius: 28px;
  background: #0a365ee3;
  box-shadow: 0 3px 12px #071b4a4f;
}
.scene-picker button {
  min-width: 45px;
  min-height: 36px;
  padding: 3px 7px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: #f7fbff;
  font-size: 12px;
  font-weight: 800;
}
.scene-picker button:hover { background: #ffffff2b; }
.scene-picker button[aria-pressed="true"] { background: #fff2ce; color: #263e65; }
.scene-picker button span { font-size: 14px; }
.hero[data-scene="night"] .motion-toggle { background: #182650d9; }
.motion-toggle {
  position: absolute;
  z-index: 4;
  right: 3%;
  bottom: 3%;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #f1fcffbd;
  border-radius: 50%;
  background: #0a4678b8;
  color: #fff;
  font: 800 13px var(--mono);
}
.motion-toggle:hover { background: #14558e; }
@keyframes skyline-drift {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
@keyframes preorder-pulse {
  0%, 100% { transform: scale(1); }
  46% { transform: scale(1.075); }
  64% { transform: scale(1.025); }
  77% { transform: scale(1.047); }
}
@keyframes duo-highlight {
  42% {
    filter: drop-shadow(0 0 1px #fff)
            drop-shadow(0 0 3px #ffffffed)
            drop-shadow(0 0 7px #e4f6ffa6)
            drop-shadow(0 4px 5px #0a225a8c);
  }
}
@media (max-width: 680px) {
  .hero-stage { width: 100%; height: auto; min-height: 525px; aspect-ratio: 100 / 174; }
  .hero-fisher { left: -6%; width: 63%; }
  .hero-job-seeker { right: -18%; width: 99%; }
  .hero-preorder { bottom: calc(8% + 20px); }
}
@media (prefers-reduced-motion: reduce) {
  .store-badge, .hero[data-background-motion="poster"] .hero-media::before { animation: none; }
  .hero-prize img { animation: none; }
  .hero-pv-cover img { transition: none; }
}

.locale-switch {
  position: absolute;
  z-index: 6;
  inset-block-start: var(--hero-controls-top);
  inset-inline-start: 4%;
  color: #fff;
  font: 700 12px/1.3 var(--font);
}
.locale-switch summary,
.locale-switch nav {
  border: 1px solid #fff2c3a6;
  border-radius: 8px;
  background: #081e46ed;
  box-shadow: 0 3px 10px #090c2966;
}
.locale-switch summary {
  padding: 6px 9px;
  cursor: pointer;
}
.locale-switch nav {
  position: absolute;
  inset-block-start: calc(100% + 4px);
  inset-inline-start: 0;
  min-inline-size: 124px;
  padding: 4px;
}
.locale-switch a {
  display: block;
  padding: 8px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
}
.locale-switch a:is(:hover, [aria-current]) { background: #2c4074; }
:root:lang(en) .hero-heading {
  font-size: clamp(20px, 6.5cqw, 44px);
  letter-spacing: -.025em;
  transform: translateY(8px) rotate(-5deg);
}
:root:lang(en) .hero-heading em { padding-inline-start: 5cqw; }
:root:lang(en) .hero-pending { letter-spacing: normal; padding-inline: 6px; }
:root:lang(ko) .hero-heading { font-family: "AppleMyungjo", "Batang", serif; font-size: clamp(23px, 8.4cqw, 54px); }
:root:lang(zh-Hans) .hero-heading { font-family: "Songti SC", "SimSun", serif; }

/* Leave room for long translations without shifting the character artwork. */
:root:not(:lang(ja), :lang(ko), :lang(zh)) .hero-heading {
  font-size: clamp(20px, var(--headline-size, 6cqw), 42px);
  letter-spacing: -.025em;
  line-height: 1.17;
  transform: translateY(8px) rotate(-4deg);
  max-inline-size: 90%;
}
:root:not(:lang(ja), :lang(ko), :lang(zh)) .hero-heading :is(span, em) {
  white-space: normal;
  overflow-wrap: anywhere;
}
:root:not(:lang(ja), :lang(ko), :lang(zh)) .hero-heading em { padding-inline-start: 4cqw; }
:root:lang(th) .hero-heading,
:root:lang(hi) .hero-heading {
  font-family: var(--font);
  font-style: normal;
  line-height: 1.34;
}
:root:lang(vi) .hero-heading { --headline-size: 5.6cqw; }
:root:lang(zh-Hant) .hero-heading { font-family: "Songti TC", "PMingLiU", serif; }

.locale-switch { inset-inline-start: auto; left: 4%; }
.locale-switch summary { min-block-size: 28px; }
.locale-switch nav {
  inset-inline-start: auto;
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  width: min(304px, 89cqw);
  max-block-size: min(420px, calc(100svh - 72px));
  overflow-y: auto;
  overscroll-behavior: contain;
  direction: ltr;
}
.locale-switch a {
  display: flex;
  align-items: center;
  min-block-size: 34px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.hero-pv-label { white-space: normal; overflow-wrap: anywhere; text-align: start; }
.store-badge-copy { text-align: start; }
.store-badge small { white-space: normal; letter-spacing: .04em; overflow-wrap: anywhere; }
.store-badge-label { min-width: 0; max-width: 100%; }
.hero-store-options { flex-wrap: wrap; }
.hero-pending { letter-spacing: normal; }

[dir="rtl"] .hero-heading {
  font-family: var(--font);
  font-style: normal;
  text-align: right;
  letter-spacing: normal;
  justify-self: start;
  transform: translateY(8px) rotate(4deg);
}
[dir="rtl"] .hero-heading em { font-style: normal; }
[dir="rtl"] .hero-heading::before { left: auto; right: -.9em; }
[dir="rtl"] .hero-heading::after { right: auto; left: -1.6em; }
[dir="rtl"] .hero-prize { direction: ltr; }
[dir="rtl"] .hero-prize small { direction: rtl; unicode-bidi: isolate; }
[dir="rtl"] .store-badge { padding: .28em .65em .28em 1.16em; }
[dir="rtl"] .store-badge .store-arrow { right: auto; left: .48em; transform: scaleX(-1); }

[dir="rtl"] .locale-switch { right: 4%; left: auto; }
[dir="rtl"] .locale-switch nav { right: 0; left: auto; }
