/* ============================================
   天邑廣告社官網 — 共用樣式
   設計原則：照片為主、白底深灰字、品牌紫黃只當點綴、CTA 用 LINE 綠
   ============================================ */

/* 標題宋體：自建子集（tools/產字型子集.py 產生；改標題出現新字要重跑） */
@font-face {
  font-family: "TY Serif TC";
  src: url("../fonts/NotoSerifTC-900-subset.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

:root {
  /* 品牌色（源自既有 logo：紫底、黃字、藍 C） */
  --brand-purple: #5b2d8e;
  --brand-purple-deep: #3e105c;
  --brand-yellow: #ffd900;
  --brand-blue: #2fa8df;
  /* 功能色 */
  --line-green: #06c755;
  --line-green-dark: #05a847;
  --ink: #1f2229;
  --ink-soft: #555b66;
  --paper: #ffffff;
  --paper-warm: #f7f6f9;
  --border: #e6e3ec;
  /* 版面 */
  --maxw: 1080px;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(62, 16, 92, 0.05);
  --serif: "TY Serif TC", "Noto Serif TC", "Microsoft JhengHei", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; }
.site-nav a:hover { color: var(--brand-purple); }
.nav-cta {
  background: var(--line-green); color: #fff !important;
  padding: 9px 18px; border-radius: 999px; font-weight: 700;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--line-green-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 700; cursor: pointer;
  border: none; transition: transform 0.12s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-line {
  background: var(--line-green); color: #fff;
  padding: 15px 34px; font-size: 1.12rem;
}
.btn-line:hover { background: var(--line-green-dark); }
.btn-ghost {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  padding: 14px 26px; font-size: 1rem;
}
.btn-ghost:hover { border-color: #fff; }

/* ---------- Hero（深色夜景滿版） ---------- */
.hero {
  position: relative; color: #fff;
  min-height: 82vh;
  display: flex; align-items: center;
  background: var(--brand-purple-deep);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  filter: brightness(0.45) saturate(1.05);
}
.hero-content { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 96px; }
.hero-eyebrow {
  font-size: 0.98rem; font-weight: 400; letter-spacing: 0.06em;
  color: var(--brand-yellow); margin-bottom: 14px;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 900; line-height: 1.25; margin-bottom: 18px;
}
.hero-sub { font-size: clamp(1rem, 2.6vw, 1.25rem); color: rgba(255,255,255,0.88); margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--paper-warm); }
.section-head { text-align: left; margin-bottom: 40px; }
.section-head::before {
  content: ""; display: block; width: 46px; height: 5px;
  background: var(--brand-yellow); margin-bottom: 16px;
}
.section-title { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 900; }
.section-desc { color: var(--ink-soft); margin-top: 10px; max-width: 620px; }

/* ---------- 服務網格 ---------- */
/* 第一梯隊：大卡（主力品項） */
.service-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .service-grid { grid-template-columns: 1fr 1fr; } }
.service-card {
  background: var(--paper); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.service-card .service-thumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
}
.service-card .service-body { padding: 18px 22px 22px; }
.service-card h3 { font-size: 1.18rem; margin-bottom: 6px; }
.service-card p { font-size: 0.95rem; color: var(--ink-soft); }
.service-card[hidden] { display: none; }

/* 第二梯隊：清單列（標配品項） */
.service-list { display: grid; gap: 0 44px; grid-template-columns: 1fr; margin-top: 36px; }
@media (min-width: 720px) { .service-list { grid-template-columns: 1fr 1fr; } }
.service-row {
  display: flex; gap: 16px; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--border);
}
.service-row img { width: 92px; height: 68px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.service-row h3 { font-size: 1.02rem; }
.service-row p { font-size: 0.88rem; color: var(--ink-soft); }
.service-row[hidden] { display: none; }

/* ---------- 案例 ---------- */
.gallery-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  cursor: zoom-in; background: var(--brand-purple-deep);
}
.gallery-item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.25s, opacity 0.25s;
}
.gallery-item video {
  width: 100%; aspect-ratio: 4 / 3; object-fit: contain;
  background: #000; display: block;
}
.gallery-item:has(video) { cursor: default; }
.gallery-item:has(video) figcaption { pointer-events: none; }
.gallery-item:hover img { transform: scale(1.04); opacity: 0.92; }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(transparent, rgba(20, 8, 32, 0.82));
  color: #fff; font-size: 0.85rem; padding: 26px 12px 10px;
}
.video-feature {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  margin-bottom: 28px; background: #000;
}
.video-feature video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- 信任區（深色、無卡片） ---------- */
.section-dark { background: var(--brand-purple-deep); color: #fff; }
.trust-lead { max-width: 720px; margin-bottom: 46px; }
.trust-statement {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.8vw, 2.05rem); font-weight: 900;
  line-height: 1.45; margin-bottom: 12px;
}
.trust-statement em { font-style: normal; color: var(--brand-yellow); }
.trust-lead > p { color: rgba(255, 255, 255, 0.85); }
.trust-facts { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.fact { border-left: 3px solid var(--brand-yellow); padding-left: 18px; }
.fact .num { font-family: var(--serif); font-size: 1.65rem; font-weight: 900; color: var(--brand-yellow); line-height: 1.3; }
.fact h3 { font-size: 1.05rem; margin: 4px 0 6px; }
.fact p { font-size: 0.92rem; color: rgba(255, 255, 255, 0.82); }

/* ---------- 流程（無框、大字編號） ---------- */
.steps { display: grid; gap: 30px 28px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); counter-reset: step; }
.step { border-top: 1px solid #d9d3e2; padding-top: 20px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--serif); display: block; line-height: 1;
  font-size: 2.1rem; font-weight: 900; color: var(--brand-purple);
}
.step h3 { font-size: 1.05rem; margin: 12px 0 6px; }
.step p { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px; background: var(--paper); overflow: hidden;
}
.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 16px 20px;
  list-style: none; position: relative;
}
.faq-item summary::after {
  content: "＋"; position: absolute; right: 18px; color: var(--brand-purple);
}
.faq-item[open] summary::after { content: "－"; }
.faq-item .answer { padding: 0 20px 18px; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- 底部 CTA ---------- */
.cta-final {
  position: relative; overflow: hidden;
  background: url("../img/seamless-facade-clinic-kangbo.webp") center / cover no-repeat, var(--brand-purple-deep);
  color: #fff; text-align: center; padding: 100px 0;
}
.cta-final::before { content: ""; position: absolute; inset: 0; background: rgba(24, 7, 40, 0.78); }
.cta-final .container { position: relative; z-index: 1; }
.cta-final h2 { font-family: var(--serif); font-size: clamp(1.6rem, 4.5vw, 2.3rem); font-weight: 900; margin-bottom: 12px; }
.cta-final p { color: rgba(255,255,255,0.85); margin-bottom: 30px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #17101f; color: #b9b2c4;
  padding: 52px 0 96px; font-size: 0.9rem; line-height: 1.9;
}
.site-footer a { color: #ddd6e8; }
.site-footer strong { color: #fff; font-size: 1.02rem; }
.site-footer .cols { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .site-footer .cols { grid-template-columns: 1.1fr 0.8fr 1.3fr; } }
.footer-map iframe {
  width: 100%; height: 220px; border: 0; display: block;
  border-radius: var(--radius); filter: saturate(0.9);
}

/* ---------- 行動版底部浮動 LINE 條 ---------- */
.float-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: 1px; box-shadow: 0 -4px 18px rgba(0,0,0,0.18);
}
.float-bar a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 8px; font-weight: 700; font-size: 1.05rem; color: #fff;
}
.float-bar .f-line { background: var(--line-green); flex: 2.2; }
.float-bar .f-tel { background: var(--brand-purple); }
@media (min-width: 900px) {
  .float-bar { left: auto; right: 26px; bottom: 26px; border-radius: 999px; overflow: hidden; width: 340px; }
  .site-footer { padding-bottom: 40px; }
}

/* ---------- 影片點播區（作品集頁） ---------- */
.video-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  margin-bottom: 44px;
}
.video-grid video {
  width: 100%; aspect-ratio: 16 / 9; object-fit: contain;
  border-radius: var(--radius); background: #000;
}
.video-grid figcaption { font-size: 0.88rem; color: var(--ink-soft); margin-top: 8px; }

