:root {
  --brand: #1E5C70;
  --brand-dark: #143A47;
  --brand-soft: #E3EEF1;
  --ink: #1B2326;
  --body: #3A4549;
  --muted: #6B777B;
  --panel: #F3F5F5;
  --line: #E2E7E8;
  --white: #ffffff;
  --radius: 14px;
  --radius-lg: 20px;
  --max: 1360px;
  --gutter: 32px;
  --font: "Noto Sans TC", system-ui, sans-serif;
  --font-en: "Outfit", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--body); background: var(--white); line-height: 1.75; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.en { font-family: var(--font-en); }
h1, h2, h3 { color: var(--ink); line-height: 1.3; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--brand); color: var(--white); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
mark.tbd { background: #FFF1A8; color: inherit; padding: 0 2px; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line), 0 4px 16px rgba(20,58,71,.05); }
.header-inner { display: flex; align-items: center; gap: 40px; height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 10px; line-height: 1.1; }
.logo b { display: block; font-size: 17px; color: var(--ink); letter-spacing: .08em; }
.logo small { display: block; font-family: var(--font-en); font-size: 10px; font-weight: 600; letter-spacing: .18em; color: var(--brand); }
.nav { display: flex; gap: 32px; margin: 0 auto; font-size: 15px; color: var(--muted); }
.nav a { transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--ink); font-weight: 700; }
.menu-btn { display: none; width: 40px; height: 40px; margin-left: auto; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 6px auto; transition: transform .2s; }
.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 28px; border-radius: 999px; font-weight: 700; font-size: 15px; transition: background .2s, color .2s, transform .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
/* 首頁主視覺 CTA：珊瑚粉紅漸層，跟 teal 主色做對比 */
.btn-gradient { background: linear-gradient(135deg, #FF8A7A, #E9497A); color: var(--white); box-shadow: 0 8px 20px rgba(233,73,122,.3); transition: filter .2s, transform .2s, box-shadow .2s; }
.btn-gradient:hover { filter: brightness(1.06); box-shadow: 0 10px 24px rgba(233,73,122,.38); }
.btn-sm { padding: 8px 20px; font-size: 14px; }
.arrow { width: 14px; height: 10px; position: relative; display: inline-block; }
.arrow::before { content: ""; position: absolute; left: 0; right: 1px; top: 4px; height: 2px; background: currentColor; }
.arrow::after { content: ""; position: absolute; right: 0; top: 1px; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }

/* 圓點連結：仿參考站的「● 關於我們」 */
.link-dot { display: inline-flex; align-items: center; gap: 14px; font-weight: 700; color: var(--ink); margin-top: 28px; }
.link-dot .dot { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); position: relative; transition: transform .25s; }
.link-dot .dot::after { content: ""; position: absolute; inset: 0; margin: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--white); }
.link-dot:hover .dot { transform: scale(1.1); }
.link-dot-right { align-self: flex-end; }

/* Common blocks */
.section { padding: 120px var(--gutter); }
.eyebrow { font-weight: 700; font-size: 15px; color: var(--brand); letter-spacing: .02em; }
.h2 { font-size: clamp(26px, 3vw, 32px); font-weight: 900; margin: 4px 0 16px; }
.h3 { font-size: 24px; font-weight: 900; margin: 4px 0 16px; }
.panel { background: var(--panel); border-radius: var(--radius-lg); }
.card { background: var(--panel); border-radius: var(--radius); padding: 32px; transition: transform .25s, box-shadow .25s; }
.tag { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink); }
.tag::before { content: ""; width: 6px; height: 6px; background: var(--brand); }
.tag span { font-family: var(--font); }
.center { text-align: center; }
/* 標題分句不從詞中間斷行 */
.nw { display: inline-block; }

