/* HelloDear 官網樣式。
   版式沿用 ezmd.app（同一個人做的，同一套排版習慣就好），
   顏色換成 App 自己的：底 #EEEEEE、天空藍 #6CB8F5、點綴藍 #007AFF、珊瑚紅 #F26B5B。
   數值正本在 HelloDear/Theme/Theme.swift，這裡是網頁版的對應。

   ezmd 那圈黑框不搬。那個站賣的是工具的銳利，這個站賣的是兩個人的柔軟，
   黑框會把整頁壓成硬東西。

   字型用系統字，不跟 Google 要檔案（這個站不追蹤）。
   字重兩級：內文 400、標題 600。 */

:root {
  --bg: #eeeeee;
  --card: #ffffff;
  --text: #000000;
  --muted: #8e8e93;
  --line: #e5e5ea;
  --line-soft: #ededf0;
  --accent: #007aff;          /* 點綴藍：連結、選中 */
  --sky: #6cb8f5;             /* 天空藍：自己的泡泡、送出鈕 */
  --coral: #f26b5b;           /* 珊瑚紅：回憶 */
  --accent-soft: #e4f0ff;
  --r: 14px;
  --r-card: 22px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101114;
    --card: #17181c;
    --text: #f2f3f5;
    --muted: #9aa1ae;
    --line: #26282e;
    --line-soft: #1c1e23;
    --accent: #4da2ff;
    --sky: #6cb8f5;
    --coral: #ff8878;
    --accent-soft: #16233a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               system-ui, "PingFang TC", "PingFang SC", "Noto Sans TC", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;          /* 中文要這麼鬆才好讀 */
  -webkit-font-smoothing: antialiased;
}

