/* 哩厚經書 網站 — 淺色 / 深色模式皆依系統設定。顏色取自 App 的綠色標題列。 */

:root {
  --bg: #f6f7f2;
  --surface: #ffffff;
  --text: #1f251c;
  --muted: #5d6658;
  --line: #dde3d6;
  --accent: #2f7d36;
  --accent-soft: #e5f1e2;
  --hero-1: #1d3b1f;
  --hero-2: #3fb54b;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(25, 60, 25, 0.10);
  --kai: "BiauKai", "DFKai-SB", "標楷體", "Kaiti TC", "STKaiti", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e110d;
    --surface: #171c16;
    --text: #e9eee6;
    --muted: #a9b3a4;
    --line: #2b3429;
    --accent: #8fd68f;
    --accent-soft: #1f2d1f;
    --hero-1: #0c1a0d;
    --hero-2: #1f6b28;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.kai { font-family: var(--kai); font-weight: normal; letter-spacing: 0.04em; }
.muted { color: var(--muted); }

/* 導覽列 */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 22px; color: var(--text); text-decoration: none; }
.brand img { border-radius: 50%; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--accent); }

/* 主視覺 */
.hero {
  background: linear-gradient(140deg, var(--hero-1), var(--hero-2));
  color: #f4f8f2;
  padding: 72px 0 64px;
}
.hero h1 { font-size: clamp(40px, 7vw, 64px); margin: 0; line-height: 1.2; }
.tagline { font-size: 22px; margin: 6px 0 18px; opacity: 0.9; }
.lead { max-width: 40em; font-size: 18px; margin: 0 0 22px; }
.platforms { font-size: 14px; opacity: 0.85; margin: 14px 0 0; }
.app-hero .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.app-icon { width: 104px; height: 104px; border-radius: 50%; margin-bottom: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.picture img { border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); max-height: 520px; margin-left: auto; object-fit: cover; }
@media (max-width: 820px) {
  .app-hero .wrap { grid-template-columns: 1fr; }
  .picture img { margin: 0 auto; max-height: 420px; }
  .nav-links { gap: 14px; }
}

/* 按鈕 */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
}
.btn svg { width: 20px; height: 20px; }
.btn-store { background: #fff; color: #142014; border: 1px solid rgba(0, 0, 0, 0.08); }
.btn-store:hover { background: #eef6ec; }
.actions.small .btn { padding: 8px 14px; font-size: 14px; }
.actions.small .btn svg { width: 17px; height: 17px; }
.card .btn-store { border-color: var(--line); }

/* 區塊 */
section { padding: 64px 0; }
section + section { padding-top: 8px; }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); margin: 4px 0 0; line-height: 1.3; }
.eyebrow { color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: 0.12em; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin: 0 0 8px; }

.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.app { display: flex; flex-direction: column; }
.app-link { display: grid; grid-template-columns: 88px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; color: inherit; text-decoration: none; }
.app-link img { grid-row: span 2; width: 88px; height: 88px; border-radius: 50%; }
.app-link h3 { font-size: 28px; margin: 0; align-self: end; }
.app-link .en { margin: 0; color: var(--muted); font-size: 14px; align-self: start; }
.app-link:hover h3 { color: var(--accent); }
.app .intro { color: var(--muted); font-size: 15px; flex: 1; margin: 14px 0 16px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.features .icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font-size: 26px; margin-bottom: 12px;
}
.features p { margin: 0; color: var(--muted); font-size: 16px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
.list { margin: 0; padding-left: 1.2em; }

/* 文章（App 介紹、隱私權政策） */
.doc { max-width: 52em; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); margin: 40px 0 6px; }
.doc h2 { font-size: 24px; margin: 38px 0 10px; }
.doc h3 { font-size: 21px; margin: 26px 0 6px; color: var(--accent); }
.doc p, .doc li { overflow-wrap: anywhere; }
.updated { color: var(--muted); font-size: 15px; }
.doc ul { padding-left: 1.3em; }

/* 頁尾 */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; margin-top: 40px; color: var(--muted); font-size: 15px; }
.foot-apps { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.foot-apps a { color: var(--text); text-decoration: none; font-family: var(--kai); font-size: 18px; }
.foot-apps a:hover { color: var(--accent); }
footer p { margin: 6px 0; }
.fine { font-size: 13px; }
