/* 드림가드 랜딩페이지
 * 색: 게임 아이콘(assets/ui/app-icon.svg)의 밤하늘 남색 #101d32와 달빛 금색 #ffdf96. 강조색은 금색 하나뿐이다.
 * 테마: 기본은 밤(다크) = 꿈속 성문. 상단 버튼으로 낮(라이트) = 주인공의 방으로 바꿀 수 있다.
 * 모양: 둥근 모서리 대신 도트식 계단 모서리. 컨트롤·태그는 한 칸(.px, 4px), 화면·카드는 두 칸(.px2, 8px).
 *       도트 모서리에 선(테두리)을 그리면 모서리에서 끊겨 보이므로, 계단 모서리를 쓰는 요소는 면으로만 칠한다.
 * 글꼴: 전부 도트 글꼴(fonts.css, tools/build_landing.py가 만든다).
 *       제목·숫자·라벨 = Galmuri11 (12px 격자, 12·24·36·48·60·72·96px),
 *       본문·버튼 = Galmuri14 (15px 격자, 15px). 격자 배수가 아닌 크기는 번져 보이니 쓰지 않는다.
 */

:root {
  color-scheme: dark;
  --bg: #0c1627;
  --bg-alt: #0f1b30;
  --surface: #13223a;
  --surface-2: #1b2d49;
  --ink: #eef0e8;
  --ink-2: #b6c4d0;
  --ink-3: #8a9cad;
  --line: rgb(182 204 224 / 0.13);
  --line-strong: rgb(182 204 224 / 0.3);
  --accent: #ffdf96;
  --accent-deep: #cf9c3a;
  --accent-ink: #ffdf96;
  --on-accent: #101d32;
  --shade: 2 6 14;
  --device: #070e1a;
  --glow-alpha: 0.26;
  --day-opacity: 0;
  --night-opacity: 1;

  --pixel: "Galmuri11", "Galmuri14", "Apple SD Gothic Neo", system-ui, sans-serif;
  --text: "Galmuri14", "Galmuri11", "Apple SD Gothic Neo", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1280px;
  --gutter: 24px;
  --edge: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))); /* 쓰는 곳의 부모 폭 기준 */
  --nav-h: 64px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf1f2;
  --bg-alt: #e2e8ea;
  --surface: #f7f9f9;
  --surface-2: #dde5e8;
  --ink: #101d32;
  --ink-2: #3d5061;
  --ink-3: #5a6c7a;
  --line: rgb(16 29 50 / 0.12);
  --line-strong: rgb(16 29 50 / 0.28);
  --accent-deep: #e2ae43;
  --accent-ink: #7a5710;
  --shade: 16 29 50;
  --device: #0e1a2c;
  --glow-alpha: 0.34;
  --day-opacity: 1;
  --night-opacity: 0;
}

/* ── 기본 ─────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 15px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  font-synthesis: none; /* 도트 글꼴에 가짜 굵게·기울임을 입히면 번진다 */
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.i { width: 20px; height: 20px; fill: currentColor; flex: none; }

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 30;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 8px; }

/* 도트식 계단 모서리 */
.px, .px2 {
  --n: 4px;
  clip-path: polygon(
    0 var(--n), var(--n) var(--n), var(--n) 0,
    calc(100% - var(--n)) 0, calc(100% - var(--n)) var(--n), 100% var(--n),
    100% calc(100% - var(--n)), calc(100% - var(--n)) calc(100% - var(--n)), calc(100% - var(--n)) 100%,
    var(--n) 100%, var(--n) calc(100% - var(--n)), 0 calc(100% - var(--n))
  );
}
.px2 {
  --n: 4px;
  clip-path: polygon(
    0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0,
    calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px,
    100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%,
    8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px)
  );
}

/* ── 글자 ─────────────────────────────────────────────── */

.h2 {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.34;
  color: var(--ink);
  text-wrap: balance;
}

.h3 {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.35;
  color: var(--ink);
}

.body {
  margin-top: 20px;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-2);
  text-wrap: pretty;
}

.small {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
}

.eyebrow {
  margin-bottom: 16px;
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--accent-ink);
}

.tag {
  display: inline-block;
  padding: 5px 10px 4px;
  background: var(--bg-alt);
  font-family: var(--pixel);
  font-size: 12px;
  line-height: 1.2;
  color: var(--accent-ink);
}

