/* ==========================================================================
   首頁 v2 — 雜誌式單欄長敘事
   --------------------------------------------------------------------------
   v1 是從 uic 沿用的「卡片格 + 交替色塊」骨架，只換配色不夠 —— 兩站看起來
   還是一樣。這一版動的是結構：滿版壓字主視覺、編號索引列取代卡片格、
   單欄敘事取代左右分欄。

   全部用 site.css 定義好的權杖，這裡不再自己定義顏色。
   舊版備份在 deploy/backup-0904/home.css.bak。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 主視覺：滿版壓字
   -------------------------------------------------------------------------- */
.hp-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  /* 用 min-height 而不是固定高度：文字長度不同時不會被裁掉。
     dvh 讓手機瀏覽器的網址列收合時不會跳版。 */
  min-height: min(78dvh, 720px);
  padding-block: clamp(4rem, 12vw, 8rem) clamp(3rem, 8vw, 5rem);
  background: var(--ink-900);
  overflow: hidden;
}

.hp-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hp-hero__media img,
.hp-hero__media picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 主視覺多半是橫幅構圖，主體偏中上；靠上對齊比置中不容易切到人 */
  object-position: 50% 35%;
}

/* 壓字要看得清楚，但不能把照片壓死。
   雙層漸層：底部重、右上留亮，文字區剛好落在最暗的地方。 */
.hp-hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(10, 21, 18, 0.94) 0%, rgba(10, 21, 18, 0.72) 38%, rgba(10, 21, 18, 0.30) 72%, rgba(10, 21, 18, 0.18) 100%),
    linear-gradient(to right, rgba(10, 21, 18, 0.70) 0%, rgba(10, 21, 18, 0.20) 55%, transparent 100%);
}

.hp-hero__inner {
  position: relative;
  z-index: 2;
  color: var(--text-invert);
  max-width: min(var(--wrap), 100%);
}

.hp-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--seal-400);
  text-transform: uppercase;
}

.hp-hero__eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--seal-400);
}

.hp-hero__title {
  margin: 0 0 28px;
  color: var(--text-invert);
  font-size: clamp(2rem, 6.2vw, 4.25rem);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.hp-hero__title em {
  font-style: normal;
  color: var(--seal-400);
  /* 底線用 box-shadow 畫，才不會跟中文的下伸部打架 */
  box-shadow: inset 0 -0.14em 0 rgba(211, 147, 63, 0.28);
}

.hp-hero__quote {
  margin: 0 0 32px;
  padding-left: 18px;
  border-left: 2px solid rgba(211, 147, 63, 0.55);
  max-width: 44ch;
  color: var(--text-invert-muted);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.9;
}

.hp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* 深底容器要覆寫描邊按鈕的變數，否則文字會是深色壓在深色上 */
.hp-hero {
  --btn-ghost-fg: var(--text-invert);
  --btn-ghost-border: rgba(238, 241, 239, 0.38);
}

/* 往下捲的提示。純裝飾，所以 aria-hidden。 */
.hp-hero__cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, transparent, rgba(211, 147, 63, 0.9));
  transform: translateX(-50%);
  animation: hp-cue 2.4s var(--ease) infinite;
}

@keyframes hp-cue {
  0%, 100% { opacity: 0.25; transform: translateX(-50%) scaleY(0.6); }
  50%      { opacity: 1;    transform: translateX(-50%) scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hp-hero__cue { animation: none; opacity: 0.6; }
}

@media (max-width: 640px) {
  .hp-hero { min-height: min(72dvh, 560px); }
  .hp-hero__cue { display: none; }
  .hp-hero__actions .btn { flex: 1 1 100%; }
}

/* --------------------------------------------------------------------------
   2. 開場陳述
   -------------------------------------------------------------------------- */
.hp-lede {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background: var(--paper-000);
  border-bottom: 1px solid var(--line-soft);
}

.hp-lede__text {
  margin: 0;
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  line-height: 1.95;
  color: var(--text-strong);
  font-weight: 400;
}

/* 數字織在句子裡，用琥珀色與等寬字標出來，不做成獨立方塊 */
.hp-lede__text strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--seal-600);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. 區塊骨架
   -------------------------------------------------------------------------- */
.hp-block {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  background: var(--paper-000);
}

.hp-block--tint { background: var(--paper-100); }

.hp-block--ink {
  background: var(--ink-800);
  color: var(--text-invert);
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(238, 241, 239, 0.022) 0 1px,
    transparent 1px 5px
  );
}

.hp-block--ink .hp-head__title { color: var(--text-invert); }
.hp-block--ink .hp-head__lead  { color: var(--text-invert-muted); }
.hp-block--ink .hp-head__no    { color: var(--seal-400); }

/* 區塊之間的北回歸線 —— 全站的識別母題 */
.hp-block + .hp-block::before,
.hp-lede + .hp-block::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: clamp(3.5rem, 8vw, 6.5rem);
  margin-top: calc(-1 * clamp(3.5rem, 8vw, 6.5rem));
  background: linear-gradient(to right, transparent, var(--seal-400) 15%, var(--seal-400) 85%, transparent);
  opacity: 0.4;
}

/* --------------------------------------------------------------------------
   4. 區塊標題
   -------------------------------------------------------------------------- */
.hp-head { margin-bottom: clamp(2rem, 4vw, 3rem); }

.hp-head__no {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--seal-500);
}

.hp-head__title {
  margin: 0 0 0.6em;
  font-size: clamp(1.55rem, 3.6vw, 2.4rem);
  line-height: 1.3;
}

