/* 모아냥 소개 페이지 — 앱의 나무 보드 위에 종이 쪽지·폴라로이드·고양이를 붙인 모양.
   색은 폴라로이드 사진에만 쓴다(앱 원칙). 나무도 앱과 같은 탈색된 톤(--wood-a/b). */
@property --fill {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}
:root {
  --paper: #fdfcf8;
  --ink: #171512;
  --muted: #6f6a5e;
  --frame: #f1efec;
  --frame-line: rgba(40, 36, 32, 0.42);
  --wood-a: #cfc7b6;
  --wood-b: #c3baa7;
  --wood-line: rgba(80, 68, 50, 0.15);
  --tape: rgba(198, 193, 183, 0.72);
  --tape-line: rgba(52, 48, 42, 0.34);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Hiragino Sans', 'Malgun Gothic', sans-serif;
  line-height: 1.6;
}
:lang(ko) { word-break: keep-all; }
:lang(ja) { line-break: strict; }

/* ── 나무 보드 (앱 App.css .board와 같은 결) ── */
.board {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(180deg, rgba(94, 66, 38, 0.05) 0 1px, transparent 1px 6px, rgba(94, 66, 38, 0.028) 6px 7px, transparent 7px 15px),
    repeating-linear-gradient(180deg, transparent 0 92px, var(--wood-line) 92px 94px),
    linear-gradient(180deg, var(--wood-a), var(--wood-b));
  box-shadow: inset 0 -10px 22px rgba(78, 54, 30, 0.10);
}
.hero {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 88px 16px 32px;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: 'note' 'stage' 'cat';
  gap: 40px;
  align-items: start;
}
/* 머리말 — 본문과 같은 폭(1080px) 안에 둔다. 화면 끝 구석에 붙이면 넓은 화면에서 로고가 길을 잃는다 */
.top {
  position: absolute; top: 16px; left: 0; right: 0; z-index: 1; /* 뒤에 오는 .hero(relative)가 덮어 언어 링크가 안 눌렸다 */
  max-width: 1080px; margin: 0 auto; padding: 0 16px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 800; color: rgba(23, 21, 18, 0.72);
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 900; letter-spacing: -0.03em; color: var(--ink) !important; }
.logo img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 6px rgba(60, 50, 35, 0.25), 0 0 0 1px rgba(40, 36, 32, 0.15); }
.top nav { display: flex; gap: 12px; font-weight: 600; }
.top a { color: inherit; text-decoration: none; }
.top a[aria-current='page'] { font-weight: 800; color: var(--ink); }

/* 테이프 — 폴라로이드·쪽지 위에 비스듬히 붙는다 */
.tape {
  position: absolute; left: 50%; top: -11px;
  width: 96px; height: 22px;
  background: var(--tape);
  border: 1px solid var(--tape-line);
  transform: translateX(-50%) rotate(var(--tape-rot, -2deg));
}

/* ── 종이 쪽지: 제목 ── */
.note {
  grid-area: note;
  position: relative;
  background: var(--frame);
  border: 1px solid var(--frame-line);
  box-shadow: 0 4px 14px rgba(60, 50, 35, 0.2);
  padding: 32px 24px 26px;
  transform: rotate(-1deg);
  max-width: 480px;
}
.note h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 8.4vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.035em;
  font-weight: 900;
}
.note p { margin: 0 0 20px; font-size: 16px; color: var(--muted); font-weight: 600; }
.soon {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--ink); color: var(--paper);
  border-radius: 999px;
  font-size: 15px; font-weight: 800;
}
.soon small { font-weight: 600; opacity: 0.7; font-size: 13px; }

/* ── 폴라로이드 (앱 Polaroid.tsx와 같은 실측 비율: 위·옆 5.1% / 아래 26.7%) ── */
.pol {
  --w: min(68vw, 300px);
  position: relative;
  width: var(--w);
  padding: calc(var(--w) * 0.051) calc(var(--w) * 0.051) 0;
  background: var(--frame);
  border: 1px solid var(--frame-line);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: rotate(var(--rot, 3deg));
}
.pol .win {
  display: grid; grid-template: 100% / 100%;
  width: 100%; aspect-ratio: 1; overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(40, 36, 32, 0.48);
}
/* 앱의 fitScale과 같은 값 — 그림이 사진창을 채워야 물드는 경계가 그림 위를 지나간다(작으면 62%에서 이미 다 컬러로 보였다).
   이 텀블러 그림 기준 실측: 배율 1.407, 세로 이동 -0.26%. 그림을 바꾸면 다시 잴 것. */
