/* 로그인 랜딩 — 여덟 장면이 끊기지 않고 이어지는 스크롤 이야기(2026-11-25). 그림·움직임은 scenes.js, 근거는 docs/LANDING_SCENES.md.
   화면에 고정된 세계(.world) 하나를 스크롤 전체 진행률로 움직인다. 키프레임은 scenes.js가 장면 크기에 맞춰 만들어 넣고,
   여기서는 그 키프레임을 스크롤 타임라인(scroll(root))에 묶는다. 모르는 브라우저는 멈춘 애니메이션을 진행률 --p로 옮긴다.
   바뀌는 값은 transform·opacity(손그림 동그라미만 stroke-dashoffset). 스크롤을 잠그거나 장면에 맞추지 않는다.
   동작 줄이기면 세계를 끄고 장면마다 정지 화면(.stage)을 보인다. */
html { background: #ebe3d4; }
body { margin: 0; color: #16140f; font-family: var(--font); word-break: keep-all; -webkit-font-smoothing: antialiased; }
.lp-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ── 머리: 마크·이름(왼쪽 위), 카카오 버튼(오른쪽 위 · 휴대폰은 아래). 버튼이 문서의 첫 링크다. ── */
.site-header { position: fixed; z-index: 5; top: 0; left: 0; display: flex; align-items: center; gap: 10px;
  padding: 18px 26px; pointer-events: none; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: .16em; color: #16140f; }
.logo svg { width: 26px; height: 26px; }
.logo-stroke { fill: none; stroke: #16140f; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.logo-dot { fill: #ffe21a; stroke: #16140f; stroke-width: 1.4; }
.logo-word { transition: font-size .3s ease, letter-spacing .3s ease; }
.is-past-first .logo-word { font-family: var(--font-heading); font-size: 19px; letter-spacing: .04em; }

/* 로그인 줄: 카카오가 주인공. 발급 계정이 있으면(has-id) 오른쪽에 같은 높이·1/4 너비의 보조 '아이디' 버튼. */
.login-bar { position: fixed; z-index: 6; top: 14px; right: 22px; display: flex; gap: 8px; }
.login-bar.has-id { display: grid; grid-template-columns: 3fr 1fr; width: 252px; }
.kakao { display: inline-flex; align-items: center; justify-content: center;
  gap: 9px; min-height: 44px; padding: 0 20px; border-radius: 999px; background: #fee500; color: #191919;
  font-size: 15px; font-weight: 750; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(25, 25, 25, .6), 0 6px 18px rgba(0, 0, 0, .16); }
.kakao:hover { filter: brightness(.97); }
.kakao:focus-visible { outline: 3px solid #16140f; outline-offset: 3px; }
.has-id .kakao { padding: 0 14px; }
.id-login { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 6px;
  border-radius: 999px; background: rgba(250, 246, 238, .82); color: #3a352c; font-size: 13px; font-weight: 600;
  text-decoration: none; box-shadow: 0 0 0 1px rgba(25, 25, 25, .28); }
.id-login:hover { background: #faf6ee; }
.id-login:focus-visible { outline: 3px solid #16140f; outline-offset: 3px; }
.bubble { position: relative; width: 18px; height: 14px; border-radius: 50%; background: #191919; }
.bubble::after { content: ""; position: absolute; bottom: -3px; left: 3px; border-top: 5px solid #191919; border-right: 4px solid transparent; }

/* ── 세계: 종이 벽 + 지평선을 따라 오르내리는 바닥 + 겹. 빛·가장자리·종이 결은 위에 CSS 한 장. ── */
.world { position: fixed; z-index: 0; inset: 0; height: 100svh; overflow: hidden; pointer-events: none; isolation: isolate;
  background: linear-gradient(#efe8db, #e1d9ca); }
.world-floor { position: absolute; left: 0; right: 0; top: 0; height: 220svh;
  background: linear-gradient(#ddd5c6 0, #f3eee3 6svh, #f1ece2 60svh, #d9d2c4 120svh); }
.world-floor::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 20px; background: rgba(0, 0, 0, .1); filter: blur(8px); }
.world-layers, .ws { position: absolute; inset: 0; }
/* 주인공·건네주는 빨간 원은 장면 겹 위(장면 겹은 나중에 붙어도 아래). */
.ws-hero { z-index: 30; }
.world::after, .stage::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 248, 232, .32), rgba(255, 248, 232, 0) 60%),
    radial-gradient(78% 78% at 50% 46%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .26) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 .1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E"); }
.world text, .paint text { font-family: var(--font-heading); }
.wl { position: absolute; overflow: visible; opacity: 0; visibility: hidden; will-change: transform, opacity; }
.wl, .wd, .world-floor {
  animation-duration: 1s; animation-timing-function: linear; animation-fill-mode: both;
  animation-play-state: paused; animation-delay: calc(var(--p, 0) * -1s);
}
.lp-timeline .wl, .lp-timeline .wd, .lp-timeline .world-floor {
  animation-play-state: running; animation-delay: 0s; animation-timeline: scroll(root block);
}
.wd { stroke-dasharray: 1 1; }

/* ── 장면 구간: 세계 위를 지나가는 투명한 스크롤 구간(장면 설명은 화면 읽기용). 사이 여백 없음. ── */
main { position: relative; z-index: 1; }
.scene { position: relative; height: 150svh; }
.scene .stage { display: none; }
.intro-wrap { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 100svh; pointer-events: none; }
.intro { position: absolute; left: 26px; bottom: 26px; max-width: 560px; font-family: var(--mono); font-size: 12px;
  line-height: 1.8; color: #3d382f; transition: opacity .35s ease, transform .35s ease, visibility 0s linear 0s; }
.intro p { margin: 0 0 10px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.intro q { display: block; quotes: none; font-size: 12.5px; color: #16140f; }
.intro q::before { content: "> "; opacity: .55; }
.cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-family: var(--mono); font-size: 12px;
  letter-spacing: .12em; color: #3d382f; transition: opacity .35s ease; }
.is-scrolled .intro { opacity: 0; transform: translateY(14px); visibility: hidden; transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s; }
.is-scrolled .cue { opacity: 0; }
.fine { position: absolute; z-index: 2; left: 26px; bottom: 22px; margin: 0; font-family: var(--mono); font-size: 11px; color: #5b564b; }

/* ── 동작 줄이기: 세계를 끄고 장면마다 정지 화면 한 장. ── */
.lp-still .world { display: none; }
.lp-still .scene { height: 100svh; }
.lp-still .scene .stage { display: block; position: relative; height: 100svh; overflow: hidden; background: #ebe3d4; }
.paint { position: absolute; inset: 0; }
.ly { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }

/* ── 휴대폰: 버튼은 아래에 붙고, 글은 버튼 위로. ── */
@media (max-width: 759px) {
  .site-header { padding: 14px 16px; }
  .login-bar { top: auto; right: 12px; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .login-bar.has-id { width: auto; }
  .login-bar:not(.has-id) .kakao { flex: 1; }
  .kakao { min-height: 54px; border-radius: 14px; font-size: 16px; }
  .id-login { min-height: 54px; border-radius: 14px; font-size: 14px; }
  .intro { left: 16px; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); }
  .cue { display: none; }
  .fine { left: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); }
}
/* ── 다크: 장면은 '사진'이라 색은 그대로, 전체를 조금만 어둡게. ── */
@media (prefers-color-scheme: dark) {
  html, .stage { background: #2a2620; }
  .world::before, .stage::before { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: rgba(8, 6, 4, .2); }
}
@media (prefers-reduced-motion: reduce) {
  .wl, .wd, .world-floor { animation: none !important; }
  .intro, .cue, .logo-word { transition: none !important; }
}
