/* 데굴데굴 여행 랜딩(https://tossandturnlab.com/rolltrip/) — 폰 먼저, 960px부터 PC 두 단. */
:root {
  --felt: #c4c269; --felt2: #b3b755; --ink: #6b3f2a; --ink2: #8f6a55; --paper: #fffaf0; --cream: #f7eedd; --red: #c0392f;
  --font: "Jua", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6;
  /* 마당 그림(위쪽만 잘라 둠) 아래 끝을 펠트 색으로 흐려 이음매를 감춘다 */
  --bg-h: calc(100vw * 1100 / 1024);
  background:
    linear-gradient(rgba(196, 194, 105, 0) 70%, var(--felt)) center top / 100% var(--bg-h) no-repeat,
    url(../img/bg-home.webp) center top / 100% auto no-repeat,
    var(--felt);
  overflow-x: hidden;
}
/* 위 펠트 차양 */
body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30px; z-index: 2; pointer-events: none;
  background: url(../img/hud/bunting.webp) left top / auto 30px repeat-x;
}
img, video { display: block; max-width: 100%; height: auto; }
b { font-weight: 400; color: var(--red); }
a { color: inherit; }
.kkuk { color: var(--red); }

/* ── 첫 화면 ── */
.hero {
  position: relative; max-width: 1120px; margin: 0 auto;
  padding: max(40px, calc(env(safe-area-inset-top) + 34px)) 16px 8px;
  display: grid; gap: 28px; justify-items: center; text-align: center;
}
.hero-text { display: grid; justify-items: center; gap: 12px; }
.logo { margin: 0; }
.logo img { width: min(82vw, 340px); filter: drop-shadow(0 6px 8px rgba(70, 40, 20, .25)); }
.lead {
  margin: 0; padding: 10px 18px; font-size: 19px; line-height: 1.5;
  background: rgba(255, 250, 240, .9); border-radius: 18px; box-shadow: 0 3px 0 rgba(107, 63, 42, .15);
}
.stores { display: grid; gap: 2px; justify-items: center; }
/* Apple 공식 배지(img/app-store-badge-ko.svg, Apple Marketing Tools 원본 그대로 — 색·비율 고치지 않음).
   규정: 화면 높이 40px 이상, 둘레 여백은 배지 높이의 1/4 이상(여기서는 padding으로 확보). */
.badge { --bh: 56px; display: block; padding: calc(var(--bh) / 4); line-height: 0; border-radius: 12px; }
.badge img { height: var(--bh); width: auto; max-width: none; }
.soon { margin: -6px 0 0; font-size: 15px; color: var(--ink); opacity: .75; }
.note { margin: -4px 0 0; font-size: 14px; color: var(--ink); opacity: .8; }

/* 영상(나무 액자 속 세로 화면) */
.hero-video { margin: 0; display: grid; justify-items: center; gap: 10px; }
.screen { position: relative; width: min(74vw, 300px); }
.screen video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: var(--cream); }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.play[hidden] { display: none; }
.hero-video figcaption {
  max-width: 340px; padding: 8px 14px; font-size: 16px; line-height: 1.5;
  background: rgba(255, 250, 240, .9); border-radius: 14px;
}

/* 큐브 친구 그림(docs/art/landing — Codex 펠트 장난감, tools/pic-cut 방식으로 투명) */
.fr-roll { position: relative; z-index: 2; width: min(86vw, 360px); margin: 6px 0 -26px; filter: drop-shadow(0 6px 6px rgba(70, 40, 20, .2)); }
.fr-lineup { display: block; width: min(94vw, 600px); margin: 0 auto -6px; filter: drop-shadow(0 5px 5px rgba(70, 40, 20, .18)); }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
section { margin: 44px 0 0; }
h2 { font-weight: 400; }

