/* 禾麗首頁 Demo
 * 配色：Rose 拍板的象牙白 / 淺奶茶 / 深咖啡黑 / 霧金 / 暖灰褐，未改動。
 * 字級比例：依 IT'S ME 手機版；三處為中文做修正（見下方註記）。
 */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400&family=Manrope:wght@400;500&family=Noto+Sans+TC:wght@400;500&family=Noto+Serif+TC:wght@200;300;400&display=swap");

:root {
  --ivory: #f7f4ee;
  --milk: #e8ded0;
  --milk-light: #f1ebe2;
  --espresso: #28231f;
  --gold: #b49a6a;
  --gold-soft: #d5c5a6;
  --taupe: #6f6459;        /* 修正①：原 #8B8175 在奶茶底上對比不足，同色系加深 */
  --taupe-soft: #8b8175;   /* 原色保留給大字與拉丁字 */
  --line: rgba(40, 35, 31, 0.13);
  --line-soft: rgba(40, 35, 31, 0.07);

  --serif: "Noto Serif TC", "Cormorant Garamond", serif;
  --sans: "Noto Sans TC", "Manrope", sans-serif;
  --latin: "Manrope", sans-serif;
  --latin-serif: "Cormorant Garamond", serif;

  --shell: 22px;
  --dock-h: 62px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--espresso);
  font-family: var(--sans);
  /* 修正②：IT'S ME 正文 14/23 是拉丁字母；中文等效放大到 16/26 */
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--dock-h) + 10px);
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  padding: 10px 16px; background: var(--espresso); color: var(--ivory);
}
.skip:focus { left: 8px; top: 8px; }

.shell { width: min(1160px, calc(100% - var(--shell) * 2)); margin-inline: auto; }

/* 修正③：中文標題不用負字距（會把字擠在一起），改 0 */
h1, h2, h3 { font-family: var(--serif); font-weight: 300; letter-spacing: 0; margin: 0; }