@media (min-width: 768px) {
  .h2 { font-size: 48px; }
}

/* ── 버튼 ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px 4px;
  border: 0;
  font: 15px/1 var(--text);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn .i { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: inset 0 -4px 0 var(--accent-deep);
}
.btn--primary:hover { background: #ffe7ad; }
.btn--primary:active { box-shadow: inset 0 -2px 0 var(--accent-deep); }
.btn--primary:focus-visible { outline: none; box-shadow: inset 0 -4px 0 var(--accent-deep), inset 0 0 0 3px var(--on-accent); }

/* 보조 버튼도 테두리 대신 면으로 칠한다: 주 버튼과 같은 도트 버튼 모양, 색만 한 단계 낮춘다 */
.btn--ghost {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: inset 0 -4px 0 var(--line-strong);
}
.btn--ghost:hover { background: var(--line-strong); }
.btn--ghost:active { box-shadow: inset 0 -2px 0 var(--line-strong); }
.btn--ghost:focus-visible { outline: none; box-shadow: inset 0 -4px 0 var(--line-strong), inset 0 0 0 3px var(--accent-ink); }

.btn--sm { min-height: 40px; padding: 0 12px 3px; font: 12px/1 var(--pixel); gap: 6px; }
.btn--sm .i { width: 16px; height: 16px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.icon-btn:hover { background: var(--line-strong); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--accent-ink); }

/* 지금 테마의 반대쪽으로 가는 아이콘만 보인다 */
.i--to-night { display: none; }
:root[data-theme="light"] .i--to-day { display: none; }
:root[data-theme="light"] .i--to-night { display: block; }

/* ── 상단 내비게이션 ──────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.nav__row {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pixel);
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
}
.brand img { image-rendering: pixelated; }

.nav__links {
  display: none;
  gap: 4px;
  margin-left: auto;
}
.nav__links a {
  padding: 8px 12px;
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.nav__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

@media (min-width: 960px) {
  .nav__links { display: flex; }
  .nav__actions { margin-left: 12px; }
}

/* ── 히어로 ───────────────────────────────────────────── */

.hero {
  position: relative;
  margin-top: calc(var(--nav-h) * -1);
  padding: calc(var(--nav-h) + 32px) 0 48px;
  overflow: clip;
}

.hero__art {
  position: absolute;
  inset: auto 0 0 0;
  height: min(640px, 78%); /* 모바일: 기기 뒤에만 깐다 */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 82%, transparent 100%);
  pointer-events: none;
}
.hero__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity 0.9s var(--ease);
}
.hero__layer--day {
  background-image: url("assets/hero-day.webp");
  background-position: 58% 50%;
  opacity: calc(var(--day-opacity) * 0.9);
}
.hero__layer--night {
  background-image: url("assets/hero-night.webp");
  background-position: 50% 16%;
  opacity: var(--night-opacity);
}

.hero__grid {
  position: relative;
  display: grid;
  gap: 40px;
}

.hero__title {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.34;
  color: var(--ink);
}

.hero__lede {
  margin-top: 20px;
  max-width: 28em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-2);
}

.hero__device {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.device-shadow { filter: drop-shadow(0 28px 44px rgb(var(--shade) / 0.38)); }

.device {
  width: var(--device-w, 240px);
  padding: 8px;
  background: var(--device);
}
.device__screen {
  width: 100%;
  aspect-ratio: 540 / 1170;
  object-fit: cover;
  background: #070e1a;
}

.hero__device .device { --device-w: 240px; }

.sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px 2px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
  font: 15px/1 var(--text);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.sound-btn .i { width: 18px; height: 18px; }
.sound-btn:hover { background: var(--line-strong); }
.sound-btn:active { transform: scale(0.97); }
.sound-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--accent-ink); }
.sound-btn .i--on { display: none; }
.sound-btn.is-on .i--on { display: block; }
.sound-btn.is-on .i--off { display: none; }

@media (min-width: 768px) {
  .hero__title { font-size: 48px; }
}

