/* ═══════════════════════════════════════════════════════
   Soothe SPA — stylesheet
   設計基調：暖奶油底 × 深墨綠 × 古銅金，細線條、留白為主
   ★ 全站以「系統字體放大也不破版」為前提設計（OPPO / 折疊機）
   ═══════════════════════════════════════════════════════ */

/* ───────── Fonts ─────────
   拉丁字（品牌、數字、英文標題）自架 Cormorant；
   中文／韓文一律走系統字，客戶日後改文案不會有缺字問題。 */
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/Cormorant-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/Cormorant-500.woff2') format('woff2');
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/Cormorant-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ───────── Reset & tokens ───────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream:      #faf7f2;
  --cream-2:    #f3eee5;
  --surface:    #ffffff;
  --green:      #1f2e26;
  --green-2:    #2f4438;
  --ink:        #26302b;
  --ink-muted:  #5f6b64;
  --bronze:     #a8815a;   /* 裝飾用（線條、圖示） */
  --bronze-dk:  #8a6340;   /* 文字用，白／奶油底可過 AA */
  --line:       #e5ddd1;
  --radius:     4px;
  --radius-lg:  8px;
  --shadow-sm:  0 1px 2px rgba(31,46,38,.05);
  --shadow-md:  0 10px 30px -12px rgba(31,46,38,.18);
  --ease:       .35s cubic-bezier(.4,0,.2,1);

  --serif: 'Cormorant', 'Noto Serif TC', 'Songti TC', 'PingFang TC', 'Apple Nova Serif', serif;
  --sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Noto Sans TC',
           'Microsoft JhengHei', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Helvetica Neue', Arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  /* 擋掉行動瀏覽器的自動字級 boosting；使用者的系統放大設定仍生效（本來就不該壓） */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 標題一律可斷字：系統字放大時中文長句與英文長字都不會撐破容器 */
h1, h2, h3, .logo-text, .card-name, .modal-info h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

p, li, dd, dt, summary { overflow-wrap: anywhere; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }
ul { list-style: none; }

:focus-visible { outline: 2px solid var(--bronze-dk); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--green); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; }

.eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--bronze-dk);
  letter-spacing: .06em;
  margin-bottom: 10px;
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: center;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
  min-width: 0;                 /* 大字體下不撐破父層 */
  max-width: 100%;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--bronze); color: var(--bronze-dk); }
