@font-face {
  font-family: "Do Hyeon";
  src: url("/media/do-hyeon-v1.woff") format("woff");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #081316;
  --panel: #101e21;
  --line: #284043;
  --text: #f5f3e8;
  --muted: #bdcbc8;
  --gold: #f1cd88;
  --mint: #9bead0;
  --display: "Do Hyeon", "Apple SD Gothic Neo", sans-serif;
  font-family: system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  background: var(--background);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }

.wrap {
  width: min(calc(100% - 7rem), 77rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 5;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  background: var(--gold);
  color: var(--background);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.masthead {
  position: absolute;
  z-index: 2;
  width: 100%;
  background: linear-gradient(180deg, #071114ed, #0711146b);
  border-bottom: 1px solid #d2f6e024;
}

.masthead-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 4.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--display);
  font-size: 1.4rem;
  white-space: nowrap;
}

.brand img { border-radius: 23%; }

nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: .94rem;
  font-weight: 650;
}

nav a { white-space: nowrap; }
nav a:hover, .credits:hover { color: var(--mint); }

.nav-release {
  display: grid;
  min-height: 2.55rem;
  place-items: center;
  border: 1px solid #f0cd8882;
  border-radius: 5px;
  padding: .35rem .95rem;
  color: var(--gold);
}

.language-menu { position: relative; }

.language-menu summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .35rem .72rem;
  border: 1px solid #cde8d964;
  border-radius: 5px;
  background: #081619b0;
  cursor: pointer;
  list-style: none;
}

.language-menu summary::-webkit-details-marker { display: none; }

