@charset "UTF-8";

/* ==========================================================================
   活動官網範本 — 共用樣式
   設計方向：克制的正式感。米白底、墨藍主色、大留白、細線分隔。
   不用大圖主視覺（載入快、SEO 好、無素材也能上線）。
   所有顏色組合都已驗證對比度 ≥ 4.5:1（WCAG 2.0 AA）。
   ========================================================================== */

:root {
  /* 色彩 */
  --bg:            #FBFAF7;  /* 米白底 */
  --bg-soft:       #F4F1EA;  /* 次級區塊底 */
  --ink:           #1F2421;  /* 主文字 */
  --ink-soft:      #48525C;  /* 次級文字（對比 7.6:1） */
  --brand:         #23374D;  /* 墨藍，主色 */
  --brand-deep:    #182634;  /* 墨藍深階 */
  --accent:        #A85C3C;  /* 赭紅，重點與數字（對比 4.7:1） */
  --line:          #E2DED6;  /* 細線 */
  --white:         #FFFFFF;

  /* 排版 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC",
          "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  --font-num: "Helvetica Neue", Arial, var(--font);

  /* 尺度 */
  --wrap: 1080px;
  --wrap-narrow: 760px;
  --gap: 1.5rem;
  --radius: 4px;
}

/* --- 基礎 ------------------------------------------------------------ */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.85;           /* 中文閱讀舒適行高 */
  letter-spacing: 0.02em;
}

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

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

/* 鍵盤操作時 focus 一定要看得見（無障礙必要條件） */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 { line-height: 1.4; letter-spacing: 0.01em; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 700; }
p  { margin: 0 0 1.2em; }

/* --- 跳至主要內容（螢幕閱讀器與鍵盤使用者的第一個焦點） ------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--brand);
  color: var(--white);
  padding: 0.8rem 1.4rem;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* --- 版面容器 -------------------------------------------------------- */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.2rem, 4vw, 2.5rem); }
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--soft { background: var(--bg-soft); }
.section--line { border-top: 1px solid var(--line); }

/* 區塊小標：細線 + 字，取代裝飾性圖片 */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* --- 頁首與導覽 ------------------------------------------------------ */

.site-header {
  background: var(--brand);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.06em;
}
.site-title a { color: var(--white); text-decoration: none; }
.site-title span { display: block; font-size: 0.72rem; font-weight: 400; opacity: 0.8; letter-spacing: 0.1em; }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: block;
  padding: 0.6rem 0.95rem;
  color: var(--white);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: var(--radius);
}
.nav a:hover { background: rgba(255, 255, 255, 0.14); color: var(--white); }

/* 當前頁面：底線 + aria-current，不只靠顏色傳達 */
.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--accent);
}

/* --- 首頁主視覺（純排版，可直接換成圖片） --------------------------- */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* 幾何裝飾：CSS 畫的，不占頻寬。screen reader 讀不到，純裝飾 */
.hero::before {
  content: "";
  position: absolute;
  top: -12%;
  right: -8%;
  width: 46vw;
  max-width: 520px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -22%;
  right: 12%;
  width: 30vw;
  max-width: 340px;
  aspect-ratio: 1;
  background: var(--bg-soft);
  border-radius: 50%;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }

.hero__kicker {
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.hero h1 { max-width: 20em; margin-bottom: 1rem; }
.hero__lead {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 2rem;
}

/* 主視覺替換區：提案定案後把圖放這裡 */
.hero__visual {
  margin-top: 2.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  background: var(--bg-soft);
}

/* --- 按鈕 ------------------------------------------------------------ */

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.btn--primary { background: var(--brand); color: var(--white); }
.btn--primary:hover { background: var(--brand-deep); color: var(--white); }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand); color: var(--white); }

/* --- 重點數字列 ------------------------------------------------------ */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.facts > div { background: var(--bg); padding: 1.8rem 1.5rem; }
.facts dt { font-size: 0.88rem; color: var(--ink-soft); letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.facts dd {
  margin: 0;
  font-family: var(--font-num);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.25;
}
.facts dd small { font-size: 0.9rem; font-weight: 400; color: var(--ink-soft); display: block; letter-spacing: 0.04em; }

/* --- 卡片格 ---------------------------------------------------------- */

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

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }
.card__num {
  font-family: var(--font-num);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.8rem;
}

/* --- 表格（評分標準、獎勵辦法、時程） ------------------------------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 0.97rem;
}
caption {
  text-align: left;
  font-weight: 700;
  font-size: 1.15rem;
  padding-bottom: 0.8rem;
  color: var(--ink);
}
th, td {
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
thead th {
  background: var(--brand);
  color: var(--white);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
tbody th { font-weight: 700; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--bg); }
td.num, th.num {
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* --- 時程（垂直軸線） ----------------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 2rem 2rem; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.65rem;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline time {
  display: block;
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.04em;
}
.timeline p { margin: 0.2rem 0 0; color: var(--ink-soft); }

/* --- 常見問答 -------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1.2rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding-right: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "＋";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.faq details[open] summary::before { content: "－"; }
.faq details > p { margin: 0.9rem 0 0 1.9rem; color: var(--ink-soft); }

/* --- 影片格（作品欣賞） --------------------------------------------- */

.video-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.video-frame {
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-align: center;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-card__body { padding: 1.2rem 1.4rem 1.5rem; }
.video-card__body h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.video-card__meta { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }
.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  background: var(--accent);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

/* --- 相關連結 -------------------------------------------------------- */

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 0.2rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.link-list a:hover { color: var(--accent); background: var(--bg-soft); }
.link-list span { font-size: 0.88rem; font-weight: 400; color: var(--ink-soft); }

/* --- 注意事項框 ------------------------------------------------------ */

.notice {
  border: 1px solid var(--accent);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--white);
  padding: 1.4rem 1.6rem;
}
.notice h3 { color: var(--accent); font-size: 1.05rem; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }

.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }
.prose > :last-child { margin-bottom: 0; }

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

.site-footer {
  background: var(--brand-deep);
  color: rgba(255, 255, 255, 0.82);
  padding-block: 3rem 2.5rem;
  font-size: 0.9rem;
  line-height: 1.8;
}
.site-footer a { color: var(--white); }
.site-footer h2 { color: var(--white); font-size: 1.05rem; }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 1.5rem;
}
.site-footer p { margin: 0 0 0.4em; }
.site-footer__note { font-size: 0.82rem; opacity: 0.7; }

/* --- 尊重「減少動態效果」的系統設定（無障礙） ----------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

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

@media (max-width: 720px) {
  .site-header { position: static; }   /* 小螢幕不黏頂，避免吃掉閱讀空間 */
  .site-header__bar { padding-block: 0.8rem; }
  .nav ul { gap: 0.1rem; }
  .nav a { padding: 0.5rem 0.7rem; font-size: 0.9rem; }
  .btn { width: 100%; justify-content: center; }
}

/* --- 列印（政府提案常要印紙本） ------------------------------------- */

@media print {
  .site-header, .site-footer, .skip-link, .btn-row, .hero__visual { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding-block: 1.2rem; }
  .hero::before, .hero::after { display: none; }
  .card, table, .notice { border-color: #999; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .faq details { page-break-inside: avoid; }
  .faq details:not([open]) > p { display: block; }   /* 印出時展開全部答案 */
}
