/* 誠正聯合會計師事務所 — 前台樣式 */
:root {
  --ink: #0b1530;
  --navy: #1e2a4a;
  --navy-hover: #31406a;
  --mist: #e6e8eb;
  --muted: #596074;
  --line: #a9aeb9;
  --gutter: clamp(20px, 3.4vw, 56px);
  --space: clamp(64px, 8vw, 120px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font: 400 16px/1.8 "DM Sans", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 700; line-height: 1.25; text-wrap: balance; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
address { font-style: normal; }
:focus-visible { outline: 3px solid #5b7bd0; outline-offset: 3px; }
.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-link { position: absolute; left: -9999px; z-index: 100; padding: 12px 20px; background: var(--navy); color: #fff; }
.skip-link:focus { left: 12px; top: 12px; }

.wrap { width: 100%; max-width: 1520px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space) 0; }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); color: #fff; }
.eyebrow { font-size: 14px; letter-spacing: .16em; line-height: 1.6; margin-bottom: 14px; }
.display { font-size: clamp(34px, 5.4vw, 80px); letter-spacing: -.01em; line-height: 1.2; }
.lede { font-size: 18px; max-width: 34em; }
.muted { color: var(--muted); }
.phrase { display: inline-block; }

.btn {
  display: inline-block; padding: 15px 36px; border: 1px solid var(--navy); background: var(--navy);
  color: #fff; font: inherit; line-height: 1.5; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--navy-hover); color: #fff; }
.btn--light { background: #fff; color: var(--navy); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; }

/* 頁首 */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.site-header__logo img { width: 250px; height: auto; }
.site-nav ul { display: flex; gap: clamp(20px, 2.6vw, 42px); }
.site-nav a { display: block; padding: 8px 0; text-decoration: none; text-underline-offset: 7px; }
.site-nav a:hover, .site-nav a[aria-current] { text-decoration: underline; }
.nav-toggle { display: none; padding: 10px 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }

/* 首頁主視覺 */
.hero__banner { width: 100%; height: auto; aspect-ratio: 2.8; object-fit: cover; }
.hero h1 { font-size: clamp(32px, 4.4vw, 68px); margin-bottom: 16px; }
.hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin: 44px 0 40px; }
.hero__points { display: flex; justify-content: space-between; gap: 8px 24px; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 15px; }

/* 標題列：左標題、右說明 */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 64px; margin-bottom: 44px; }
.head .lede { max-width: 25em; padding-bottom: 8px; }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px clamp(20px, 3vw, 56px); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card { position: relative; display: flex; flex-direction: column; background: #fff; }
.card__media { aspect-ratio: 1; overflow: hidden; background: #d5d8de; }
.cards--3 .card__media { aspect-ratio: 1.5; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__media img { transform: scale(1.03); }
.card__body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.card__body h2, .card__body h3 { font-size: 23px; overflow-wrap: anywhere; }
.card__body p { font-size: 15px; }
.card__body time { font-size: 14px; color: var(--muted); }
.card__more { margin-top: auto; padding-top: 8px; font-weight: 500; text-underline-offset: 5px; }
.card__more::after { content: ""; position: absolute; inset: 0; }
.cards-foot { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }

/* 階梯式編號清單 */
.steps { margin: 40px 0 0 40%; }
.steps li { padding: 0 0 26px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.steps li:nth-child(2) { margin-left: 9%; }
.steps li:nth-child(3) { margin-left: 18%; }
.steps li:last-child { margin-bottom: 0; }
.steps h3 { font-size: 21px; margin-bottom: 12px; }
.steps h3 span { margin-right: 14px; font-size: 15px; font-weight: 400; letter-spacing: .12em; }
.steps p { color: var(--muted); max-width: 32em; }

/* 圖文並列 */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 4vw, 72px); align-items: center; }
.split__img { width: 100%; aspect-ratio: 1.03; object-fit: cover; object-position: left; }
.split .display { margin-bottom: 28px; }
.split .btn { margin-top: 40px; }
.section--tight { padding: clamp(28px, 3.4vw, 48px) 0; }

/* 最新消息 */
.news-list { margin-top: 48px; border-bottom: 1px solid var(--line); }
.news-list li { border-top: 1px solid var(--line); }
.news-list a { display: grid; grid-template-columns: clamp(90px, 14vw, 210px) minmax(0, 1fr); align-items: start; padding: 44px 0; text-decoration: none; }
.news-list li:nth-child(2) a { margin-left: 15%; }
.news-list li:nth-child(3) a { margin-left: 30%; }
.news-list b { font-size: clamp(48px, 7vw, 104px); line-height: 1; color: var(--navy); }
.news-list h3 { font-size: clamp(20px, 2.3vw, 34px); line-height: 1.4; overflow-wrap: anywhere; }
.news-list a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.news-list time { display: block; margin-top: 10px; font-size: 15px; color: var(--muted); }

/* Google 評論 */
.reviews { border-bottom: 1px solid var(--line); }
.reviews li { display: grid; grid-template-columns: clamp(90px, 14vw, 210px) minmax(0, 46em); padding: 44px 0; border-top: 1px solid var(--line); }
.reviews li:nth-child(2) { padding-left: 12%; }
.reviews li:nth-child(3) { padding-left: 24%; }
.reviews b { font-size: clamp(48px, 7vw, 104px); line-height: 1; color: var(--navy); }
.reviews blockquote { margin: 6px 0 18px; font-size: clamp(18px, 1.8vw, 25px); font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.reviews__stars { letter-spacing: .1em; color: #8a5a00; }
.reviews__by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 15px; }
.reviews__by img { border-radius: 50%; }
.reviews__more { margin-top: 36px; }

.field-error { margin-top: 6px; font-size: 14px; color: #a3231b; }
.form-note { margin-top: 32px; padding: 24px 0; border-top: 1px solid var(--line); font-size: 20px; font-weight: 500; }
.btn[disabled] { opacity: .6; cursor: wait; }

.cta .head { margin-bottom: 0; }
.cta .lede { margin-top: 20px; padding-bottom: 0; }

/* 內頁 */
.page-hero { padding: 32px 0 56px; }
.page-hero .display { margin-bottom: 22px; }
.crumbs { display: flex; gap: 10px; margin-bottom: 40px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 10px; }
.crumbs a { text-underline-offset: 4px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 32px clamp(20px, 3vw, 56px); margin-top: 48px; }
.facts li { padding-top: 22px; border-top: 1px solid var(--line); }
.facts h3 { font-size: 20px; margin-bottom: 8px; }
.facts p { color: var(--muted); font-size: 15px; }
.section--navy .facts li { border-color: #66708c; }
.section--navy .facts p { color: #ccd2e0; }
.empty { padding: 48px 0; border-top: 1px solid var(--line); }

.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 88px); align-items: start; padding-bottom: var(--space); }
.story img { width: 100%; height: auto; }
.story p + p { margin-top: 20px; }
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(28px, 5vw, 88px); }
.person { padding: 32px 0 44px; border-top: 1px solid var(--line); }
.person h3 { font-size: 28px; margin-bottom: 14px; }
.person h3 small { margin-left: 8px; font-size: 16px; font-weight: 400; color: var(--muted); }

.article { max-width: 860px; margin: 0 auto; padding: 32px 0 var(--space); }
.article h1 { font-size: clamp(30px, 4vw, 54px); margin-bottom: 18px; overflow-wrap: anywhere; }
.article__img { width: 100%; max-height: 560px; object-fit: contain; background: var(--mist); margin: 36px 0; }
.prose { font-size: 18px; line-height: 1.95; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul { list-style: disc; padding-left: 1.4em; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose img { height: auto; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose td, .prose th { padding: 8px 14px; border: 1px solid var(--line); }
.article__back { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { text-underline-offset: 5px; }

/* 聯絡 */
.contact { display: grid; grid-template-columns: 1fr 1.6fr; background: #fff; }
.contact__info { padding: clamp(28px, 3.6vw, 60px); background: var(--navy); color: #fff; }
.contact__info h2, .contact__form h2 { font-size: 30px; margin-bottom: 10px; }
.contact__info dl { margin-top: 32px; }
.contact__info dt { padding-top: 18px; border-top: 1px solid #66708c; font-size: 14px; color: #ccd2e0; }
.contact__info dd { padding-bottom: 18px; overflow-wrap: anywhere; }
.contact__info small { display: block; font-size: 14px; color: #ccd2e0; }
.contact__form { padding: clamp(28px, 3.6vw, 60px); min-width: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.fields .full { grid-column: 1 / -1; }
.fields label { display: block; font-weight: 500; }
.fields input:not([type=checkbox]), .fields select, .fields textarea {
  width: 100%; min-height: 48px; padding: 10px 0; border: 0; border-bottom: 1px solid #6c7385; border-radius: 0;
  background: #fff; color: inherit; font: inherit;
}
.fields textarea { resize: vertical; }
.fields ::placeholder { color: #6c7385; }
.fields .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; }
.fields .check input { width: 18px; height: 18px; margin-top: 6px; flex: none; accent-color: var(--navy); }
.map { display: block; width: 100%; height: 440px; margin-top: 44px; border: 0; }

/* 頁尾 */
.site-footer { padding: 48px 0 32px; }
.site-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 64px; }
.site-footer__row address { display: flex; flex-wrap: wrap; gap: 16px 56px; }
.site-footer__row ul { display: flex; flex-wrap: wrap; gap: 4px 26px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.wordmark { margin: 28px 0 16px; font-size: min(13.9vw, 222px); font-weight: 700; line-height: 1.1; letter-spacing: -.04em; white-space: nowrap; }
.site-footer__copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; font-size: 14px; color: var(--muted); }

@media (max-width: 1000px) {
  .cards, .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .head, .hero__row { flex-direction: column; align-items: flex-start; }
  .steps { margin-left: 0; }
  .split, .story, .contact { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .site-header__in { min-height: 72px; flex-wrap: wrap; }
  .site-header__logo img { width: 200px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; padding-bottom: 20px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 12px 0; border-top: 1px solid var(--mist); }
}
@media (max-width: 600px) {
  .cards, .cards--3, .people, .fields { grid-template-columns: minmax(0, 1fr); }
  .hero__banner { aspect-ratio: 1.35; object-position: 16%; }
  .hero h1 { font-size: min(8.6vw, 44px); }
  .hero__points { flex-direction: column; }
  .reviews li:nth-child(n) { padding: 28px 0; grid-template-columns: 80px minmax(0, 1fr); }
  .steps li:nth-child(n), .news-list li:nth-child(n) a { margin-left: 0; }
  .news-list a { padding: 28px 0; grid-template-columns: 80px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