/* 英文不需要中文那麼鬆的行距 */
html[data-lang="en"] body { line-height: 1.55; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
a { color: inherit; }

/* ── 頂列 ───────────────────────────────── */
.top {
  display: flex; align-items: center; gap: 10px;
  height: 60px; position: sticky; top: 0; z-index: 20;
  flex-wrap: wrap;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.top img { width: 28px; height: 28px; border-radius: 7px; }
.top .name { letter-spacing: -0.015em; font-size: 16px; font-weight: 600; white-space: nowrap; }
.top .name .full { font-weight: 400; color: var(--muted); font-size: 15px; }
.top nav { margin-left: auto; display: flex; gap: 20px; align-items: center; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.top nav a:hover { color: var(--text); }
@media (max-width: 640px) {
  /* 選單字放不下就折成兩行：品牌一行、選單一行。
     padding 左右一定要一起寫，只寫 `10px 0` 會把 .wrap 的 24px 蓋掉。 */
  .top { height: auto; padding: 10px 24px; row-gap: 8px; }
  .top nav { margin-left: 0; width: 100%; justify-content: space-between; gap: 12px; }
  .top .name .full { display: none; }
}

.lang { display: flex; gap: 1px; background: var(--line-soft); border-radius: 8px; padding: 3px; }
.lang button {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 12px; padding: 4px 8px;
  border-radius: 6px; cursor: pointer; line-height: 1.4;
}
.lang button[aria-pressed="true"] {
  background: var(--card); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* ── 排版基礎 ────────────────────────────── */
section { padding: 58px 0; }
h1 {
  font-size: clamp(40px, 6.8vw, 68px);
  line-height: 1.05; letter-spacing: -0.035em; font-weight: 600;
  margin: 0 0 20px;
}
h2 {
  font-size: clamp(27px, 3.6vw, 39px);
  line-height: 1.18; letter-spacing: -0.025em; font-weight: 600;
  margin: 0 0 14px;
}
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.012em; margin: 0 0 6px; }
.tagline {
  font-size: clamp(20px, 2.7vw, 28px);
  line-height: 1.3; letter-spacing: -0.02em; font-weight: 600;
  margin: 0 0 16px; color: var(--text);
}
p { margin: 0 0 14px; }
.lede { font-size: 16px; color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.note { color: var(--muted); font-size: 14px; }

/* ── 按鈕 ───────────────────────────────── */
.btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-size: 15px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; line-height: 1.2;
}
.btn.primary { background: var(--sky); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }

/* 上架前的狀態膠囊。上線後換成 App Store 徽章，這條就刪掉 */
.soon {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 18px; font-size: 15px; color: var(--muted);
}
.soon b { font-weight: 600; color: var(--text); }

/* ── 四個事實 ───────────────────────────── */
.facts {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px 12px; margin-top: 44px; text-align: center;
}
@media (min-width: 720px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts .n {
  font-size: 25px; letter-spacing: -0.02em; font-weight: 600;
  line-height: 1.25; min-height: 2.5em;
}
.facts .l { font-size: 13px; color: var(--muted); margin-top: 4px; }
@media (min-width: 720px) { .facts .n { min-height: 0; } }
@media (max-width: 560px) { .facts .n { font-size: 20px; } }

/* ── 手機示意圖（CSS 畫的，不是截圖）──────────
   用 App 真正的設計 token 畫：泡泡圓角 20、自己的泡泡天空藍、
   對方純白、底 #EEEEEE。等真截圖拍好就整塊換掉。 */
.phone {
  width: 300px; margin: 40px auto 0;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 42px; padding: 14px 12px 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) { .phone { background: #17181c; } }
.phone .bar {
  width: 92px; height: 22px; background: #000; border-radius: 999px;
  margin: 0 auto 18px;
}
.phone .head { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; padding: 0 10px; }
.phone .sub { font-size: 12px; color: var(--muted); padding: 0 10px; margin-bottom: 14px; }
.phone .row { display: flex; margin: 0 8px 8px; }
.phone .row.me { justify-content: flex-end; }
.phone .bub {
  max-width: 78%; padding: 9px 14px; border-radius: 20px;
  font-size: 14px; line-height: 1.4; text-align: left;
}
.phone .row.me .bub { background: var(--sky); color: #fff; }
.phone .row.you .bub { background: #fff; color: #000; }
.phone .day { text-align: center; font-size: 11px; color: var(--muted); margin: 12px 0 10px; }
.phone .places {
  background: #fff; border-radius: var(--r-card); margin: 14px 8px 0;
  padding: 14px 16px 16px; text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.phone .places .meta { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.phone .places .place { padding: 4px 0; }
.phone .places .place + .place { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.phone .places .name { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; color: #000; }
.phone .places .visits { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── 功能面板 ───────────────────────────── */
.grouphead { text-align: center; max-width: 660px; margin: 0 auto 40px; }
.grouphead h2 { margin-bottom: 12px; }
.grouphead .lede { margin: 0 auto; }

.panels { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .panels { grid-template-columns: 1fr 1fr; } }
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px;
}
.panel h3 {
  font-size: clamp(20px, 2.3vw, 24px);
  line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 10px;
}
.panel p { font-size: 16px; color: var(--muted); margin: 0; }
.panel .tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 3px 10px; margin-bottom: 12px;
}

/* 不做清單：一條一條，前面一個叉 */
.nots { max-width: 720px; margin: 0 auto; }
.not { border-bottom: 1px solid var(--line); padding: 16px 0; display: flex; gap: 14px; }
.not:first-child { border-top: 1px solid var(--line); }
.not .x { color: var(--coral); font-weight: 600; flex: none; }
.not h3 { margin: 0 0 2px; font-size: 17px; }
.not p { margin: 0; color: var(--muted); font-size: 15px; }

/* ── 價格 ───────────────────────────────── */
.plans { display: grid; gap: 16px; max-width: 900px; margin: 0 auto; }
@media (min-width: 820px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; text-align: left; }
.plan.pick { border-color: var(--sky); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan .price { font-size: 32px; letter-spacing: -0.03em; margin: 10px 0 4px; font-weight: 600; }
.plan .price small { font-size: 15px; color: var(--muted); letter-spacing: 0; font-weight: 400; }
.plan .year { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.plan p { font-size: 14px; margin: 0 0 6px; }
.plan p:last-child { margin: 0; color: var(--muted); }

/* ── 問答 ───────────────────────────────── */
.qas { max-width: 760px; margin: 0 auto; }
.qa { border-bottom: 1px solid var(--line); padding: 18px 0; }
.qa:first-child { border-top: 1px solid var(--line); }
.qa p { margin: 0; color: var(--muted); font-size: 15px; }

/* ── 文件頁（隱私、條款、幫助）───────────────── */
.doc { max-width: 720px; margin: 0 auto; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); }
.doc h2 { font-size: 25px; margin-top: 44px; }
.doc h3 { font-size: 19px; margin-top: 28px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 10px; }
.doc a { color: var(--accent); }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 600; }
.doc code {
  background: var(--line-soft); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px; font-size: 13px;
}

/* ── 邀請頁 ─────────────────────────────── */
.code {
  font-size: 44px; font-weight: 600; letter-spacing: 0.12em;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 20px 28px; display: inline-block; margin: 6px 0 18px;
}

/* ── 頁尾 ───────────────────────────────── */
footer {
  border-top: 1px solid var(--line); padding: 28px 0 36px;
  color: var(--muted); font-size: 14px; text-align: center;
}
footer nav {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px 10px; margin: 0;
}
footer a { color: var(--muted); text-decoration: none; }
footer .sep { color: var(--line); user-select: none; }
footer a:hover { color: var(--text); }

/* ── 手機上的大字用 550 ──────────────────────
   antialiased 只在 macOS 生效，iOS 不吃，同一個 600 在 iPhone 上偏厚。
   SF 是可變字體，中間值取得到。 */
@media (max-width: 640px) {
  h1, h2, .tagline, .facts .n, .panel h3, .plan .price, .code { font-weight: 550; }
}

/* ── 語言切換：由 <html data-lang> 決定顯示哪一份 ── */
[data-i18n] { display: none; }
html[data-lang="en"]      [data-i18n="en"],
html[data-lang="zh-Hant"] [data-i18n="zh-Hant"],
html[data-lang="zh-Hans"] [data-i18n="zh-Hans"] { display: revert; }

/* 沒有粗體：<strong> 也不加粗，只改顏色 */
strong, b { font-weight: 600; color: var(--text); }

/* Static language URLs remain usable without JavaScript. */
.top .lang a {
  display: block; font-size: 12px; padding: 4px 8px;
  border-radius: 6px; line-height: 1.4; text-decoration: none;
}
.top .lang a[aria-current="page"] {
  background: var(--card); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.cta-note { margin-top: 10px; }
.pricing-note { max-width: 900px; margin: 24px auto 0; }
#pricing { scroll-margin-top: 110px; }
html:not([data-lang="en"]) h1 { line-height: 1.25; }
@media (max-width: 360px) {
  .phone { width: 100%; max-width: 300px; }
}
@media (max-width: 640px) {
  main > .center h1 { font-size: clamp(25px, 7.6vw, 40px); }
  html[data-lang="en"] main > .center h1 { font-size: clamp(32px, 8.2vw, 44px); }
}
main > .center h1 { text-wrap: balance; }
