/* BIUDESIGN — site styles */

:root {
  --bg: #F3F2F0;
  --bg-alt: #ECEAE7;
  --card: #F8F7F5;
  --line: #D9D5D1;
  --ink: #2E2A29;
  --muted: #5C5452;
  --taupe: #6B5D57;
  --accent: #3D4752;
  --on-dark: #F3F2F0;
  --on-dark-muted: #CFC9C4;
  --serif-en: "EB Garamond", "Times New Roman", serif;
  --serif-tc: "Noto Serif TC", "Songti TC", serif;
  --sans-tc: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans-tc);
  font-size: 16px;
  line-height: 1.8;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif-tc); font-weight: 500; line-height: 1.5; margin: 0; }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 22px; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--on-dark); padding: 8px 16px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap--narrow { max-width: 800px; }
.muted { color: var(--muted); }
.lead { font-size: 18px; max-width: 680px; }
.small { font-size: 13px; color: var(--muted); }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; padding-block: 24px;
}
.logo { font-family: var(--serif-en); font-size: 26px; letter-spacing: .18em; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-family: var(--serif-en); letter-spacing: .12em; }
.nav a { text-decoration: none; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
.nav a[aria-current="page"] { text-decoration: underline; }
.menu-btn { display: none; }

/* 手機：選單收合成 MENU 按鈕（沒有 JavaScript 時照常顯示選單） */
@media (max-width: 700px) {
  .site-header { padding-block: 16px; }
  .logo { font-size: 22px; }
  .has-js .menu-btn {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
    background: none; border: 0; color: var(--ink); cursor: pointer;
    font-family: var(--serif-en); font-size: 15px; letter-spacing: .14em;
  }
  .has-js .nav { display: none; }
  .has-js.is-open .nav {
    display: flex; flex-direction: column; flex-basis: 100%;
    gap: 0; padding: 8px 0 16px; border-top: 1px solid var(--line);
  }
  .has-js.is-open .nav a { font-size: 17px; padding: 6px 0; min-height: 48px; }
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.actions--center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 32px; border-radius: 999px;
  text-decoration: none; letter-spacing: .1em; font: inherit; cursor: pointer;
  border: 1px solid transparent; transition: background-color .2s, color .2s;
}
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--ink); color: #fff; }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--on-dark); }
.btn--light { background: var(--on-dark); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn--ghost-light { border-color: var(--on-dark); color: var(--on-dark); }
.btn--ghost-light:hover { background: var(--on-dark); color: var(--ink); }

/* Hero */
.hero { padding-block: clamp(56px, 10vw, 112px); display: flex; flex-direction: column; gap: 28px; }
.hero .actions { margin-top: clamp(24px, 4vw, 44px); }
.hero__tagline { font-family: var(--serif-en); font-size: clamp(36px, 5.4vw, 72px); line-height: 1.12; color: var(--taupe); }
.hero__headline { font-size: clamp(18px, 1.7vw, 22px); font-weight: 400; line-height: 1.9; letter-spacing: .04em; color: var(--ink); max-width: 640px; }
/* 分隔點：換行時，行首的點會被裁掉，不會出現落單的點 */
.hero__sub { overflow: hidden; font-size: 14px; color: var(--muted); letter-spacing: .08em; }
.hero__list { display: flex; flex-wrap: wrap; row-gap: 4px; margin-left: -32px; }
.hero__item { position: relative; padding-left: 32px; white-space: nowrap; }
.hero__item::before { content: ""; position: absolute; left: 14px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; transform: translateY(-50%); }

/* Bands & sections */
.band { background: var(--bg-alt); border-block: 1px solid var(--line); }
.band--pad { padding-block: clamp(64px, 9vw, 112px); }
.section { padding-block: clamp(64px, 9vw, 112px); }
.section--tight { padding-block: 32px clamp(64px, 8vw, 96px); }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 40px; }
.section__head > a { display: inline-flex; align-items: center; min-height: 44px; }
.form + .small { margin-top: 28px; }
.section__head--stack { flex-direction: column; align-items: flex-start; }
.page-head { padding-block: clamp(48px, 8vw, 96px) 24px; display: flex; flex-direction: column; gap: 16px; }
.page-head h1 { font-size: clamp(28px, 4vw, 44px); }

