:root {
  --bg: #F2F0E2;
  --surface: #FDFCF6;
  --text: #241208;
  --muted: #645C42;
  --accent: #F58B0F;
  --accent-ink: #C55907;
  --tint: #FEECDA;
  --gold: #F7B25A;
  --blue: #1D4ED8;
  --blue-tint: #E3EAFB;
  --red: #C8102E;
  --red-tint: #FBE1E1;
  --dark: #241208;
  --dark-muted: #D8CFC4;
  --gutter: 24px;
  /* 두 스토어 배지는 같은 높이다. Apple 화면 최소 40px, Google 은 App Store 배지보다 작으면 안 된다.
     Google 한국어 배지의 한글 획이 높이의 1% 안팎이라 48px 에서는 흰 글씨가 회색으로 번진다. */
  --badge-h: 56px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
figure { margin: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.accent { color: var(--accent); }

/* 머리 */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 20px; font-weight: 700; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.site-nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.site-nav .nav-cta { background: var(--accent); color: #FFF8F0; padding: 12px 20px; border-radius: 999px; }
.site-nav .nav-cta:hover { color: #FFF8F0; background: var(--accent-ink); }

/* 첫 화면 */
.hero { position: relative; overflow: hidden; }
.hero-blob { position: absolute; right: -120px; top: 20px; width: 860px; height: 760px; }
/* 배지를 글과 떼어 둔다. 데스크톱은 글 아래, 모바일은 그림 아래에 놓기 위해서다. 위아래 빈 줄(1fr)이 왼쪽 묶음을 그림 높이의 가운데로 민다. */
.hero-grid {
  position: relative; display: grid; column-gap: 48px; padding-top: 56px; padding-bottom: 96px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas: ". media" "copy media" "badges media" ". media";
}
.hero-copy { grid-area: copy; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-badges { grid-area: badges; padding-top: 32px; }
.pill { align-self: flex-start; background: var(--tint); color: var(--accent-ink); font-size: 14px; font-weight: 700; padding: 8px 14px; border-radius: 999px; }
.hero h1 { font-size: 56px; line-height: 1.22; font-weight: 800; letter-spacing: -0.02em; }
.lead { font-size: 18px; line-height: 1.7; color: var(--muted); max-width: 500px; }
.hero-media { grid-area: media; min-width: 0; align-self: center; }
.hero-collage { width: 100%; max-width: 640px; margin: 0 auto; }

/* 스토어 배지. 공식 그림을 그대로 쓰고 둘레에 배지 높이의 1/4 이상을 비운다. */
.badges { display: flex; flex-wrap: wrap; gap: calc(var(--badge-h) / 3); padding-top: 8px; }
.badge { display: block; line-height: 0; }
.badge img { height: var(--badge-h); width: auto; }
.badge-apple-white { display: none; }
.platform-ios .badge-apple-black { display: none; }
.platform-ios .badge-apple-white { display: block; }
.platform-ios .badge-google { display: none; }
.platform-android .badge-apple { display: none; }

/* 폰 틀 없이 둥근 화면과 그림자만 둔다. 콜라주 그림을 만든 Figma `화면` 컴포넌트와 같은 비율(모서리 폭의 12%, 그림자 둘)이라
   콜라주 속 화면과 폰 줄의 화면이 같은 모양으로 보인다. */
.phone {
  --w: var(--w-d, 220px);
  flex: 0 0 auto;
  width: var(--w);
  border-radius: calc(var(--w) * 0.12);
  box-shadow: 0 calc(var(--w) * 0.012) calc(var(--w) * 0.03) rgba(36, 18, 8, .13), 0 calc(var(--w) * 0.05) calc(var(--w) * 0.11) rgba(36, 18, 8, .208);
}
.phone img { width: 100%; border-radius: calc(var(--w) * 0.12); }

/* 구역 */
.band { position: relative; overflow: hidden; padding: 120px 0; }
.band-surface { background: var(--surface); }
.band-dark { background: var(--dark); color: var(--surface); }
.stack { display: flex; flex-direction: column; gap: 48px; }
.section-head { display: flex; flex-direction: column; gap: 16px; }
.section-head.center { align-items: center; text-align: center; }
.section-head.center p { max-width: 660px; }
.section-head h2, .feature-copy h2 { font-size: 44px; line-height: 1.3; font-weight: 800; letter-spacing: -0.02em; }
.section-head p, .feature-copy p { font-size: 17px; line-height: 1.75; color: var(--muted); }
.eyebrow { font-size: 15px; font-weight: 800; color: var(--accent); }
.eyebrow-gold { color: var(--gold); }
.eyebrow-blue { color: var(--blue); }
.eyebrow-red { color: var(--red); }
.band-dark .feature-copy p { color: var(--dark-muted); }

/* 핵심 기능 카드 */
/* 한 줄에 둘. 넷이면 카드가 좁아져 제목이 두 줄로 꺾인다. */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--bg); border-radius: 24px; padding: 28px; display: flex; gap: 18px; align-items: flex-start; }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.card p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.card-icon { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px; background: var(--tint); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.card-icon svg, .arrow svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-icon-blue { background: var(--blue-tint); color: var(--blue); }
.card-icon-red { background: var(--red-tint); color: var(--red); }

/* 자동 기록 단계 */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.step { flex: 1 1 300px; min-width: 0; background: var(--surface); border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.step h3 { font-size: 21px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 15px; line-height: 1.65; color: var(--muted); }
.step-num { width: 40px; height: 40px; border-radius: 999px; background: var(--accent); color: #FFF8F0; font-size: 18px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* 글 + 폰 줄 */
.feature-row { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.feature-row-reverse { flex-wrap: wrap-reverse; }
.feature-copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.feature-media { flex: 1 1 640px; min-width: 0; position: relative; }
.feature-media.wide { flex: none; }
.blob { position: absolute; inset: 0; width: 100%; height: 100%; }
.feature-media.wide .blob { top: 40px; height: calc(100% - 40px); }
/* 화면 셋과 띄운 카드를 한 장에 담은 그림. 뒤에 깔린 .blob(absolute) 위에 오도록 position 을 준다. */
.collage { position: relative; width: 100%; }
/* 콜라주 구역은 글 칸을 넓힌다. 글 칸이 408px 이면 제목 `스타포스 · 큐브 비용까지` 가 한 줄에 안 들어가 세 줄이 된다. */
.feature-media-collage { flex-basis: 440px; }

/* 가로로 넘기는 폰 줄 */
.carousel { position: relative; }
.rail { display: flex; gap: 28px; align-items: flex-start; overflow-x: auto; padding: 12px 4px 40px; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
/* 한 줄에 다 들어가면 가운데에 모이고, 넘치면 처음부터 넘긴다. */
.rail > :first-child { margin-left: auto; }
.rail > :last-child { margin-right: auto; }
.lift-1 { margin-top: 56px; }
.lift-2 { margin-top: 112px; }
.lift-h { margin-top: 48px; }

.arrow {
  position: absolute; top: calc(50% - 46px); z-index: 2;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 999px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 10px 24px -8px rgba(36, 18, 8, .4);
  display: none; align-items: center; justify-content: center; cursor: pointer;
}
.arrow svg { width: 22px; height: 22px; stroke-width: 2.2; }
.arrow-prev { left: -10px; }
.arrow-next { right: -10px; }
.arrow:disabled { opacity: .35; cursor: default; }
.carousel.is-scrollable .arrow { display: flex; }

/* 테마 */
.phone-theme { --w: 160px; }

/* 다운로드 */
.cta-band { padding: 0 var(--gutter) 120px; }
.cta { position: relative; overflow: hidden; max-width: 1152px; margin: 0 auto; background: var(--accent); border-radius: 40px; padding: 72px 40px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.cta-blob { position: absolute; }
.cta-blob-a { left: -80px; bottom: -140px; width: 360px; height: 360px; }
.cta-blob-b { right: -60px; top: -120px; width: 300px; height: 300px; }
.cta-icon { position: relative; width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 16px 32px -12px rgba(36, 18, 8, .4); }
.cta h2 { position: relative; font-size: 44px; line-height: 1.3; font-weight: 800; letter-spacing: -0.02em; }
.cta p { position: relative; font-size: 17px; color: #3B2410; }
.cta .badges { position: relative; justify-content: center; }

/* 바닥 */
.site-footer { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: flex-start; padding-bottom: 64px; font-size: 13px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-brand img { width: 28px; height: 28px; border-radius: 8px; }
.footer-brand strong { color: var(--text); font-size: 14px; }
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-legal { display: flex; flex-direction: column; gap: 4px; max-width: 640px; line-height: 1.6; }

/* 모바일 */
@media (max-width: 860px) {
  :root { --gutter: 20px; --badge-h: 52px; }
  .site-nav a:not(.nav-cta) { display: none; }
  .site-header { padding-top: 16px; padding-bottom: 16px; }
  .brand { font-size: 18px; }
  .brand img { width: 36px; height: 36px; }

  .hero-blob { right: -180px; top: 360px; width: 560px; height: 500px; }
  /* 모바일은 글 · 그림 · 배지 순서로 쌓는다. 배지가 그림 위에 있으면 그림이 첫 화면 밑으로 밀려 안 보인다. */
  .hero-grid {
    row-gap: 28px; padding-top: 24px; padding-bottom: 56px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "copy" "media" "badges";
  }
  .hero-copy { gap: 20px; }
  .hero h1 { font-size: 34px; line-height: 1.3; }
  .lead { font-size: 16px; }
  .hero-badges { padding-top: 0; }

  .band { padding: 56px 0 24px; }
  .stack { gap: 24px; }
  .section-head.center { align-items: flex-start; text-align: left; }
  .section-head h2, .feature-copy h2, .cta h2 { font-size: 26px; line-height: 1.35; }
  .section-head p, .feature-copy p { font-size: 15px; line-height: 1.7; }
  .eyebrow { font-size: 14px; }
  .feature-row, .feature-row-reverse { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 20px; }
  /* 세로로 쌓이면 flex-basis 360px 이 높이가 되어 글 아래가 빈다. */
  .feature-copy { flex: none; gap: 12px; }
  /* 데스크톱에서 폰을 왼쪽에 두는 줄도 모바일에서는 글이 먼저다. */
  .feature-row-reverse .feature-copy { order: -1; }
  .feature-media, .feature-media.wide { flex: none; }
  .blob { display: none; }

  .cards { grid-template-columns: 1fr; gap: 10px; }
  .card { border-radius: 20px; padding: 18px; gap: 14px; }
  .card h3 { font-size: 17px; }
  .card p { font-size: 14px; }
  .card-icon { width: 44px; height: 44px; border-radius: 14px; }
  .card-icon svg { width: 22px; height: 22px; }
  .step { padding: 20px; border-radius: 22px; flex-direction: row; gap: 14px; }
  .step h3 { font-size: 17px; }
  .step p { font-size: 14px; }
  .step-num { flex: 0 0 auto; width: 32px; height: 32px; font-size: 15px; }

  /* 화면 끝까지 넘기고, 다음 폰이 걸쳐 보여 넘길 수 있다는 것을 알린다. */
  .carousel { margin: 0 calc(var(--gutter) * -1); }
  .rail { gap: 14px; padding: 8px var(--gutter) 32px; scroll-padding: 0 var(--gutter); }
  .rail > :first-child { margin-left: 0; }
  .rail > :last-child { margin-right: 0; }
  .rail .phone { --w: 210px; margin-top: 0; }
  .rail .phone-theme { --w: 150px; }
  .arrow { width: 44px; height: 44px; top: calc(50% - 40px); box-shadow: 0 8px 20px -6px rgba(36, 18, 8, .45); }
  .arrow-prev { left: 8px; }
  .arrow-next { right: 8px; }

  .cta-band { padding: 48px var(--gutter) 56px; }
  .cta { border-radius: 32px; padding: 48px 24px; gap: 18px; }
  .cta-icon { width: 80px; height: 80px; border-radius: 22px; }
  .cta p { font-size: 15px; }
  .site-footer { flex-direction: column; padding-bottom: 48px; }
}