@media (min-width: 1024px) {
  .hero {
    min-height: 100dvh;
    display: grid;
    align-items: center;
    padding: calc(var(--nav-h) + 24px) 0 40px;
  }
  .hero__art {
    inset: 0 0 0 40%;
    height: auto;
    /* 왼쪽(제목 쪽)과 위쪽(내비게이션 밑)을 함께 흐려 글자 뒤를 비운다 */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%), linear-gradient(180deg, transparent 0, #000 150px);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0%, #000 38%), linear-gradient(180deg, transparent 0, #000 150px);
    mask-composite: intersect;
  }
  .hero__art::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 160px;
    background: linear-gradient(180deg, transparent, var(--bg));
  }
  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 48px;
  }
  .hero__device .device { --device-w: clamp(230px, calc((100dvh - 190px) * 0.45), 310px); }
  .sound-btn {
    position: absolute;
    right: calc(50% + var(--device-w-half, 150px) + 20px);
    bottom: 28px;
  }
  .hero__device { --device-w-half: calc(clamp(230px, calc((100dvh - 190px) * 0.45), 310px) / 2 + 8px); }
}

@media (min-width: 1280px) {
  .hero__title { font-size: 60px; }
}

/* 첫 화면 등장: 제목 → 설명 → 버튼 → 기기 순서로 시선을 모은다 */
@media (prefers-reduced-motion: no-preference) {
  .hero__title, .hero__lede, .hero .cta-row { animation: rise 0.9s var(--ease) both; }
  .hero__lede { animation-delay: 0.08s; }
  .hero .cta-row { animation-delay: 0.16s; }
  .hero__device { animation: rise-device 1.1s 0.12s var(--ease) both; }
  .hero__layer { animation: fade-in 1.4s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-device { from { opacity: 0; transform: translateY(36px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }

/* ── 공통 섹션 ────────────────────────────────────────── */

.section { padding: 80px 0; }
@media (min-width: 1024px) { .section { padding: 120px 0; } }

/* 스크롤 등장. JS가 없으면 처음부터 보인다 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ── 이야기 ───────────────────────────────────────────── */

.story__grid { display: grid; gap: 48px; }

.cast {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 20px;
}
.cast__face { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 16px; }
.cast__name { font-family: var(--pixel); font-weight: 400; font-size: 24px; line-height: 1.3; }
.cast__role { margin: 4px 0 8px; font-family: var(--pixel); font-size: 12px; color: var(--accent-ink); }

@media (min-width: 1024px) {
  .story__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 72px 24px;
  }
  .story__copy { grid-column: 1 / span 6; }
  .cast { grid-column: 3 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .cast__item:nth-child(even) { margin-top: 48px; }
}

/* ── 하루의 순환 ──────────────────────────────────────── */

.loop { background: var(--bg-alt); transition: background-color 0.5s var(--ease); }

.loop__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(68vw, 260px);
  gap: 20px;
  margin-top: 48px;
  padding: 4px var(--edge) 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.loop__track:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -2px; }

.loop__card { scroll-snap-align: start; }
.loop__card .tag { margin: 20px 0 10px; background: var(--surface); }
.loop__card .small { margin-top: 6px; }

.shot { padding: 6px; background: var(--device); }
.shot img { width: 100%; aspect-ratio: 540 / 1170; object-fit: cover; }

@media (min-width: 1180px) {
  .loop__track {
    grid-auto-columns: minmax(0, 1fr);
    overflow: visible;
    padding-bottom: 0;
  }
  .loop__card:nth-child(even) { margin-top: 56px; }
}

/* ── 전투 ─────────────────────────────────────────────── */

.combat__grid { display: grid; gap: 56px; }

.combat__media {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  align-items: end;
  gap: 16px;
}
.combat__main .device, .combat__side .device { --device-w: 100%; padding: 6px; }
.combat__side { margin-bottom: 32px; }

.build {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin-top: 40px;
}
.build__item { padding: 24px 0 8px; border-top: 1px solid var(--line); }
.build dt { display: flex; align-items: baseline; gap: 12px; }
.build__num {
  font-family: var(--pixel);
  font-size: 48px;
  line-height: 1;
  color: var(--accent-ink);
}
.build__name { font-family: var(--pixel); font-size: 24px; line-height: 1.3; color: var(--ink); }
.build dd { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink-3); }

@media (min-width: 1024px) {
  .combat__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 80px; align-items: center; }
  .combat__media { display: block; min-height: 700px; }
  .combat__main { width: 320px; transform: rotate(-3deg); }
  .combat__side { position: absolute; left: 240px; bottom: 0; width: 210px; margin: 0; transform: rotate(4deg); }
  .build__num { font-size: 72px; }
}

/* ── 무기 계보 (벤토) ─────────────────────────────────── */

.bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 296px;
  grid-auto-flow: dense;
  gap: 12px;
  margin-top: 48px;
}
.bento__cell--wide { grid-column: span 2; }

