/* ==========================================================================
   FlexiPDF 粵語官網 · 通用樣式 common.css
   主題色：#E6122D  ·  淺色主題  ·  不使用 Google 字體
   ========================================================================== */

:root {
  /* 主題色系 */
  --c-primary: #E6122D;
  --c-primary-dark: #B70E23;
  --c-primary-2: #FF4A5E;
  --c-primary-rgb: 230, 18, 45;
  --c-accent: #1B2A4A;

  /* 中性色 */
  --c-ink: #14181F;
  --c-body: #3D4552;
  --c-muted: #6B7280;
  --c-line: #E8EBF0;
  --c-bg: #FFFFFF;
  --c-bg-soft: #F6F8FB;
  --c-bg-soft2: #EEF2F8;

  /* 排版 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(20, 24, 31, .06);
  --shadow-md: 0 12px 32px rgba(20, 24, 31, .10);
  --shadow-primary: 0 12px 28px rgba(var(--c-primary-rgb), .30);

  --maxw: 1200px;
  --nav-h: 72px;
}

/* --------------------------------------------------------------------------
   基礎重置
   -------------------------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.3; font-weight: 800; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section--soft { background: var(--c-bg-soft); }

/* 區塊標題 */
.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--c-primary);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 16px;
  letter-spacing: -.01em;
}
.section-sub {
  font-size: 17px;
  color: var(--c-muted);
  max-width: 720px;
}
.section-head { margin-bottom: 56px; }
.section-head--center { text-align: center; }
.section-head--center .section-sub { margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------------------
   按鈕
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  font-size: 15.5px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn--primary {
  background: linear-gradient(120deg, var(--c-primary), var(--c-primary-2));
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(var(--c-primary-rgb), .40); }

.btn--ghost {
  background: #fff;
  color: var(--c-ink);
  border-color: var(--c-line);
}
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }

.btn--lg { padding: 16px 34px; font-size: 16.5px; }
.btn--block { width: 100%; }

/* ==========================================================================
   導航欄 header（樣式獨立）
   ========================================================================== */
/* 注入容器不參與佈局，避免限制 sticky 生效範圍（否則滾動後導航欄會消失） */
#site-header {
  display: contents;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--c-line);
}
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__brand { display: flex; align-items: center; gap: 11px; }
.nav__logo { width: 40px; height: 40px; object-fit: contain; }
.nav__brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav__brand-name { font-size: 19px; font-weight: 800; color: var(--c-ink); letter-spacing: -.01em; }
.nav__brand-by { font-size: 11.5px; color: var(--c-muted); font-weight: 600; }

.nav__menu { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav__link {
  position: relative;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-body);
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav__link:hover { color: var(--c-primary); background: var(--c-bg-soft); }
.nav__link.is-active { color: var(--c-primary); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2.5px; border-radius: 2px;
  background: var(--c-primary);
}

.nav__actions { display: flex; align-items: center; gap: 12px; }

/* 語言切換（桌面下拉） */
.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 12px;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--c-body);
  background: #fff;
  border: 1.5px solid var(--c-line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lang__btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.lang__btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.lang__chev { transition: transform .25s ease; opacity: .7; }
.lang.is-open .lang__chev { transform: rotate(180deg); }
.lang__menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 190px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 1100;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px;
  font-size: 14.5px; font-weight: 600; color: var(--c-ink);
  border-radius: 9px;
  transition: background .18s, color .18s;
}
.lang__item:hover { background: var(--c-bg-soft); color: var(--c-primary); }
.lang__item.is-active { color: var(--c-primary); }
.lang__item .lang__check { width: 16px; height: 16px; color: var(--c-primary); }

