:root {
  --bg: #0a0f1f;
  --bg-2: #0e1530;
  --panel: #131c38;
  --panel-2: #18234a;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef1f8;
  --muted: #aab4cd;
  --gold: #f3c454;
  --gold-2: #dda431;
  --ink: #1a1405;
  --cyan: #5ad5ec;
  --radius: 16px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  --font-ja: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Noto Sans JP", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

/* 언어 전환: 번역 조각은 class="i18n" + lang 속성. 지금 언어만 보인다. */
html[data-lang="en"] .i18n:not([lang="en"]),
html[data-lang="ko"] .i18n:not([lang="ko"]),
html[data-lang="ja"] .i18n:not([lang="ja"]) {
  display: none !important;
}
/* 약관: 한국어면 한국어 원문, 그 밖은 영어. 스크립트가 꺼져 있으면 둘 다 보인다 */
html.js[data-lang="ko"] .doc[lang="en"],
html.js:not([data-lang="ko"]) .doc[lang="ko"] {
  display: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:lang(ja) {
  font-family: var(--font-ja);
  line-break: strict;
}

:lang(ko) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
}

/* 머리줄 */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 31, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 17px;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.langs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.langs button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 9px;
  min-height: 36px;
  min-width: 40px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}

/* 첫 화면부터 지금 언어 버튼이 눌린 모양 */
html[data-lang="en"] .langs button[data-set-lang="en"],
html[data-lang="ko"] .langs button[data-set-lang="ko"],
html[data-lang="ja"] .langs button[data-set-lang="ja"],
.langs button[aria-pressed="true"] {
  background: var(--panel-2);
  color: var(--text);
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }
  .langs {
    margin-left: auto;
  }
}

/* 첫 화면 */
.hero {
  position: relative;
  padding: 56px 0 40px;
  text-align: center;
  background:
    radial-gradient(1200px 520px at 50% -10%, rgba(90, 120, 255, 0.22), transparent 70%),
    radial-gradient(700px 380px at 15% 30%, rgba(255, 140, 60, 0.10), transparent 70%),
    radial-gradient(700px 380px at 85% 30%, rgba(170, 90, 255, 0.12), transparent 70%);
}

.eyebrow {
  display: inline-block;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}

.hero-logo {
  width: min(420px, 78vw);
  margin: 0 auto 14px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
}

.hero h1 {
  margin: 0;
}

.hero-sub {
  margin: 0 auto 12px;
  max-width: 760px;
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: 800;
  line-height: 1.35;
  color: var(--gold);
}

.hero-lead {
  margin: 0 auto 26px;
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 20px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.15;
  text-align: left;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  background: var(--panel-2);
}

.btn small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.btn svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.btn-gold {
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  border-color: transparent;
  color: var(--ink);
}

.btn-gold:hover {
  background: linear-gradient(180deg, #ffd56a, var(--gold));
}

.btn-gold small {
  color: rgba(26, 20, 5, 0.72);
}

.hero-art {
  margin: 40px auto 0;
  max-width: 1080px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(243, 196, 84, 0.06);
  aspect-ratio: 1200 / 433;
  background: var(--bg-2);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 숫자 줄 */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 28px auto 0;
  max-width: 1080px;
}

.fact {
  padding: 16px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.fact b {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.fact span {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 공통 구역 */
.section {
  padding: 72px 0;
}

.section.alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.head {
  max-width: 760px;
  margin: 0 auto 32px;
  text-align: center;
}

.head h2,
.h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.25;
  font-weight: 800;
}

.head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

/* 트레일러 */
.video {
  position: relative;
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

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

.video .play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  background: rgba(10, 15, 31, 0.72);
  border: 2px solid var(--gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

.video .play::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 26px;
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent var(--gold);
}

.video:hover .play {
  transform: scale(1.06);
}

.video-meta {
  max-width: 900px;
  margin: 12px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* 종족 */
.races {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.race {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 720 / 628;
  background: var(--panel);
}

.race img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.race figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 18, 0.88));
  font-size: 20px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .races {
    grid-template-columns: 1fr;
  }
  .race {
    aspect-ratio: 16 / 10;
  }
}

/* 특징 */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.feature {
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  color: var(--gold);
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* 스크린샷 */
.shots {
  display: flex;
  gap: 16px;
  justify-content: center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 12px;
}

.shot {
  flex: 0 0 auto;
  width: min(260px, 70vw);
  margin: 0;
  scroll-snap-align: center;
}

.shot img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}

@media (max-width: 860px) {
  .shots {
    justify-content: flex-start;
  }
}

/* 기술 */
.tech {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: 32px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(90, 213, 236, 0.08), rgba(243, 196, 84, 0.06)), var(--panel);
  border: 1px solid var(--line);
}

.tech p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .tech {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

/* 회사 */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.about p.lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.card {
  padding: 24px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.company {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
  font-size: 15px;
}

.company dt {
  color: var(--muted);
}

.company dd {
  margin: 0;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .company {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .company dd {
    margin-bottom: 10px;
  }
}

/* 바닥줄 */
.foot {
  padding: 32px 0 44px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.foot a {
  color: var(--muted);
}

.foot a:hover {
  color: var(--text);
}

/* 약관 문서 */
.doc-page {
  padding: 40px 0 72px;
}

.doc {
  max-width: 820px;
  margin: 0 auto;
}

.doc h1 {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.25;
  margin: 0 0 6px;
}

.doc .doc-meta {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 14px;
}

.doc h2 {
  font-size: 20px;
  margin: 36px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.doc h3 {
  font-size: 16px;
  margin: 22px 0 6px;
  color: var(--gold);
}

.doc ul {
  margin: 0 0 10px;
  padding-left: 1.3em;
  color: #d9deeb;
  font-size: 15px;
  line-height: 1.8;
}

.doc-dates {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.doc-dates p {
  color: var(--muted);
  font-size: 14px;
}

.doc p {
  margin: 0 0 10px;
  color: #d9deeb;
  font-size: 15px;
  line-height: 1.8;
}

.doc-note {
  max-width: 820px;
  margin: 0 auto 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.back {
  display: inline-block;
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 600;
}

.nf {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .video .play {
    transition: none;
  }
}

/* 좁은 폰(360px 안팎): 머리줄이 한 줄에 들어가게 */
@media (max-width: 400px) {
  .top .wrap {
    gap: 10px;
  }
  .brand {
    font-size: 15px;
    gap: 8px;
  }
  .brand-mark {
    width: 24px;
    height: 24px;
  }
  .langs button {
    padding: 5px 7px;
    font-size: 12px;
  }
}
