/* ══════════════════ Cozy Ledger 著陸頁 · 設計 token ══════════════════ */
:root {
  --ivory: #f9f9f9;
  --paper: #ffffff;
  --sage-deep: #3f5a44;
  --sage: #6b8e6b;
  --sage-soft: #dde8d4;
  --leaf: #a8c090;
  --gold: #c9a96a;
  --gold-soft: #f1e3c0;
  --gold-deep: #8a7340;
  --ink: #2a2d28;
  --ink-soft: #5c6058;
  --ink-mute: #9ba096;
  --line: #ece7db;

  --r-chip: 12px;
  --r-small: 18px;
  --r-card: 22px;
  --r-hero: 28px;
  --r-pill: 999px;

  --shadow-card: 0 6px 14px rgba(63, 90, 68, 0.12);
  --shadow-soft: 0 8px 24px rgba(63, 90, 68, 0.1), 0 2px 6px rgba(63, 90, 68, 0.05);
  --shadow-phone: 0 30px 60px rgba(63, 90, 68, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.05);

  --maxw: 1120px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Chiron GoRound TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ══════════════════ 按鈕 ══════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 26px;
  border-radius: var(--r-pill);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: linear-gradient(145deg, var(--sage), var(--sage-deep));
  color: var(--ivory);
  box-shadow: 0 8px 18px rgba(63, 90, 68, 0.28);
}
.btn--gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(201, 169, 106, 0.34);
}
.btn--ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn--pill {
  height: 42px;
  padding: 0 20px;
  font-size: 14px;
  background: linear-gradient(145deg, var(--sage), var(--sage-deep));
  color: var(--ivory);
  box-shadow: 0 6px 14px rgba(63, 90, 68, 0.24);
}

/* ══════════════════ 導覽列 ══════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 249, 249, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: 18px;
}
.nav__logo { display: block; width: 34px; height: 34px; }
.nav__links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
}
.nav__links a { transition: color 0.2s var(--ease); }
.nav__links a:hover { color: var(--sage-deep); }

/* ══════════════════ Hero ══════════════════ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px 40px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.badge {
  display: inline-block;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero__sub {
  margin-top: 20px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-soft);
  max-width: 30em;
}
.hero__cta {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero__note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-mute);
  font-weight: 600;
}

/* Hero 手機預覽 */
.hero__visual { position: relative; display: flex; justify-content: center; }
.hero__glow {
  position: absolute;
  inset: -10% -6% 0 -6%;
  z-index: -1;
  background: radial-gradient(60% 55% at 55% 40%, rgba(107, 142, 107, 0.28), transparent 70%);
  filter: blur(8px);
}
.phone {
  width: 300px;
  height: 624px;
  background: #1a1c19;
  border-radius: 46px;
  padding: 10px;
  box-shadow: var(--shadow-phone);
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--ivory);
  border-radius: 38px;
  overflow: hidden;
  padding: 14px 14px 0;
  display: flex;
  flex-direction: column;
}
.mock-status {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1px;
  padding: 2px 6px 10px;
}
.mock-status__dots { letter-spacing: -1px; color: var(--ink-mute); }

/* Hero — 對齊實際 app 首頁支出卡的比例/高度 */
.mock-hero {
  position: relative;
  flex: 0 0 auto;
  min-height: 166px;
  background: linear-gradient(150deg, var(--sage), var(--sage-deep));
  border-radius: var(--r-hero);
  padding: 20px 22px;
  color: var(--ivory);
  box-shadow: 0 12px 24px rgba(63, 90, 68, 0.28);
  overflow: hidden;
}
.mock-hero__label { font-size: 13px; opacity: 0.9; font-weight: 600; }
.mock-hero__amount {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -1px;
  margin-top: 8px;
  line-height: 1.05;
  padding-right: 70px;
}
.mock-hero__diff {
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}
.mock-mascot { position: absolute; right: 12px; bottom: 8px; }

/* 區塊標題 */
.mock-listhead {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 4px 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.mock-listhead__all { font-size: 12px; font-weight: 700; color: var(--sage); }

/* 帳務列表（可捲）*/
.mock-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 82px;
  scrollbar-width: none;
}
.mock-list::-webkit-scrollbar { display: none; }
.mock-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  background: var(--paper);
  border-radius: var(--r-small);
  padding: 11px 13px;
  box-shadow: 0 2px 6px rgba(63, 90, 68, 0.05);
  font-family: inherit;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.mock-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); }