.btn-ghost:hover { background: var(--bronze); color: #fff; }
.btn-block { display: flex; width: 100%; }

/* ═══════════════ Header ═══════════════ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  /* 實心霧白底：避免透明 header 疊淺色被判低對比，logo 也保持清楚 */
  background: rgba(250,247,242,.94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;              /* 字級放大時允許換行，而不是把元素擠出畫面 */
}

.logo {
  display: flex; align-items: center; gap: 10px;
  min-width: 0; flex: 1 1 auto;
  color: var(--green);
}
.logo-mark { color: var(--bronze); flex-shrink: 0; display: flex; }
.logo-text { font-size: 1.5rem; letter-spacing: .02em; }
.logo-sub {
  font-family: var(--sans);
  font-size: .62em; font-weight: 600;
  letter-spacing: .18em; color: var(--bronze-dk);
  margin-left: .4em; vertical-align: .25em;
}

.nav-links { display: flex; gap: 30px; flex-wrap: wrap; min-width: 0; }
.nav-links a {
  font-size: .92rem; color: var(--ink-muted);
  padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.nav-links a:hover { color: var(--green); border-color: var(--bronze); }

.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }

/* 語言：單一下拉（並排 pill 在大字體下會把漢堡擠掉） */
.lang-switcher { position: relative; }
.lang-switcher summary {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .85rem; color: var(--ink-muted); cursor: pointer;
  list-style: none; white-space: nowrap;
}
.lang-switcher summary::-webkit-details-marker { display: none; }
.lang-switcher[open] summary { border-color: var(--bronze); color: var(--green); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 120;
  min-width: 148px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.lang-opt {
  display: block; width: 100%; text-align: left;
  padding: 9px 14px; border-radius: var(--radius);
  font-size: .9rem; color: var(--ink-muted);
}
.lang-opt:hover { background: var(--cream-2); color: var(--green); }
.lang-opt.is-active { color: var(--green); font-weight: 600; background: var(--cream-2); }

.menu-btn { display: none; flex-direction: column; gap: 5px; padding: 8px; flex-shrink: 0; }
.menu-btn span { display: block; width: 22px; height: 1.5px; background: var(--green); transition: var(--ease); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════════════ Hero ═══════════════ */
.hero {
  background: linear-gradient(170deg, var(--cream) 0%, var(--cream-2) 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 8vw, 88px);
  text-align: center;
}
.hero-inner { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.hero h1 {
  font-size: clamp(2rem, 6.2vw, 3.4rem);
  color: var(--green);
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.02rem; color: var(--ink-muted);
  max-width: 40em; margin: 0 auto 32px;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  margin-bottom: 48px;
}

.hero-facts {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px 44px;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.hero-facts li {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 0;
}
.hero-facts strong {
  font-family: var(--serif); font-weight: 500;
  font-size: 1.9rem; color: var(--bronze-dk); line-height: 1.1;
}
.hero-facts span { font-size: .82rem; color: var(--ink-muted); letter-spacing: .04em; }

/* ═══════════════ Section shell ═══════════════ */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--cream-2); border-block: 1px solid var(--line); }

.section-head { max-width: 640px; margin: 0 auto clamp(32px, 5vw, 52px); text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 4.2vw, 2.4rem); color: var(--green); }
.section-lead { margin-top: 14px; color: var(--ink-muted); font-size: .98rem; }

/* ═══════════════ Region tabs ═══════════════ */
.region-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-bottom: 20px;
}
.region-tab {
  padding: 11px 30px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: .95rem; font-weight: 600; color: var(--ink-muted);
  min-width: 0; max-width: 100%;
  transition: all var(--ease);
}
.region-tab:hover { border-color: var(--bronze); color: var(--bronze-dk); }
.region-tab.is-active { background: var(--green); border-color: var(--green); color: #fff; }

.region-note {
  max-width: 620px; margin: 0 auto 10px;
  text-align: center; font-size: .9rem; color: var(--ink-muted);
}
.result-count {
  text-align: center; font-size: .85rem; color: var(--ink-muted);
  letter-spacing: .04em; margin-bottom: 34px;
}
#therapist-count { font-family: var(--serif); font-size: 1.25rem; color: var(--bronze-dk); }

.noscript-note {
  max-width: 620px; margin: 24px auto 0; padding: 16px 20px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); text-align: center; color: var(--ink-muted); font-size: .92rem;
}

/* ═══════════════ Therapist cards ═══════════════ */
.therapist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}
.therapist-grid > * { min-width: 0; }   /* grid 子項不因內容過寬撐破欄 */

.therapist-card {
  display: flex; flex-direction: column;
  width: 100%; min-width: 0; text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  opacity: 0; transform: translateY(14px);
  animation: fadeUp .5s ease forwards;
}
.therapist-card:hover { transform: translateY(-4px); border-color: var(--bronze); box-shadow: var(--shadow-md); }

/* 卡片本體是 <button>（整張可點且對鍵盤友善），內層 span 需還原成區塊 */
.therapist-card > span, .card-name, .card-title { display: block; }

/* 圖片一律以 3:4 裁切、object-position 略偏上 —
   客戶上傳的照片即使尺寸不一，版面仍完全一致 */
.card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--cream-2) url('../images/og/placeholder.svg') center/44px no-repeat;
  overflow: hidden;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 22%;
  transition: transform .6s ease;
}
.therapist-card:hover .card-image img { transform: scale(1.04); }

.card-badge {
  position: absolute; top: 12px; left: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 13px; border-radius: 999px;
  background: rgba(255,255,255,.93);
  font-size: .74rem; font-weight: 600; color: var(--green);
  letter-spacing: .03em;
}
.card-price {
  position: absolute; bottom: 12px; right: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 13px; border-radius: 999px;
  background: rgba(31,46,38,.88); color: #fff;
  font-size: .78rem; font-weight: 600;
}