.hp-head__lead {
  margin: 0;
  max-width: 58ch;
  color: var(--text-muted);
  line-height: 1.9;
}

.hp-note {
  margin: 28px 0 0;
  color: var(--text-muted);
}

.hp-note__sep { margin-inline: 10px; opacity: 0.5; }

.hp-block--ink .hp-note { color: var(--text-invert-muted); }

.link-more--invert {
  color: var(--seal-400);
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   5. 對號入座：單欄細線列
   -------------------------------------------------------------------------- */
.hp-sym {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}

.hp-sym__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.hp-sym__text {
  flex: 1 1 min(28ch, 100%);
  margin: 0;
  color: var(--text-body);
  line-height: 1.85;
}

.hp-sym__tag {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--seal-600);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   6. 編號索引列（服務與問答共用）
   --------------------------------------------------------------------------
   用原生 details/summary。不需要 JS，鍵盤與螢幕報讀器天生就支援，
   而且沒有 JS 的環境下內容仍然讀得到（對 SEO 也一樣）。
   -------------------------------------------------------------------------- */
.hp-index {
  border-top: 1px solid var(--line-mid);
}

.hp-index__item {
  border-bottom: 1px solid var(--line-soft);
}

.hp-index__row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;          /* Firefox 的預設三角形 */
  transition: color 0.18s var(--ease);
}

/* WebKit 的預設三角形 */
.hp-index__row::-webkit-details-marker { display: none; }

.hp-index__row:hover { color: var(--seal-600); }

.hp-index__no {
  flex: none;
  min-width: 2.6em;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--seal-500);
}

.hp-index__name {
  flex: 1;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  color: inherit;
  line-height: 1.5;
}

/* 開合標記：兩條線，展開時垂直那條消失，變成減號 */
.hp-index__mark {
  flex: none;
  position: relative;
  width: 14px;
  height: 14px;
}

.hp-index__mark::before,
.hp-index__mark::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1.5px;
  background: var(--seal-500);
  transform: translateY(-50%);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.hp-index__mark::after { transform: translateY(-50%) rotate(90deg); }

.hp-index__item[open] .hp-index__mark::after {
  transform: translateY(-50%) rotate(0deg);
  opacity: 0;
}

.hp-index__body {
  padding: 0 0 22px calc(2.6em + 18px);
  color: var(--text-muted);
  line-height: 1.9;
}

.hp-index__body p { margin: 0 0 14px; }

@media (max-width: 560px) {
  /* 手機上左邊縮排會把內文擠成很窄一條，拉回齊左 */
  .hp-index__body { padding-left: 0; }
}

/* --------------------------------------------------------------------------
   7. 敘事段落與引言
   -------------------------------------------------------------------------- */
.hp-prose {
  font-size: clamp(1rem, 1.7vw, 1.08rem);
  line-height: 1.95;
  color: var(--text-body);
}

.hp-quote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--seal-500);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 500;
  line-height: 1.85;
  color: var(--text-strong);
}

/* --------------------------------------------------------------------------
   8. 條列重點（關於／收費共用）
   -------------------------------------------------------------------------- */
.hp-points {
  margin: 32px 0 0;
  border-top: 1px solid var(--line-soft);
}

.hp-points__row {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) 1fr;
  gap: 4px 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.hp-points dt {
  font-weight: 700;
  color: var(--text-strong);
}

.hp-points dd {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.85;
}

@media (max-width: 560px) {
  .hp-points__row { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   9. 流程
   -------------------------------------------------------------------------- */
.hp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.hp-steps__item {
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}

.hp-steps__item:first-child { border-top: 1px solid var(--line-mid); }

.hp-steps__title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 10px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hp-steps__no {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--seal-500);
}

.hp-steps__text {
  padding-left: calc(0.82rem * 2.6 + 16px);
  color: var(--text-muted);
  line-height: 1.9;
}

.hp-steps__text p:last-child { margin-bottom: 0; }

@media (max-width: 560px) {
  .hp-steps__text { padding-left: 0; }
}

/* --------------------------------------------------------------------------
   10. 閱讀清單
   -------------------------------------------------------------------------- */
.hp-read {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-mid);
}

.hp-read__row { border-bottom: 1px solid var(--line-soft); }

.hp-read__link {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  align-items: baseline;
  gap: 6px 18px;
  padding: 16px 0;
  color: var(--text-body);
  transition: color 0.18s var(--ease);
}

.hp-read__link:hover { color: var(--seal-600); }

.hp-read__kind {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--seal-500);
  white-space: nowrap;
}

.hp-read__title {
  font-weight: 500;
  line-height: 1.65;
  color: inherit;
}

.hp-read__date {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .hp-read__link {
    grid-template-columns: 1fr auto;
  }
  /* 手機上把類別標籤挪到標題上方，日期跟標題同一行右對齊 */
  .hp-read__kind { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   11. 服務範圍：連續文字
   -------------------------------------------------------------------------- */
.hp-area {
  margin: 0;
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  line-height: 2.05;
  color: var(--text-invert-muted);
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   12. 進場動畫
   --------------------------------------------------------------------------
   這裡刻意什麼都不寫。site.css 第 1332 行已經處理好了，而且是用 `.js`
   前綴當開關 —— 沒有 JS 的環境下 opacity 規則根本不會套用，內容照樣看得到。

   在這裡重寫一份的話會蓋掉那個保護，變成「JS 沒跑 = 整頁空白」。
   -------------------------------------------------------------------------- */
