/* 공식 사이트 공통 문서 틀 — ADR 0083·0086. 모든 공개 쪽이 글꼴(fonts/pretendard) → site/tokens.css(토큰) → site/base.css(초기화) →
   이 파일 → site/shell.css(머리글) → 쪽 종류별 컴포넌트 CSS 하나(site/landing.css · site/blog.css · site/policy.css) 순서로 읽는다.
   본문 글꼴과 크기, 글 틀(main[data-layout])의 읽기폭·여백·제목, 공통 바닥글이 여기 있다. 숫자는 모두 토큰 변수에서 온다. */

/* 세로 스크롤이 없는 짧은 쪽도 스크롤바 자리를 비워 둬 머리글·본문이 쪽마다 같은 자리에 온다. */
html {
  scrollbar-gutter: stable;
  background: var(--canvas);
}

body {
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-size);
  line-height: var(--leading);
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

/* 머리글·랜딩 구획·바닥글의 안쪽 줄 */
.wrap {
  width: min(100%, calc(var(--frame) + 2 * var(--gutter)));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 본문 틀. wide(루트 랜딩)는 구획마다 .wrap을 쓰므로 main 자체에 폭이 없다. */
main[data-layout="article"],
main[data-layout="license"] {
  width: min(100%, calc(var(--measure) + 2 * var(--gutter)));
  margin: 0 auto;
  padding: var(--main-top) var(--gutter) var(--main-bottom);
}

main[data-layout="license"] {
  width: min(100%, calc(var(--wide-measure) + 2 * var(--gutter)));
}

/* 글 틀의 제목 — 블로그·가이드·개발자 문서·정책·베타·출처 안내가 같은 크기다. */
main:is([data-layout="article"], [data-layout="license"]) h1 {
  font-size: var(--h1-size);
  line-height: var(--heading-leading);
  font-weight: 800;
  letter-spacing: var(--heading-tracking);
}

main:is([data-layout="article"], [data-layout="license"]) h2 {
  font-size: var(--h2-size);
  line-height: var(--heading-leading);
  font-weight: 700;
  letter-spacing: var(--heading-tracking);
}

main:is([data-layout="article"], [data-layout="license"]) h3 {
  font-size: var(--h3-size);
  line-height: var(--heading-leading);
  font-weight: 700;
  letter-spacing: var(--heading-tracking);
}

/* 글 틀의 본문 기본값. 컴포넌트 CSS의 클래스 규칙이 이보다 세다. */
:where(main[data-layout="article"]) p {
  margin: 0 0 1rem;
}

:where(main[data-layout="article"]) :is(ul, ol) {
  padding-left: 1.4em;
  list-style: revert;
}

:where(main[data-layout="article"]) a {
  color: var(--accent);
}

:where(main[data-layout="article"]) a:hover {
  color: var(--accent-hover);
}

/* 실제 앱 화면 자리 — 랜딩·시작하기·사용 가이드·블로그가 같은 모양으로 쓴다(scripts/site-shots.ts).
   캡처가 없는 자리는 아예 그리지 않으므로(2026-10-18) 아래는 캡처가 있을 때의 모양뿐이다. */
.shot {
  display: flex;
}
.shot img {
  width: 100%;
  height: auto;
  border-radius: inherit;
}
.shot-phone {
  width: 300px;
  height: 620px;
  padding: 12px;
  border: 1px solid var(--stroke-strong);
  border-radius: 40px;
  background: var(--canvas);
  box-shadow: var(--shadow-phone);
}
.shot-phone img {
  border-radius: 30px;
}
.shot-card {
  width: 100%;
  min-height: 120px;
  border-radius: var(--radius);
}
/* 화면 카드의 그림은 휴대폰 화면 폭 정도로만 보인다(가이드·블로그·시작하기 본문). 흰 앱 화면이 흰 바탕에 묻히지 않게 선 하나.
   랜딩 단계 카드는 카드 폭을 채운다(landing.css). */
.shot-card img {
  max-width: 300px;
  border: 1px solid var(--stroke);
}
/* 공통 바닥글 — 첫 줄: 글자 워드마크 · 링크 줄(베타 시작하기 · 개인정보 처리방침), 둘째 줄: 언어 바꾸기 · © 2026 1234asdf · 문의 메일.
   위 1px 선. 마크업은 apps/site/scripts/site-layout.ts의 renderSiteFooter 하나다. */
.site-footer {
  border-top: 1px solid var(--stroke);
  padding: 28px 0 40px;
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: var(--small-size);
  line-height: var(--small-leading);
}

.site-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
}

.site-footer-bottom {
  padding-top: 8px;
  border-top: 1px solid var(--stroke);
}

.site-footer-brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: var(--display-tracking);
  text-decoration: none;
}
/* 바닥글 워드마크 그림(ADR 0119, 색은 shell.css의 .brand-* 규칙). 가로 워드마크 최소 14px. */
.site-footer-brand .brand-logotype {
  display: block;
  width: auto;
  height: 18px;
}

.site-footer-nav,
.site-footer-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.site-footer-nav a,
.site-footer-lang a,
.site-footer-mail {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  color: inherit;
  text-decoration: none;
}

.site-footer-nav a:hover,
.site-footer-lang a:hover,
.site-footer-mail:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer-lang a[aria-current="true"] {
  color: var(--text);
  font-weight: 700;
}

.site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 16px;
  margin: 0;
}

.site-footer-mail {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-footer-note {
  margin: 0;
  max-width: var(--measure);
}

/* 출처 안내(license) 틀의 본문 */
main[data-layout="license"] h2 {
  margin: 32px 0 12px;
}

main[data-layout="license"] p {
  margin: 14px 0;
}

main[data-layout="license"] ul {
  padding-left: 22px;
  list-style: revert;
}

main[data-layout="license"] li {
  margin: 10px 0;
}

main[data-layout="license"] a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

main[data-layout="license"] img {
  width: 96px;
  height: auto;
  margin-top: 16px;
}

@media (max-width: 760px) {
  .site-footer-row {
    justify-content: space-between;
    gap: 8px 18px;
    font-size: 13px;
  }

  .site-footer-nav,
  .site-footer-lang {
    width: 100%;
    gap: 0 18px;
  }
}
