/* 捷運管家官網：首頁、隱私權政策、支援頁共用樣式 */

:root {
  --brand: #0a66f0;
  --brand-top: #227afc;
  --brand-bottom: #0257de;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --text: #121826;
  --text-2: #4a5468;
  --border: #dde3ee;
  --shadow: 0 18px 50px -20px rgba(16, 40, 90, 0.35);

  /* 路線色（同 App） */
  --br: #c48c31;
  --r: #e3002c;
  --g: #008659;
  --o: #f8b61c;
  --bl: #0070bd;
  --y: #c9a214;

  --radius: 20px;
  --max: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #5b9bff;
    --bg: #0d1220;
    --surface: #151c2e;
    --surface-2: #1c2539;
    --text: #eef2fa;
    --text-2: #a7b1c6;
    --border: #2a3550;
    --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --brand: #5b9bff;
  --bg: #0d1220;
  --surface: #151c2e;
  --surface-2: #1c2539;
  --text: #eef2fa;
  --text-2: #a7b1c6;
  --border: #2a3550;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC",
    "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--brand); text-underline-offset: 3px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .wrap { padding: 0 28px; }
}

/* ── 頁首 ───────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  margin-right: auto;
  white-space: nowrap;
}

.brand img { width: 32px; height: 32px; border-radius: 8px; }

.site-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

@media (max-width: 560px) {
  .site-nav .nav-optional { display: none; }
}

/* ── 路線色條 ───────────────────────── */

.line-bar {
  display: flex;
  height: 6px;
}

.line-bar span { flex: 1; }
.line-bar span:nth-child(1) { background: var(--br); }
.line-bar span:nth-child(2) { background: var(--r); }
.line-bar span:nth-child(3) { background: var(--g); }
.line-bar span:nth-child(4) { background: var(--o); }
.line-bar span:nth-child(5) { background: var(--bl); }
.line-bar span:nth-child(6) { background: var(--y); }

/* ── 首頁主視覺 ─────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, var(--brand-top), var(--brand-bottom));
}

.hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 0;
}

@media (min-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1.1fr 0.9fr;
    padding-top: 72px;
  }
}

.hero-copy { padding-bottom: 8px; }

@media (min-width: 880px) {
  .hero-copy { padding-bottom: 72px; }
}

.app-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.app-badge img {
  width: 72px;
  height: 72px;
  border-radius: 17px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45);
}

.app-badge strong { display: block; font-size: 22px; line-height: 1.3; }
.app-badge span { font-size: 15px; opacity: 0.85; }

.hero h1 {
  font-size: clamp(34px, 7vw, 56px);
  line-height: 1.2;
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}

.hero p.lead {
  font-size: clamp(17px, 2.4vw, 20px);
  margin: 0 0 32px;
  opacity: 0.92;
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #0b2a66;
  font-weight: 700;
  font-size: 17px;
  padding: 13px 22px;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.45);
}

.store-btn svg { width: 22px; height: 22px; }

.cta-note { font-size: 15px; opacity: 0.85; }

.hero-phone {
  justify-self: center;
  width: min(300px, 78vw);
  margin-bottom: -60px;
}

@media (min-width: 880px) {
  .hero-phone { width: 320px; margin-bottom: -90px; justify-self: end; }
}

.phone {
  border-radius: 44px;
  padding: 10px;
  background: #0b0f19;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
}

.phone img { border-radius: 35px; width: 100%; height: auto; }

/* ── 區塊 ───────────────────────────── */

section { padding: 88px 0; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 52px;
}

.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 8px;
}

h2 {
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.3;
  margin: 0 0 12px;
}

.section-head p { color: var(--text-2); margin: 0; }

/* 重點特色 */

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
}

.highlight .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-bottom: 14px;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);
}

.highlight h3 { font-size: 18px; margin: 0 0 4px; }
.highlight p { font-size: 15px; color: var(--text-2); margin: 0; line-height: 1.65; }

/* 功能列（圖文交錯） */

.feature {
  display: grid;
  gap: 36px;
  align-items: center;
  margin-bottom: 96px;
}

.feature:last-child { margin-bottom: 0; }

@media (min-width: 820px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature.reverse .feature-media { order: 2; }
}

.feature-media {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.feature-media .phone { width: min(270px, 72vw); }

.feature-media.pair .phone { width: min(220px, 43vw); border-radius: 34px; padding: 7px; }
.feature-media.pair .phone img { border-radius: 28px; }

.feature-copy h3 {
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.35;
  margin: 0 0 14px;
}

.feature-copy > p { color: var(--text-2); margin: 0 0 18px; }

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.checks li {
  position: relative;
  padding-left: 30px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.chip {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  padding: 1px 9px;
  border-radius: 999px;
  vertical-align: 2px;
}

/* 截圖輪播 */

.alt-bg { background: var(--surface-2); }

.gallery {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 24px;
  margin: 0 -16px;
  scrollbar-width: thin;
}

.gallery figure {
  flex: 0 0 min(230px, 62vw);
  scroll-snap-align: center;
  margin: 0;
}

.gallery .phone { border-radius: 34px; padding: 7px; }
.gallery .phone img { border-radius: 28px; }

.gallery figcaption {
  text-align: center;
  font-size: 15px;
  color: var(--text-2);
  margin-top: 12px;
}

/* 常見問題 */

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 20px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 18px 28px 18px 0;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-2);
}

.faq details[open] summary::after { content: "−"; }

.faq details p { margin: 0 0 18px; color: var(--text-2); }

/* 底部下載 */

.final-cta {
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, var(--brand-top), var(--brand-bottom));
}

.final-cta h2 { color: #fff; }
.final-cta p { opacity: 0.9; margin: 0 0 28px; }
.final-cta .cta-row { justify-content: center; }

/* ── 文件頁（隱私權政策、支援） ──────── */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 0 88px;
}

.doc h1 {
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.3;
  margin: 0 0 8px;
}

.doc .meta { color: var(--text-2); font-size: 15px; margin: 0 0 32px; }

.doc h2 {
  font-size: 22px;
  margin: 44px 0 10px;
  padding-top: 8px;
}

.doc h3 { font-size: 18px; margin: 28px 0 6px; }

.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }

.summary-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--brand);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 8px;
}

.summary-box p { margin: 0; }
.summary-box ul { margin: 8px 0 0; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0;
}

.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.doc th { color: var(--text-2); font-weight: 600; white-space: nowrap; }

.table-scroll { overflow-x: auto; }

.lang-switch {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 28px;
  font-size: 15px;
}

.lang-switch a {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-2);
}

.lang-switch a:hover { color: var(--text); background: var(--surface-2); }

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 64px 0 0;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 12px 0 8px;
}

.contact-card a.mail {
  font-size: 20px;
  font-weight: 700;
  word-break: break-all;
}

/* ── 頁尾 ───────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 44px;
  font-size: 14px;
  color: var(--text-2);
}

.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 14px;
}

.site-footer .links a { color: var(--text); text-decoration: none; }
.site-footer .links a:hover { text-decoration: underline; }
.site-footer p { margin: 6px 0; line-height: 1.65; }
