/* 竹北房仲孟涓｜Dreamy Aqua Ocean 主題 */
:root {
  --ocean: #A6E3E2;
  --sand: #F1E9D6;
  --text: #245B68;
  --text-2: #477D87;
  --coral: #E7A26C;
  --coral-dark: #C97F48;
  --deep: #3A9DB7;
  --shell: #F7F2E7;
  --foam: #FFFFFF;
  --line: #06C755;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(36, 91, 104, .10);
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  background: var(--shell);
  line-height: 1.8;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; letter-spacing: .04em; line-height: 1.4; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- 水面光影（caustics） ---------- */
.water {
  position: relative;
  background-color: var(--ocean);
  overflow: hidden;
  isolation: isolate;
}
.water::before, .water::after {
  content: "";
  position: absolute; inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 18% 6% at 20% 30%, rgba(255,255,255,.55), transparent 70%),
    radial-gradient(ellipse 10% 4% at 70% 20%, rgba(255,255,255,.45), transparent 70%),
    radial-gradient(ellipse 14% 5% at 55% 65%, rgba(255,255,255,.40), transparent 70%),
    radial-gradient(ellipse 9% 3% at 85% 75%, rgba(255,255,255,.45), transparent 70%),
    radial-gradient(ellipse 12% 4% at 10% 80%, rgba(255,255,255,.35), transparent 70%),
    radial-gradient(circle at 50% 120%, rgba(58,157,183,.35), transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
}
.water::after {
  opacity: .6;
  transform: rotate(12deg) scale(1.1);
  animation-duration: 26s;
  animation-direction: alternate-reverse;
}
@keyframes drift {
  from { transform: translate(-2%, -1%) rotate(0deg); }
  to   { transform: translate(2%, 1.5%) rotate(3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .water::before, .water::after { animation: none; }
  html { scroll-behavior: auto; }
}
.sand { background: var(--sand); }

/* ---------- 導覽列 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 242, 231, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(36, 91, 104, .08);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--ocean) 55%, var(--deep));
  flex-shrink: 0;
}
.brand small { display: block; font-size: 11px; font-weight: 400; color: var(--text-2); letter-spacing: .08em; line-height: 1.2; }
.brand span { line-height: 1.2; }
.nav-links { display: flex; gap: 4px; list-style: none; align-items: center; }
.nav-links a {
  text-decoration: none; padding: 8px 14px; border-radius: 999px;
  font-size: 15px; color: var(--text-2); transition: background .2s, color .2s;
}
.nav-links a:hover { background: rgba(166, 227, 226, .5); color: var(--text); }
.nav-links a[aria-current="page"] { background: var(--ocean); color: var(--text); font-weight: 700; }
.nav-toggle {
  display: none; background: none; border: 0; width: 44px; height: 44px;
  border-radius: 12px; cursor: pointer; color: var(--text);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 860px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--shell); padding: 8px 16px 16px;
    box-shadow: 0 12px 20px rgba(36,91,104,.08);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 16px; font-size: 16px; }
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
  min-height: 48px;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--coral); outline-offset: 2px;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-line { background: var(--line); color: #fff; box-shadow: 0 8px 20px rgba(6, 199, 85, .28); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 8px 20px rgba(231, 162, 108, .35); }
.btn-ghost { background: rgba(255,255,255,.75); color: var(--text); }
.btn-ghost:hover { background: #fff; }
.btn-sm { padding: 10px 18px; min-height: 40px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; }
.avatar {
  width: 300px; height: 300px; border-radius: 50%;
  background: var(--shell);
  border: 8px solid rgba(255,255,255,.8);
  box-shadow: 0 18px 40px rgba(36, 91, 104, .18);
  overflow: hidden; position: relative;
  display: grid; place-items: center;
}
.avatar img {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 0;
  background: #fff;
  /* 全身照：放大聚焦在臉與肩膀 */
  transform: scale(1.55); transform-origin: 50% 18%;
}
.avatar .initials { font-size: 72px; font-weight: 700; color: var(--deep); }
.eyebrow {
  display: inline-block; font-size: 14px; letter-spacing: .12em;
  background: rgba(255,255,255,.7); padding: 4px 14px; border-radius: 999px;
  color: var(--text-2); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 12px; }
.hero .tagline { font-size: clamp(18px, 2.4vw, 22px); color: var(--text-2); margin-bottom: 26px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  font-size: 14px; padding: 4px 12px; border-radius: 999px;
  background: rgba(247, 242, 231, .85); color: var(--text-2);
}

@media (max-width: 760px) {
  .hero { padding: 28px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 20px; text-align: center; justify-items: center; }
  .avatar { width: 170px; height: 170px; border-width: 6px; }
  .avatar .initials { font-size: 48px; }
  .hero-cta, .chips { justify-content: center; }
  .hero-cta .btn { flex: 1 1 100%; max-width: 360px; }
}

/* 頁面標頭（內頁） */
.page-head { padding: 52px 0 56px; }
.page-head h1 { font-size: clamp(28px, 4.5vw, 40px); margin-bottom: 8px; }
.page-head p { color: var(--text-2); font-size: 18px; max-width: 36em; }

/* ---------- 區塊 ---------- */
section.block { padding: 72px 0; }
.sec-title { margin-bottom: 36px; }
.sec-title .kicker { color: var(--coral-dark); font-size: 14px; font-weight: 700; letter-spacing: .14em; }
.sec-title h2 { font-size: clamp(24px, 3.6vw, 34px); }
.sec-title p { color: var(--text-2); max-width: 40em; margin-top: 6px; }
@media (max-width: 760px) { section.block { padding: 52px 0; } }

.card {
  background: rgba(255, 255, 255, .78);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.sand .card { background: var(--shell); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* 貝殼序號 */
.shell-num {
  width: 44px; height: 44px; border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 40% 30%, #fff, var(--sand) 60%, #E3D5B5);
  display: grid; place-items: center;
  font-weight: 700; color: var(--coral-dark);
  box-shadow: 0 4px 10px rgba(36,91,104,.12);
  margin-bottom: 14px;
}

/* ---------- 服務項目（可展開） ---------- */
.services { display: grid; gap: 14px; }
.service {
  background: rgba(255,255,255,.82); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.service summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; min-height: 64px;
}
.service summary::-webkit-details-marker { display: none; }
.service summary .ico {
  width: 48px; height: 48px; border-radius: 16px; flex-shrink: 0;
  background: var(--ocean); display: grid; place-items: center; color: var(--text);
}
.service summary .ico svg { width: 26px; height: 26px; }
.service summary h3 { font-size: 19px; }
.service summary p { font-size: 15px; color: var(--text-2); line-height: 1.5; }
.service summary .arrow { margin-left: auto; transition: transform .25s; color: var(--coral-dark); flex-shrink: 0; }
.service[open] summary .arrow { transform: rotate(180deg); }
.service .body { padding: 0 24px 24px 88px; color: var(--text); }
.service .body ul { padding-left: 1.2em; margin: 8px 0 14px; }
.service .body li { margin: 4px 0; }
.service .body .note {
  background: var(--sand); border-radius: 14px; padding: 12px 16px;
  font-size: 15px; color: var(--text-2);
}
@media (max-width: 640px) {
  .service summary { padding: 16px 18px; gap: 12px; }
  .service .body { padding: 0 18px 20px; }
}

/* ---------- 實績 / 見證 ---------- */
.case .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--ocean); color: var(--text); }
.tag.coral { background: #F7D9C1; color: #8A4E22; }
.tag.sample { background: #FFE9A8; color: #7A5A00; }
.case h3 { font-size: 19px; margin-bottom: 8px; }
.case dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 15px; margin-top: 10px; }
.case dt { color: var(--text-2); font-weight: 700; }
.quote { position: relative; padding-top: 40px; }
.quote::before {
  content: "“"; position: absolute; top: -6px; left: 22px;
  font-size: 72px; color: var(--coral); line-height: 1; font-family: Georgia, serif;
}
.quote cite { display: block; margin-top: 14px; font-style: normal; font-size: 14px; color: var(--text-2); }

.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter button {
  font: inherit; font-size: 15px; border: 0; cursor: pointer;
  padding: 8px 18px; border-radius: 999px; background: rgba(255,255,255,.7); color: var(--text-2);
  min-height: 40px;
}
.filter button[aria-pressed="true"] { background: var(--text); color: #fff; }

/* ---------- 數字 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { text-align: center; padding: 22px 12px; }
.stat b { display: block; font-size: 30px; color: var(--deep); line-height: 1.2; }
.stat span { font-size: 14px; color: var(--text-2); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 引言 ---------- */
.big-quote { text-align: center; padding: 84px 0; }
.big-quote blockquote { font-size: clamp(22px, 3.4vw, 32px); font-weight: 700; max-width: 22em; margin: 0 auto; }
.big-quote p { margin-top: 14px; color: var(--text-2); }

/* ---------- 試算工具 ---------- */
.calc label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid rgba(36, 91, 104, .18); background: #fff;
  min-height: 48px;
}
textarea { min-height: 110px; resize: vertical; }
.unit { position: relative; }
.unit input { padding-right: 52px; }
.unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-2); }
.result {
  background: var(--sand); border-radius: var(--radius); padding: 22px;
  margin-top: 6px;
}
.result .main { font-size: 32px; font-weight: 700; color: var(--deep); line-height: 1.3; }
.result .rows { margin-top: 10px; font-size: 15px; display: grid; gap: 4px; }
.result .rows div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed rgba(36,91,104,.15); padding: 4px 0; }
.result .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hint { font-size: 14px; color: var(--text-2); margin-top: 10px; }

