/* 값은 docs/design_tokens.json (북벗 디자인 시스템 v1.1) 을 그대로 옮긴 것이다. */
:root {
  --primary: #3C6C51;
  --primary-tint: #DFE8D9;
  --cream: #FBF6EF;
  --paper: #FEFBF6;
  --beige: #EADCCB;
  --beige-tint: #F2ECE3;
  --sage-tint: #ECECE0;
  --gray: #6F6F75;
  --charcoal: #1F1F1F;
  --shadow-soft: 0 1px 2px #3B2A1A0D, 0 4px 14px #3B2A1A12;
  --shadow-raised: 0 4px 18px #3B2A1A1A;
  --page: 1040px;
  --bar: 64px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 4px;
}

.bar,
main,
.bottom {
  max-width: var(--page);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--paper);
  font-size: 14px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* 헤더 */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #FBF6EFE6;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.bar {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--bar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.sections {
  display: flex;
  gap: 4px;
  margin-left: auto;
  font-size: 15px;
}

.sections a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--gray);
  text-decoration: none;
}

.sections a:hover {
  background: var(--beige-tint);
  color: var(--charcoal);
}

/* 언어 버튼 — 미선택 칩(beigeTint) 모양 */
.lang {
  position: relative;
}

.lang summary {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--beige-tint);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.lang .menu {
  position: absolute;
  right: 0;
  top: 44px;
  min-width: 140px;
  padding: 8px;
  border: 1px solid var(--beige);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-raised);
}

.lang .menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
}

.lang .menu a:hover {
  background: var(--beige-tint);
}

.lang .menu a[aria-current] {
  color: var(--primary);
  font-weight: 700;
}

/* 본문 공통 */
.hero,
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero {
  padding: 48px 0 96px;
}

.feature {
  padding: 96px 0;
  scroll-margin-top: calc(var(--bar) - 32px);
}

.feature:nth-of-type(odd) .copy {
  order: 2;
}

h1,
h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(34px, 4.6vw, 50px);
  line-height: 1.25;
}

h2 {
  font-size: clamp(28px, 3.6vw, 36px);
  line-height: 1.3;
}

.copy p {
  margin-top: 16px;
  max-width: 24em;
  color: var(--gray);
  text-wrap: pretty;
}

.hero .copy p {
  font-size: 19px;
}

/* 히어로 요점 */
.points {
  display: grid;
  gap: 16px;
  margin-top: 32px;
  padding: 0;
  list-style: none;
}

.points li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.points svg {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 999px;
  background: var(--primary-tint);
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.points strong,
.points span {
  display: block;
  line-height: 1.45;
}

.points strong {
  font-size: 16px;
  font-weight: 700;
}

.points span {
  color: var(--gray);
  font-size: 15px;
}

/* Google Play 공식 배지 */
.play {
  display: inline-block;
  margin-top: 36px;
  border-radius: 8px;
  transition: transform 0.15s ease;
}

.play:hover {
  transform: translateY(-1px);
}

.play img {
  width: auto;
  height: 56px;
}

/* 화면 캡처 */
.shots {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.shot {
  height: auto;
  width: min(300px, 100%);
  border: 1px solid var(--beige);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.pair .shot {
  width: min(232px, calc(50% - 10px));
  border-radius: 16px;
}

.pair .shot:last-child {
  margin-top: 56px;
}

/* 마무리 */
.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 48px 0 96px;
  padding: 56px 24px 64px;
  border-radius: 24px;
  background: var(--sage-tint);
  text-align: center;
}

.buddies {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(4px, 1.6vw, 20px);
  margin-bottom: 32px;
}

.buddies img {
  width: clamp(40px, 11vw, 104px);
}

.closing p {
  margin-top: 12px;
  color: var(--gray);
  font-size: 18px;
}

.closing .play {
  margin-top: 28px;
}

/* 푸터 */
.bottom {
  padding-top: 8px;
  padding-bottom: 48px;
  color: var(--gray);
  font-size: 14px;
  text-align: center;
}

.bottom nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-bottom: 12px;
}

.bottom a {
  text-decoration: none;
}

.bottom a:hover {
  color: var(--charcoal);
}

@media (max-width: 760px) {
  :root {
    --bar: 104px;
  }

  .bar,
  main,
  .bottom {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* 좁은 화면: 섹션 버튼을 둘째 줄로 내리고 가로로 넘긴다. */
  .bar {
    flex-wrap: wrap;
    gap: 0 16px;
    height: auto;
    padding-top: 10px;
  }

  .lang {
    margin-left: auto;
  }

  .sections {
    order: 3;
    width: calc(100% + 40px);
    margin: 6px -20px 0;
    padding: 0 12px 8px;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .sections::-webkit-scrollbar {
    display: none;
  }

  .hero,
  .feature {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero {
    gap: 0;
    padding: 28px 0 64px;
  }

  /* 좁은 화면: 제목 → 소개 → 배지 → 화면 → 요점 순으로 보여 준다. */
  .hero .copy {
    display: contents;
  }

  .hero .play {
    order: 1;
    justify-self: start;
    margin-top: 24px;
  }

  .hero .shots {
    order: 2;
    margin-top: 36px;
  }

  .hero .points {
    order: 3;
    margin-top: 40px;
  }

  .feature {
    padding: 56px 0;
    scroll-margin-top: calc(var(--bar) - 16px);
  }

  .feature:nth-of-type(odd) .copy {
    order: 0;
  }

  .shot {
    width: min(280px, 78%);
  }

  .pair .shot:last-child {
    margin-top: 40px;
  }

  .closing {
    margin: 24px 0 64px;
    padding: 40px 20px 48px;
  }
}

/* 일본어는 keep-all 이면 문장 중간에서 줄이 안 바뀐다. */
:lang(ja) body {
  word-break: normal;
  line-break: strict;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .play {
    transition: none;
  }
}