.pol .win img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; transform: translate(0, -0.26%) scale(1.407); }
/* 위에 덮인 흑백 겹을 --fill만큼 아래에서부터 걷어낸다 — 앱과 같은 식 */
.pol .win .gray {
  filter: grayscale(1) brightness(1.32) contrast(0.72);
  --edge: linear-gradient(to top, transparent calc(var(--fill) * 118% - 18%), #000 calc(var(--fill) * 118%));
  -webkit-mask-image: var(--edge);
  mask-image: var(--edge);
}
.pol { transition: --fill 2200ms cubic-bezier(0.2, 0.7, 0.3, 1) 600ms; }
.pol.filled { --fill: 0.45; }
.pol .lab {
  height: calc(var(--w) * 0.267);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; color: #2c2924; line-height: 1.35;
}
/* 작은 폴라로이드(사용법 칸)에서도 읽히게 바닥을 둔다 — 비례값만 쓰면 9px까지 내려갔다 */
.pol .lab b { font-family: inherit; font-size: max(13px, calc(var(--w) * 0.06)); }
.pol .lab i { font-style: normal; font-size: max(12px, calc(var(--w) * 0.05)); color: var(--muted); font-family: -apple-system, 'Apple SD Gothic Neo', sans-serif; }

/* ── 고양이 + 말풍선 (앱 .cat-bubble과 같은 모양) ── */
.cat {
  grid-area: cat;
  position: relative;
  justify-self: end;
  display: flex; flex-direction: column; align-items: flex-end;
  margin-right: 4vw;
}
.bubble {
  position: relative;
  margin: 0 0 14px;
  padding: 10px 18px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 18px;
  font-size: 16px; font-weight: 800; line-height: 1.4;
  max-width: 260px;
}
.bubble::after {
  content: '';
  position: absolute; right: 64px; bottom: -8px;
  width: 13px; height: 13px;
  background: var(--paper);
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
}
.cat img { width: min(42vw, 190px); height: auto; display: block; margin-bottom: -6px; }

/* ── 넓은 화면: 쪽지 왼쪽, 폴라로이드 오른쪽, 고양이 아래 가운데 ── */
@media (min-width: 820px) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    grid-template-areas: 'note stage' 'cat stage';
    align-items: center;
    padding-top: 112px;
    gap: 24px 48px;
  }
  .note { padding: 44px 40px 36px; }
  .cat { justify-self: start; align-items: flex-start; margin: 0 0 0 40px; }
  .bubble::after { right: auto; left: 64px; }
  .cat img { width: 200px; }
}

/* ── 아래 칸들 공통: 보드 위 칸 제목 ── */
.section { max-width: 1080px; margin: 0 auto; padding: 72px 16px; }
.section-title {
  /* 칸 제목은 가운데에 — 내용 폭만큼만 차지하게 두고 좌우 auto로 가운데 맞춤 */
  display: block; width: fit-content; position: relative;
  margin: 0 auto 40px; padding: 14px 22px 12px;
  background: var(--paper); border: 1px solid var(--frame-line);
  box-shadow: 0 3px 10px rgba(60, 50, 35, 0.16);
  font-size: clamp(22px, 5.6vw, 30px); font-weight: 900; letter-spacing: -0.03em;
  transform: rotate(-1.2deg);
}

/* ── 고양이 꾸미기 ── */
/* 가운데 고양이 말풍선이 위로 솟으니, 칸 제목과 안 겹치게 위를 비워 둔다(폰에서 겹쳤다) */
.cats { padding-top: 76px; display: flex; justify-content: center; align-items: flex-end; gap: 4vw; flex-wrap: wrap; }
.cats figure { margin: 0; position: relative; }
.cats img { display: block; height: min(34vw, 210px); width: auto; }
.cats .bubble { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; margin-bottom: 10px; }
.cats .bubble::after { right: auto; left: calc(50% - 7px); }
.cats-mid { margin-top: 84px; }
.cats-caption { text-align: center; margin: 28px auto 0; max-width: 520px; font-weight: 700; color: rgba(23, 21, 18, 0.72); }

