/* 머니퍼피 홈페이지 — 앱 디자인 토큰(lib/core/theme/mm_theme.dart)과 같은 값 */
:root {
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --ink: #111111;
  --ink-soft: #8E8E93;
  --line: #E5E5EA;
  --green: #34C759;
  --green-deep: #248A3D;
  --green-soft: #EAF9EE;
  --sky: #007AFF;
  --sky-soft: #E8F1FF;
  --pink: #FF2D55;
  --pink-soft: #FFE8EE;
  --coin: #FFCC00;
  --coin-deep: #FF9500;
  --purple: #7B61FF;
  --shadow: 0 6px 16px rgba(0, 0, 0, .08);
  --shadow-sm: 0 3px 8px rgba(0, 0, 0, .06);
  --r: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ── 리퀴드 글래스 메뉴 (앱 하단 탭과 같은 유리) ── */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(1080px, calc(100% - 28px)); z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.42));
  border: 1px solid rgba(255,255,255,.75);
  backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 20px; text-decoration: none; }
.logo img { width: 36px; height: 36px; border-radius: 10px; }
.nav .links { display: flex; gap: 4px; margin-left: auto; }
.nav .links a {
  text-decoration: none; font-weight: 700; font-size: 14px; color: #48484A;
  padding: 8px 14px; border-radius: 999px; transition: background .2s;
}
.nav .links a:hover { background: rgba(0,0,0,.05); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--ink); color: #fff; font-weight: 900; font-size: 16px;
  text-decoration: none; cursor: pointer; transition: transform .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn .soon { font-size: 11px; font-weight: 800; opacity: .7; }

/* ── 첫 화면 ── */
.hero { padding: 130px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 800; font-size: 13px; color: var(--green-deep);
}
.eyebrow img { width: 18px; }
h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.18; letter-spacing: -1.5px; margin: 16px 0 14px; font-weight: 900; }
h1 .hl { position: relative; white-space: nowrap; }
h1 .hl::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: 6px; height: 16px; z-index: -1;
  background: var(--coin); border-radius: 8px; opacity: .55;
}
.lead { font-size: 18px; line-height: 1.6; color: #48484A; margin: 0 0 26px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.store { min-width: 168px; }
.store svg { width: 20px; height: 20px; }

/* 앱 홈 화면을 아이폰 목업 안에 (폰 화면 크기 그대로). 안쪽 크기는 화면 폭 비율(cqw)이라 폰이 작아져도 같은 모양 */
.phone { display: flex; justify-content: center; }
.phone-frame {
  --pw: min(330px, 82vw);
  position: relative; width: var(--pw); aspect-ratio: 9 / 19.5; padding: calc(var(--pw) * .035);
  border-radius: calc(var(--pw) * .165); background: #1C1C1E;
  box-shadow: 0 0 0 2px #3A3A3C, 0 40px 80px rgba(120, 70, 0, .22), 0 12px 24px rgba(0, 0, 0, .18);
}
.phone-frame::before, .phone-frame::after { /* 옆 버튼 */
  content: ""; position: absolute; width: 4px; border-radius: 2px; background: #2C2C2E;
}
.phone-frame::before { left: -5px; top: 18%; height: 9%; box-shadow: 0 calc(var(--pw) * .2) 0 #2C2C2E; }
.phone-frame::after { right: -5px; top: 24%; height: 13%; }
.island {
  position: absolute; z-index: 9; left: 50%; transform: translateX(-50%);
  top: calc(var(--pw) * .06); width: calc(var(--pw) * .3); height: calc(var(--pw) * .088);
  border-radius: 999px; background: #000;
}
.screen {
  container-type: inline-size; position: relative; height: 100%; overflow: hidden;
  border-radius: calc(var(--pw) * .13); background: var(--bg);
  display: flex; flex-direction: column;
}
.statusbar {
  height: 13cqw; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 1.5cqw 8cqw 0 9cqw; font-size: 4.6cqw; letter-spacing: -.2px;
}
.statusbar .sb { display: flex; align-items: center; gap: 1.6cqw; }
.statusbar svg { height: 3.4cqw; width: auto; fill: currentColor; }
.apptop { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 1cqw 3.5cqw 2.5cqw; }
.wallet {
  display: flex; align-items: center; gap: 1.5cqw; padding: 1.2cqw 3.5cqw 1.2cqw 1.2cqw; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-sm); font-weight: 900; font-size: 4.6cqw;
}
.wallet img { width: 7cqw; }
.wallet.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.12); } }
.namechip {
  position: relative; overflow: hidden; padding: 1.6cqw 3.5cqw 2.2cqw; border-radius: 999px; background: #fff;
  box-shadow: var(--shadow-sm); font-weight: 900; font-size: 3.6cqw;
}
.namechip em { font-style: normal; color: var(--coin-deep); margin-left: 1cqw; }
.namechip i { position: absolute; left: 3.5cqw; right: 3.5cqw; bottom: 1cqw; height: .8cqw; border-radius: 9px; background: var(--line); }
.namechip i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 9px; background: var(--sky); }