.eyebrow { font-size: 13px; letter-spacing: .12em; color: var(--taupe); }
.eyebrow--en { font-family: var(--serif-en); font-size: 16px; letter-spacing: .16em; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; padding-block: 36px; }
@media (min-width: 960px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value { font-family: var(--serif-en); font-size: clamp(24px, 6.4vw, 34px); line-height: 1.2; white-space: nowrap; }
.stat__label { font-size: 14px; color: var(--muted); }
/* 首頁第一屏：主視覺＋數字剛好一屏，合作夥伴留在下面 */
.band--stats { border-bottom: 0; }
.band--partners { border-top: 0; }
.band--partners .partners { padding-top: 28px; }
@media (min-width: 900px) and (min-height: 640px) {
  .home-intro { min-height: calc(100svh - 97px); display: flex; flex-direction: column; }
  .home-intro .hero { flex: 1; width: 100%; justify-content: center; padding-block: 40px 64px; }
}
.partners { font-size: 14px; color: var(--muted); padding-bottom: 32px; letter-spacing: .04em; }
.partners span { margin-right: 1em; color: var(--ink); }

/* Grids */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 40px; margin-top: 32px; }

/* Work groups */
.group-nav { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 8px; }
.group-nav a { display: inline-flex; align-items: baseline; gap: 6px; min-height: 44px; align-items: center; text-decoration: none; border-bottom: 1px solid transparent; }
.group-nav a:hover { border-bottom-color: currentColor; }
.group-nav span { font-family: var(--serif-en); font-size: 13px; color: var(--taupe); }
.work-group { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.work-group__head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 36px; max-width: 640px; }
.work-group__head p { letter-spacing: .06em; line-height: 1.8; }
.grid-2--feature { margin-top: 0; gap: 56px 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .grid-2--feature { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-2--feature { gap: 64px 48px; } }
.grid-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
@media (min-width: 600px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; } }
.work-group--compact .work-card__title { font-size: 18px; }
@media (max-width: 959px) { .work-group--compact .work-card__title { font-size: 16px; } }

