@charset "utf-8";

/* ============================================================
   EditPlus 繁體中文官網 · 公共樣式 common.css
   主題色：#FF6329（橙） / #FFCE00（黃）
   說明：導航欄、頁尾、按鈕、全域性變數等通用樣式集中管理
   ============================================================ */

:root {
  --ep-primary: #FF6329;
  --ep-primary-dark: #E2521C;
  --ep-accent: #E2521C;
  --ep-ink: #1c1f26;
  --ep-text: #3a3f4a;
  --ep-muted: #6b7280;
  --ep-line: #ececf0;
  --ep-bg: #ffffff;
  --ep-bg-soft: #f7f8fa;
  --ep-radius: 14px;
  --ep-shadow-sm: 0 2px 10px rgba(20, 24, 33, .06);
  --ep-shadow: 0 12px 36px rgba(20, 24, 33, .10);
  --ep-shadow-primary: 0 12px 30px rgba(255, 99, 41, .32);
  --ep-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
             "Hiragino Sans GB", "Microsoft YaHei", "微軟雅黑", "Helvetica Neue",
             Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ep-font);
  color: var(--ep-text);
  background: var(--ep-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.ep-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 通用按鈕 ---------- */
.ep-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
  white-space: nowrap;
}
.ep-btn svg { width: 18px; height: 18px; flex: none; }
.ep-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--ep-primary) 0%, #ff8348 100%);
  box-shadow: var(--ep-shadow-primary);
}
.ep-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(255, 99, 41, .42); }
.ep-btn-ghost {
  color: var(--ep-ink);
  background: #fff;
  border-color: var(--ep-line);
}
.ep-btn-ghost:hover { border-color: var(--ep-primary); color: var(--ep-primary); }

/* ============================================================
   導航欄 Header
   ============================================================ */
/* 讓掛載容器不形成限制塊，使 sticky 相對 body 生效，避免滾動後導航欄消失 */
#ep-header { display: contents; }
.ep-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.72) 100%);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(236, 236, 240, .7);
  transition: padding .3s ease, box-shadow .3s ease, background .3s ease;
}
/* 滾動後收縮為更緊湊、帶陰影的狀態 */
.ep-header.is-scrolled {
  padding: 8px 0;
  box-shadow: 0 8px 30px rgba(20, 24, 33, .08);
  border-bottom-color: transparent;
}
.ep-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 56px;
}

/* ---------- 品牌標識 ---------- */
.ep-brand { display: flex; align-items: center; gap: 13px; }
.ep-brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.ep-brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.ep-brand__name { font-size: 20px; font-weight: 800; color: var(--ep-ink); letter-spacing: .2px; }
.ep-brand__by { font-size: 11.5px; color: var(--ep-muted); font-weight: 600; letter-spacing: .2px; }

/* ---------- 居中段落式選單 ---------- */
.ep-nav__menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0 auto;
  padding: 6px;
  background: rgba(247, 248, 250, .8);
  border: 1px solid rgba(236, 236, 240, .9);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(20,24,33,.03);
}
.ep-nav__link {
  position: relative;
  display: block;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ep-text);
  transition: color .25s ease, background .25s ease;
}
.ep-nav__link:hover { color: var(--ep-ink); background: #fff; box-shadow: var(--ep-shadow-sm); }
.ep-nav__link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--ep-primary) 0%, #ff8348 100%);
  box-shadow: 0 6px 16px rgba(255,99,41,.3);
}

.ep-nav__actions { display: flex; align-items: center; gap: 9px; }

.ep-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--ep-line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  box-shadow: var(--ep-shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.ep-burger:hover { border-color: var(--ep-primary); }
.ep-burger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--ep-ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .25s ease;
}
.ep-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ep-burger.is-open span:nth-child(2) { opacity: 0; }
.ep-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 移動端彈出選單 ---------- */
.ep-mobile {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
}
.ep-mobile.is-open { display: block; }
.ep-mobile__mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 24, .42);
  opacity: 0;
  transition: opacity .3s ease;
}
.ep-mobile.is-open .ep-mobile__mask { opacity: 1; }
.ep-mobile__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(86%, 360px);
  height: 100%;
  background: #fff;
  box-shadow: -16px 0 50px rgba(15, 18, 24, .18);
  padding: 26px 24px 32px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .34s cubic-bezier(.22, 1, .36, 1);
  overflow-y: auto;
}
.ep-mobile.is-open .ep-mobile__panel { transform: translateX(0); }
.ep-mobile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ep-line);
}
.ep-mobile__title { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ep-ink); }
.ep-mobile__title img { width: 32px; height: 32px; border-radius: 8px; }
.ep-mobile__close {
  width: 40px; height: 40px;
  border: 1px solid var(--ep-line);
  border-radius: 10px;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  color: var(--ep-muted);
  cursor: pointer;
}
.ep-mobile__links { list-style: none; margin: 22px 0 0; padding: 0; }
.ep-mobile__links li { margin-bottom: 4px; }
.ep-mobile__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ep-ink);
  background: var(--ep-bg-soft);
  transition: background .2s, color .2s;
}
.ep-mobile__links a:hover,
.ep-mobile__links a.is-active { background: rgba(255, 99, 41, .1); color: var(--ep-primary); }
.ep-mobile__links a::after {
  content: "›";
  font-size: 20px;
  color: var(--ep-muted);
}
.ep-mobile__cta { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.ep-mobile__cta .ep-btn { width: 100%; justify-content: center; }
.ep-mobile__contact {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--ep-line);
  font-size: 13.5px;
  color: var(--ep-muted);
}
.ep-mobile__contact strong { color: var(--ep-ink); }