.mock-emoji {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.mock-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mock-row__text b { font-size: 13.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row__text i { font-size: 11px; font-style: normal; color: var(--ink-mute); }
.mock-row__amt { font-size: 13.5px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.mock-empty { text-align: center; color: var(--ink-mute); font-size: 12.5px; padding: 26px 0; }

/* 底部 tab + 中央 + */
.mock-tab {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  height: 56px;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 14px;
  z-index: 4;
}
.mock-tab__ic { width: 22px; height: 22px; fill: none; stroke: var(--ink-mute); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mock-tab__ic.is-on { stroke: var(--sage-deep); }
.mock-tab__gap { width: 44px; flex-shrink: 0; }
.mock-add {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 27px;
  border: none;
  cursor: pointer;
  background: linear-gradient(145deg, var(--sage), var(--sage-deep));
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(63, 90, 68, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  z-index: 5;
  transition: transform 0.18s var(--ease);
}
.mock-add:hover { transform: translateX(-50%) translateY(-2px); }
.mock-add:active { transform: translateX(-50%) scale(0.94); }
.mock-add svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

/* 新增 / 編輯 sheet */
.mock-scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 28, 25, 0.32);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
  z-index: 8;
}
.mock-scrim.is-open { opacity: 1; visibility: visible; }
.mock-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--paper);
  border-radius: 26px 26px 38px 38px;
  padding: 10px 20px 22px;
  box-shadow: 0 -12px 30px rgba(26, 28, 25, 0.18);
  transform: translateY(106%);
  transition: transform 0.3s var(--ease);
  z-index: 9;
}
.mock-sheet.is-open { transform: translateY(0); }
.mock-sheet__handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
.mock-sheet__title { font-size: 15px; font-weight: 800; text-align: center; margin-bottom: 14px; color: var(--ink); }
.mock-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
}
.mock-amount span { font-size: 17px; font-weight: 800; color: var(--ink-soft); }
.mock-amount input {
  width: 128px;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 30px;
  font-weight: 900;
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.5px;
}
.mock-amount input::placeholder { color: var(--line); }
.mock-amount.shake { animation: mock-shake 0.35s var(--ease); }
@keyframes mock-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.mock-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--line);
  border-radius: var(--r-chip);
  background: var(--ivory);
  padding: 11px 13px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  margin-bottom: 12px;
  transition: border-color 0.2s var(--ease);
}
.mock-input:focus { border-color: var(--sage); }
.mock-cats { display: flex; gap: 7px; justify-content: space-between; margin-bottom: 16px; }
.mock-cat {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease);
}
.mock-cat:hover { transform: translateY(-2px); }
.mock-cat.is-sel { border-color: var(--sage-deep); }
.mock-sheet__actions { display: flex; gap: 10px; }
.mock-save {
  flex: 1;
  height: 46px;
  border: none;
  border-radius: 23px;
  cursor: pointer;
  background: linear-gradient(145deg, var(--sage), var(--sage-deep));
  color: var(--ivory);
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 6px 14px rgba(63, 90, 68, 0.24);
  transition: transform 0.18s var(--ease);
}
.mock-save:hover { transform: translateY(-2px); }
.mock-del {
  height: 46px;
  padding: 0 18px;
  border: 1.5px solid #e4c4c4;
  border-radius: 23px;
  cursor: pointer;
  background: var(--paper);
  color: #c0574f;
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  transition: background 0.18s var(--ease);
}
.mock-del:hover { background: #fbedec; }

/* ══════════════════ 通用 section ══════════════════ */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 68px 24px;
}
.section--tint {
  max-width: none;
  background: linear-gradient(180deg, rgba(221, 232, 212, 0.35), rgba(221, 232, 212, 0.15));
}
.section--tint > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { text-align: center; max-width: 34em; margin: 0 auto 42px; }
.eyebrow {
  display: inline-block;
  color: var(--gold-deep);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.section__head h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 900; }
.section__head p { margin-top: 14px; color: var(--ink-soft); font-size: 17px; }

/* ══════════════════ Grid + 卡片 ══════════════════ */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.card__icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--sage-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--sage-deep);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 15px; }

/* 適合誰 */
.use {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease);
}
.use:hover { transform: translateY(-4px); }
.use__icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--sage-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.use__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--sage-deep);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.use h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.use p { color: var(--ink-soft); font-size: 14px; }

/* 三步驟 */
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
  color: var(--gold-deep);
  font-weight: 900;
  font-size: 19px;
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* ══════════════════ FAQ ══════════════════ */
.faq { max-width: 720px; margin: 0 auto; }
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-small);
  padding: 4px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 16px;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--sage);
  font-weight: 700;
  font-size: 22px;
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); font-size: 15px; padding: 0 0 18px; }

/* ══════════════════ 最終 CTA ══════════════════ */
.cta-band {
  max-width: var(--maxw);
  margin: 40px auto 72px;
  padding: 56px 24px;
  text-align: center;
  background: linear-gradient(150deg, var(--sage), var(--sage-deep));
  border-radius: var(--r-hero);
  color: var(--ivory);
  box-shadow: var(--shadow-soft);
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 900; }
.cta-band p { margin: 14px 0 26px; opacity: 0.9; font-size: 17px; }

/* ══════════════════ Footer ══════════════════ */
.footer {
  border-top: 1px solid var(--line);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.footer__brand { display: flex; flex-direction: column; gap: 2px; }
.footer__brand strong { font-size: 17px; font-weight: 900; }
.footer__brand span { color: var(--ink-mute); font-size: 14px; }
.footer__links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer__links a:hover { color: var(--sage-deep); }
.footer__copy { width: 100%; color: var(--ink-mute); font-size: 13px; padding-top: 8px; }

/* ══════════════════ 捲動淡入 ══════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.grid .reveal:nth-child(4) { transition-delay: 0.18s; }

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

/* ══════════════════ 響應式 ══════════════════ */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
    text-align: center;
  }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__cta { justify-content: center; }
  .hero__visual { order: -1; margin-bottom: 16px; }
  .nav__links { display: none; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  /* 手機版 CTA 綠帶滿版、去圓角 */
  .cta-band { border-radius: 0; margin-left: 0; margin-right: 0; }
}

@media (max-width: 560px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .btn { width: 100%; }
  .hero__cta { flex-direction: column; }
  .footer__links { margin-left: 0; }
}