/* 語言切換（移動端面板內） */
.mnav__lang { padding: 16px 0 4px; margin-top: 8px; border-top: 1px solid var(--c-line); }
.mnav__lang-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--c-muted); margin-bottom: 8px; }
.mnav__lang-label svg { width: 16px; height: 16px; }
.mnav__lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mnav__lang-list .lang__item {
  border: 1px solid var(--c-line);
  border-radius: 10px;
  font-size: 15px;
}
.mnav__lang-list .lang__item.is-active { border-color: var(--c-primary); background: rgba(var(--c-primary-rgb), .06); }

/* 漢堡按鈕 */
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  position: relative;
}
.nav__burger span {
  position: absolute;
  left: 12px; right: 12px;
  height: 2.2px; border-radius: 2px;
  background: var(--c-ink);
  transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.nav__burger span:nth-child(1) { top: 15px; }
.nav__burger span:nth-child(2) { top: 21px; }
.nav__burger span:nth-child(3) { top: 27px; }
.nav__burger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* 移動端彈層菜單 */
.mnav {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}
.mnav__overlay {
  position: absolute; inset: 0;
  background: rgba(15, 20, 30, .45);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .3s ease;
}
.mnav__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(84vw, 360px);
  background: #fff;
  box-shadow: -20px 0 50px rgba(0, 0, 0, .18);
  transform: translateX(100%);
  transition: transform .38s cubic-bezier(.22, 1, .36, 1);
  display: flex;
  flex-direction: column;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.mnav.is-open { pointer-events: auto; }
.mnav.is-open .mnav__overlay { opacity: 1; }
.mnav.is-open .mnav__panel { transform: translateX(0); }

.mnav__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 20px; margin-bottom: 8px;
  border-bottom: 1px solid var(--c-line);
}
.mnav__brand { display: flex; align-items: center; gap: 10px; }
.mnav__brand img { width: 34px; height: 34px; }
.mnav__brand b { font-size: 17px; color: var(--c-ink); }
.mnav__close {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--c-line); background: #fff; cursor: pointer;
  font-size: 22px; color: var(--c-ink); line-height: 1;
}
.mnav__links { display: flex; flex-direction: column; padding: 12px 0; gap: 2px; }
.mnav__links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 12px;
  font-size: 17px; font-weight: 600; color: var(--c-ink);
  border-radius: 12px;
  transition: background .2s, color .2s;
}
.mnav__links a:hover, .mnav__links a.is-active { background: var(--c-bg-soft); color: var(--c-primary); }
.mnav__links a svg { width: 18px; height: 18px; opacity: .4; }
.mnav__cta { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 20px; }

/* ==========================================================================
   頁腳 footer（樣式獨立）
   ========================================================================== */