/* Hero */
.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; letter-spacing: .18em; color: var(--brand); }
.hero-eyebrow::before { content: ""; width: 28px; height: 2px; background: #F2647A; }
.hero-title { font-size: clamp(36px, 4.6vw, 64px); font-weight: 900; color: var(--ink); line-height: 1.22; letter-spacing: .01em; margin-top: 18px; }
.hero-title em { font-style: normal; color: var(--brand); background: linear-gradient(transparent 70%, rgba(242,100,122,.28) 70%, rgba(242,100,122,.28) 92%, transparent 92%); }
.hero-lead { font-size: clamp(16px, 1.4vw, 19px); font-weight: 500; color: var(--body); margin: 22px 0 32px; line-height: 1.8; max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 32px; font-size: 14px; font-weight: 700; color: var(--muted); }
.hero-trust li::before { content: "✓"; color: var(--brand); margin-right: 6px; }
/* 主視覺：投放平台繞著直白的軌道，logo 沿用跑馬燈的彩色圖檔 */
.hero-art { position: relative; aspect-ratio: 1 / 1; }
.hero-orbit { position: absolute; inset: 8%; border-radius: 50%; border: 2px dashed rgba(30,92,112,.2); }
.hero-orbit::before { content: ""; position: absolute; inset: 19%; border-radius: 50%; border: 2px solid rgba(30,92,112,.1); }
.hero-core { position: absolute; inset: 36%; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #2E7F98, var(--brand) 50%, var(--brand-dark)); box-shadow: 0 24px 50px rgba(20,58,71,.25); color: #fff; font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; font-style: italic; }
.hero-chip { position: absolute; translate: -50% -50%; display: flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border-radius: 999px; background: var(--white); box-shadow: 0 10px 28px rgba(20,58,71,.14); font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; animation: chip-float 6s ease-in-out var(--d, 0s) infinite; }
.hero-chip img { width: 22px; height: 22px; }
@keyframes chip-float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-chip { animation: none; } }

/* 廣告平台 logo 跑馬燈：清單由 app.js 讀 /data/media.json 產生 */
.media { padding: 40px 0; overflow: hidden; }
.marquee { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee-set { display: flex; gap: 16px; padding-right: 16px; }
.media-item { height: 64px; padding: 0 24px; border-radius: 10px; background: var(--panel); display: flex; align-items: center; gap: 12px; flex: none; white-space: nowrap; }
.media-item img { width: 28px; height: 28px; }
.media-item span { font-family: 'Outfit', sans-serif; font-size: 17px; font-weight: 600; color: var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

.statement { padding-top: 88px; padding-bottom: 120px; text-align: center; }
.statement p { font-size: clamp(22px, 2.8vw, 34px); font-weight: 900; color: var(--ink); line-height: 1.7; }
/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 48px; }
/* 關於我們：品牌色底大字標語（取代原本的圖庫照片） */
.about-slogan { aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--brand-dark) radial-gradient(circle at 85% 15%, rgba(53,183,154,.3), transparent 50%); display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8% 9%; }
.about-slogan p { font-size: clamp(26px, 2.8vw, 38px); font-weight: 900; line-height: 1.45; color: var(--white); }
.about-slogan em { font-style: normal; background: linear-gradient(transparent 68%, rgba(242,100,122,.55) 68%, rgba(242,100,122,.55) 90%, transparent 90%); }
.about-slogan small { margin-top: 18px; font-size: 13px; font-weight: 700; letter-spacing: .18em; color: #7FD1E0; }
.about-title { font-size: 26px; font-weight: 900; margin: 6px 0 20px; }
.about-title .en { font-size: 16px; font-weight: 700; margin-left: 10px; }
.about-body p + p { margin-top: 12px; }

/* 首頁：關於直白 + 數據證明 */
.home-h2 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 900; line-height: 1.28; margin: 8px 0 18px; }
.home-about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 72px; align-items: center; }
.home-about p { font-size: 17px; max-width: 560px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-weight: 700; color: var(--ink); padding-bottom: 4px; border-bottom: 2px solid #F2647A; }
.text-link:hover .arrow { transform: translateX(3px); }
.text-link .arrow { transition: transform .2s; }
/* 數字在上、說明在下（dd 用 order 排到 dt 前面） */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border-radius: var(--radius-lg); padding: 30px 28px; }
.stat dd { order: -1; margin: 0; font-family: var(--font-en); font-size: clamp(34px, 4vw, 54px); font-weight: 800; color: var(--ink); line-height: 1.05; letter-spacing: -.02em; }
.stat dd small { font-family: var(--font); font-size: .6em; font-weight: 900; margin: 0 .04em; }
.stat dt { font-size: 15px; font-weight: 700; color: var(--muted); }
.stat-hl { background: var(--brand); }
.stat-hl dd { color: var(--white); }
.stat-hl dt { color: rgba(255,255,255,.8); }

