/* 比爾 AI 官網設計系統。顏色只用下列變數，不用漸層、陰影、光暈。 */
:root {
  --ink: #111418;
  --paper: #ffffff;
  --soft: #f4f5f7;
  --line: #e2e5ea;
  --muted: #5c6573;
  --blue: #1769ff;
  --blue-ink: #0f52cc;
  --ok: #12805c;
  --r: 6px;
  --w: 1200px;
  --gut: 24px;
  --sans: 'IBM Plex Sans', 'Noto Sans TC', system-ui, -apple-system, 'PingFang TC', 'Microsoft JhengHei', 'WenQuanYi Zen Hei', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.wrap { width: 100%; max-width: calc(var(--w) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: var(--r); z-index: 100; }
.skip:focus { left: 8px; }

/* 內文連結：藍色底線 */
main p a, main li a:not(.btn), .note a, .faq a {
  color: var(--blue-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--blue);
}
main p a:hover, main li a:not(.btn):hover { background: var(--soft); }

/* ---------- 排版階層 ---------- */
h1 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.25; font-weight: 900; letter-spacing: 0; text-wrap: balance; }
h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.35; font-weight: 700; text-wrap: balance; }
h3 { font-size: 18px; line-height: 1.5; font-weight: 700; }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 8px; height: 8px; background: var(--blue); flex: none; }
.lead { color: var(--muted); max-width: 40em; margin-top: 12px; }
.note { font-size: 14px; color: var(--muted); margin-top: 16px; }
.more { margin-top: 32px; font-weight: 500; }
.more a { border-bottom: 1px solid var(--blue); text-decoration: none; color: var(--blue-ink); }

/* ---------- 待補標記 ---------- */
.todo {
  font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1.4; letter-spacing: .04em;
  color: var(--muted); background: var(--soft);
  border-bottom: 1px dashed var(--muted); padding: 1px 6px; margin: 0 2px;
  white-space: nowrap; display: inline-block; vertical-align: baseline;
}

/* ---------- 頁首 ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.wordmark { font-weight: 900; font-size: 20px; letter-spacing: .02em; line-height: 1; }
.wordmark b { color: var(--blue); font-weight: 700; font-family: var(--sans); margin-left: 2px; }
.nav ul { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--blue); }
.nav a[aria-current='page'] { border-bottom-color: var(--ink); }
.nav a.nav-cta { background: var(--ink); color: var(--paper); padding: 7px 16px; border-radius: var(--r); border: 0; }
.nav a.nav-cta:hover { background: var(--blue-ink); }
.nav-toggle { display: none; font: inherit; font-size: 14px; font-weight: 500; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px; cursor: pointer; }
.nav-toggle::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--blue); margin-right: 8px; }
.nav-toggle[aria-expanded='true'] { border-color: var(--ink); }

@media (max-width: 820px) {
  :root { --gut: 16px; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0 var(--gut) 12px; }
  .nav li { border-top: 1px solid var(--line); }
  .nav a { display: block; padding: 14px 0; border: 0; }
  .nav a.nav-cta { margin-top: 12px; text-align: center; padding: 12px 16px; }
  .nav li:last-child { border-top: 0; }
}

/* ---------- 按鈕 ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block; font: inherit; font-size: 16px; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer;
  background: var(--blue); color: var(--paper); border: 1px solid var(--blue); border-radius: var(--r); padding: 13px 24px;
}
.btn:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn-line { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- 區塊 ---------- */
.section { padding: 80px 0; border-top: 1px solid var(--line); }
.section.tight { padding: 48px 0; }
.sec-head { margin-bottom: 40px; }
.sec-head h2, .sec-head h1 { margin: 0; }
.section h2 + p, .section h2 + ul, .section p + h2, .section ul + h2 { margin-top: 12px; }
.section h2:not(.sec-head h2) { margin-bottom: 12px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.cols h3 { margin-bottom: 12px; }
.quote { margin-top: 32px; padding: 14px 18px; background: var(--soft); border-radius: var(--r); font-family: var(--mono); font-size: 14px; }

/* ---------- 首頁主視覺 ---------- */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: start; }
.hero h1 { font-size: clamp(30px, 3.4vw, 48px); }
.hero .sub { margin-top: 24px; font-size: 18px; line-height: 1.85; max-width: 31em; }
.hero .actions { margin-top: 36px; }