/* Work card */
.work-card { display: flex; flex-direction: column; gap: 16px; }
.work-card__link { display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
.work-card__img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: #DEDAD6; transition: opacity .2s; }
.work-card__link:hover .work-card__img { opacity: .88; }
.work-card__title { font-size: 22px; }
.placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.story { margin: 4px 0 0; display: flex; flex-direction: column; gap: 16px; font-size: 15px; color: var(--muted); }
.story div { display: flex; gap: 16px; }
.story dt { color: var(--ink); font-weight: 500; flex: none; }
.story dd { margin: 0; letter-spacing: .02em; line-height: 1.9; text-align: justify; text-justify: inter-character; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; align-items: stretch; margin-bottom: 16px; }
.plan {
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  padding: 36px 32px; display: flex; flex-direction: column; gap: 16px;
}
.plan--featured { border-color: var(--ink); }
.plan h3 { font-size: 24px; }
.plan__price { font-family: var(--serif-en); font-size: 28px; }
.plan__desc { font-size: 15px; color: var(--muted); }
.plan ul { margin: 0; padding-left: 20px; font-size: 15px; color: var(--muted); }
.plan .btn { margin-top: auto; min-height: 48px; }
.badge { align-self: flex-start; font-size: 13px; letter-spacing: .1em; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.plan--primary .badge { background: var(--accent); border-color: var(--accent); color: #fff; }
.plan--featured .badge { border-color: var(--ink); color: var(--ink); }

/* Journal */
.journal-teaser { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 48px; align-items: center; }
.journal-teaser > div { display: flex; flex-direction: column; gap: 16px; }
.link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.article-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.article-list a { display: flex; flex-direction: column; gap: 6px; padding: 28px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.article-list time { font-family: var(--serif-en); color: var(--taupe); letter-spacing: .08em; }
.article-list h2 { font-size: 22px; }
.article-cta { margin-block: 56px; padding: 32px; background: var(--bg-alt); border-radius: 4px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

/* Project */
.meta { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px 40px; font-size: 15px; }
.meta dt { font-family: var(--serif-en); color: var(--taupe); letter-spacing: .1em; }
.meta dd { margin: 0; }
.cover { margin-block: 24px 0; }
.cover img { width: auto; max-width: 100%; max-height: min(85vh, 960px); }
.prose .cover img, .article-cover img { width: 100%; }
.story-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 32px; padding-block: 48px; border-bottom: 1px solid var(--line); }
.story-grid p { letter-spacing: .02em; line-height: 1.9; text-align: justify; text-justify: inter-character; }
.story-grid__label { font-size: 15px; color: var(--taupe); letter-spacing: .12em; margin-bottom: 8px; font-family: var(--sans-tc); }
.prevnext { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 40px; }
.prevnext a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

/* Prose (blocks) */
.prose { padding-block: 32px; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-size: 26px; margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose figure { margin: 2em 0; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.prose blockquote { margin: 2em 0; padding: 0 0 0 24px; font-family: var(--serif-tc); font-size: 20px; border-left: 1px solid var(--ink); }
.prose blockquote footer { margin-top: 12px; font-family: var(--sans-tc); font-size: 14px; color: var(--muted); }
.prose blockquote footer::before { content: "— "; }
/* 文字段落維持好讀的寬度，圖片可以撐滿 */
.prose > :is(p, h2, h3, ul, ol, blockquote) { max-width: 720px; }
.prose figure img { width: 100%; height: auto; }
/* 多圖（圖庫）：自動排成網格 */
.prose figure > ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.prose figure > ul li { margin: 0; }
/* 後台選了「裁切」與比例時 */
.prose figure[data-crop] img { object-fit: cover; }
.prose figure[data-crop][data-ratio="16/9"] img { aspect-ratio: 16 / 9; }
.prose figure[data-crop][data-ratio="4/3"] img { aspect-ratio: 4 / 3; }
.prose figure[data-crop][data-ratio="3/2"] img { aspect-ratio: 3 / 2; }
.prose figure[data-crop][data-ratio="1/1"] img { aspect-ratio: 1 / 1; }
.prose figure[data-crop][data-ratio="3/4"] img { aspect-ratio: 3 / 4; }
.prose figure[data-crop][data-ratio="2/3"] img { aspect-ratio: 2 / 3; }
.prose figure[data-crop][data-ratio="9/16"] img { aspect-ratio: 9 / 16; }

/* About */
.about-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 48px; align-items: start; }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.specialty { display: flex; flex-direction: column; gap: 10px; }
.specialty__num { font-family: var(--serif-en); font-size: 28px; color: var(--taupe); }
.timeline { margin: 32px 0 0; border-top: 1px solid var(--line); }
.timeline div { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline dt { font-weight: 500; }
.timeline dd { margin: 0; color: var(--muted); }

/* Closing */
.closing { background: var(--ink); color: var(--on-dark); }
.closing__inner { padding-block: clamp(72px, 10vw, 112px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.closing__quote { font-family: var(--serif-tc); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.7; }
.closing__text { color: var(--on-dark-muted); max-width: 560px; }
.closing a:hover { color: var(--ink); }

/* Form */
.form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid #B9B2AD; border-radius: 4px; padding: 12px 14px; min-height: 48px; width: 100%;
}
.field textarea { resize: vertical; }
.field__error { color: #9B2C1F; font-size: 14px; }
.form .btn { align-self: flex-start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 16px 20px; border-radius: 4px; margin-bottom: 24px; }
.notice--ok { background: #E3EAE3; color: #24402A; }
.notice--error { background: #F4E1DD; color: #7A2216; }

/* Service detail */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.back { font-size: 14px; text-decoration: none; color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.page-head .badge { margin-top: 4px; }
.checklist { display: flex; flex-direction: column; gap: 16px; }
.checklist h2 { font-size: 22px; }
.checklist ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.checklist li { padding: 14px 0 14px 28px; border-bottom: 1px solid var(--line); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 25px; width: 10px; height: 1px; background: var(--ink); }
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 32px; }
.step { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--ink); }
.step__num { font-family: var(--serif-en); font-size: 28px; color: var(--taupe); line-height: 1; }
.step h3 { font-size: 20px; }
.step small { font-family: var(--sans-tc); font-size: 13px; color: var(--taupe); margin-left: 6px; }
.grid-2--4up { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.faq-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px 64px; align-items: start; }
.faq-layout__head { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) { .faq-layout { grid-template-columns: 1fr 2fr; } }
.faq { margin: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 40px 18px 0; font-weight: 500; min-height: 44px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--serif-en); font-size: 24px; font-weight: 400; color: var(--taupe); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 20px; }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-block: 40px; font-family: var(--serif-en); font-size: 15px; color: var(--muted);
}

/* 平板（600–959px）：三欄卡片縮小間距，避免兩個加一個落單 */
@media (min-width: 600px) and (max-width: 959px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .grid-3 .work-card__title { font-size: 18px; }
  .grid-3 .story { font-size: 14px; }
  .grid-3 .story div { flex-direction: column; gap: 2px; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans > .plan:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* 品牌策略顧問入口 */
.consulting-teaser { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.consulting-teaser__text { display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
.consulting-teaser__text strong { font-weight: 500; }
.consulting-teaser__link { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
.consulting-teaser--framed { margin-top: 0; padding: 28px 32px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); }


/* 案例內文的編號步驟（例如「感動的路徑」） */
.prose ol { padding-left: 1.4em; }
.prose ol > li { padding-left: .3em; }
.prose ol > li + li { margin-top: 18px; }
.prose ol > li::marker { font-family: var(--serif-en); color: var(--taupe); }
.prose li strong { font-weight: 500; }

/* 案例頁目錄 */
.case-toc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.case-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; counter-reset: toc; }
.case-toc li { counter-increment: toc; }
.case-toc a { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; align-items: center; text-decoration: none; border-bottom: 1px solid transparent; }
.case-toc a::before { content: "0" counter(toc); font-family: var(--serif-en); color: var(--taupe); }
.case-toc a:hover { border-bottom-color: currentColor; }
.prose h2[id], .prose h3[id] { scroll-margin-top: 24px; }
.prose > h2 { padding-top: 12px; }
.prose > h2 + * { margin-top: .8em; }

/* 作品頁：放大的長期合作卡片 */
.work-card--wide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 64px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.work-card--wide .work-card__body { display: flex; flex-direction: column; gap: 14px; }
.work-card--wide .work-card__title { font-size: clamp(24px, 2.6vw, 32px); }
.work-card--wide .work-card__title a { text-decoration: none; }
.work-card--wide .badge { align-self: flex-start; border-color: var(--ink); color: var(--ink); }
.work-card__more { margin-top: 4px; min-height: 44px; display: inline-flex; align-items: center; align-self: flex-start; }
@media (min-width: 900px) {
  .work-card--wide { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
}

/* 圖庫剛好 4 張：手機 2×2，其他尺寸排成一列，避免落單 */
.prose figure > ul:has(> li:first-child:nth-last-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .prose figure > ul:has(> li:first-child:nth-last-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