.eyebrow {
  margin: 0;
  font-family: var(--latin);
  font-size: 11.2px;
  line-height: 17px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow.zh { font-family: var(--sans); letter-spacing: 0.2em; text-transform: none; }

/* ── header ───────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px var(--shell);
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
}
.mark { display: flex; flex-direction: column; line-height: 1; }
.mark b { font-family: var(--serif); font-size: 16px; font-weight: 400; letter-spacing: 0.14em; }
.mark span {
  margin-top: 6px; color: var(--gold);
  font-family: var(--latin); font-size: 8.5px; letter-spacing: 0.24em; text-transform: uppercase;
}
.bar-nav { display: none; }

.branchpick { display: flex; align-items: center; gap: 4px; }
.bchip {
  padding: 6px 9px; border-radius: 2px;
  font-size: 12px; letter-spacing: 0.1em; color: var(--taupe);
  transition: color .2s ease, background .2s ease;
}
.bchip[aria-pressed="true"] { color: var(--ivory); background: var(--espresso); }

/* ── hero ─────────────────────────────────── */
.hero { padding: 34px 0 8px; }
.hero-slogan { margin: 14px 0 0; font-size: 40px; line-height: 1.06; font-weight: 200; }
.hero-slogan span { display: block; white-space: nowrap; }
.hero-src {
  margin: 14px 0 0; color: var(--taupe-soft);
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.04em;
}

.hero-grid { display: flex; flex-direction: column; }
.hero-left { order: 1; }
.result { order: 2; }
.rxslot { order: 3; }

.ask { margin-top: 40px; }
.ask h2 { font-size: 32px; line-height: 34px; }
.ask-hint { margin: 10px 0 0; color: var(--taupe); font-size: 13px; max-width: 34em; }

.chips { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px; letter-spacing: 0.04em; color: var(--taupe);
  transition: color .22s ease, border-color .22s ease, background .22s ease;
}
.chip:hover { border-color: var(--gold-soft); color: var(--espresso); }
.chip[aria-checked="true"] {
  color: var(--ivory); background: var(--espresso); border-color: var(--espresso);
}

/* ── 結果卡：選了困擾之後浮出的醫師 ───────────── */
.result { margin-top: 26px; }

.rule { height: 1px; background: var(--line); position: relative; overflow: hidden; }
.rule i {
  position: absolute; inset: 0 auto 0 0; width: 100%;
  background: var(--gold); transform-origin: left;
  animation: sweep .55s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.lead-card {
  margin-top: 0;
  background: var(--milk-light);
  border-bottom: 1px solid var(--line);
}
.lead-photo { position: relative; background: var(--ivory); aspect-ratio: 5 / 4; overflow: hidden; }
.lead-photo img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 12%; }
.lead-badge {
  position: absolute; left: 0; bottom: 0;
  padding: 7px 12px; background: var(--espresso); color: var(--ivory);
  font-family: var(--latin); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
}
.lead-body { padding: 22px 20px 26px; }
.lead-name { font-size: 36px; line-height: 38px; }
.lead-sub { margin: 6px 0 0; color: var(--taupe); font-size: 13px; letter-spacing: .06em; }

.why {
  margin: 16px 0 0; padding: 12px 14px;
  background: var(--ivory); border-left: 2px solid var(--gold);
}
.why span {
  display: block; margin-bottom: 5px; color: var(--gold);
  font-family: var(--latin); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
}
.why q { font-size: 15px; quotes: "「" "」"; }

.credits { margin: 18px 0 0; padding: 0; list-style: none; }
.credits li {
  padding: 7px 0; border-bottom: 1px solid var(--line-soft);
  color: var(--taupe); font-size: 14px; line-height: 1.55;
}
.credits li:last-child { border-bottom: 0; }

.go {
  margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 52px; padding: 0 20px;
  background: var(--espresso); color: var(--ivory);
  font-size: 13px; letter-spacing: 0.12em;
}
.go svg { flex: none; }
.go-note { margin: 10px 0 0; color: var(--taupe); font-size: 12px; line-height: 1.7; }
.go-note q { color: var(--espresso); }

/* 其他符合的醫師 */
.others { margin-top: 26px; }
.others-h {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.others-h h3 { font-size: 19px; }
.others-h span { color: var(--taupe-soft); font-family: var(--latin); font-size: 11px; letter-spacing: .16em; }
.mini { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.mini img { width: 52px; height: 65px; object-fit: cover; object-position: center top; flex: none; background: var(--ivory); }
.mini-t { flex: 1 1 auto; min-width: 0; }
.mini-t b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 300; }
.mini-t em { display: block; margin-top: 3px; color: var(--taupe); font-size: 12.5px; font-style: normal; line-height: 1.5; }
.mini-go { flex: none; padding: 8px 12px; border: 1px solid var(--line); font-size: 12px; letter-spacing: .1em; color: var(--taupe); }
.mini-go:hover { border-color: var(--gold); color: var(--espresso); }

/* 對應療程 */
.rx { margin-top: 34px; }
.rx-h { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.rx-h h3 { font-size: 19px; }
.rx-h span { color: var(--taupe-soft); font-family: var(--latin); font-size: 11px; letter-spacing: .16em; }
.rx-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.rx-list a {
  padding: 9px 13px; background: var(--milk-light);
  font-size: 13.5px; color: var(--espresso);
  transition: background .2s ease;
}
.rx-list a:hover { background: var(--milk); }
.rx-list a i { font-style: normal; color: var(--gold); margin-left: 6px; }

.disclaim { margin: 22px 0 0; color: var(--taupe); font-size: 12px; line-height: 1.75; }

/* ── 一般區塊 ─────────────────────────────── */
.sect { padding: 74px 0; }
.sect-h { margin-bottom: 26px; }
.sect-h h2 { margin-top: 12px; font-size: 32px; line-height: 34px; }
.sect-h p { margin: 12px 0 0; color: var(--taupe); font-size: 14px; }

/* 醫師名冊 */
.team { background: var(--espresso); color: var(--ivory); }
.team .sect-h p { color: rgba(247, 244, 238, .62); }
.team .eyebrow { color: var(--gold-soft); }

.branch-block { padding-top: 26px; border-top: 1px solid rgba(247, 244, 238, .16); margin-top: 26px; }
.branch-block:first-of-type { margin-top: 6px; }
.branch-t { display: flex; align-items: baseline; justify-content: space-between; }
.branch-t h3 { font-size: 24px; line-height: 25px; }
.branch-t span { font-family: var(--latin); font-size: 10.5px; letter-spacing: .22em; color: var(--gold-soft); }

.docs { margin-top: 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
.doc img { aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; background: var(--milk-light); filter: grayscale(1) contrast(1.02); transition: filter .35s ease; }
.doc:hover img { filter: grayscale(0); }
.doc b { display: block; margin-top: 11px; font-family: var(--serif); font-size: 20px; font-weight: 300; }
.doc em { display: block; margin-top: 5px; color: rgba(247, 244, 238, .55); font-size: 12px; font-style: normal; line-height: 1.55; }
.doc a.doc-go { display: inline-block; margin-top: 9px; padding-bottom: 3px; border-bottom: 1px solid var(--gold); font-size: 12px; letter-spacing: .1em; color: var(--gold-soft); }

/* 療程 */
.cat { padding: 24px 0; border-top: 1px solid var(--line); }
.cat-t { display: flex; align-items: baseline; justify-content: space-between; }
.cat-t h3 { font-size: 24px; line-height: 25px; }
.cat-t span { font-family: var(--latin); font-size: 10.5px; letter-spacing: .2em; color: var(--gold); }
.cat-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; }
.cat-list li { border-bottom: 1px solid var(--line-soft); }
.cat-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 2px; font-size: 14.5px;
}
.cat-list a i { font-style: normal; color: var(--gold); opacity: .5; transition: opacity .2s ease; }
.cat-list a:hover i { opacity: 1; }

/* 分院 */
.clinic { padding: 26px 0; border-top: 1px solid var(--line); }
.clinic-city { margin: 0; font-family: var(--latin); font-size: 10.5px; letter-spacing: .22em; color: var(--gold); }
.clinic h3 { margin-top: 10px; font-size: 24px; line-height: 25px; }
.clinic dl { margin: 16px 0 0; display: grid; grid-template-columns: 62px 1fr; gap: 9px 12px; font-size: 14px; }
.clinic dt { color: var(--taupe-soft); font-size: 12px; letter-spacing: .06em; padding-top: 2px; }
.clinic dd { margin: 0; }
.clinic dd a { border-bottom: 1px solid var(--line); }
.flag { display: block; margin-top: 5px; color: var(--gold); font-size: 11.5px; line-height: 1.6; }
.clinic .go { margin-top: 18px; }

/* footer */
.foot { padding: 46px 0 34px; border-top: 1px solid var(--line); }
.foot .mark b { font-size: 14px; }
.foot-note { margin: 20px 0 0; color: var(--taupe); font-size: 12px; line-height: 1.85; }
.foot-copy { margin: 16px 0 0; color: var(--taupe-soft); font-size: 11px; }

/* 手機固定 LINE */
.dock {
  position: fixed; z-index: 50; left: 10px; right: 10px; bottom: 10px;
  height: var(--dock-h);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--espresso); color: var(--ivory);
  font-size: 13px; letter-spacing: .12em;
  box-shadow: 0 14px 36px rgba(40, 35, 31, .22);
}

/* ── 桌機 ─────────────────────────────────── */
@media (min-width: 900px) {
  :root { --shell: 5vw; }
  body { padding-bottom: 0; }

  .bar { padding: 18px var(--shell); }
  .bar-nav { display: flex; gap: 30px; font-size: 13px; letter-spacing: .08em; color: var(--taupe); }
  .bar-nav a:hover { color: var(--gold); }

  .hero { padding: 60px 0 0; }
  .hero-slogan { font-size: clamp(34px, 3.6vw, 56px); }

  .hero-grid {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    column-gap: 60px;
    align-items: start;
  }
  .hero-left { grid-column: 1; }
  .result { grid-column: 2; }
  .ask { margin-top: 52px; }
  .ask-hint { margin-top: 12px; }
  .result { margin-top: 52px; }

  .lead-card { display: grid; grid-template-columns: 0.82fr 1.18fr; }
  .lead-photo { aspect-ratio: auto; min-height: 460px; }
  .lead-body { padding: 30px 30px 34px; }
  .lead-name { font-size: 44px; line-height: 46px; }

  .sect { padding: 110px 0; }
  .sect-h h2 { font-size: 44px; line-height: 47px; }

  .docs { grid-template-columns: repeat(3, 1fr); gap: 30px 22px; }
  @media (min-width: 1180px) { .docs { grid-template-columns: repeat(4, 1fr); } }
  .branch-block { display: grid; grid-template-columns: 0.3fr 1.7fr; gap: 40px; }
  .branch-t { display: block; }
  .branch-t span { display: block; margin-top: 8px; }
  .docs { margin-top: 0; }

  .cat { display: grid; grid-template-columns: 0.32fr 1.68fr; gap: 40px; padding: 30px 0; }
  .cat-t { display: block; }
  .cat-t span { display: block; margin-top: 8px; }
  .cat-list { margin-top: 0; grid-template-columns: repeat(2, 1fr); column-gap: 40px; }

  .clinics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 30px; }
  .dock { display: none; }
  .foot-in { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: 40px; align-items: start; }
  .foot-note { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rule i { animation: none; }
  .doc img { transition: none; }
}