.language-menu summary::after {
  content: "";
  width: .36rem;
  height: .36rem;
  margin-bottom: .18rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.language-menu[open] summary { border-color: var(--mint); }

.language-options {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  min-width: 8rem;
  padding: .25rem;
  border: 1px solid #62897e78;
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 8px 24px #01070894;
}

.language-options a {
  display: grid;
  align-items: center;
  min-height: 2.75rem;
  padding: .35rem .65rem;
  border-radius: 3px;
}

.language-options a:hover, .language-options a[aria-current="true"] {
  color: var(--mint);
  background: #1a3631;
}

.hero {
  position: relative;
  isolation: isolate;
  background: #0b1b21;
  border-bottom: 1px solid var(--line);
}

.hero-scenery, .hero-scenery img, .hero-scenery video, .hero-scenery::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-scenery {
  z-index: -1;
  overflow: hidden;
}

.hero-scenery img, .hero-scenery video {
  object-fit: cover;
  object-position: 64% 48%;
}

[data-motion-src] { opacity: 0; }
[data-motion-src][data-ready] { opacity: 1; }

.hero-scenery::after {
  content: "";
  background:
    linear-gradient(0deg, #081316 0%, #0813164d 23%, transparent 65%),
    linear-gradient(90deg, #071216f7 1%, #071216e6 25%, #07121685 52%, #07121615 82%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(15rem, .8fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  min-height: clamp(46rem, 93svh, 55rem);
  padding-block: 7rem 4.75rem;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--mint);
  font-size: .9rem;
  font-weight: 750;
  letter-spacing: .09em;
}

.hero .eyebrow { color: var(--gold); }

.hero h1 {
  font: 400 clamp(5.3rem, 10.6vw, 9.5rem) / .77 var(--display);
  letter-spacing: -.048em;
  text-transform: uppercase;
  color: #fff9ec;
  text-shadow: 0 6px 30px #010a0c96;
}

.hero h1 span {
  display: block;
  color: var(--gold);
}

.hero-tagline {
  margin-top: 1.5rem;
  font: 400 clamp(1.55rem, 2.7vw, 2.45rem) / 1.1 var(--display);
  text-wrap: balance;
}

.hero-description {
  max-width: 26rem;
  margin-top: .65rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.7;
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.65rem;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .65rem;
  min-height: 3.1rem;
  padding: .65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: .95rem;
  font-weight: 750;
  text-align: center;
}

.button-primary {
  color: #151b16;
  background: var(--gold);
  box-shadow: 0 2px 0 #a98048;
}

.button-primary:hover { background: #ffe3aa; }

.button-ghost {
  color: var(--text);
  border-color: #cde8d964;
  background: #081619b0;
}

.button-ghost:hover { border-color: var(--mint); }

.play-icon {
  width: .75rem;
  height: .8rem;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.gameplay-figure {
  width: min(100%, clamp(15rem, 24vw, 19.4rem));
  justify-self: center;
  text-align: center;
}

.gameplay-frame {
  display: block;
  position: relative;
  aspect-ratio: 480 / 852;
  border: 1px solid #b2e8d775;
  border-radius: 1.15rem;
  overflow: hidden;
  background: #0d1a21;
  box-shadow: 0 0 0 5px #0a1719cc, 0 0 0 6px #9adac744, 0 24px 54px #010708d6;
}

.gameplay-frame:hover { border-color: var(--mint); }

.gameplay-frame img, .gameplay-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gameplay-figure figcaption {
  display: inline-block;
  margin-top: .85rem;
  padding: .25rem .65rem;
  border-radius: 4px;
  background: #091615df;
  color: #d7efe6;
  font-size: .84rem;
  font-weight: 650;
}

.motion-toggle {
  position: absolute;
  top: 5.25rem;
  right: max(1.3rem, calc((100% - 77rem) / 2));
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .4rem .75rem;
  color: #d4e4df;
  background: #091719cf;
  border: 1px solid #bdeee655;
  border-radius: 5px;
  font-size: .875rem;
}

.motion-toggle:hover { color: var(--mint); }

.motion-icon {
  width: .62rem;
  height: .7rem;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.motion-toggle[data-playing] .motion-icon {
  background: transparent;
  border-inline: 2.5px solid currentColor;
  clip-path: none;
}

h2 {
  font: 400 clamp(2.15rem, 4.5vw, 4rem) / 1.04 var(--display);
  word-break: keep-all;
}

.about { padding-block: clamp(4rem, 8vw, 7rem); }
.about .eyebrow, .story .eyebrow { margin-bottom: .6rem; }

.mechanics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 2.1rem;
}

.mechanic {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .65rem;
}

.mechanic img {
  width: 100%;
  height: auto;
  aspect-ratio: 12 / 7;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.mechanic-copy { padding: 1.2rem 1.25rem 1.5rem; }

h3 {
  font: 400 1.65rem / 1.15 var(--display);
  color: var(--text);
}

.mechanic p, .story p:not(.eyebrow), .release p {
  margin-top: .45rem;
  color: var(--muted);
  line-height: 1.7;
  word-break: keep-all;
}

.story {
  position: relative;
  isolation: isolate;
  background: #142627;
  border-block: 1px solid var(--line);
}

.story > img, .story::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.story > img {
  object-fit: cover;
  object-position: 60% 47%;
}

.story::after {
  content: "";
  background: linear-gradient(90deg, #071416f5 0%, #071416d9 31%, #07141650 60%, #07141604 100%);
}

.story-inner {
  display: flex;
  align-items: end;
  min-height: clamp(25rem, 42vw, 37rem);
  padding-block: 3.5rem;
}

.story p:not(.eyebrow) {
  max-width: 23rem;
  margin-top: .8rem;
  color: #e0e9e5;
}

.release { padding-block: clamp(3rem, 7vw, 6.25rem); }

.release-panel {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 3vw, 2rem);
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid #62897e78;
  border-radius: .75rem;
  background: radial-gradient(ellipse farthest-side at 2% 3%, #193d36, transparent), #0f2121;
}

.release-panel img {
  width: clamp(3.7rem, 9vw, 6rem);
  height: auto;
  border-radius: 23%;
}

.release h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
.release p { margin-top: .25rem; }

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  padding: 0;
  margin: .85rem 0 0;
  list-style: none;
}

.footer { border-top: 1px solid var(--line); }
.footer-inner { flex-wrap: wrap; padding-block: 1rem; }
.footer .brand { flex: none; font-size: 1.15rem; }
.footer-links { flex-wrap: wrap; min-width: 0; gap: .5rem 1rem; }
.credits { color: var(--muted); font-size: .9rem; }

.gameplay-dialog {
  width: min(100% - 2rem, 32rem);
  max-height: calc(100dvh - 2rem);
  padding: .8rem;
  background: var(--panel);
  border: 1px solid #83c8b680;
  border-radius: 12px;
  color: var(--text);
}

.gameplay-dialog::backdrop { background: #03090aeb; }

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-left: .35rem;
  margin-bottom: .65rem;
}

.dialog-heading h2 { font-size: 1.35rem; }
.dialog-heading form { flex: 0 0 auto; }

.dialog-close {
  position: relative;
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #15272b;
  color: var(--text);
}

.dialog-close::before, .dialog-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.dialog-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.gameplay-dialog video {
  width: 100%;
  height: min(71dvh, 42rem);
  border-radius: 6px;
  background: #050c0e;
}

.error-page {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 1.5rem;
  min-height: 100svh;
}

.error-page h1 { font: 400 clamp(2rem, 5vw, 4rem) / 1.1 var(--display); }

@media (max-width: 60rem) {
  .wrap { width: calc(100% - 4rem); }
  .hero h1 { font-size: clamp(4.85rem, 11vw, 7rem); }
  .mechanic-copy { padding-inline: 1rem; }
}

@media (max-width: 44rem) {
  .wrap { width: calc(100% - 2.25rem); }
  .masthead-inner { min-height: 4rem; }
  nav { gap: .75rem; }
  .nav-section { display: none; }
  .nav-release { padding-inline: .65rem; }
  .hero h1 { font-size: clamp(4.25rem, 17vw, 7rem); }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.7rem;
    min-height: 0;
    padding-block: 6.4rem 3.6rem;
  }

  .hero-tagline { margin-top: 1.1rem; }
  .hero-actions { margin-top: 1.25rem; }
  .hero .eyebrow { margin-bottom: .9rem; }

  .hero-scenery img, .hero-scenery video { object-position: 75% 44%; }

  .hero-scenery::after {
    background:
      linear-gradient(0deg, #081316, #08131612 49%, #0813167a 100%),
      linear-gradient(90deg, #081316f0, #081316a3 43%, #08131641);
  }

  .gameplay-figure { width: min(75%, 17rem); }
  .mechanics { grid-template-columns: minmax(0, 1fr); }
  .mechanic-copy { padding-inline: 1.2rem; }

  .story-inner {
    min-height: 26rem;
    padding-bottom: 2.5rem;
  }

  .story::after {
    background: linear-gradient(0deg, #081316f7 0%, #081316b3 45%, #08131617 100%);
  }

  .story > img { object-position: 63% 50%; }
}

@media (max-width: 24rem) {
  .masthead-inner .brand { font-size: 1.2rem; gap: .5rem; }
  .masthead-inner .brand img { width: 32px; height: 32px; }
  .masthead-inner, nav { gap: .5rem; }
  .hero-inner { padding-top: 8.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
