/* BestFrame 정적 사이트 공용 스타일 — 시스템 폰트, 라이트/다크 자동, 빌드 없음 */
:root {
  color-scheme: light dark;
  --ink: #1c1c1e;
  --muted: #5d5d62;
  --bg: #ffffff;
  --surface: #f2f2f7;
  --accent: #335f4d;          /* 앱 AccentColor (라이트) */
  --margin: clamp(20px, 4vw, 48px);
  --max: 1200px;
  --gap-section: clamp(96px, 12vw, 176px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Apple SD Gothic Neo", "Pretendard", system-ui, "Helvetica Neue", Arial, "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
  /* 다섯 단계 */
  --t-small: 15px;
  --t-body: 17px;
  --t-mid: 22px;
  --t-h2: clamp(30px, 3.4vw, 44px);
  --t-display: clamp(40px, 5vw, 68px);
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f2f2f7; --muted: #aeaeb2; --bg: #000000; --surface: #1c1c1e; --accent: #8ccca8; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; font: var(--t-body)/1.6 var(--font); color: var(--ink); background: var(--bg);
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; transition: color 160ms ease; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
p, li { color: var(--ink); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
.muted { color: var(--muted); font-size: var(--t-small); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--margin); top: 8px; background: var(--bg); padding: 8px 12px; z-index: 2; }

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

/* 상단 줄: 이름, 링크 몇 개, 언어 */
header.site { display: flex; align-items: center; gap: 24px; padding-top: 20px; padding-bottom: 20px; }
header.site .brand { font-weight: 700; font-size: var(--t-body); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; margin-right: auto; }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: var(--t-small); }
header.site nav a { color: var(--ink); text-decoration: none; }
header.site nav a:hover { color: var(--accent); }
header.site nav a[aria-current] { color: var(--muted); }
header.site .lang { display: flex; gap: 12px; }
@media (max-width: 600px) {
  header.site { flex-wrap: wrap; gap: 8px 16px; }
  header.site nav.links { display: none; }
}

/* App Store 배지: Apple 원본 그대로, 크기만 지정. 둘레에 높이의 1/4 이상 여백 */
.store { display: inline-block; line-height: 0; padding: 0; border-radius: 10px; }
.store img { height: 54px; width: auto; }
.store.small img { height: 44px; }
.hero .store { margin: 32px 0 16px; }

/* 앱 화면 캡처: 기기 프레임 없이 둥근 모서리만 */
.shot { border-radius: 13% / 6%; background: var(--surface); }
.stage { background: var(--surface); border-radius: 28px; display: grid; place-items: center; }

/* 첫 화면 */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-top: clamp(24px, 4vw, 56px); }
.hero h1 { font-size: var(--t-display); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.hero .lead { font-size: var(--t-mid); line-height: 1.5; margin: 24px 0 0; max-width: 30em; }
.hero .facts { color: var(--muted); font-size: var(--t-small); margin: 0; }
.hero .stage { margin: 0; padding: clamp(28px, 4vw, 48px) 24px; }
.hero .stage img { width: min(100%, 300px); }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero .stage { padding: 32px 20px; }
  .hero .stage img { width: min(72%, 280px); }
}

section { margin-top: var(--gap-section); }
section h2 { font-size: var(--t-h2); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; }

/* 사용 방법: 한쪽은 고정된 앱 화면, 한쪽은 읽는 열 */
.flow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); }
.flow .pin { position: sticky; top: 24px; height: calc(100svh - 48px); max-height: 860px; min-height: 560px; }
.flow .pin .stage { height: 100%; position: relative; }
.flow .pin img { position: absolute; height: calc(100% - 64px); width: auto; max-width: calc(100% - 48px); object-fit: contain; opacity: 0; transition: opacity 240ms ease; }
.flow .pin img.on { opacity: 1; }
.flow h2 { margin-bottom: 8px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps > li { padding: 0 0 18vh; min-height: 52vh; }
.steps > li:first-child { padding-top: 12vh; }
.steps > li:last-child { padding-bottom: 0; min-height: 0; }
.steps h3 { font-size: var(--t-mid); line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 12px; }
.steps p { margin: 0; max-width: 34em; }
.steps p + p { margin-top: 12px; }
.steps figure { display: none; margin: 0 0 28px; padding: 32px 20px; }
.steps figure img { width: min(100%, 300px); }

/* 스크립트가 없거나 좁은 화면: 단계마다 자기 화면을 둔다 */
html:not(.js) .flow { grid-template-columns: 1fr; }
html:not(.js) .flow .pin { display: none; }
html:not(.js) .steps figure { display: block; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow .pin { display: none; }
  .steps figure { display: block; }
  .steps > li, .steps > li:first-child { min-height: 0; padding: 48px 0 0; }
  .steps figure img { width: min(72%, 280px); }
}

/* 개인정보: 한 단계 짙은 바탕 위에 목록과 설정 화면 */
.private { background: var(--surface); border-radius: 28px; padding: clamp(32px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.private ul { list-style: none; padding: 0; margin: 28px 0 28px; }
.private li { font-size: var(--t-mid); line-height: 1.45; margin: 0 0 14px; }
.private .shot { width: min(100%, 280px); justify-self: center; background: var(--bg); }
@media (max-width: 820px) {
  .private { grid-template-columns: 1fr; }
  .private li { font-size: var(--t-body); }
  .private .shot { width: min(72%, 260px); }
}

/* 설치 전에 알아 둘 점: 질문이 앞에 붙은 읽는 글 */
.notes { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 72px); }
.notes .cols { columns: 2; column-gap: 56px; }
.notes .cols p { margin: 0 0 20px; break-inside: avoid; line-height: 1.55; }
.notes .cols b { font-weight: 600; }
@media (max-width: 900px) {
  .notes { grid-template-columns: 1fr; }
  .notes .cols { columns: 1; }
}

/* 마지막 권유 */
.close { padding: 8vh 0 4vh; }
.close p { font-size: var(--t-mid); margin: 0 0 24px; max-width: 40ch; }

/* 하단 */
footer.site { margin-top: clamp(64px, 10vw, 128px); padding-top: 24px; padding-bottom: 48px; color: var(--muted); font-size: var(--t-small); background: var(--surface); max-width: none; }
footer.site .wrap { display: grid; gap: 12px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
footer.site nav a { color: var(--ink); text-decoration: none; }
footer.site nav a:hover { color: var(--accent); }
footer.site p { margin: 0; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
