/* ============================================
   landing.css — public landing page
   ============================================ */

/* 本頁安全網：避免任何元素造成水平捲動、並讓文件寬度＝螢幕寬（藍色 header 才會填滿右側）。
   landing.css 僅 index 載入，不影響後台。 */
html, body { overflow-x: hidden; width: 100%; max-width: 100%; }

/* Hero */
.hero {
  padding: 28px 0 28px;
}
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}
.topbar { display: flex; align-items: center; gap: 18px; }
.logo--lg { width: 56px; height: 56px; border-radius: 12px; }
.logo--lg img { width: 28px; height: 28px; }
.head-text h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.head-text .sub {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255,255,255,.78);
  letter-spacing: 0.08em;
}

.hero-band {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
  gap: 32px;
  position: relative;
}
.hero-tagline { max-width: 590px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  margin-bottom: 14px;
}
.eyebrow .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.hero-tagline h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.hero-tagline p {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,.8);
  max-width: 480px;
}
.hero-illu {
  position: relative;
  height: 200px;
  margin-bottom: -28px;
}
.hero-illu img { width: 100%; height: 100%; object-fit: contain; object-position: right bottom; }

/* Hero hook（首頁 Hero 主標 + 亮點膠囊 + CTA） */
.hero-tagline h2.hero-hook { font-size: 30px; line-height: 1.3; font-weight: 800; }
.hero-tagline h2.hero-hook .hl { color: #ffd34d; }
.hero-actions {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px; font-weight: 700;
}
.hero-pill strong { color: #ffd34d; font-size: 18px; }
/* Hero 內的申請鈕：覆寫 .btn 的滿版，改為自適應寬度 */
.hero-cta { width: auto; padding: 11px 26px; }

/* 首頁 Hero 背景圖（無文字版 hero-bg.jpg）
   左側壓深藍漸層 scrim 讓白字清楚，右側保留地球；找不到圖時以藍色漸層 fallback。 */
.site-header.hero {
  background:
    linear-gradient(100deg, rgba(8,48,104,.85) 0%, rgba(12,72,150,.55) 40%, rgba(15,110,175,.12) 62%, rgba(15,120,185,0) 76%),
    url("../img/hero-bg.png") right center / cover no-repeat,
    linear-gradient(110deg, #0a3a73 0%, #11539a 45%, #1f6cb8 80%, #2a86d6 100%);
}
/* 用實圖後不需要格線疊加，避免雜訊 */
.site-header.hero::before { display: none; }
/* 背景圖已含地球網格，移除重複的 SVG 插圖 */
.site-header.hero .hero-illu { display: none; }

@media (max-width: 960px) {
  /* 手機：文字滿版，改用上下向 scrim 確保白字可讀 */
  .site-header.hero {
    background:
      linear-gradient(180deg, rgba(8,48,104,.80) 0%, rgba(12,72,150,.55) 100%),
      url("../img/hero-bg.png") center / cover no-repeat,
      linear-gradient(110deg, #0a3a73, #1f6cb8);
  }
}

/* Main grid */
main {
  max-width: 1180px;
  margin: -36px auto 64px;
  padding: 0 32px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}
.panel {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(227, 232, 240, .8);
}
.panel.policy { padding: 36px 40px; }
.section-title {
  display: flex; align-items: center; gap: 12px;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}
.section-title .bar {
  width: 4px; height: 18px;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-900));
  border-radius: 2px;
}
.section-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--line) 0%, transparent 60%);
  margin: 18px 0 24px;
}

.lede {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 0 0 18px;
}
.lede strong, .lede em {
  color: var(--ink);
  font-style: normal;
  font-weight: 600;
  background: linear-gradient(transparent 65%, var(--accent-soft) 65%);
  padding: 0 2px;
}
/* 政策說明為 CMS 動態內容：避免內含圖片/表格/長字串造成水平溢出 */
.lede { overflow-wrap: anywhere; }
.lede img { max-width: 100%; height: auto; }
.lede table { display: block; max-width: 100%; overflow-x: auto; }

/* Quick facts row */
.facts {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.fact {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 12px;
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
}
.fact .ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #fff;
  display: grid; place-items: center;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(15,37,64,.05);
}
.fact .label {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.fact .value {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-900);
  letter-spacing: 0.01em;
}
.fact .value .unit { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.fact.accent { background: var(--accent-soft); border-color: #f3d8bc; }
.fact.accent .value { color: #8a3f12; }
.fact.mint { background: var(--mint-soft); border-color: #bee0d1; }
.fact.mint .value { color: #1c5d44; }

/* Steps */
.steps {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px dashed var(--line);
}
.steps h4 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.05em;
}
.step-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  position: relative;
}
.step {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  position: relative;
}
.step .n {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-700);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 6px;
}
.step .t {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.step .d {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.55;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10px; top: 50%;
  width: 8px; height: 8px;
  border-top: 2px solid #c8d4e3;
  border-right: 2px solid #c8d4e3;
  transform: translateY(-50%) rotate(45deg);
  z-index: 2;
}

/* Sidebar */
aside { display: flex; flex-direction: column; gap: 16px; }

.cta-card {
  background: linear-gradient(160deg, #0b3a6b 0%, #1564b0 100%);
  color: #fff;
  border-radius: 18px;
  padding: 24px 24px 22px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(217,122,58,.35), transparent 70%);
  border-radius: 50%;
}
.cta-card .deadline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.cta-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  position: relative;
}
.cta-card p {
  margin: 0 0 18px;
  font-size: 13px;
  color: rgba(255,255,255,.78);
  position: relative;
}
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 14px 16px;
  background: #fff;
  color: var(--brand-900);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn.btn-accent { background: var(--accent); color: #fff; }

.file-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.file-card:hover { border-color: var(--brand-500); transform: translateY(-1px); }
.file-ico {
  width: 42px; height: 48px;
  background: linear-gradient(160deg, #fbecdc, #fff);
  border: 1px solid #f3d8bc;
  border-radius: 6px;
  display: grid; place-items: center;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-size {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  font-family: "Inter", sans-serif;
  letter-spacing: 0.05em;
}
.file-action { color: var(--brand-700); font-size: 16px; flex-shrink: 0; }

.help-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.help-card h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.help-card h4 .ico {
  width: 24px; height: 24px;
  background: var(--brand-50);
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--brand-700);
}
.help-card ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}
.help-card li {
  font-size: 13px;
  color: var(--ink-2);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.help-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
}
.help-card .contact {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}
.help-card .contact b { color: var(--ink); font-family: "Inter", sans-serif; }

@media (max-width: 960px) {
  .container, main { padding-left: 18px; padding-right: 18px; }
  /* 用 minmax(0,1fr)（非 1fr=minmax(auto,1fr)）讓欄位可縮到比視窗窄，內容才會換行而非被撐寬/裁切 */
  main { grid-template-columns: minmax(0, 1fr); }
  .panel.policy { padding: 24px 18px; }
  .step-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2)::after { display: none; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .hero-band { grid-template-columns: minmax(0, 1fr); }
  .hero-illu { display: none; }
  .hero-tagline h2 { font-size: 22px; }
  /* .hero-hook 因 specificity 較高，需明確覆寫才不會卡在 30px */
  .hero-tagline h2.hero-hook { font-size: 21px; line-height: 1.35; }
  /* 長字串膠囊（申請期間…）允許換行，避免撐破寬度 */
  .eyebrow { white-space: normal; max-width: 100%; }
  /* 聯絡資訊含長 email/電話，允許斷行避免撐寬 */
  .help-card .contact { overflow-wrap: anywhere; }
}