/* 主視覺左欄：任職背景小區塊 */
.bg-strip { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.strip-label { font-family: var(--mono); font-size: 12px; font-weight: 400; line-height: 1.4; letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.strip-label::before { content: ''; width: 8px; height: 8px; background: var(--blue); flex: none; }
.bg-strip .logos { margin-top: 16px; gap: 14px 24px; flex-wrap: wrap; }
.bg-strip .logos img { max-width: 120px; }
.strip-note { margin-top: 12px; font-size: 12px; line-height: 1.6; color: var(--muted); }

/* 線上系統看板 */
.board { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.board-head { padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.board-head .eyebrow { margin-bottom: 10px; }
.board-head h2 { font-size: 20px; line-height: 1.4; }
.board-head p:last-child { font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.board-cols, .board-rows li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 0 20px; }
.board-cols { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); background: var(--soft); height: 32px; border-bottom: 1px solid var(--line); }
.board-rows li { padding-top: 11px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.board-rows li:last-child { border-bottom: 0; }
.sq { width: 10px; height: 10px; background: var(--ok); display: block; }
.b-name { min-width: 0; line-height: 1.45; }
.b-name a { font-weight: 500; font-size: 15px; text-decoration: none; }
.b-name a:hover { color: var(--blue-ink); text-decoration: underline; }
.b-name small { display: block; font-size: 12px; color: var(--muted); }
.b-host { font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; text-align: right; }
.b-host:hover { color: var(--blue-ink); text-decoration: underline; }
.board-foot { border-top: 1px solid var(--line); padding: 12px 20px; font-size: 14px; font-weight: 500; }
.board-foot a { color: var(--blue-ink); text-decoration: none; border-bottom: 1px solid var(--blue); }

@media (max-width: 960px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .sub { font-size: 16px; }
}
@media (max-width: 520px) {
  .board-cols { display: none; }
  .board-rows li { grid-template-columns: 12px minmax(0, 1fr); row-gap: 2px; padding: 12px 16px; align-items: start; }
  .board-rows .sq { margin-top: 7px; }
  .b-host { grid-column: 2; text-align: left; max-width: 100%; }
  .board-head, .board-foot { padding-left: 16px; padding-right: 16px; }
}

/* ---------- 服務清單 ---------- */
.svc-group { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.svc-group:last-child { border-bottom: 1px solid var(--line); }
.svc-group h3 { font-size: 20px; display: flex; align-items: baseline; gap: 12px; }
.idx { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); }
.svc-list li { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; padding: 10px 0; border-top: 1px solid var(--line); }
.svc-list li:first-child { border-top: 0; padding-top: 0; }
.svc-name { font-weight: 700; text-decoration: none; justify-self: start; border-bottom: 1px solid var(--blue); line-height: 1.6; }
.svc-name:hover { color: var(--blue-ink); }
.svc-desc { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) {
  .svc-group { grid-template-columns: 1fr; gap: 12px; }
  .svc-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- 作品卡與截圖容器 ---------- */
.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.work h3 { margin-top: 16px; font-size: 18px; }
.work h3 a { text-decoration: none; }
.work h3 a:hover { color: var(--blue-ink); text-decoration: underline; }
.work .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 2px 0 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.work p { font-size: 15px; }
.work p.meta { font-size: 12px; }
.work-url { margin-top: 6px; font-family: var(--mono); font-size: 12px !important; }
.work-url a { overflow-wrap: anywhere; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); }
.live-tag i { width: 8px; height: 8px; background: var(--ok); display: block; }
@media (max-width: 960px) { .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .works-grid { grid-template-columns: 1fr; } }

.frame { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.frame-bar { display: flex; align-items: center; height: 28px; padding: 0 12px; background: var(--soft); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.frame-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame img { width: 100%; }
.frame.crop img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; height: auto; }
.frame.phone { max-width: 260px; }
.shots { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; align-items: start; }
.shots.single { grid-template-columns: minmax(0, 1fr); }
.shots.single .frame.phone { max-width: 320px; }
@media (max-width: 720px) { .shots { grid-template-columns: 1fr; } .shots .frame.phone { max-width: 220px; } }

/* 規格卡 */
.spec { border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); padding: 16px 18px; align-self: start; }
.work > .spec { aspect-ratio: 16 / 10; overflow: hidden; }
.spec-title { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.spec-title::before { content: ''; width: 8px; height: 8px; background: var(--blue); }
.spec dl > div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.spec dt { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.spec dd { overflow-wrap: anywhere; }

/* ---------- logo 列 ---------- */
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 48px; }
.logos li { display: flex; align-items: center; }
.logos img { height: 32px; width: auto; max-width: 160px; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .15s, opacity .15s; }
.logos img:hover { filter: none; opacity: 1; }
.brand-logos { gap: 28px 56px; }
.brand-logos img { filter: grayscale(1) contrast(1.35); opacity: .85; }
.brand-logos img:hover { filter: none; opacity: 1; }
main .logos li a { display: flex; align-items: center; border-bottom: 0; }
main .logos li a:hover { background: none; }
.price-line { margin-top: 12px; font-weight: 500; }
.page-head .note { margin-top: 12px; }
@media (max-width: 520px) { .logos { gap: 20px 32px; } }

/* ---------- 編號步驟 ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.steps li { counter-increment: step; padding: 18px 20px 0 0; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 13px; color: var(--blue-ink); margin-bottom: 8px; }
.steps h3 { font-size: 17px; margin-bottom: 6px; }
.steps p { font-size: 15px; color: var(--muted); line-height: 1.75; }
.steps.plain { display: block; border-top: 0; }
.steps.plain li { padding: 8px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 36px 1fr; }
.steps.plain li::before { margin: 2px 0 0; }
.steps.plain p { color: var(--ink); }
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps li { padding: 16px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 0; }
  .steps li::before { grid-row: 1 / 3; margin: 2px 0 0; }
  .steps li:first-child { border-top: 1px solid var(--ink); }
}

/* ---------- 列點 ---------- */
.sq-list li { position: relative; padding: 6px 0 6px 22px; }
.sq-list li::before { content: ''; position: absolute; left: 0; top: 17px; width: 7px; height: 7px; background: var(--blue); }

/* ---------- 細線表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.tbl thead th { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--muted); padding-top: 10px; padding-bottom: 10px; background: var(--soft); padding-left: 12px; }
.tbl tbody th { font-weight: 700; width: 26%; }
.tbl.feat tbody th { white-space: nowrap; }
.tbl td { color: var(--ink); }
.tbl small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.tbl.products tbody th { width: auto; }
.tbl.products td { white-space: nowrap; }
@media (max-width: 720px) {
  .tbl.feat, .tbl.feat tbody, .tbl.members, .tbl.members tbody { display: block; }
  .tbl.feat thead, .tbl.members thead { position: absolute; left: -9999px; }
  .tbl.feat tr, .tbl.members tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tbl.feat th, .tbl.feat td, .tbl.members td { display: block; border: 0; padding: 0; width: auto !important; white-space: normal !important; }
  .tbl.feat td { color: var(--muted); }
  .tbl.members td { padding: 4px 0; }
  .tbl.products td { white-space: normal; }
}

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; border-top: 1px solid var(--ink); }
.qa { padding: 20px 0; border-bottom: 1px solid var(--line); }
.qa h3 { font-size: 17px; margin-bottom: 8px; }
.qa p { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .faq { grid-template-columns: 1fr; } }

/* ---------- 內頁抬頭 ---------- */
.page-top { padding-top: 24px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.crumbs li + li::before { content: '/'; margin: 0 10px; color: var(--line); }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--blue-ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }
.page-head { padding: 32px 0 64px; }
.page-head .answer { margin-top: 24px; font-size: 18px; line-height: 1.9; max-width: 36em; }
.page-head .answer + .actions, .page-head p + p { margin-top: 20px; }
.page-head .actions { margin-top: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chips a { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px; font-size: 14px; text-decoration: none; }
.chips a:hover { border-color: var(--ink); }
.chips span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.kind { padding: 40px 0 8px; border-top: 1px solid var(--line); }
.kind:first-child { border-top: 0; padding-top: 0; }
.kind-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.kind-head a { font-size: 14px; color: var(--blue-ink); text-decoration: none; border-bottom: 1px solid var(--blue); }
.works-all { padding-bottom: 72px; }
.work-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; }
.work-detail h2 { font-size: 22px; margin: 32px 0 8px; }
.work-detail > div > h2:first-child { margin-top: 0; }
@media (max-width: 900px) { .work-detail { grid-template-columns: 1fr; gap: 32px; } .cols { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- 聯絡（深色） ---------- */
.contact { background: var(--ink); color: var(--paper); padding: 80px 0; }
.contact .eyebrow { color: rgba(255, 255, 255, .7); }
.contact .lead { color: rgba(255, 255, 255, .78); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact h1, .contact h2 { color: var(--paper); }
.contact-list { border-top: 1px solid rgba(255, 255, 255, .3); }
.contact-list > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.contact-list dt { font-family: var(--mono); font-size: 13px; color: rgba(255, 255, 255, .7); }
.contact-list a { color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--blue); overflow-wrap: anywhere; }
.contact-list a:hover { background: var(--blue); }
.contact .todo { background: transparent; color: rgba(255, 255, 255, .8); border-bottom-color: rgba(255, 255, 255, .6); }
@media (max-width: 820px) { .contact { padding: 56px 0; } .contact-grid { grid-template-columns: 1fr; gap: 32px; } .contact-list > div { grid-template-columns: 96px minmax(0, 1fr); } }

/* ---------- 頁尾 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1.2fr .8fr 1fr; gap: 40px; }
.foot-brand p { margin-top: 16px; color: var(--muted); max-width: 22em; line-height: 1.7; }
.foot-h { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.site-footer li { padding: 3px 0; }
.site-footer li a { text-decoration: none; }
.site-footer li a:hover { color: var(--blue-ink); text-decoration: underline; }
.copyright { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } .section { padding: 56px 0; } .section.tight { padding: 36px 0; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.nb { display: inline-block; white-space: nowrap; }
.quote + p, p + .tbl { margin-top: 24px; }
.b-host { justify-self: start; }
@media (min-width: 521px) { .b-host { justify-self: end; } }