.stage {
  position: relative; flex: 1; min-height: 0; margin: 0 3.5cqw; border-radius: 7cqw; overflow: hidden;
  background: linear-gradient(180deg, #FFFBF4 0%, #FFEFD9 100%);
}
.stage::before { /* 바닥 */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: linear-gradient(180deg, #F6E3C4, #EFD3A8);
}
.stage .dog { position: absolute; left: 58%; bottom: 3%; width: 78%; transform: translateX(-50%); }
.gauges { position: absolute; left: 3cqw; top: 50%; transform: translateY(-58%); display: flex; flex-direction: column; gap: 2cqw; z-index: 3; }
.gauge {
  width: 8.5cqw; height: 24cqw; border-radius: 999px; background: rgba(255,255,255,.85); box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
}
.gauge i { position: absolute; left: 1.3cqw; right: 1.3cqw; bottom: 1.3cqw; border-radius: 999px; }
.gauge.heart i { height: 72%; background: linear-gradient(#FF8FB0, #FF4F7E); animation: fillh 6s infinite; }
.gauge.bolt i { height: 54%; background: linear-gradient(#FFE07A, #FFB800); }
.gauge span { position: relative; z-index: 1; margin-bottom: 1.4cqw; font-size: 3.4cqw; }
@keyframes fillh { 50% { height: 92%; } }
.bubble {
  position: absolute; left: 58%; top: 5%; transform: translateX(-50%); z-index: 4; width: max-content;
  max-width: 70%; padding: 2.4cqw 3.6cqw; border-radius: 4.5cqw; background: #fff; box-shadow: var(--shadow);
  font-weight: 800; font-size: 3.6cqw; text-align: center; line-height: 1.4; transition: opacity .25s;
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -1.6cqw; width: 3.4cqw; height: 3.4cqw; background: #fff;
  transform: translateX(-50%) rotate(45deg); border-radius: 2px;
}
.bubble.fade { opacity: 0; }
.floatcoin { position: absolute; width: 9cqw; z-index: 2; animation: bob 2.4s ease-in-out infinite; }
.floatcoin.c1 { right: 6%; top: 30%; }
.floatcoin.c2 { right: 15%; top: 42%; width: 7cqw; animation-delay: -.8s; }
.floatheart { position: absolute; left: 24%; top: 34%; width: 8cqw; animation: bob 2.8s ease-in-out infinite; z-index: 2; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-6deg); } }
.flying { position: fixed; width: 26px; z-index: 60; pointer-events: none; transition: transform .8s cubic-bezier(.3,.7,.2,1), opacity .8s; }

.care {
  flex: none; display: flex; justify-content: space-around; margin: 2.5cqw 3.5cqw 0; padding: 2.4cqw 1cqw 1.8cqw;
  border-radius: 5.5cqw; background: #fff; box-shadow: var(--shadow-sm);
}
.care b { display: flex; flex-direction: column; align-items: center; gap: .6cqw; cursor: pointer; font-weight: 800; }
.care b i {
  width: 10.5cqw; height: 10.5cqw; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-size: 5cqw; font-style: normal; box-shadow: 0 2px 6px rgba(0,0,0,.09); transition: transform .15s;
}
.care b small { font-size: 2.7cqw; }
.care b:hover i { transform: translateY(-3px); }
.care b:active i { transform: translateY(1px); }

.missions { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2cqw; margin: 2.5cqw 3.5cqw 0; }
.missions div {
  display: flex; flex-direction: column; align-items: center; gap: 1cqw; padding: 2.4cqw 0 2cqw;
  border-radius: 4.5cqw; background: #fff; box-shadow: var(--shadow-sm); font-weight: 800; font-size: 2.9cqw;
}
.missions img { width: 8.5cqw; height: 8.5cqw; object-fit: contain; }
.tabbar {
  flex: none; display: flex; justify-content: space-around; margin-top: 2.5cqw; padding: 2cqw 2cqw 8cqw;
  background: rgba(255,255,255,.92); border-top: 1px solid var(--line);
}
.tabbar span { display: flex; flex-direction: column; align-items: center; gap: .6cqw; font-size: 2.6cqw; font-weight: 800; color: var(--ink-soft); }
.tabbar span.on { color: var(--ink); }
.tabbar svg { width: 6cqw; height: 6cqw; fill: currentColor; }
.homebar { position: absolute; left: 50%; bottom: 2.2cqw; transform: translateX(-50%); width: 34cqw; height: 1.4cqw; border-radius: 9px; background: #111; }

/* ── 행렬 ── */
.parade { position: relative; height: 120px; overflow: hidden; margin: 10px 0 30px; }
.parade img { position: absolute; bottom: 0; width: 140px; animation: walk 26s linear infinite; }
@keyframes walk { from { transform: translateX(calc(100vw + 40px)); } to { transform: translateX(-200px); } }

/* ── 섹션 ── */
section { padding: 70px 0; }
.title { text-align: center; margin-bottom: 40px; }
.title h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -1px; margin: 10px 0 8px; font-weight: 900; }
.title p { color: var(--ink-soft); font-size: 17px; margin: 0; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 24px;
  position: relative; overflow: hidden;
}
.card h3 { font-size: 21px; margin: 14px 0 6px; font-weight: 900; letter-spacing: -.3px; }
.card p { color: #48484A; line-height: 1.6; margin: 0; font-size: 15px; }
.card .art { height: 190px; border-radius: 22px; display: grid; place-items: center; position: relative; overflow: hidden; }
.card .art img.d { height: 190px; }
.art.cream { background: linear-gradient(180deg, #FFFBF4, #FFEFD9); }
.art.mint { background: linear-gradient(180deg, #F2FBF4, var(--green-soft)); }
.art.sky { background: linear-gradient(180deg, #F4F8FF, var(--sky-soft)); }
.art.pink { background: linear-gradient(180deg, #FFF6F8, var(--pink-soft)); }
.art.violet { background: linear-gradient(180deg, #F7F4FF, #EDE8FF); }
.art.gold { background: linear-gradient(180deg, #FFFBEA, #FFF1C2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 900; background: var(--green-soft); color: var(--green-deep);
}
.chip.purple { background: #EFEBFF; color: var(--purple); }
.chip.gold { background: #FFF4D6; color: #B26A00; }
.wide { grid-column: span 2; }

/* 터치 적립 미니 판 */
.tiles { display: grid; grid-template-columns: repeat(3, 54px); gap: 8px; }
.tiles span {
  width: 54px; height: 54px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm);
  display: grid; place-items: center; font-weight: 900; font-size: 12px; transform: scale(.98);
}
.tiles span.on { animation: pop 1.6s ease-in-out infinite; }
.tiles span.good { background: #FFF4D6; }
.tiles span.bad { background: #FFE5E3; color: #FF3B30; }
.tiles span img { width: 34px; }
@keyframes pop { 0%, 100% { transform: scale(.85); } 40% { transform: scale(1.05); } }

/* 팀 랭킹 미니 */
.rank { width: 86%; display: flex; flex-direction: column; gap: 8px; }
.rank div {
  display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 8px 12px;
  box-shadow: var(--shadow-sm); font-weight: 800; font-size: 14px;
}
.rank i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; }
.rank em { margin-left: auto; font-style: normal; color: var(--green-deep); font-weight: 900; }

/* 상점 미니 */
.shop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 88%; }
.shop div { background: #fff; border-radius: 14px; padding: 8px; box-shadow: var(--shadow-sm); text-align: center; font-size: 11px; font-weight: 800; }
.shop div b { display: block; height: 42px; border-radius: 10px; margin-bottom: 6px; font-size: 24px; line-height: 42px; }

/* 품종 갤러리 */
.breeds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.breed { background: #fff; border-radius: 24px; box-shadow: var(--shadow-sm); padding: 10px 10px 16px; text-align: center; font-weight: 900; }
.breed img { width: 100%; aspect-ratio: 1; }

/* 숫자 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat { background: #fff; border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); text-align: center; }
.stat b { display: block; font-size: 34px; font-weight: 900; letter-spacing: -1px; }
.stat span { color: var(--ink-soft); font-weight: 700; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: #fff; border-radius: 22px; box-shadow: var(--shadow-sm); padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 900; font-size: 17px; list-style: none; display: flex; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--ink-soft); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: #48484A; line-height: 1.7; margin: 12px 0 2px; }

/* 마지막 권유 */
.final {
  text-align: center; border-radius: 36px; padding: 50px 24px 0; overflow: hidden; position: relative;
  background: radial-gradient(circle at 50% 30%, #FFF1A8 0%, #FFD94A 45%, #FFB21E 100%);
}
.final h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 900; letter-spacing: -1px; margin: 0 0 10px; }
.final p { margin: 0 0 24px; font-weight: 700; color: #6B4A00; }
.final .dogs { display: flex; justify-content: center; margin-top: 26px; }
.final .dogs img { width: 170px; margin: 0 -18px; }

/* 꼬리말 */
footer { padding: 50px 0 60px; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
footer .row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 14px; }
footer .row a { font-weight: 800; color: #48484A; text-decoration: none; }
footer .co b { color: #48484A; }

/* 나타나기 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

/* ── 문서(약관·개인정보) ── */
.doc { max-width: 820px; margin: 0 auto; padding: 120px 20px 60px; }
.doc .paper { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 36px clamp(20px, 5vw, 48px); }
.doc h1 { font-size: 32px; margin: 0 0 6px; letter-spacing: -.8px; }
.doc .meta { color: var(--ink-soft); font-weight: 700; margin-bottom: 26px; }
.doc h2 { font-size: 19px; margin: 32px 0 10px; font-weight: 900; }
.doc h3 { font-size: 16px; margin: 20px 0 6px; font-weight: 900; }
.doc p, .doc li { line-height: 1.8; color: #333; font-size: 15px; }
.doc ol, .doc ul { padding-left: 20px; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; line-height: 1.6; }
.doc th { background: #F7F7FA; font-weight: 900; }
.doc .toc { background: var(--bg); border-radius: 18px; padding: 16px 20px; margin-bottom: 10px; }
.doc .toc a { text-decoration: none; display: inline-block; margin: 3px 12px 3px 0; font-weight: 700; font-size: 14px; color: #48484A; }
.doc .todo { background: #FFF4D6; border-radius: 6px; padding: 0 4px; font-weight: 800; }

/* ── 모바일 ── */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 110px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .breeds { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .nav .links a:not(.keep) { display: none; }
  .grid, .stats { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .parade img { width: 110px; }
  .final .dogs img { width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
