/* 드림로그 promo site — "밤하늘 꿈 기록" (DESIGN.md v2)
   밤 모드 단일: 사이트는 앱의 밤 문법(어두운 배경 + 부드러운 대비)에 고정한다.
   토큰 원본: flutter_app/apps/app/lib/theme/night_tokens.dart */

:root {
  --bg: #0a0912;                            /* 밤하늘 */
  --fog: #1a1533;                           /* 보랏빛 안개 */
  --fog-strong: #2a2145;
  --ink: #ece9f5;                           /* 달빛 종이 */
  --ink-body: rgba(236, 233, 245, .85);
  --ink-dim: rgba(236, 233, 245, .72);
  --card: rgba(255, 255, 255, .05);
  --line: rgba(255, 255, 255, .09);
  --lavender: #c3a9e8;
  --gold: #e8c98a;
  --ink-on-accent: #1b1630;
  --serif: 'Gowun Batang', serif;
  --sans: 'IBM Plex Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 18px;
  --maxw: 620px;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.9;
  padding: 44px 24px 80px;
  word-break: keep-all;        /* 한국어 어절 단위 줄바꿈 */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* 라디얼 안개 — 새벽 하늘 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -12%, var(--fog-strong) 0%, var(--fog) 34%, transparent 66%),
    radial-gradient(60% 44% at 86% 6%, rgba(124, 102, 171, .16), transparent 70%),
    var(--bg);
}

/* 라벤더 별 — 함께 느리게 숨쉰다 */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 2px; height: 2px;
  border-radius: 50%;
  z-index: -1;
  box-shadow:
    8vw  12vh 0 0     rgba(195, 169, 232, .50),
    22vw  6vh 0 -.5px rgba(236, 233, 245, .40),
    34vw 20vh 0 0     rgba(195, 169, 232, .35),
    48vw  9vh 0 .5px  rgba(236, 233, 245, .50),
    61vw 16vh 0 -.5px rgba(195, 169, 232, .45),
    73vw  5vh 0 0     rgba(236, 233, 245, .35),
    88vw 13vh 0 .5px  rgba(195, 169, 232, .50),
    15vw 30vh 0 -.5px rgba(236, 233, 245, .30),
    55vw 28vh 0 0     rgba(195, 169, 232, .30),
    80vw 26vh 0 -.5px rgba(236, 233, 245, .35),
    93vw 38vh 0 0     rgba(195, 169, 232, .25),
     5vw 44vh 0 -.5px rgba(236, 233, 245, .25);
  animation: breathe 5.6s ease-in-out infinite alternate;
}

@keyframes breathe {
  from { opacity: .45; }
  to   { opacity: 1; }
}

.wrap { max-width: var(--maxw); margin: 0 auto; }

/* ---- Header ---- */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 56px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-header img { width: 40px; height: 40px; border-radius: 10px; }
.site-header .name { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.site-header nav { margin-left: auto; display: flex; gap: 20px; }

a { color: var(--lavender); text-decoration-color: rgba(195, 169, 232, .4); text-underline-offset: 3px; }
nav a { color: var(--ink-dim); text-decoration: none; font-size: 13.5px; font-weight: 400; }
nav a:hover { color: var(--ink); }

::selection { background: rgba(124, 102, 171, .45); }

/* ---- Hero ---- */
.hero { text-align: center; padding: 16px 0 8px; }

.moon { position: relative; display: inline-block; margin-bottom: 30px; }
.moon img {
  display: block;
  width: 92px; height: 92px;
  border-radius: 24px;
  animation: bob 7s ease-in-out infinite;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .55), 0 0 80px rgba(232, 201, 138, .12);
}
.moon::after {
  content: '';
  position: absolute;
  inset: -13px;
  border-radius: 32px;
  border: 1px solid rgba(232, 201, 138, .4);
  animation: pulse-ring 3.4s ease-out infinite;
  pointer-events: none;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@keyframes pulse-ring {
  0%        { transform: scale(.97); opacity: .65; }
  70%, 100% { transform: scale(1.12); opacity: 0; }
}

.overline {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
  color: rgba(236, 233, 245, .8);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(24px, 5.4vw, 31px);
  line-height: 1.55;
}
.hero .tagline { color: var(--ink-dim); margin-top: 18px; font-size: 14.5px; }

/* ---- 앱 화면 (기기 프레임) ---- */
.shots {
  display: flex;
  gap: 16px;
  margin: 60px -24px 0;          /* 모바일에서 화면 가장자리까지 */
  padding: 10px 24px 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
/* 다 들어가면 가운데, 넘치면 첫 장부터 스크롤 —
   justify-content: center는 넘칠 때 왼쪽 끝이 잘려 못 쓴다. */
.shot:first-child { margin-left: auto; }
.shot:last-child { margin-right: auto; }
.shot {
  flex: 0 0 clamp(168px, 46vw, 186px);
  scroll-snap-align: center;
  text-align: center;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 6px solid var(--fog-strong);   /* 베젤 — 스토어 프레임과 같은 톤 */
  outline: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .5), 0 0 56px rgba(195, 169, 232, .10);
}
.shot figcaption {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-dim);
}

/* ---- 타임라인 (기능) ---- */
.timeline {
  position: relative;
  max-width: 460px;
  margin: 64px auto;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px; top: 10px; bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg,
    transparent, rgba(195, 169, 232, .45) 18%,
    rgba(195, 169, 232, .45) 82%, transparent);
}
.entry { position: relative; padding: 16px 0; }
.entry::before {
  content: '';
  position: absolute;
  left: -30px; top: 27px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--lavender);
  box-shadow: 0 0 10px rgba(195, 169, 232, .65);
}
.entry h2 { margin: 0; font-size: 19px; }
.entry p { font-size: 14px; color: var(--ink-dim); margin-top: 6px; }

.closing {
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 2;
  color: var(--ink);
  margin: 64px 0 8px;
}

/* ---- 지면 공통 ---- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1.5;
}
h1 { font-size: 28px; }
h2 { font-size: 20px; margin: 44px 0 10px; }

p + p { margin-top: 10px; }
strong { font-weight: 500; color: var(--ink); }
.dim { color: var(--ink-dim); }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
}
.panel p { font-size: 14.5px; }

ul { padding-left: 18px; }
li { margin: 8px 0; font-size: 14.5px; }
li::marker { color: var(--lavender); }

/* 자주 묻는 질문 */
.qa { padding: 18px 0; border-bottom: 1px solid var(--line); }
.qa:last-of-type { border-bottom: none; }
.qa h3 { font-size: 16.5px; }
.qa p { margin-top: 6px; font-size: 14px; color: var(--ink-dim); }

/* 필 버튼 (스토어 링크가 생기면 쓴다) */
.store-cta {
  display: inline-block;
  background: var(--lavender);
  color: var(--ink-on-accent);
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
}

/* ---- Footer ---- */
.footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 13px;
  text-align: center;
}
.footer a { color: var(--ink-dim); }
.footer a:hover { color: var(--ink); }
.footer p + p { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  body::after, .moon img, .moon::after { animation: none; }
}