/* ============================================================
   語言切換（桌面端下拉）
   ============================================================ */
.ep-lang { position: relative; }
.ep-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--ep-line);
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ep-ink);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.ep-lang__btn:hover { border-color: var(--ep-primary); color: var(--ep-primary); }
.ep-lang__btn svg { width: 16px; height: 16px; }
.ep-lang__btn .chev { transition: transform .25s ease; }
.ep-lang.is-open .ep-lang__btn .chev { transform: rotate(180deg); }
.ep-lang__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 156px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--ep-line);
  border-radius: 12px;
  box-shadow: var(--ep-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 1100;
}
.ep-lang.is-open .ep-lang__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.ep-lang__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ep-text);
}
.ep-lang__menu a:hover { background: var(--ep-bg-soft); color: var(--ep-primary); }
.ep-lang__menu a.is-active { color: var(--ep-primary); font-weight: 700; }
.ep-lang__menu a svg { width: 16px; height: 16px; flex: none; }

/* 語言切換（移動端面板） */
.ep-mobile__lang { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ep-line); }
.ep-mobile__lang-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--ep-muted);
  margin-bottom: 10px;
}
.ep-mobile__lang-title svg { width: 16px; height: 16px; }
.ep-mobile__lang-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ep-mobile__lang-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--ep-bg-soft);
  font-size: 14px; color: var(--ep-text);
}
.ep-mobile__lang-list a.is-active { color: var(--ep-primary); font-weight: 700; }
.ep-mobile__lang-list a svg { width: 15px; height: 15px; flex: none; }

/* ============================================================
   子頁面通用：頁首橫幅 / 區塊容器
   ============================================================ */
.ep-pagehero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 64px 0 56px;
  background:
    radial-gradient(900px 360px at 50% -20%, rgba(255, 206, 0, .2), transparent 62%),
    linear-gradient(180deg, #fffaf6 0%, #ffffff 100%);
  border-bottom: 1px solid var(--ep-line);
}
.ep-pagehero__eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ep-primary);
}
.ep-pagehero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 800;
  color: var(--ep-ink);
  margin: 12px 0 14px;
  letter-spacing: -.5px;
}
.ep-pagehero p {
  max-width: 660px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--ep-muted);
}
.ep-section { padding: 70px 0; }
.ep-section--soft { background: var(--ep-bg-soft); }
.ep-section__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--ep-ink);
  margin: 0 0 8px;
}

/* ============================================================
   頁尾 Footer
   ============================================================ */
.ep-footer {
  background: #15181f;
  color: #c3c8d2;
  padding: 56px 0 30px;
  margin-top: 80px;
}
.ep-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.ep-footer__brand { max-width: 420px; }
.ep-footer__logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ep-footer__logo img { width: 40px; height: 40px; border-radius: 9px; }
.ep-footer__logo b { font-size: 19px; color: #fff; font-weight: 800; }
.ep-footer__logo span { display: block; font-size: 12px; color: #8a909c; }
.ep-footer__desc { font-size: 14px; line-height: 1.85; color: #9aa0ac; }
.ep-footer__contact { display: grid; gap: 12px; }
.ep-footer__contact a,
.ep-footer__contact span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: #c3c8d2;
}
.ep-footer__contact svg { width: 18px; height: 18px; color: var(--ep-accent); flex: none; }
.ep-footer__notice {
  margin: 28px 0 0;
  padding: 18px 20px;
  background: rgba(255, 255, 255, .04);
  border-left: 0px solid var(--ep-primary);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.85;
  color: #9aa0ac;
}
.ep-footer__notice .en { color: #767c88; font-size: 12px; }
.ep-footer__copy {
  margin-top: 26px;
  font-size: 13px;
  color: #767c88;
  text-align: center;
}

/* 中等寬度：先收起次要操作按鈕，給居中選單讓出空間 */
@media (max-width: 1080px) {
  .ep-nav__actions .ep-btn-ghost { display: none; }
  .ep-nav__link { padding: 8px 12px; }
  .ep-nav__menu { gap: 0; }
}

@media (max-width: 900px) {
  .ep-nav__menu, .ep-nav__actions .ep-btn, .ep-lang { display: none; }
  .ep-burger { display: flex; }
}