.bento__cell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 78% 30%, rgb(var(--glow) / var(--glow-alpha)), transparent 62%),
    var(--surface);
  transition: background-color 0.5s var(--ease);
}

.bento__art {
  position: absolute;
  right: 50%;
  top: 5%;
  height: 48%;
  width: auto;
  transform: translateX(50%) rotate(14deg);
  filter: drop-shadow(0 12px 18px rgb(var(--shade) / 0.35));
  transition: transform 0.6s var(--ease);
}
.bento__cell:hover .bento__art { transform: translate(50%, -8px) rotate(8deg); }
.bento__cell--wide .bento__art { right: 8%; top: 50%; height: 118%; transform: translateY(-50%) rotate(-38deg); }
.bento__cell--wide:hover .bento__art { transform: translateY(calc(-50% - 8px)) rotate(-32deg); }

.bento__text {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
}
.bento__cell--wide .bento__text { right: auto; max-width: 54%; }
.bento__text .tag { background: var(--bg); margin-bottom: 10px; }
.bento__text .small { margin-top: 4px; color: var(--ink-2); }

@media (min-width: 640px) {
  .bento { gap: 16px; }
  .bento__text { left: 24px; right: 20px; bottom: 22px; }
  .bento__cell--wide .bento__text { max-width: 46%; }
  .bento__cell--wide .bento__art { right: 10%; height: 120%; }
}

@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 320px; grid-auto-flow: row; }
  .bento__cell--wide .bento__text { left: 32px; bottom: 30px; }
}

/* ── 지역 (펼쳐지는 띠) ───────────────────────────────── */

.strips {
  display: grid;
  gap: 12px;
  margin-top: 48px;
}

.strip {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  background: var(--art) center / cover no-repeat, var(--device);
  color: #eef0e8;
  cursor: pointer;
}
.strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(8 14 26 / 0.92) 0%, rgb(8 14 26 / 0.62) 48%, rgb(8 14 26 / 0.18) 100%);
}
.strip:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--accent); }

.strip__body {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
}
.strip__range { font-family: var(--pixel); font-size: 12px; color: var(--accent); }
.strip__name { margin-top: 6px; font-family: var(--pixel); font-weight: 400; font-size: 24px; line-height: 1.3; }
.strip__line { margin-top: 6px; max-width: 30em; font-size: 15px; line-height: 1.6; color: #d3dde6; }

@media (min-width: 900px) {
  .strips { display: flex; height: 500px; }
  .strip {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    transition: flex-grow 0.7s var(--ease);
  }
  .strip.is-open { flex-grow: 3.4; }
  .strip__body { left: 20px; right: 12px; bottom: 26px; }
  /* 좁은 띠에서는 이름을 줄여 한 줄로 두고, 펼치면 원래 크기로 키운다 (transform만 움직인다) */
  .strip__name {
    font-size: 36px;
    white-space: nowrap;
    transform: scale(0.6);
    transform-origin: left bottom;
    transition: transform 0.6s var(--ease);
  }
  .strip__range { white-space: nowrap; }
  .strip.is-open .strip__name { transform: none; }
  .strip.is-open .strip__body { right: 24px; }
  .strip__line {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
  }
  .strip.is-open .strip__line { opacity: 1; transform: none; transition-delay: 0.18s; }
}

/* ── 꿈의 틈 (흐르는 띠) ──────────────────────────────── */

.marquee {
  margin-top: 48px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.marquee__track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding-inline: var(--edge);
}
.rift { width: 260px; }
.rift img { width: 100%; aspect-ratio: 560 / 314; object-fit: cover; margin-bottom: 14px; }
.rift .small { margin-top: 4px; }

/* 여덟 가지를 하나씩 설명하기보다 폭을 보여 주는 것이 목적이라 흐르게 둔다. 멈추면 읽을 수 있다 */
@media (prefers-reduced-motion: no-preference) {
  .marquee.is-ready {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  }
  .marquee.is-ready .marquee__track {
    padding-inline: 0;
    animation: drift 64s linear infinite;
  }
  .marquee.is-ready:hover .marquee__track { animation-play-state: paused; }
}
@keyframes drift { to { transform: translateX(calc(-50% - 10px)); } }

/* ── 마무리 ───────────────────────────────────────────── */

.finale {
  background:
    radial-gradient(50% 60% at 18% 45%, rgb(255 223 150 / 0.14), transparent 70%),
    var(--bg);
}
.finale__grid { display: grid; gap: 40px; }
.finale__quote {
  font-family: var(--pixel);
  font-size: 48px;
  line-height: 1.25;
  color: var(--ink);
}
.finale__caption { margin-top: 16px; font-size: 15px; color: var(--ink-3); }
.finale__action .body { margin-top: 0; }

@media (min-width: 768px) {
  .finale__quote { font-size: 72px; }
}
@media (min-width: 1024px) {
  .finale { padding: 160px 0; }
  .finale__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 64px; }
  .finale__quote { font-size: 96px; }
}

