/* 6 A.M. 소개·프레스킷 공용 스타일.
   페이지 전체가 하룻밤이다: 위는 23시의 잉크색, 아래로 내려갈수록 6시 새벽빛으로 바뀐다(body 배경 그라데이션 하나).
   섹션 머리의 시각(23:00 → 06:00)은 게임의 라운드 순서 그대로라 순번 표시로 쓴다. */
:root {
  --ink: #0f1320;
  --ink-2: #171c2c;
  --rain: #8c94a6;
  --paper: #e9e1cf;
  --lamp: #d8a446;
  --dawn: #f3d9b8;
  --red: #b3392f;
  --line: rgba(233, 225, 207, 0.14);
  --serif: "Zen Old Mincho", "Nanum Myeongjo", serif;
  --sans: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--paper);
  font: 400 16px/1.75 var(--sans);
  background: var(--ink) linear-gradient(180deg, var(--ink) 0%, var(--ink) 55%, #22263a 78%, #4a3b3f 92%, #7b5a4a 100%);
  min-height: 100vh;
}
a { color: var(--lamp); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }
img, video { display: block; max-width: 100%; height: auto; }

/* 언어: html[data-lang] 와 맞는 블록만 보인다 */
[data-l] { display: none; }
html[data-lang="ko"] [data-l~="ko"],
html[data-lang="ja"] [data-l~="ja"],
html[data-lang="en"] [data-l~="en"] { display: revert; }
html[data-lang="ko"] span[data-l~="ko"],
html[data-lang="ja"] span[data-l~="ja"],
html[data-lang="en"] span[data-l~="en"] { display: inline; }

.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: rgba(15, 19, 32, 0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.top .home { color: var(--paper); text-decoration: none; font: 700 18px/1 var(--serif); letter-spacing: 0.04em; }
.top nav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.top nav a { color: var(--rain); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--paper); }
.langs { display: flex; gap: 2px; }
.langs button {
  font: 500 13px/1 var(--sans); color: var(--rain); background: none;
  border: 1px solid transparent; border-radius: 4px; padding: 6px 7px; cursor: pointer;
}
.langs button[aria-pressed="true"] { color: var(--paper); border-color: var(--line); }

.hero { position: relative; }
.hero img { width: 100%; aspect-ratio: 10 / 3; object-fit: cover; }
.tagline {
  max-width: 760px; margin: 0 auto; padding: 28px 16px 8px;
  font: 400 clamp(20px, 3.4vw, 30px)/1.55 var(--serif); text-align: center;
}
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 18px 16px 8px; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 4px; text-decoration: none;
  font: 500 15px/1.2 var(--sans);
}
.btn.main { background: var(--paper); color: var(--ink); }
.btn.ghost { border: 1px solid var(--line); color: var(--paper); }
.when { text-align: center; color: var(--rain); font-size: 14px; margin: 6px 16px 0; }

main { max-width: 980px; margin: 0 auto; padding: 0 16px 64px; }
.hour { padding-top: 72px; }
.hour > header { display: flex; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 22px; }
.hour time { font: 400 15px/1 var(--serif); color: var(--lamp); letter-spacing: 0.08em; min-width: 3.4em; }
.hour h2 { margin: 0; font: 700 clamp(22px, 3vw, 28px)/1.3 var(--serif); }
.hour p { max-width: 64ch; }
.hour.dawn time { color: var(--dawn); }

.rule { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0 8px; }
.rule div { border: 1px solid var(--line); border-radius: 6px; padding: 16px; background: rgba(23, 28, 44, 0.6); }
.rule b { display: block; font: 700 17px/1.4 var(--serif); margin-bottom: 4px; }
.rule .wrong { border-color: rgba(179, 57, 47, 0.45); }

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.shots figure { margin: 0; }
.shots figure:first-child { grid-column: 1 / -1; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.shots figcaption { font-size: 13px; color: var(--rain); padding-top: 6px; }

.trailer video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; }

.pair { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; }
.pair img { border-radius: 4px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--rain); }
.facts dd { margin: 0; }

footer { border-top: 1px solid rgba(15, 19, 32, 0.25); color: var(--ink); padding: 22px 16px 40px; text-align: center; font-size: 14px; }
footer a { color: var(--ink); }

