/* 파멸의 마법사 랜딩 — 색은 스플래시·키아트에서 가져왔다 */
@font-face {
  font-family: "WoR Serif KR";
  src: url("assets/fonts/NotoSerifKR-Bold-subset.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "WoR Cinzel";
  src: url("assets/fonts/Cinzel-subset.woff") format("woff");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #100914;
  --bg-2: #1a0e16;
  --ink: #efe4cf;
  --muted: #b5a696;
  --ember: #ff9a2e;
  --blood: #c8281c;
  --bronze: #b08a4e;
  --bronze-hi: #e0bb78;
  --bronze-lo: #4d3819;
  --gutter: clamp(16px, 4vw, 48px);
  --head: "WoR Serif KR", "Noto Serif KR", "AppleMyungjo", "Batang", serif;
  --body: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
}
:root:lang(en) {
  --head: "WoR Cinzel", "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(16px, 0.35vw + 15px, 18px)/1.75 var(--body);
  overflow-wrap: break-word;
}
:lang(ko) { word-break: keep-all; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ember); text-underline-offset: 3px; }
a:hover { color: var(--bronze-hi); }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }

/* 언어: 현재 언어가 아닌 쪽은 숨긴다 */
html[lang="ko"] body [lang="en"],
html[lang="en"] body [lang="ko"] { display: none !important; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.center { text-align: center; }
.px { image-rendering: pixelated; }

h2 {
  font: 700 clamp(28px, 3vw, 42px)/1.3 var(--head);
  letter-spacing: 0.02em;
  color: var(--bronze-hi);
  text-shadow: 0 2px 0 #000;
}
h3 {
  font: 700 clamp(20px, 1.6vw, 24px)/1.35 var(--head);
  color: var(--ink);
}

/* 90년대 청동 테두리 — 둥글리지 않고 위·왼쪽만 밝게 */
.frame {
  border: 3px solid;
  border-color: var(--bronze-hi) var(--bronze-lo) var(--bronze-lo) var(--bronze);
  box-shadow: 0 0 0 1px #000, 0 10px 24px rgba(0, 0, 0, 0.55);
}

/* 언어 전환 */
.lang-switch {
  position: absolute;
  z-index: 5;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: var(--gutter);
  display: flex;
  border: 2px solid var(--bronze);
  background: rgba(16, 9, 20, 0.85);
}
html:not(.js) .lang-switch { display: none; }
.lang-switch button {
  min-width: 48px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 14px/1 var(--body);
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--bronze); color: #1a0e16; }

/* 첫 화면 */
.hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-height: 1180px;
}
.hero-art {
  position: relative;
  flex: 1 1 auto;
  min-height: 400px;
  overflow: hidden;
  background: var(--bg);
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 100%;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(16, 9, 20, 0.94) 0, rgba(16, 9, 20, 0.72) 26%, rgba(16, 9, 20, 0) 54%);
}
.hero-logo {
  position: relative;
  z-index: 1;
  width: min(52vw, 700px);
  margin: clamp(56px, 6vh, 72px) auto 0;
}
.hero-logo img { position: relative; width: 100%; }
.hero-logo::before {
  content: "";
  position: absolute;
  inset: -18% -14%;
  background: radial-gradient(closest-side, rgba(16, 9, 20, 0.82) 45%, rgba(16, 9, 20, 0));
}

.hero-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding: 20px var(--gutter);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  background: linear-gradient(rgba(16, 9, 20, 0.72), rgba(16, 9, 20, 0.72)), url("assets/tile-stone.webp") 0 0/240px;
  border-top: 3px solid var(--bronze);
  box-shadow: 0 -1px 0 #000;
}
.hero-copy { min-width: 0; }
.tagline {
  font: 700 clamp(19px, 1.7vw, 25px)/1.45 var(--head);
  text-shadow: 0 2px 0 #000;
}
.genre { display: flex; flex-wrap: wrap; column-gap: 0.6em; margin-top: 4px; color: var(--muted); font-size: 0.92em; }
.plat { color: var(--bronze-hi); white-space: nowrap; }