.card-body { padding: 18px 18px 8px; flex: 1 1 auto; min-width: 0; }
.card-name { font-size: 1.32rem; color: var(--green); }
.card-title { font-size: .84rem; color: var(--bronze-dk); margin-bottom: 10px; }
.card-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  font-size: .8rem; color: var(--ink-muted); margin-bottom: 12px;
}
.card-meta span { min-width: 0; }

.card-specialties { display: flex; flex-wrap: wrap; gap: 6px; }
.specialty-tag {
  padding: 4px 11px; border-radius: 999px;
  background: var(--cream-2); border: 1px solid var(--line);
  font-size: .74rem; color: var(--ink-muted);
}

.card-footer {
  padding: 14px 18px 18px;
  display: flex; justify-content: flex-start;
}
.card-btn {
  font-size: .86rem; font-weight: 600; color: var(--green);
  border-bottom: 1px solid var(--bronze);
  padding-bottom: 2px;
  transition: color var(--ease), border-color var(--ease);
}
.therapist-card:hover .card-btn { color: var(--bronze-dk); }

/* ═══════════════ Services ═══════════════ */
.service-grid {
  display: grid;
  /* 固定 3 欄：6 張卡剛好排滿兩列，不留空格 */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.service-grid > * { min-width: 0; }
.service-card { background: var(--cream); padding: 32px 28px; }
.service-num {
  display: block; font-family: var(--serif);
  font-size: 1.1rem; color: var(--bronze); letter-spacing: .1em; margin-bottom: 12px;
}
.service-card h3 { font-size: 1.28rem; color: var(--green); margin-bottom: 10px; }
.service-card p { font-size: .92rem; color: var(--ink-muted); }
.service-card-note { background: var(--green); }
.service-card-note h3 { color: #fff; }
.service-card-note p { color: rgba(255,255,255,.78); }

/* ═══════════════ About ═══════════════ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.about-text h2 { font-size: clamp(1.6rem, 4.2vw, 2.3rem); color: var(--green); margin-bottom: 18px; }
.about-text p { color: var(--ink-muted); margin-bottom: 16px; }
.about-points { margin-top: 26px; display: grid; gap: 12px; }
.about-points li {
  position: relative; padding-left: 26px;
  font-size: .94rem; color: var(--ink);
}
.about-points li::before {
  content: ''; position: absolute; left: 0; top: .72em;
  width: 12px; height: 1px; background: var(--bronze);
}

.about-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 30px 28px;
}
.about-card h3 {
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; color: var(--bronze-dk); text-transform: uppercase;
  margin-bottom: 8px;
}
.about-card h3 + * { margin-bottom: 22px; }
.about-card h3 ~ h3 { margin-top: 26px; }
.about-hours { font-family: var(--serif); font-size: 2rem; color: var(--green); line-height: 1.2; margin-bottom: 2px !important; }
.about-hours-sub { font-size: .85rem; color: var(--ink-muted); }
.about-card .btn { margin-top: 6px; }

/* ═══════════════ FAQ ═══════════════ */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px 24px;
}
.faq-item summary {
  display: flex; align-items: flex-start; gap: 12px;
  font-family: var(--serif); font-size: 1.16rem; font-weight: 500;
  color: var(--green); cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; margin-left: auto; flex-shrink: 0;
  color: var(--bronze); font-size: 1.3rem; line-height: 1;
  transition: transform var(--ease);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: 12px; font-size: .93rem; color: var(--ink-muted); }

/* ═══════════════ Modal ═══════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(31,46,38,.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity var(--ease), visibility var(--ease);
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }

.modal-content {
  position: relative;
  width: 100%; max-width: 820px; max-height: 90vh;
  background: var(--surface); border-radius: var(--radius-lg);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateY(16px) scale(.98);
  transition: transform var(--ease);
}
.modal-overlay.is-open .modal-content { transform: none; }

.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.9); color: var(--green);
  font-size: 1.5rem; line-height: 1;
  transition: background var(--ease);
}
.modal-close:hover { background: var(--cream-2); }

.modal-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.modal-image { aspect-ratio: 3 / 4; background: var(--cream-2); overflow: hidden; }
.modal-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }

.modal-info { padding: clamp(24px, 4vw, 38px); min-width: 0; }
.modal-info h2 { font-size: 1.75rem; color: var(--green); }
.modal-title { font-size: .92rem; color: var(--bronze-dk); margin-bottom: 14px; }
.modal-price {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--cream-2); border: 1px solid var(--line);
  font-weight: 600; font-size: .95rem; color: var(--green);
  margin-bottom: 22px;
}

.modal-meta {
  display: grid; gap: 12px;
  padding: 18px 20px; margin-bottom: 22px;
  background: var(--cream); border-radius: var(--radius-lg);
}
/* 「標籤左／內容右」在系統大字體下會把左欄壓成一字一行 →
   允許換行、左欄可伸縮、右欄不 nowrap */
.meta-item { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.meta-label { flex: 0 0 auto; font-size: .82rem; color: var(--ink-muted); }
.meta-value { flex: 1 1 160px; min-width: 0; text-align: right; font-size: .9rem; font-weight: 600; }

.modal-specialties { margin-bottom: 22px; }
.modal-specialties .meta-label { display: block; margin-bottom: 10px; }
.specialty-tags { display: flex; flex-wrap: wrap; gap: 7px; }

.modal-about { margin-bottom: 26px; }
.modal-about h3 { font-size: 1.1rem; color: var(--green); margin-bottom: 8px; }
.modal-about p { font-size: .92rem; color: var(--ink-muted); }

/* ═══════════════ Footer ═══════════════ */
.site-footer { background: var(--green); color: rgba(255,255,255,.7); padding: 60px 0 26px; }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 36px; margin-bottom: 40px;
}
.footer-grid > * { min-width: 0; }
.footer-brand .logo-text { color: #fff; font-size: 1.5rem; display: block; margin-bottom: 10px; }
.footer-brand .logo-sub { color: var(--bronze); }
.footer-brand p { font-size: .9rem; }
.footer-col h3 {
  font-family: var(--sans); font-size: .76rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--bronze);
  margin-bottom: 12px;
}
.footer-col p, .footer-col a { font-size: .92rem; }
.footer-col ul { display: grid; gap: 9px; }
/* 連結不只靠顏色區分，加底線以符合無障礙 */
.footer-col a { color: rgba(255,255,255,.78); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.28); }
.footer-col a:hover { color: #fff; text-decoration-color: var(--bronze); }

.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14);
  text-align: center; font-size: .84rem; color: rgba(255,255,255,.6);
}

/* ═══════════════ Animation ═══════════════ */
@keyframes fadeUp { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .therapist-card { opacity: 1; transform: none; }
}

/* ═══════════════ Responsive ═══════════════ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .service-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .menu-btn { display: flex; }
  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 2px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }

  .therapist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .card-body { padding: 14px 14px 6px; }
  .card-footer { padding: 10px 14px 16px; }

  .modal-body { grid-template-columns: 1fr; }
  .modal-image { aspect-ratio: 4 / 3; }
  .meta-value { text-align: left; }
}

@media (max-width: 480px) {
  .therapist-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .container { padding: 0 18px; }
  .header-inner { padding: 10px 18px; }
  .logo-text { font-size: 1.3rem; }
  .hero-facts { gap: 12px 26px; }
  .service-card { padding: 26px 22px; }
}

/* 極窄或系統字體大幅放大時：nav 與 hero 按鈕改成整列，避免互相擠壓 */
@media (max-width: 380px) {
  .lang-switcher summary .lang-current { display: none; }
  .hero-actions .btn { width: 100%; }
}

/* ═══════════════ Scrollbar ═══════════════ */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--cream-2); }
::-webkit-scrollbar-thumb { background: #d8cfc0; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--bronze); }