.tool-link { display: flex; flex-direction: column; text-decoration: none; height: 100%; }
.tool-link h3 { font-size: 19px; margin-bottom: 6px; }
.tool-link p { color: var(--text-2); font-size: 15px; flex: 1; }
.tool-link .go { margin-top: 14px; font-weight: 700; color: var(--coral-dark); }
.tool-link:hover { transform: translateY(-3px); }
.tool-link { transition: transform .2s; }

/* ---------- 聯絡 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid rgba(36,91,104,.1); text-decoration: none; }
.contact-item:last-child { border-bottom: 0; }
.contact-item .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--ocean); flex-shrink: 0; }
.contact-item .ico svg { width: 24px; height: 24px; }
.contact-item small { display: block; color: var(--text-2); font-size: 13px; }
.contact-item b { font-size: 18px; }
.check-group { display: flex; flex-wrap: wrap; gap: 8px; }
.check-group label {
  font-weight: 400; display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1.5px solid rgba(36,91,104,.18); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; min-height: 42px; margin: 0;
}
.check-group input { width: auto; min-height: 0; accent-color: var(--deep); }
.form-msg { margin-top: 12px; font-size: 15px; color: var(--deep); font-weight: 700; }

/* ---------- 結尾 CTA ---------- */
.closing { text-align: center; padding: 80px 0; }
.closing h2 { font-size: clamp(24px, 4vw, 36px); margin-bottom: 10px; }
.closing p { color: var(--text-2); margin-bottom: 26px; }
.closing .hero-cta { justify-content: center; }

