/* 첫 화면(index.html) 전용. 법률 문서는 style.css를 쓴다.
   색과 글꼴은 앱의 Forest 토큰(app_tokens.dart)과 UI 글꼴(VerbaSansKR)을 그대로 쓴다. */
@font-face { font-family: "VerbaSansKR"; src: url("/assets/fonts/VerbaSansKR-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "VerbaSansKR"; src: url("/assets/fonts/VerbaSansKR-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "VerbaSansKR"; src: url("/assets/fonts/VerbaSansKR-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #FAF7F2;
  --ink: #1B2A27;
  --ink-sub: #66655E;
  --accent: #00473F;
  --line: #E6E1D8;
  --wall: #0F2A24;
  /* 휴대폰 화면의 너비. 앱 화면 그림을 이 너비에 딱 맞게 그려 두었으므로(build.mjs, capture/run.sh)
     바꾸려면 그림도 다시 만들어야 한다. 정수 픽셀이어야 그림이 번지지 않는다. */
  --screen-w: 320px;
  --screen-h: 696px;
  --bezel: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 "VerbaSansKR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.top, main, .foot { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }

.top { display: flex; justify-content: space-between; align-items: center; padding-block: 22px; }
.brand img { display: block; height: 28px; width: auto; }
.langs { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.langs a { color: var(--ink-sub); text-decoration: none; }
.langs a:hover { color: var(--accent); text-decoration: underline; }
.langs a[aria-current] { color: var(--ink); font-weight: 600; }

/* ── 첫 화면 ── */
.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 48px 72px; padding-block: 40px 96px; }
.hero-copy { flex: 1 1 340px; max-width: 520px; }
.soon { margin: 0 0 14px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0 0 18px; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; word-break: keep-all; }
.lede { margin: 0 0 28px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-sub); max-width: 30em; word-break: keep-all; }
.stores { margin: 0; font-weight: 600; color: var(--accent); }
.hero-demo { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.replay { font: inherit; font-size: 14px; color: var(--ink-sub); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; cursor: pointer; }
.replay:hover { color: var(--accent); border-color: var(--accent); }

/* ── 휴대폰 ── 화면은 캡처와 같은 402x874pt(아이폰 Pro). --pt 는 화면 속 1pt의 실제 길이. */
.phone {
  --pt: calc(var(--screen-w) / 402);
  position: relative; width: calc(var(--screen-w) + 2 * var(--bezel)); padding: var(--bezel);
  border-radius: calc(55 * var(--pt) + var(--bezel));
  background: linear-gradient(145deg, #4a4f4d, #1a1e1d 28%, #0d100f 70%, #3b403e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 0 0 4px #060807,
    0 calc(60 * var(--pt)) calc(90 * var(--pt)) calc(-50 * var(--pt)) rgba(0, 71, 63, .6), 0 calc(14 * var(--pt)) calc(30 * var(--pt)) calc(-14 * var(--pt)) rgba(27, 42, 39, .35);
}
/* 옆 버튼 */
.phone::before, .phone::after { content: ""; position: absolute; width: calc(3 * var(--pt)); border-radius: calc(2 * var(--pt)); background: #2a2e2d; }
.phone::before { left: calc(-2.4 * var(--pt)); top: 22%; height: 7%; box-shadow: 0 calc(74 * var(--pt)) 0 #2a2e2d; }
.phone::after { right: calc(-2.4 * var(--pt)); top: 30%; height: 11%; }
.screen { position: relative; width: var(--screen-w); height: var(--screen-h); border-radius: calc(55 * var(--pt)); overflow: hidden; background: var(--bg); }
.screen img { display: block; }
.shot, .launch { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot { opacity: 0; transition: opacity .2s linear; }
.shot.on { opacity: 1; }

.statusbar { position: absolute; inset: 0 0 auto; height: calc(62 * var(--pt)); z-index: 5; color: #000; transition: color .3s; pointer-events: none; }
.statusbar.light { color: #fff; }
.statusbar .time { position: absolute; left: 0; width: calc(138 * var(--pt)); top: calc(22 * var(--pt)); text-align: center; font: 600 calc(17 * var(--pt))/1 -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; letter-spacing: -.01em; }
.statusbar .island { position: absolute; left: 50%; top: calc(11 * var(--pt)); width: calc(126 * var(--pt)); height: calc(37 * var(--pt)); margin-left: calc(-63 * var(--pt)); border-radius: calc(19 * var(--pt)); background: #000; }
.statusbar .icons { position: absolute; right: 0; width: calc(138 * var(--pt)); top: calc(24 * var(--pt)); display: flex; justify-content: center; align-items: center; gap: calc(6 * var(--pt)); }
.statusbar svg { display: block; height: calc(12 * var(--pt)); width: auto; fill: currentColor; }
.statusbar svg:last-child { height: calc(13 * var(--pt)); }

/* 홈 화면에서 아이콘을 누르면 시작 화면이 아이콘 자리에서 커지며 열리고, 잠시 뒤 앱의 첫 화면으로 바뀐다 */
.springboard { position: absolute; inset: 0; z-index: 2; background: radial-gradient(130% 70% at 25% 8%, #3A8B7D, #17463D 45%, #0B211C 100%); }
.app { position: absolute; left: calc(27 * var(--pt)); top: calc(86 * var(--pt)); width: calc(64 * var(--pt)); }
.app img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 22.5%; box-shadow: 0 calc(4 * var(--pt)) calc(10 * var(--pt)) rgba(0, 0, 0, .25); }
.app b { position: absolute; left: -40%; right: -40%; top: calc(70 * var(--pt)); text-align: center; font: 500 calc(12 * var(--pt))/1.2 -apple-system, "SF Pro Text", "Apple SD Gothic Neo", sans-serif; color: #fff; }
.app.tap img { animation: press .42s ease; }
@keyframes press { 45% { transform: scale(.88); filter: brightness(.8); } }
.launch { z-index: 3; transform-origin: 14.7% 13.5%; transform: scale(.16); opacity: 0; border-radius: 22.5%; transition: transform .5s cubic-bezier(.3, .8, .25, 1), opacity .12s linear, border-radius .5s; }
.launch.open { transform: none; opacity: 1; border-radius: 0; }
.launch.gone { transform: none; border-radius: 0; opacity: 0; transition: opacity .4s linear; }
.hide { visibility: hidden; }

/* 탭을 누르는 손가락 자리 */
.touch { position: absolute; z-index: 1; top: 90.6%; left: 17%; width: 12%; aspect-ratio: 1; margin: -6% 0 0 -6%; border-radius: 50%; background: rgba(27, 42, 39, .26); opacity: 0; transform: scale(.4); pointer-events: none; }
.touch.go { animation: touch .5s ease-out; }
@keyframes touch { 0% { opacity: 0; transform: scale(.4); } 35% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }

/* ── 스크롤 이야기 ── */
.story { padding-block: 24px 40px; border-top: 1px solid var(--line); }
.story h2, .closing h2 { margin: 56px 0 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.3; font-weight: 700; text-wrap: balance; word-break: keep-all; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 96px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; max-width: 440px; opacity: .3; transition: opacity .35s; }
.step.on { opacity: 1; }
.step .n { margin: 0 0 10px; font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--accent); }
.step h3 { margin: 0 0 12px; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.3; font-weight: 700; text-wrap: balance; word-break: keep-all; }
.step p { margin: 0; color: var(--ink-sub); word-break: keep-all; }
.story-pin { position: sticky; top: max(12px, calc(50vh - var(--screen-h) / 2 - var(--bezel))); padding-block: 5vh; }
.inline-shot { display: none; }

.closing { padding-block: 8px 104px; text-align: center; border-top: 1px solid var(--line); }
.closing h2 { margin-bottom: 14px; }
.contact { margin: 22px 0 0; font-size: 15px; color: var(--ink-sub); }

.foot { padding-block: 24px 44px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-sub); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.foot p { margin: 4px 0 0; }

@media (max-width: 760px) {
  :root { --screen-w: 270px; --screen-h: 587px; --bezel: 9px; }
  .brand img { height: 22px; }
  .hero { padding-block: 16px 64px; }
  .hero-copy { text-align: center; }
  .lede { margin-inline: auto; }
  .story-grid { display: block; }
  .story-pin { display: none; }
  .step { min-height: 0; max-width: none; padding-block: 44px 8px; opacity: 1; align-items: center; text-align: center; }
  .inline-shot { display: block; width: 270px; height: 587px; max-width: none; margin-top: 26px; box-sizing: content-box; border: 9px solid #0d100f; border-radius: 46px; box-shadow: 0 30px 50px -34px rgba(0, 71, 63, .55); }
  .closing { padding-block: 0 72px; margin-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .shot, .launch, .step { transition: none; }
  .replay { display: none; }
}