/* ── 자주 묻는 질문: 큰 종이 한 장 ── */
.sheet {
  position: relative; max-width: 760px; margin: 0 auto;
  background: var(--paper); border: 1px solid var(--frame-line);
  box-shadow: 0 6px 18px rgba(60, 50, 35, 0.18);
  padding: 40px 24px 32px;
}
.sheet h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -0.03em; }
.sheet h3 { margin: 26px 0 6px; font-size: 17px; }
.sheet p { margin: 0; color: #4a463e; }
.sheet .contact { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(40, 36, 32, 0.18); font-weight: 700; }
.sheet a { color: var(--ink); }
.foot { text-align: center; padding: 8px 16px 40px; font-size: 14px; color: rgba(23, 21, 18, 0.62); }
.foot a { color: inherit; }

@media (min-width: 820px) {
  .sheet { padding: 52px 56px 44px; }
}

/* ── 손글씨 메모 — 짧은 강조에만 쓴다(본문은 읽기 쉬운 글꼴) ── */
.hand {
  font-family: 'Nanum Pen Script', 'Caveat', cursive;
  font-size: 30px; line-height: 1.1; font-weight: 400;
  color: var(--ink); margin: 0;
}
:lang(ja) .hand { font-family: 'Yomogi', cursive; font-size: 22px; }
:lang(en) .hand { font-family: 'Caveat', cursive; font-weight: 600; font-size: 30px; }
.arrow { position: absolute; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ── 아이폰 틀에 넣은 앱 화면 — 보드에 테이프로 붙인 사진처럼 ── */
.phone {
  --pw: 230px;
  position: relative; margin: 0;
  width: var(--pw);
  padding: calc(var(--pw) * 0.035);
  background: #1d1b18;
  border-radius: calc(var(--pw) * 0.16);
  box-shadow: 0 14px 30px rgba(50, 38, 22, 0.32), inset 0 0 0 1.5px #4a4640;
  transform: rotate(var(--rot, 0deg));
}
.phone img { display: block; width: 100%; height: auto; border-radius: calc(var(--pw) * 0.125); }
.phone .tape { z-index: 1; top: -12px; }
/* 화면 일부만 오려 붙인 사진(보드 화면) */
.snap {
  position: relative; margin: 0; width: min(100%, 340px);
  padding: 10px 10px 34px; background: var(--paper);
  border: 1px solid var(--frame-line);
  box-shadow: 0 8px 20px rgba(50, 38, 22, 0.24);
  transform: rotate(var(--rot, 0deg));
}
.snap img { display: block; width: 100%; height: auto; border: 1px solid rgba(40, 36, 32, 0.2); }

/* ── 첫 화면 오른쪽: 앱 화면 + 물드는 폴라로이드 + 손글씨 ── */
.hero-stage { grid-area: stage; position: relative; justify-self: center; padding: 34px 0 20px 70px; }
.hero-stage .phone { --pw: 230px; }
.hero-pol { position: absolute; left: 0; bottom: -10px; --w: 150px; z-index: 2; }
.hero-hand { position: absolute; left: -6px; top: 0; transform: rotate(-6deg); }
.hero-arrow { left: 28px; top: 34px; width: 56px; height: 40px; transform: rotate(8deg); }

/* ── 쪽지 카드 (설명 글) ── */
.card {
  position: relative;
  background: var(--frame); border: 1px solid var(--frame-line);
  box-shadow: 0 4px 12px rgba(60, 50, 35, 0.18);
  padding: 30px 24px 24px;
  transform: rotate(var(--rot, 0deg));
  max-width: 440px;
}
.card h2, .card h3 { margin: 6px 0 8px; font-size: 22px; letter-spacing: -0.02em; line-height: 1.3; }
.card h2 { font-size: clamp(24px, 6vw, 30px); font-weight: 900; }
.card p { margin: 0; color: var(--muted); font-weight: 600; font-size: 15.5px; }
.card .hand { margin-top: 14px; color: var(--ink); transform: rotate(-2deg); transform-origin: left; }
/* .card p(15.5px)가 손글씨 크기를 덮어쓰지 않게 다시 잡는다 */
.card p.hand { font-size: 30px; font-weight: 400; }
:lang(ja) .card p.hand { font-size: 22px; }
:lang(en) .card p.hand { font-weight: 600; }
/* 동그란 번호 도장 */
.stamp {
  position: absolute; right: 18px; top: -18px;
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px dashed var(--ink); background: var(--paper);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 800; font-size: 15px;
  transform: rotate(-12deg);
}

/* ── 이렇게 써요: 앱 화면과 쪽지가 지그재그 ── */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 64px; }
.flow-row { display: flex; flex-direction: column; align-items: center; gap: 28px; }

/* 상점 화면 옆으로 튀어나온 꾸민 고양이 — 화면 속 상점에서 고른 베레모·목도리를 실제로 쓴 모습 */
.phone .flow-cat { /* .phone img(폭 100%)보다 우선해야 한다 */
  position: absolute; z-index: 2;
  width: 72%; height: auto; border-radius: 0 !important;
  left: -24%; bottom: 9%;
  transform: rotate(calc(var(--rot, 0deg) * -1 - 4deg));
  filter: drop-shadow(0 6px 10px rgba(50, 38, 22, 0.25));
}

/* ── 기록 탭 ── */
.feature { display: flex; flex-direction: column; align-items: center; gap: 32px; }

/* ── 공유: 스토리 화면 모양(세로 9:16) 위에 앱의 공유 그림 ── */
.share { display: flex; flex-direction: column; align-items: center; gap: 36px; }
.stories { display: flex; justify-content: center; gap: 4vw; }
.story {
  position: relative; margin: 0;
  width: min(40vw, 210px); aspect-ratio: 9 / 16;
  background: #fdfcf8; /* 앱이 스토리 배경으로 보내는 색(share.ts PAPER) */
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 12px 26px rgba(50, 38, 22, 0.3), inset 0 0 0 1px rgba(40, 36, 32, 0.12);
  transform: rotate(var(--rot, 0deg));
  display: grid; place-items: center;
}
.story-bar { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 4px; }
.story-bar i { flex: 1; height: 2px; border-radius: 2px; background: rgba(23, 21, 18, 0.18); }
.story-bar i:first-child { background: rgba(23, 21, 18, 0.7); }
.story-who { position: absolute; top: 18px; left: 10px; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; }
.story-who img { width: 22px; height: 22px; border-radius: 50%; }
.story-img { width: 76%; height: auto; display: block; }

/* ── 약속 세 가지: 핀으로 꽂은 메모지 ── */
.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; justify-items: center; }
.promises li {
  position: relative; width: min(100%, 300px);
  background: #f6f1e4; border: 1px solid rgba(80, 68, 50, 0.25);
  box-shadow: 0 6px 14px rgba(60, 50, 35, 0.2);
  padding: 26px 22px 22px;
  transform: rotate(var(--rot, 0deg));
  display: flex; flex-direction: column; gap: 6px;
}
.promises b { font-size: 19px; letter-spacing: -0.02em; }
.promises li > span:last-child { color: var(--muted); font-weight: 600; font-size: 15px; }
.pin {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8a8578, #2a2723);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}

/* 화면에 들어올 때 살짝 떠오른다(한 번만) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.in { opacity: 1; transform: none; }

@media (min-width: 820px) {
  .hero-stage { padding: 40px 0 30px 110px; }
  .hero-stage .phone { --pw: 280px; }
  .hero-pol { --w: 200px; bottom: -20px; }
  .hero-hand { top: 6px; left: 0; }
  .hero-arrow { left: 52px; top: 46px; width: 70px; height: 50px; }
  .flow { gap: 96px; }
  .flow-row { flex-direction: row; justify-content: center; gap: 72px; }
  .flow-row:nth-child(even) { flex-direction: row-reverse; }
  .flow .phone { --pw: 250px; }
  .feature { flex-direction: row; justify-content: center; gap: 72px; }
  .feature .phone { --pw: 270px; }
  .promises { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .share { flex-direction: row; justify-content: center; gap: 64px; }
  .stories { gap: 28px; }
  .story { width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .pol { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