/* ---------- 頁尾（法定揭露） ---------- */
.footer { background: var(--text); color: #E6F3F2; padding: 40px 0 110px; font-size: 14px; line-height: 1.9; }
.footer .legal p { margin: 0; }
.footer .legal { border-left: 3px solid var(--coral); padding-left: 16px; }
.footer .credit { font-size: 12px; opacity: .6; margin-top: 18px; }
.footer .credit a { color: #fff; }
.footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 20px; }
.footer .links a { text-decoration: none; opacity: .85; }
.footer .links a:hover { opacity: 1; text-decoration: underline; }

/* ---------- 浮動聯絡列（每頁） ---------- */
.float-cta {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; flex-direction: column; gap: 10px;
}
.float-cta a {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 8px 22px rgba(36,91,104,.25);
  transition: transform .15s;
}
.float-cta a:hover { transform: scale(1.06); }
.float-cta svg { width: 28px; height: 28px; }
.float-cta .lbl { display: none; }
.float-cta .f-line { background: var(--line); }
.float-cta .f-tel { background: var(--coral); }

@media (max-width: 640px) {
  .float-cta {
    left: 0; right: 0; bottom: 0; flex-direction: row; gap: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(247,242,231,.96); box-shadow: 0 -6px 18px rgba(36,91,104,.10);
  }
  .float-cta a {
    flex: 1; width: auto; height: 50px; border-radius: 999px; margin: 0 5px;
    display: flex; gap: 8px; font-weight: 700; text-decoration: none; font-size: 16px;
  }
  .float-cta svg { width: 22px; height: 22px; }
  .float-cta .lbl { display: inline; }
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 15px; opacity: 0; pointer-events: none; transition: .25s; z-index: 80;
  max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 進場動畫 */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.center { text-align: center; }
.mt { margin-top: 28px; }
.muted { color: var(--text-2); }