.site-footer {
  background: var(--c-accent);
  color: #C9D2E3;
  padding: 72px 0 32px;
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}
.footer__brand { max-width: 380px; }
.footer__brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer__brand-row img {
  width: 42px; height: 42px;
  background: #fff; border-radius: 10px; padding: 5px;
}
.footer__brand-row b { display: block; color: #fff; font-size: 20px; line-height: 1.2; margin-bottom: 2px; }
.footer__brand-row span { display: block; font-size: 12px; color: #8C99B3; }
.footer__desc { font-size: 14.5px; line-height: 1.8; color: #9FABC4; }

.footer__contact { display: flex; flex-direction: column; gap: 14px; }
.footer__contact h4 { color: #fff; font-size: 15px; margin-bottom: 4px; }
.footer__contact a, .footer__contact span {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: #C9D2E3;
}
.footer__contact a:hover { color: #fff; }
.footer__contact svg { width: 18px; height: 18px; color: var(--c-primary-2); }

.footer__notice {
  margin-top: 32px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, .05);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
  line-height: 1.75;
  color: #9FABC4;
}
.footer__notice p + p { margin-top: 8px; }
.footer__notice .en { color: #7E8CA8; font-style: italic; }

.footer__bottom {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: #8C99B3;
}

/* ==========================================================================
   動畫（無呼吸燈效果）
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   子頁面通用 · 頁頭橫幅 page-hero
   ========================================================================== */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background:
    radial-gradient(900px 420px at 88% -20%, rgba(var(--c-primary-rgb), .12), transparent 60%),
    linear-gradient(180deg, #FFF6F7 0%, #FFFFFF 60%);
  text-align: center;
}
.page-hero__crumbs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--c-muted);
  margin-bottom: 18px;
}
.page-hero__crumbs a:hover { color: var(--c-primary); }
.page-hero__crumbs span { color: var(--c-primary); font-weight: 600; }
.page-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .03em;
  color: var(--c-primary); margin-bottom: 16px;
}
.page-hero__eyebrow::before,
.page-hero__eyebrow::after { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--c-primary); }
.page-hero h1 {
  font-size: clamp(32px, 5vw, 50px);
  letter-spacing: -.02em;
  line-height: 1.12;
  margin-bottom: 16px;
}
.page-hero p {
  font-size: 17px;
  color: var(--c-muted);
  max-width: 680px;
  margin: 0 auto;
}
.page-hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ==========================================================================
   子頁面通用 · 底部行動號召 CTA（含漂浮軟件裝飾）
   ========================================================================== */
.cta { position: relative; overflow: hidden; background: linear-gradient(125deg, #1B2A4A 0%, #7A1524 62%, var(--c-primary-dark) 100%); color: #fff; text-align: center; }
.cta::before { content: ""; position: absolute; z-index: 0; width: 520px; height: 520px; right: -160px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--c-primary-rgb), .35), transparent 65%); }
.cta > .container { position: relative; z-index: 1; }
.cta__deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.cta__deco span { position: absolute; display: grid; place-items: center; color: #fff; opacity: .10; border: 1px solid rgba(255,255,255,.22); border-radius: 16px; background: rgba(255,255,255,.04); backdrop-filter: blur(1px); animation: ctaFloat 9s ease-in-out infinite; }
.cta__deco span svg { width: 46%; height: 46%; }
.cta__deco .d1 { width: 76px; height: 76px; left: 6%; top: 20%; animation-duration: 10s; }
.cta__deco .d2 { width: 58px; height: 58px; left: 16%; bottom: 16%; animation-duration: 12s; animation-delay: -3s; border-radius: 50%; }
.cta__deco .d3 { width: 64px; height: 64px; right: 9%; top: 16%; animation-duration: 11s; animation-delay: -1.5s; }
.cta__deco .d4 { width: 88px; height: 88px; right: 5%; bottom: 14%; animation-duration: 13s; animation-delay: -5s; transform: rotate(-8deg); }
.cta__deco .d5 { width: 50px; height: 50px; left: 44%; top: 8%; animation-duration: 9.5s; animation-delay: -2s; border-radius: 50%; }
@keyframes ctaFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) { .cta__deco span { animation: none; } }
@media (max-width: 700px) { .cta__deco .d2, .cta__deco .d5 { display: none; } }
.cta h2 { color: #fff; font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.cta p { font-size: 17px; color: rgba(255, 255, 255, .9); max-width: 620px; margin: 0 auto 30px; }
.cta__btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta .btn--ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .4); }
.cta .btn--ghost:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.cta .btn--primary { background: #fff; color: var(--c-primary-dark); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.cta .btn--primary:hover { box-shadow: 0 16px 34px rgba(0,0,0,.24); }

/* ==========================================================================
   響應式
   ========================================================================== */
@media (max-width: 900px) {
  .nav__menu { display: none; }
  .nav__actions .btn { display: none; }
  .nav__actions .lang { display: none; }
  .nav__burger { display: block; }
  .section { padding: 68px 0; }
  .page-hero { padding: 52px 0 46px; }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .nav__brand-name { font-size: 17px; }
  .page-hero__cta { flex-direction: column; align-items: stretch; }
  .page-hero__cta .btn { width: 100%; }
  .cta__btns { flex-direction: column; align-items: stretch; }
  .cta__btns .btn { width: 100%; justify-content: center; }
}