/* ── 문서 페이지 (개인정보처리방침) ─────────────────── */

.doc { padding: 40px 0 96px; }
.doc__inner { max-width: 808px; }
.doc__head { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.doc__title { font-family: var(--pixel); font-weight: 400; font-size: 36px; line-height: 1.3; color: var(--ink); }
.doc__meta { margin-top: 14px; font-family: var(--pixel); font-size: 12px; color: var(--accent-ink); }
.doc__intro { margin-top: 20px; line-height: 1.8; color: var(--ink-2); }
.doc__body section { padding-top: 40px; }
.doc__body h2 { margin-bottom: 14px; font-family: var(--pixel); font-weight: 400; font-size: 24px; line-height: 1.35; color: var(--ink); }
.doc__body p, .doc__body li { line-height: 1.8; color: var(--ink-2); }
.doc__body p + p { margin-top: 14px; }
.doc__body ul { margin: 14px 0; padding: 0; list-style: none; }
.doc__body li { position: relative; padding-left: 22px; }
.doc__body li + li { margin-top: 6px; }
.doc__body li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--accent-ink);
}
.doc__body strong { font-weight: 400; color: var(--accent-ink); }
.doc__contact { padding: 18px 22px; background: var(--surface); line-height: 1.9; }
.doc a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.doc a:hover { color: var(--ink); }
.doc a:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }

@media (min-width: 768px) {
  .doc { padding: 56px 0 120px; }
  .doc__title { font-size: 48px; }
}

/* ── 바닥글 ───────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer__row { display: grid; gap: 16px; align-items: center; }
.footer .brand { font-size: 24px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
}
.footer__links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__links a[aria-current="page"] { color: var(--ink); }
.footer__links .i { width: 14px; height: 14px; }
.footer__legal { font-family: var(--pixel); font-size: 12px; color: var(--ink-3); }

@media (min-width: 900px) {
  .footer__row { grid-template-columns: auto 1fr; }
  .footer__links { justify-content: flex-end; }
  .footer__legal { grid-column: 1 / -1; }
}

/* ── 모바일 여백 ──────────────────────────────────────── */

@media (max-width: 767px) {
  :root { --gutter: 16px; }
}

/* 폰: 두 버튼을 같은 폭으로 나란히 둔다 (폭이 다른 두 줄로 쌓이지 않게) */
@media (max-width: 559px) {
  .cta-row { display: grid; grid-template-columns: 1fr 1fr; }
  .cta-row .btn { padding-inline: 12px; }
}

/* 320px대 소형 폰: 상단 버튼은 아이콘만 보이고(읽기 이름은 그대로), 제목을 한 단계 줄인다 */
@media (max-width: 359px) {
  .nav .btn--sm { padding-inline: 12px; }
  .nav .btn--sm span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .cta-row { grid-template-columns: 1fr; }
  /* 30px은 Galmuri14(15px 격자)의 2배라 이 구간만 제목 글꼴을 바꿔 번지지 않게 한다 */
  .hero__title, .h2 { font-family: var(--text); font-size: 30px; }
}