/* ---------- 作品集頁 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.filter-btn {
  border: 1px solid var(--border); background: var(--paper);
  border-radius: 999px; padding: 8px 18px; font-size: 0.92rem; cursor: pointer;
  font-family: inherit;
}
.filter-btn.active { background: var(--brand-purple); color: #fff; border-color: var(--brand-purple); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 4, 18, 0.92);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 82vh; max-width: 100%; border-radius: 8px; }
.lightbox .lb-caption { color: #fff; margin-top: 14px; font-size: 0.95rem; }
.lightbox .lb-close {
  position: absolute; top: 18px; right: 22px; font-size: 2rem; color: #fff;
  background: none; border: none; cursor: pointer;
}

/* ---------- 手機版調整（2026-08-22） ---------- */
.nowrap { white-space: nowrap; }
.brand span, .site-nav a { white-space: nowrap; }
@media (max-width: 640px) {
  .site-header .container { padding: 0 14px; }
  .brand { font-size: 0.98rem; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .site-nav { gap: 13px; font-size: 0.85rem; }
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 26px; }
  .hero-content { padding-top: 72px; padding-bottom: 72px; }
  .trust-lead { margin-bottom: 30px; }
  .trust-facts { gap: 22px; }
  .steps { gap: 22px; }
  .cta-final { padding: 72px 0; }
  .service-card .service-thumb { aspect-ratio: 4 / 3; }
}
