/* Japandi Warm Minimalism */
:root {
  --bg: #F3EDE3;
  --text: #4C463E;
  --text-soft: #7A7166;
  --accent: #536347;
  --accent-dark: #435238;
  --oak: #B79A79;
  --surface: #E7DBCB;
  --highlight: #D2B38B;
  --card: #FAF6EF;
  --line-green: #536347;
  --radius: 14px;
  --max: 1120px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; line-height: 1.35; margin: 0 0 .5em; letter-spacing: .02em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 237, 227, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(183, 154, 121, .25);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 18px; font-weight: 600; }
.brand span { font-size: 12px; color: var(--text-soft); letter-spacing: .08em; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { text-decoration: none; font-size: 15px; color: var(--text-soft); }
.nav a:hover { color: var(--accent); }
.nav .btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: 16px; font-weight: 500; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-line { background: var(--accent); color: #fff; }
.btn-line:hover { background: var(--accent-dark); }
.btn-outline { border-color: var(--oak); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 64px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-eyebrow { font-size: 14px; letter-spacing: .16em; color: var(--accent); margin-bottom: 12px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 50px); font-weight: 600; margin-bottom: 16px; }
.nb { white-space: nowrap; }
.hero h1 small { display: block; font-size: .42em; font-weight: 400; color: var(--text-soft); letter-spacing: .1em; margin-top: 10px; }
.hero-lead { font-size: 19px; color: var(--text-soft); max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 14px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 1px solid transparent; transition: border-color .2s;
}
a.chip:hover { border-color: var(--accent); }

.hero-visual { position: relative; aspect-ratio: 4 / 5; max-width: 440px; justify-self: end; width: 100%; }
.slats {
  position: absolute; inset: 8% 0 0 18%; border-radius: 220px 220px var(--radius) var(--radius);
  background:
    repeating-linear-gradient(90deg, #C9AE8C 0 14px, #D8C2A4 14px 18px, #BFA27F 18px 30px, #D8C2A4 30px 34px);
  opacity: .55;
}
.hero-photo {
  position: absolute; inset: 0 8% 0 0; border-radius: 220px 220px var(--radius) var(--radius);
  background: var(--surface); overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
}
.hero-photo picture { width: 100%; height: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.plant { position: absolute; right: -6%; bottom: -2%; width: 34%; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .num { font-size: 13px; letter-spacing: .2em; color: var(--accent); display: block; margin-bottom: 8px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { color: var(--text-soft); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card); border-radius: var(--radius); padding: 28px;
  border: 1px solid rgba(183, 154, 121, .22);
}
.section-alt .card { background: var(--bg); }
.card h3 { font-size: 20px; }
.card p:last-child { margin-bottom: 0; }
.muted { color: var(--text-soft); }
.small { font-size: 14px; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.quote {
  font-size: clamp(22px, 2.6vw, 28px); line-height: 1.6; font-weight: 500;
  border-left: 3px solid var(--accent); padding-left: 20px; margin: 0 0 28px;
}
.reason-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.reason-list li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.reason-list .n { font-size: 14px; color: var(--accent); font-weight: 600; padding-top: 3px; }
.reason-list strong { display: block; font-weight: 600; }
.reason-list span { color: var(--text-soft); font-size: 16px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.fact { background: var(--surface); border-radius: 10px; padding: 14px 16px; }
.fact b { display: block; font-size: 13px; color: var(--text-soft); font-weight: 400; }

/* Services */
.service { cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; transition: border-color .2s, transform .2s; }
.service:hover, .service[aria-expanded="true"] { border-color: var(--accent); }
.service .icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: 14px; }
.service .more { font-size: 14px; color: var(--accent); margin-top: 12px; display: inline-block; }
.service-detail { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--oak); display: none; }
.service[aria-expanded="true"] .service-detail { display: block; }
.service-detail ul { margin: 0; padding-left: 1.2em; }
.service-detail li { margin-bottom: 4px; font-size: 16px; }

/* Listings */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; align-items: center; }
.filters label { font-size: 14px; color: var(--text-soft); display: flex; flex-direction: column; gap: 4px; }
.filters select {
  font: inherit; font-size: 15px; padding: 10px 36px 10px 14px; border-radius: 10px;
  border: 1px solid rgba(183, 154, 121, .5); background: var(--card); color: var(--text);
  appearance: none; min-width: 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237A7166' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.result-count { font-size: 14px; color: var(--text-soft); margin-left: auto; align-self: flex-end; }
.listing { padding: 0; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.listing:hover { border-color: var(--accent); transform: translateY(-2px); }
.listing-img { aspect-ratio: 4 / 3; background: var(--surface); position: relative; overflow: hidden; }
.listing-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.listing-body h3 { font-size: 18px; margin-bottom: 4px; }
.listing-meta { font-size: 14px; color: var(--text-soft); margin-bottom: 12px; }
.listing-price { font-size: 22px; font-weight: 600; color: var(--accent); margin-top: auto; }
.listing-price small { font-size: 14px; font-weight: 400; }
.badge {
  position: absolute; top: 12px; left: 12px; font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgba(250, 246, 239, .92); color: var(--text-soft);
}
.empty { padding: 40px; text-align: center; color: var(--text-soft); }
.more-wrap { text-align: center; margin-top: 28px; }
.more-wrap .btn[hidden] { display: none; }
.desc p { margin: 0 0 .6em; }
/* 我家網照片最大約 480px，大圖改成完整顯示、不放大裁切 */
.gallery-main img { object-fit: contain; }

/* Areas */
.area h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.area h3 a { font-size: 13px; font-weight: 400; color: var(--accent); white-space: nowrap; }
.area .who { font-size: 14px; color: var(--accent); margin-bottom: 8px; }
.area .watch { font-size: 15px; background: var(--surface); border-radius: 10px; padding: 10px 14px; }
.section-alt .area .watch { background: var(--card); }
.area .comm { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.area .comm span { font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(183, 154, 121, .5); color: var(--text-soft); }

/* Deals & testimonials */
.deal .result { font-size: 18px; font-weight: 600; color: var(--accent); margin: 6px 0 10px; }
.deal .tagline { font-size: 14px; color: var(--text-soft); }
.testi blockquote { margin: 0 0 14px; font-size: 17px; }
.testi cite { font-style: normal; font-size: 14px; color: var(--text-soft); }
.sample-flag { font-size: 12px; color: var(--oak); }

/* Tools */
.tool { text-decoration: none; display: block; transition: border-color .2s; }
.tool:hover { border-color: var(--accent); }
.tool-own { border-color: var(--accent); }
.own-tag { font-size: 12px; font-weight: 500; color: #fff; background: var(--accent); border-radius: 999px; padding: 2px 10px; white-space: nowrap; align-self: center; }
.tool h3 { display: flex; justify-content: space-between; gap: 8px; }
.tool h3 svg { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 6px; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.calc-fields { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--text-soft); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 16px; padding: 11px 14px; border-radius: 10px;
  border: 1px solid rgba(183, 154, 121, .5); background: var(--bg); color: var(--text); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus, .filters select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc-result { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.calc-result .big { font-size: 34px; font-weight: 600; color: var(--accent); line-height: 1.2; }
.calc-result dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 15px; }
.calc-result dt { color: var(--text-soft); }
.calc-result dd { margin: 0; text-align: right; }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.contact-list a { display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 16px 18px; border-radius: var(--radius); background: var(--bg); border: 1px solid rgba(183, 154, 121, .22); }
.contact-list a:hover { border-color: var(--accent); }
.contact-list svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.contact-list b { display: block; font-weight: 600; }
.contact-list span { font-size: 14px; color: var(--text-soft); }
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-msg { font-size: 14px; color: var(--accent); min-height: 1.4em; }

/* Socials */
.follow-title { font-size: 18px; margin-top: 8px; }
.social-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.social {
  display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0;
  padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid rgba(183, 154, 121, .22);
}
.social:hover { border-color: var(--accent); }
.social svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.social span { min-width: 0; line-height: 1.4; }
.social b { display: block; font-weight: 600; font-size: 15px; }
.social small { display: block; font-size: 12px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-icons { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.social-icons a {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(183, 154, 121, .5); color: var(--accent); transition: border-color .2s, background .2s;
}
.social-icons a:hover { border-color: var(--accent); background: var(--surface); }
.social-icons svg { width: 18px; height: 18px; }

/* Footer */
.site-footer { padding: 48px 0 120px; font-size: 13px; color: var(--text-soft); line-height: 1.9; border-top: 1px solid rgba(183, 154, 121, .3); }
.site-footer .slogan { font-size: 16px; color: var(--text); margin-bottom: 14px; }
.site-footer p { margin: 0; }
.credit { margin-top: 14px !important; font-size: 11px; opacity: .8; }
.credit a { color: inherit; }

/* Floating contact bar */
.contact-bar {
  position: fixed; z-index: 60; right: 24px; bottom: 24px; display: flex; gap: 10px;
}
.contact-bar .btn { box-shadow: 0 6px 20px rgba(76, 70, 62, .14); }
.contact-bar .btn-outline { background: var(--card); }

/* Property detail page */
.crumb { font-size: 14px; color: var(--text-soft); padding: 24px 0 0; }
.crumb a { color: var(--accent); text-decoration: none; }
.detail { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; padding: 24px 0 80px; }
.gallery-main { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; width: 84px; height: 64px; flex: none; cursor: pointer; background: var(--surface); }
.thumbs button[aria-current="true"] { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin: 20px 0; font-size: 16px; }
.spec dt { color: var(--text-soft); }
.spec dd { margin: 0; }
.detail > * { min-width: 0; }
.detail-aside { position: sticky; top: 88px; align-self: start; }
.detail h1 { font-size: clamp(24px, 3vw, 32px); }
.detail .price { font-size: 32px; font-weight: 600; color: var(--accent); }
.points { padding-left: 1.2em; }
.points li { margin-bottom: 8px; }

/* Illustration placeholder for listings */
.illus { width: 100%; height: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about, .calc, .contact, .detail { grid-template-columns: 1fr; gap: 32px; }
  .detail-aside { position: static; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid rgba(183, 154, 121, .3);
    display: none; padding: 8px 0 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 16px; width: 100%; text-align: center; font-size: 16px; }
  .nav .btn { width: auto; margin-top: 8px; }
  .nav-toggle { display: block; }

  /* 手機首屏：照片＋LINE 一眼可見 */
  .hero { padding: 20px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 20px; }
  .hero-visual { order: -1; max-width: 230px; justify-self: center; }
  .hero-text { text-align: center; }
  .hero-lead { font-size: 16px; margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; margin: 20px 0 18px; }
  .hero-actions .btn { flex: 1 1 140px; padding: 12px 12px; font-size: 15px; white-space: nowrap; }
  .hero-chips { justify-content: center; }

  section { padding: 56px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .card.listing { padding: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .filters label { flex: 1 1 140px; }
  .filters select { min-width: 0; width: 100%; }
  .result-count { width: 100%; margin-left: 0; }

  .contact-bar {
    left: 0; right: 0; bottom: 0; gap: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(243, 237, 227, .96); border-top: 1px solid rgba(183, 154, 121, .3);
  }
  .contact-bar .btn { flex: 1; box-shadow: none; }
  .contact-bar .btn + .btn { margin-left: 10px; }
}
