/* Dmessenger 官網的樣式：兩頁共用。
   顏色只在 :root 定義；之後加深色模式（跟著系統）時，只在下面
   @media (prefers-color-scheme: dark) { :root { … } } 補一組同名的值，其他不用改。 */

:root {
  --bg: #FFFFFF;
  --bg-alt: #F5F5FA;
  --surface: #FFFFFF;
  --text: #0B0B12;
  --text-2: #3C3C46;
  --text-3: #55555F;
  --text-muted: #6B6B76;
  --line: #EDEDF2;
  --line-strong: #E4E4EC;
  --control-line: #DCDCE4;
  --placeholder-line: #C9C9D6;
  --accent: #4A3DFF;
  --accent-text: #3A2FD9;
  --accent-soft: #ECEAFF;
  --on-accent: #FFFFFF;
  --note-text: #8A4B00;
  --note-bg: #FFF1E0;
  --inverse-bg: #0B0B12;
  --inverse-text: #FFFFFF;
  --inverse-text-2: rgba(255, 255, 255, .76);
  --inverse-text-3: rgba(255, 255, 255, .66);
  --inverse-line: rgba(255, 255, 255, .5);
  --inverse-placeholder-line: rgba(255, 255, 255, .35);
  --inverse-ring: rgba(255, 255, 255, .12);
  --device: #0B0B12;
  --shadow-menu: 0 12px 32px rgba(11, 11, 18, .12);
  --shadow-phone: 0 30px 60px rgba(74, 61, 255, .18);
  --shadow-icon: 0 10px 28px rgba(0, 0, 0, .25);
  color-scheme: light;
}

/* ---------- 基本 ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "SF Pro Text", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.2px;
}

h1, h2, h3, p, ul { margin: 0; }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- 頁首 ---------- */

.site-header { border-bottom: 1px solid var(--line); }

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 19px;
  font-weight: 700;
}
.brand img { border-radius: 9px; }

.nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
  font-size: 15px;
}
.nav a { color: var(--text-2); text-decoration: none; padding: 10px 0; }
.nav a:hover { color: var(--text); }

/* 語言選單（<details>：沒有 JavaScript 也能開） */
.lang { position: relative; }