/* ── 스크린샷 ── */
.shots { text-align: center; }
.shot-row {
  list-style: none; margin: 16px -16px 0; padding: 4px 16px 14px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(66vw, 260px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shot-row::-webkit-scrollbar { display: none; }
.shot-row li { scroll-snap-align: start; }
.shot-row img {
  width: 100%; border-radius: 18px; border: 5px solid var(--paper);
  box-shadow: 0 4px 0 rgba(107, 63, 42, .18), 0 10px 18px rgba(70, 40, 20, .14);
}
.tip { margin: 6px auto 0; max-width: 520px; padding: 8px 14px; font-size: 16px; background: rgba(255, 250, 240, .85); border-radius: 14px; }

/* ── 꾹 여권 이야기 ── */
.story { margin-top: 84px; position: relative; max-width: 720px; margin-left: auto; margin-right: auto; padding: 8px 6px 4px; }
.story h2 { margin: 4px 0 10px; font-size: 30px; line-height: 1.2; text-align: center; }
.eyebrow { display: block; font-size: 15px; color: var(--ink2); }
.story p { margin: 0 0 12px; font-size: 17px; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
/* 여권 그림(쪽 위로 살짝 튀어나오게) */
.fr-passport { display: block; width: min(70vw, 280px); margin: -64px auto 4px; filter: drop-shadow(0 6px 6px rgba(70, 40, 20, .18)); }

/* ── 아래 ── */
.fr-bye { display: block; width: min(72vw, 300px); margin: -96px auto 0; filter: drop-shadow(0 6px 6px rgba(70, 40, 20, .2)); }
.bye-line { margin: 0 0 12px !important; font-size: 19px; opacity: 1 !important; }
.foot { margin: 120px 0 0; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); text-align: center; font-size: 15px; background: var(--felt2); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.foot a { color: var(--ink); text-underline-offset: 3px; }
.foot p { margin: 8px 0 0; opacity: .8; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 12px; }

/* 폰 넓은 쪽 */
@media (min-width: 600px) {
  .shot-row { grid-auto-columns: 240px; }
}

/* PC·가로 태블릿: 첫 화면 두 단(왼쪽 제목·버튼, 오른쪽 영상), 스크린샷 네 장 한 줄 */
@media (min-width: 960px) {
  body {
    --bg-h: calc(100vw * 740 / 1536);
    background:
      linear-gradient(rgba(196, 194, 105, 0) 65%, var(--felt)) center top / 100% var(--bg-h) no-repeat,
      url(../img/bg-home-wide.webp) center top / 100% auto no-repeat,
      var(--felt);
  }
  body::before { height: 36px; background-size: auto 36px; }
  .hero { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 40px; padding-top: 64px; }
  .logo img { width: 440px; }
  .lead { font-size: 22px; }
  .badge { --bh: 76px; }
  .screen { width: 300px; }
  .shot-row { margin: 18px 0 0; padding: 4px 0 14px; grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; }
  .story { padding: 14px 26px 8px; }
  .story h2 { font-size: 34px; }
  .hero-video { position: relative; }
  /* 영상 속 단추·글자를 가리지 않게 액자 왼쪽 테두리에만 살짝 걸침 */
  .fr-roll { position: absolute; width: 290px; left: calc(50% - 150px - 262px); bottom: 70px; margin: 0; }
  .fr-passport { float: right; width: 270px; margin: -74px -34px 8px 18px; }
  .story h2 { text-align: left; }
}

/* 낮은 가로 화면(7인치 1024×576 등): 첫 화면에 App Store 단추가 들어오게 줄인다 */
@media (min-width: 960px) and (max-height: 720px) {
  .hero { padding-top: 44px; gap: 32px; }
  .hero-text { gap: 8px; }
  .logo img { width: 300px; }
  .lead { font-size: 19px; padding: 6px 16px; }
  .badge { --bh: 60px; }
  .screen { width: 250px; }
  .fr-roll { width: 240px; left: calc(50% - 125px - 222px); bottom: 60px; }
}