/* 스토어 */
.stores { display: flex; flex-wrap: wrap; gap: 12px 24px; flex: none; }
.store-item { display: flex; align-items: center; gap: 12px; }
.store {
  display: block;
  min-width: 158px;
  padding: 8px 16px 9px;
  border: 3px solid;
  border-color: var(--bronze-hi) var(--bronze-lo) var(--bronze-lo) var(--bronze);
  background: linear-gradient(#3a1a14, #1d0d10);
  box-shadow: 0 0 0 1px #000;
  color: var(--ink);
  font: 700 19px/1.2 var(--body);
  text-decoration: none;
  white-space: nowrap;
}
.store small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }
.store:hover { background: linear-gradient(#57241a, #2c1212); color: var(--ink); }
.store:active { border-color: var(--bronze-lo) var(--bronze-hi) var(--bronze-hi) var(--bronze-lo); }
.soon {
  color: var(--ember);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* 이야기 */
.story { padding-block: clamp(56px, 8vw, 112px); }
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.story-fig img { width: 100%; }
.ring { width: 63px; height: 63px; margin-bottom: 12px; animation: flicker 2.4s steps(3) infinite alternate; }
@keyframes flicker { from { opacity: 1; } to { opacity: 0.62; } }
.oath { margin-top: 24px; }
.oath > div { padding-block: 14px; border-top: 1px solid rgba(176, 138, 78, 0.4); }
.oath > div:last-child { border-bottom: 1px solid rgba(176, 138, 78, 0.4); }
.oath dt { color: var(--ember); font: 700 1.05em/1.4 var(--head); }
.oath dd { margin-top: 4px; }

/* 특징 */
.features {
  padding-block: clamp(56px, 7vw, 96px);
  background: var(--bg-2);
  border-block: 3px solid #000;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(28px, 4vw, 48px);
}
.feature { display: flex; flex-direction: column; background: var(--bg); }
.feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 3px solid #000; }
.feature > div { padding: 18px 18px 22px; }
.feature p { margin-top: 8px; color: var(--muted); font-size: 0.95em; }

/* 챕터 */
.chapters { padding-block: clamp(56px, 8vw, 112px); }
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(36px, 5vw, 72px);
}
.chapter:nth-of-type(even) { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.chapter:nth-of-type(even) img { order: 2; }
.chapter img { width: 100%; }
.num { color: var(--acc); font-weight: 700; font-size: 0.92em; letter-spacing: 0.06em; }
.chapter h3 { margin-block: 4px 12px; font-size: clamp(24px, 2.4vw, 34px); }
.chapter-text > p:last-child { color: var(--muted); }
.c1 { --acc: #ff6a4a; }
.c2 { --acc: #ffa23a; }
.c3 { --acc: #8fd14f; }
.c4 { --acc: #8cc4e8; }
.c5 { --acc: #d08cf0; }

/* 출시 안내 */
.get {
  padding-block: clamp(48px, 7vw, 88px);
  background: linear-gradient(rgba(16, 9, 20, 0.8), rgba(16, 9, 20, 0.8)), url("assets/tile-stone.webp") 0 0/240px;
  border-top: 3px solid var(--bronze);
}
.get-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.get .ring { margin-bottom: -8px; }
.get .stores { justify-content: center; }
.langs-label { color: var(--ink); font-weight: 600; }
.lang-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; max-width: 760px; margin-top: -12px; color: var(--muted); font-size: 0.92em; }

/* 바닥글 */
.foot { padding-block: 28px calc(env(safe-area-inset-bottom, 0px) + 28px); background: #08040a; font-size: 0.95em; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; }
.foot .note { flex-basis: 100%; color: var(--muted); font-size: 0.88em; }
.foot a { display: inline-block; margin-left: 2px; padding-block: 10px; }

/* 개인정보 안내 */
.notice { max-width: 680px; padding-block: 88px 64px; }
.notice-logo { width: min(100%, 320px); margin-bottom: 36px; }
.notice h1 { margin-bottom: 16px; font: 700 clamp(26px, 3vw, 36px)/1.3 var(--head); color: var(--bronze-hi); }
.notice p { margin-top: 12px; }

/* 처리방침·약관 본문 */
.doc { max-width: 820px; }
.doc .meta { color: var(--muted); font-size: 0.92em; }
.doc h2 {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(176, 138, 78, 0.4);
  font-size: clamp(20px, 1.8vw, 24px);
}
.doc h3 { margin-top: 20px; font-size: 1.05em; color: var(--ember); }
.doc ul, .doc ol { margin-top: 10px; padding-left: 1.4em; }
.doc ul { list-style: disc; }
.doc ol { list-style: decimal; }
.doc li { margin-top: 6px; }
.doc li::marker { color: var(--bronze); }
.doc .toc { margin-top: 24px; }
.table-scroll { margin-top: 14px; overflow-x: auto; }
.doc table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.92em; }
.doc th, .doc td { padding: 10px 12px; border: 1px solid rgba(176, 138, 78, 0.45); text-align: left; vertical-align: top; }
.doc th { background: var(--bg-2); color: var(--bronze-hi); font-weight: 700; }
/* 휴대폰 폭: 표를 행마다 카드처럼 쌓는다 */
@media (max-width: 640px) {
  .doc table { min-width: 0; }
  .doc thead { display: none; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc tr { margin-top: 12px; border: 1px solid rgba(176, 138, 78, 0.45); }
  .doc td { border: 0; padding: 6px 12px; }
  .doc td:first-child { background: var(--bg-2); color: var(--bronze-hi); font-weight: 700; padding-block: 10px; }
  .doc td:not(:first-child)::before { display: block; color: var(--muted); font-size: 0.86em; font-weight: 700; }
  html[lang="ko"] .t-collect td:nth-child(2)::before { content: "항목"; }
  html[lang="ko"] .t-collect td:nth-child(3)::before { content: "목적"; }
  html[lang="ko"] .t-transfer td:nth-child(2)::before { content: "서비스"; }
  html[lang="ko"] .t-transfer td:nth-child(3)::before { content: "전송 항목"; }
  html[lang="en"] .t-collect td:nth-child(2)::before { content: "Items"; }
  html[lang="en"] .t-collect td:nth-child(3)::before { content: "Purpose"; }
  html[lang="en"] .t-transfer td:nth-child(2)::before { content: "Services"; }
  html[lang="en"] .t-transfer td:nth-child(3)::before { content: "Data transferred"; }
}
.doc-links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 48px; }

/* 태블릿 이하 */
@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-img { object-position: 20% 100%; }
  .hero-logo { width: min(66vw, 620px); }
  .hero-band { flex-direction: column; align-items: stretch; }
  .hero-band .stores { flex: 0 0 auto; }
  .hero-band .store-item { flex: 1 1 280px; }
  .hero-band .store { flex: 1; }
}
@media (max-width: 899px) {
  .story-grid, .chapter, .chapter:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); }
  .chapter:nth-of-type(even) img { order: 0; }
}
@media (max-width: 640px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-logo { width: min(88vw, 520px); margin-top: 64px; }
  .hero-img { object-position: 7% 100%; }
  .get .store-item { width: 100%; }
  .get .store { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring { animation: none; }
}