.lang-btn {
  list-style: none;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  border: 1px solid var(--control-line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.lang-btn::-webkit-details-marker { display: none; }

.lang-menu {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 5;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-menu);
  padding: 6px;
}

.lang-item {
  font-size: 15px;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}
.lang-item:hover { background: var(--bg-alt); }
.lang-item[aria-current="true"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }

.lang-more {
  margin-top: 4px;
  padding: 10px 12px 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- 共用元件 ---------- */

.h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.8px;
}

.section { padding-top: 88px; padding-bottom: 88px; }
.alt { background: var(--bg-alt); }
.inverse { background: var(--inverse-bg); color: var(--inverse-text); }

.btn {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 24px;
  border-radius: 26px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.btn-dark { background: var(--text); color: var(--bg); }
.btn-outline { border: 1.5px solid var(--accent); color: var(--accent-text); }
.btn-light { background: var(--inverse-text); color: var(--inverse-bg); }
.btn-outline-light { border: 1.5px solid var(--inverse-line); color: var(--inverse-text); }

.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* 橘色「待確認」：內容是空的就不顯示 */
.note {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  color: var(--note-text);
  background: var(--note-bg);
  padding: 5px 10px;
  border-radius: 8px;
}
.note:empty { display: none; }

/* App 截圖的佔位（虛線框） */
.placeholder {
  background: var(--bg-alt);
  border: 2px dashed var(--placeholder-line);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- 首頁 ---------- */

.hero {
  padding-top: 88px;
  padding-bottom: 96px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}

.hero-text {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 7px 14px;
  border-radius: 999px;
}

.hero-title {
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -1.6px;
}

.lead { max-width: 520px; font-size: 19px; line-height: 1.55; color: var(--text-3); }

.hero-phone { flex: 1 1 300px; display: flex; justify-content: center; }

.phone {
  width: 290px;
  height: 600px;
  border-radius: 52px;
  background: var(--device);
  padding: 12px;
  box-shadow: var(--shadow-phone);
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 41px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
}
.phone-screen img { border-radius: 22px; box-shadow: var(--shadow-icon); }

.why {
  max-width: 880px;
  margin: 0 auto;
  padding: 104px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.why-title { font-size: clamp(32px, 4.6vw, 58px); line-height: 1.1; font-weight: 700; letter-spacing: -1.2px; }
.why-body { max-width: 620px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.6; color: var(--inverse-text-2); }

.stack { display: flex; flex-direction: column; gap: 40px; }
.points-title { max-width: 640px; }

.cards { display: flex; flex-wrap: wrap; gap: 20px; }

.card {
  flex: 1 1 280px;
  background: var(--surface);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card h3 { font-size: 21px; line-height: 1.25; font-weight: 600; }
.card p { font-size: 16px; line-height: 1.55; color: var(--text-3); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 26px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step { flex: 1 1 280px; display: flex; flex-direction: column; gap: 16px; }

.step-shot {
  height: 380px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.step-row { display: flex; gap: 14px; align-items: flex-start; }

.step-num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 17px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text { display: flex; flex-direction: column; gap: 6px; }
.step-text h3 { font-size: 19px; line-height: 1.3; font-weight: 600; }
.step-text p { font-size: 16px; line-height: 1.5; color: var(--text-3); }

.truths { display: flex; flex-wrap: wrap; gap: 40px 64px; }
.truths > .h2 { flex: 1 1 280px; }
.truth-list { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.truth {
  background: var(--surface);
  border-radius: 20px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.truth h3 { font-size: 19px; line-height: 1.3; font-weight: 600; }
.truth p { font-size: 16px; line-height: 1.55; color: var(--text-3); }

.faq { max-width: 800px; display: flex; flex-direction: column; gap: 28px; }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 18px 0; font-size: 18px; font-weight: 600; line-height: 1.35; }
.faq-answer { padding: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.faq-answer p { font-size: 16px; line-height: 1.6; color: var(--text-3); }

.get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.get-text { flex: 1 1 420px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.get-text img { border-radius: 17px; box-shadow: 0 0 0 1px var(--inverse-ring); }
.get-title { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.12; font-weight: 700; letter-spacing: -0.8px; }
.get-sub { font-size: 18px; line-height: 1.55; color: var(--inverse-text-2); }
.requires { font-size: 14px; color: var(--inverse-text-3); }

/* QR 碼只在電腦（滑鼠或觸控板）上顯示；手機用上面的按鈕直接點 */
.qr { display: none; }
@media (hover: hover) and (pointer: fine) {
  .qr { flex: none; width: 200px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
}

.qr-box {
  width: 176px;
  height: 176px;
  border-radius: 24px;
  border: 2px dashed var(--inverse-placeholder-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--inverse-text-3);
}
.qr p { font-size: 13px; line-height: 1.45; text-align: center; color: var(--inverse-text-3); }

/* ---------- 隱私政策 ---------- */

.policy {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.policy-head { display: flex; flex-direction: column; gap: 14px; }
.policy-head .note { font-size: 13px; padding: 6px 12px; }
.policy-title { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.1; font-weight: 700; letter-spacing: -1.2px; }
.policy-dates { font-size: 15px; color: var(--text-muted); }
.policy-intro { margin-top: 8px; font-size: 18px; line-height: 1.6; color: var(--text-2); }

.policy-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.policy-section h2 { font-size: 22px; line-height: 1.3; font-weight: 700; display: flex; gap: 12px; align-items: baseline; }
.policy-num { color: var(--accent); font-variant-numeric: tabular-nums; }
.policy-section p,
.policy-section ul { font-size: 17px; line-height: 1.65; color: var(--text-2); }
.policy-section ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.6; }

.contact-box {
  background: var(--bg-alt);
  border-radius: 20px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-box h2 { font-size: 20px; font-weight: 700; }
.contact-box p { font-size: 16px; line-height: 1.6; color: var(--text-2); }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; }
.contact-links a { color: var(--accent-text); }

/* ---------- 頁尾 ---------- */

.site-footer { border-top: 1px solid var(--line); }

.footer-row {
  padding-top: 32px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  font-size: 14px;
  color: var(--text-3);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--text-2); }

/* ---------- 手機 ---------- */

@media (max-width: 640px) {
  /* 頁首兩列：第一列商標和語言，第二列連結 */
  .lang { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; margin-left: 0; gap: 4px 20px; }

  .hero { padding-top: 48px; padding-bottom: 64px; gap: 48px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .why { padding-top: 80px; padding-bottom: 80px; }
  .card { padding: 26px; }
  .truth { padding: 22px 22px; }
  .policy { padding-top: 40px; padding-bottom: 72px; }
  .contact-box { padding: 22px; }
}