/* 프레스킷: presskit() 관례대로 왼쪽 사실표, 오른쪽 본문 */
.kit { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding-top: 40px; }
.kit aside { position: sticky; top: 72px; align-self: start; font-size: 14px; }
.kit aside h2, .kit section h2 { font: 700 20px/1.3 var(--serif); margin: 0 0 12px; }
.kit aside dl { margin: 0; }
.kit aside dt { color: var(--rain); margin-top: 12px; }
.kit aside dd { margin: 2px 0 0; }
.kit section { padding-bottom: 36px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.kit section:last-child { border-bottom: 0; }
.kit ul { padding-left: 1.2em; }
.kit li { margin: 4px 0; }
.dl { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid3 a { display: block; color: var(--rain); font-size: 13px; text-decoration: none; }
.grid3 img { border-radius: 4px; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 4px; }
.vids { display: grid; gap: 18px; }
.vids h3 { font: 500 15px/1.4 var(--sans); margin: 0 0 6px; color: var(--rain); }
.note { border-left: 3px solid var(--lamp); padding: 6px 0 6px 14px; color: var(--paper); }

@media (max-width: 760px) {
  .rule, .pair, .kit { grid-template-columns: 1fr; }
  .kit aside { position: static; }
  .grid3 { grid-template-columns: repeat(2, 1fr); }
  .top nav { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ── 소개 페이지(이야기): 게임 속 쪽지와 같은 손글씨(나눔손글씨 펜 / Yomogi)로 쪽지가 하나씩 떠오른다 ── */
.story { --hand: "Nanum Pen Script", "Yomogi", cursive; }
html[data-lang="ja"] .story { --hand: "Yomogi", cursive; }
.notes { max-width: 760px; margin: 0 auto; padding: 40px 16px 40px; display: flex; flex-direction: column; align-items: center; gap: 56px; }
.note-paper {
  position: relative; margin: 0; max-width: 520px; padding: 26px 30px 24px;
  background: #e2d9c4 url(paper.jpg) center / cover; color: #1d2236;
  font: 400 40px/1.3 var(--hand);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: rotate(-1.2deg);
}
html[data-lang="ja"] .note-paper { font-size: 24px; line-height: 1.6; }
.note-paper:nth-of-type(even) { transform: rotate(1.4deg); }
.note-paper::before, .note-paper::after {
  content: ""; position: absolute; top: -10px; width: 56px; height: 20px; background: rgba(214, 196, 150, 0.75);
}
.note-paper::before { left: 14px; transform: rotate(-24deg); }
.note-paper::after { right: 14px; transform: rotate(22deg); }
.note-paper.last { filter: brightness(0.9) sepia(0.15); }
/* 볼펜 잉크: 획 가장자리를 흔들고 살짝 번지게(index.html 의 SVG 필터 #ink) */
.note-paper > span { filter: url(#ink); opacity: 0.92; }
.still { margin: 0; width: 100%; }
.still img, img.still { width: 100%; border-radius: 3px; filter: saturate(0.85); }
.still figcaption { font: 400 28px/1.4 var(--hand); color: var(--rain); padding-top: 8px; text-align: center; }
html[data-lang="ja"] .still figcaption { font-size: 16px; }
/* "뒤돌지 마." — 게임 속 피 쪽지와 같은 그리기(tools/note/build_blood_note.py)로 만든 PNG 를 종이 위에 */
.dont { margin: 30px 0; width: min(100%, 640px); padding: 44px 34px 64px; background: #e2d9c4 url(paper.jpg) center / cover;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6); transform: rotate(0.8deg); }
.dont img { width: 100%; }
.end { text-align: center; width: 100%; padding-top: 40px; }
.end .title { margin: 0 auto; width: min(80%, 520px); }
.end .sub { color: var(--rain); margin: 10px 0 0; }
.end video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; margin-top: 28px; }

/* 스크롤 등장: 쪽지는 살짝 떨어지듯, 사진은 어둠에서 */
.notes .note-paper, .notes .still, .notes .dont { opacity: 0; transition: opacity 0.5s ease; }
.notes .note-paper { translate: 0 12px; transition: opacity 0.5s ease, translate 0.5s ease; }
.notes .in { opacity: 1; translate: 0 0; }
.notes .dont { transition: opacity 0.25s steps(2, end); }

@media (prefers-reduced-motion: reduce) {
  .notes .note-paper, .notes .still, .notes .dont { opacity: 1; translate: none; transition: none; }
}