/* 首頁：服務項目深色帶 */
.svc-band { background: var(--brand-dark) radial-gradient(circle at 85% 10%, rgba(53,183,154,.18), transparent 45%); color: #C9DADF; padding: 120px 0; }
.svc-band .eyebrow { color: #7FD1E0; }
.svc-band .home-h2 { color: var(--white); }
.svc-sub { font-size: 17px; color: #A9C2C9; }
.svc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.svc-card { display: flex; flex-direction: column; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); padding: 34px 32px; transition: background .2s, transform .2s; }
.svc-card:hover { background: rgba(255,255,255,.1); transform: translateY(-3px); }
.svc-card > b { font-size: 15px; font-weight: 800; color: #FF8A7A; }
.svc-card h3 { color: var(--white); font-size: 26px; font-weight: 900; margin: 8px 0 2px; }
.svc-card > span.en { font-size: 14px; font-weight: 600; color: #7FD1E0; }
.svc-card p { margin: 16px 0 20px; font-size: 16px; }
.svc-card ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.svc-card li { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.1); color: #E3EEF1; }
.svc-card .more { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; font-weight: 700; color: var(--white); }

/* 首頁：客戶案例（官網截圖放在瀏覽器框裡，左右交錯） */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-head .home-h2 { margin-bottom: 0; }
.case-rows { display: flex; flex-direction: column; gap: 24px; margin-top: 48px; }
.case-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; background: var(--panel); border-radius: 24px; padding: 40px; }
.case-row:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.case-row:nth-child(even) .browser { order: 2; }
.browser { border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(20,58,71,.12); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #D5DCDE; }
.browser-bar span { margin-left: 10px; flex: 1; background: var(--white); border-radius: 6px; font-size: 11px; color: var(--muted); padding: 3px 10px; }
.shot { aspect-ratio: 2 / 1; display: grid; place-items: center; background: repeating-linear-gradient(135deg, #EEF2F3 0 14px, #F6F8F8 14px 28px); font-size: 14px; font-weight: 700; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case-ind { font-size: 14px; font-weight: 700; color: var(--brand); }
.case-body h3 { font-size: 30px; font-weight: 900; margin: 6px 0 12px; }
.case-body > p:not(.case-ind) { font-size: 16px; }
.case-res { display: flex; gap: 32px; margin-top: 22px; }
.case-res b { display: block; font-size: 40px; font-weight: 800; color: var(--ink); line-height: 1.05; }
.case-res b small { font-family: var(--font); font-size: .55em; font-weight: 900; margin: 0 .06em; }
.case-res span { font-size: 13px; font-weight: 700; color: var(--muted); }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.case-tags span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--white); color: var(--brand); border: 1px solid var(--line); }

/* 成功案例頁沿用同一組案例 */
.case-page { padding-top: 24px; }
.case-page .case-rows { margin-top: 0; }
.case-page > p { margin-top: 40px; }

/* 首頁：整段滿版底色（不改變內容寬度，用 box-shadow 往兩側延伸） */
.band-soft { box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); background: var(--band); --band: var(--brand-soft); }
.band-soft .stat:not(.stat-hl) { background: var(--white); }
.band-soft .card { background: var(--white); }
/* 服務項目頁：夾在中間的色帶上下要留距離，因為相鄰區塊的 padding 在色帶外 */
.service-detail.band-soft { margin-top: 120px; padding-bottom: 120px; }
.band-dark { --band: var(--brand-dark); box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); background: var(--band); color: #C9DADF; margin-top: 120px; margin-bottom: 120px; }
.band-dark .eyebrow { color: #7FD1E0; }
.band-dark h2, .band-dark h3 { color: var(--white); }
.band-dark .card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.band-dark .steps b { color: #FF8A7A; }

/* 首頁：結尾邀請 */
.closing-cta { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; background: linear-gradient(120deg, var(--brand-dark), var(--brand)); border-radius: 28px; padding: 72px 64px; margin: 40px 0 120px; color: #D5E3E7; }
.closing-cta::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: linear-gradient(135deg, #FF8A7A, #E9497A); opacity: .85; }
.closing-cta h2 { color: var(--white); font-size: clamp(26px, 3vw, 38px); font-weight: 900; margin-bottom: 10px; }
.closing-cta p { font-size: 17px; }
.closing-cta > div { position: relative; z-index: 1; }
.closing-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.5); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* Values：錯落排列 */
/* 為什麼選直白：左側標題捲動時固定，右側卡片往上滑（另有 Bento 版存在 design-options/ 備用） */
.values { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; padding-top: 24px; padding-bottom: 120px; }
.values-side { position: sticky; top: 120px; align-self: start; }
.values-title { font-size: clamp(32px, 4.2vw, 56px); font-weight: 900; margin: 0; letter-spacing: -.01em; }
.values-side p { font-size: 17px; color: var(--muted); margin: 6px 0 32px; }
.value-list { display: flex; flex-direction: column; gap: 16px; }
.value { display: grid; grid-template-columns: 64px 1fr; gap: 24px; background: var(--brand-soft); border-radius: var(--radius); padding: 40px 44px; }
.value > b { font-size: 36px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.value h3 { font-size: clamp(20px, 2vw, 24px); font-weight: 900; margin-bottom: 8px; }
.value p { font-size: 17px; color: var(--body); line-height: 1.75; }

/* Footer */
.footer { background: var(--brand-dark) radial-gradient(circle at 85% 20%, rgba(53,183,154,.25), transparent 45%); padding: 10px; }
.footer-card { background: var(--white); border-radius: var(--radius); max-width: 1400px; margin: 0 auto; padding: 48px 56px 20px; display: grid; grid-template-columns: 1fr auto; gap: 24px; }
.footer-contact .eyebrow { color: var(--ink); font-weight: 500; }
.footer-contact ul { list-style: none; font-weight: 700; color: var(--ink); }
.footer-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; gap: 12px; }
.footer-side > p { font-size: 14px; color: var(--muted); }
.social { display: flex; gap: 6px; }
.social a { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.social a:hover { background: var(--panel); }
.social svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.copyright { grid-column: 1 / -1; text-align: center; font-size: 12px; color: var(--muted); margin-top: 16px; }

/* Inner pages */
.page-hero { padding-top: 88px; padding-bottom: 64px; }
.page-hero h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 900; margin: 4px 0 16px; }
.page-hero > p:last-child { font-size: 17px; max-width: 640px; }
.muted { color: var(--muted); }
.btn-white { background: var(--white); color: var(--brand-dark); }
.btn-white:hover { background: var(--brand-soft); }
.btn-block { width: 100%; padding: 14px 28px; font-size: 16px; }

.who-panel { padding: 40px; }
.check-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; margin-top: 8px; }
.check-list li { position: relative; padding-left: 32px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); }
.check-list li::after { content: ""; position: absolute; left: 7px; top: 10px; width: 5px; height: 9px; border-right: 2px solid var(--white); border-bottom: 2px solid var(--white); transform: rotate(45deg); }
.check-list b { color: var(--ink); margin-right: 6px; }

.service-detail { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; padding-bottom: 0; scroll-margin-top: 80px; }
.sd-head .h2 { margin-top: 10px; }
.sd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sd-grid h3 { font-size: 19px; font-weight: 900; margin-bottom: 8px; }
.sd-grid p { font-size: 15px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.steps b { display: block; font-size: 36px; font-weight: 800; color: var(--brand); line-height: 1; margin-bottom: 16px; }
.steps h3 { font-size: 19px; font-weight: 900; margin-bottom: 8px; }
.steps p { font-size: 15px; }

.faq { padding-top: 0; max-width: 880px; }
.faq-list { margin-top: 24px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; position: relative; padding: 22px 48px 22px 0; font-weight: 700; font-size: 17px; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before, .faq-item summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 2px; background: var(--brand); transition: transform .2s; }
.faq-item summary::after { transform: rotate(90deg); }
.faq-item[open] summary::after { transform: rotate(0); }
.faq-item p { padding: 0 48px 24px 0; }

.cta-panel { background: var(--brand-dark) radial-gradient(circle at 85% 20%, rgba(53,183,154,.3), transparent 50%); color: #D5E3E7; border-radius: var(--radius-lg); padding: 72px 32px; text-align: center; margin-bottom: 120px; }
.cta-panel h2 { color: var(--white); font-size: clamp(24px, 3vw, 32px); font-weight: 900; }
.cta-panel p { margin: 12px 0 28px; }


/* 關於我們：工作原則 2×2 */
.principle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.principle { padding: 36px 40px; }
.principle .tag { font-size: 14px; color: var(--brand); }
.principle h3 { font-size: 22px; font-weight: 900; margin: 14px 0 8px; }
.principle p:last-child { font-size: 17px; }

/* Contact form */
.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; margin-bottom: 120px; }
.form-panel { padding: 48px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 20px; border: 0; min-width: 0; }
.field label, .field legend { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231B2326' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #B9C4C7; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,92,112,.15); }
.field.invalid input { border-color: #C2362B; }
.field-error { color: #C2362B; font-size: 13px; margin-top: 6px; }
.hint { font-size: 13px; color: var(--muted); margin: -10px 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: 14px; cursor: pointer; transition: .15s; }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--white); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(30,92,112,.25); }
.form-error { background: #FBECEA; color: #A2281F; font-size: 14px; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.note a, .copyright a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-done { padding: 24px 0; }
.form-done:focus { outline: none; }
.form-done h2 { font-size: 26px; font-weight: 900; }
.form-done p { margin: 8px 0 24px; }
.contact-info ul { list-style: none; margin-top: 8px; }
.contact-info li { padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--ink); word-break: break-all; }
.contact-info li span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }

/* Blog list */
.blog-list { margin-bottom: 120px; }
.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.cat-nav a { padding: 8px 18px; border-radius: 999px; background: var(--panel); font-size: 14px; font-weight: 700; color: var(--body); transition: .15s; }
.cat-nav a:hover { color: var(--ink); background: var(--brand-soft); }
.cat-nav a[aria-current] { background: var(--brand); color: var(--white); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { display: flex; flex-direction: column; background: var(--panel); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(20,58,71,.08); }
.post-cover { aspect-ratio: 16 / 9; background: var(--brand-soft); overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-cover img { transform: scale(1.04); }
.post-cover-fallback { display: flex; align-items: center; justify-content: center; height: 100%; font-weight: 900; color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), #F6FAFA); }
.post-body { padding: 24px; }
.post-body h2 { font-size: 19px; font-weight: 900; margin: 8px 0 10px; text-wrap: pretty; }
.post-body p:last-child { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.post-meta > :first-child { color: var(--brand); font-weight: 700; }
.post-meta time { font-family: var(--font-en); }
.empty-note { padding: 64px 0; text-align: center; color: var(--muted); }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 48px; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 14px; font-weight: 700; }
.pager a:hover { background: var(--panel); }
.pager span { background: var(--ink); color: var(--white); }

/* 首頁最新文章 */
.latest { padding-top: 40px; }
.latest-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.latest-head .h2 { margin-bottom: 0; }
.latest-head .link-dot { margin-top: 0; }

/* Article */
.article-head { max-width: 820px; padding-top: 64px; }
.back-link { display: inline-block; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.back-link::before { content: "← "; }
.back-link:hover { color: var(--ink); }
.article-head h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 900; margin: 14px 0 32px; text-wrap: pretty; }
.article-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; margin: 48px 0 96px; align-items: start; }
.article-side { position: sticky; top: 100px; display: grid; gap: 16px; }
.side-box { background: var(--panel); border-radius: var(--radius); padding: 24px; }
.side-title { font-weight: 900; color: var(--ink); margin-bottom: 10px; }
#toc a { display: block; font-size: 14px; color: var(--muted); padding: 5px 0 5px 12px; border-left: 2px solid var(--line); transition: .15s; }
#toc a.sub { padding-left: 24px; font-size: 13px; }
#toc a:hover { color: var(--ink); }
#toc a.on { color: var(--brand); border-left-color: var(--brand); font-weight: 700; }
.side-cats { list-style: none; }
.side-cats a { display: block; padding: 6px 0; font-size: 14px; }
.side-cats a:hover, .side-cats a[aria-current] { color: var(--brand); font-weight: 700; }
.related { margin-bottom: 96px; }
.related .h3 { margin-bottom: 24px; }
.preview-bar { background: #FFF1A8; color: var(--ink); text-align: center; font-size: 14px; font-weight: 700; padding: 10px 16px; }

/* 文章內文排版 */
.prose { font-size: 17px; line-height: 1.95; color: var(--body); }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-size: 26px; font-weight: 900; margin-top: 2.2em; padding-bottom: 10px; border-bottom: 2px solid var(--line); scroll-margin-top: 96px; }
.prose h3 { font-size: 21px; font-weight: 900; margin-top: 1.8em; scroll-margin-top: 96px; }
.prose h4 { font-size: 18px; font-weight: 700; margin-top: 1.5em; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.legal { max-width: 760px; margin-bottom: 96px; }
.prose strong, .prose b { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose blockquote { border-left: 4px solid var(--brand); background: var(--panel); padding: 16px 20px; border-radius: 0 10px 10px 0; }
.prose img { border-radius: var(--radius); margin: 1.6em 0; }
.prose pre { background: var(--brand-dark); color: #E6F0F2; padding: 16px 20px; border-radius: 10px; overflow-x: auto; font-size: 14px; }
.prose code { font-size: .9em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--panel); }

/* 捲動淡入：只有 JS 有載入（html.js）才先隱藏，避免 JS 失敗時內容看不到 */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .marquee { animation: none; }
}

@media (max-width: 960px) {
  :root { --gutter: 24px; }
  .header-inner { height: 64px; gap: 16px; }
  .header-cta { display: none; }
  .menu-btn { display: block; }
  .nav { position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0; background: var(--white); padding: 8px 24px 24px; box-shadow: 0 12px 24px rgba(0,0,0,.08); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s; font-size: 17px; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .menu-open .nav { transform: none; opacity: 1; visibility: visible; }
  .hero { padding: 48px 0; }
  .hero-grid, .about, .home-about { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { order: -1; width: min(100%, 380px); margin: 0 auto; }
  .hero-chip { font-size: 12px; padding: 6px 11px 6px 8px; gap: 6px; }
  .hero-chip img { width: 16px; height: 16px; }
  .about { padding: 28px 20px; }
  .section { padding: 80px var(--gutter); }
  .statement { padding-top: 48px; padding-bottom: 80px; }
  .statement br { display: none; }
  .link-dot-right { align-self: flex-start; }
  .stat { padding: 22px 20px; }
  .svc-band { padding: 80px 0; }
  .svc-cards { grid-template-columns: 1fr; margin-top: 32px; }
  .svc-card { padding: 28px 24px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .case-row, .case-row:nth-child(even) { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .case-row:nth-child(even) .browser { order: 0; }
  .case-body h3 { font-size: 24px; }
  .case-res b { font-size: 32px; }
  .closing-cta { grid-template-columns: 1fr; padding: 48px 24px; gap: 28px; margin-bottom: 80px; }
  .closing-cta::after { top: auto; bottom: -70px; right: -70px; width: 180px; height: 180px; }
  .values { grid-template-columns: 1fr; gap: 32px; padding-bottom: 80px; }
  .values-side { position: static; }
  .values-side p { margin-bottom: 24px; }
  .value { grid-template-columns: 44px 1fr; gap: 14px; padding: 28px 22px; }
  .value > b { font-size: 26px; }
  .value p { font-size: 16px; }
  .page-hero { padding-top: 48px; padding-bottom: 40px; }
  .page-hero br { display: none; }
  .who-panel { padding: 28px 20px; }
  .check-list, .service-detail, .sd-grid, .principle-grid, .contact-grid, .form .row { grid-template-columns: 1fr; }
  .service-detail { gap: 24px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .form-panel { padding: 28px 20px; }
  .principle { padding: 28px 22px; }
  .service-detail.band-soft { margin-top: 80px; padding-bottom: 80px; }
  .band-dark { margin-top: 80px; margin-bottom: 80px; }
  .form .row { gap: 0; }
  .cta-panel, .contact-grid { margin-bottom: 80px; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; margin: 32px 0 64px; }
  .article-side { position: static; order: -1; }
  .article-side .side-box:last-child { display: none; }
  .article-head { padding-top: 32px; }
  .footer-card { grid-template-columns: 1fr; padding: 40px 24px 20px; }
  .footer-side { align-items: flex-start; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .steps, .post-grid { grid-template-columns: 1fr; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 22px; }
}
