/* ============================================================
   FameHouse 全屋定制 — 全站样式
   設計方向：高端木作 / 溫暖 / 港式簡約
   ============================================================ */

:root {
  --bg: #FAF8F4;
  --bg-alt: #F1EBE0;
  --bg-soft: #F6F2EA;
  --ink: #26221B;
  --ink-soft: #5C564B;
  --wood: #A67C52;
  --wood-dark: #7A5A3A;
  --walnut: #35291D;
  --walnut-2: #45372A;
  --line: #E5DDCF;
  --white: #FFFFFF;
  --gold: #C9A063;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(53, 41, 29, 0.10);
  --shadow-lg: 0 18px 45px rgba(53, 41, 29, 0.16);
  --font-head: "Noto Serif TC", "Songti TC", "STSong", "SimSun", serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; border-radius: 999px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .25s ease;
  font-family: var(--font-body); letter-spacing: .02em;
}
.btn-primary { background: var(--walnut); color: #F5EFE4; }
.btn-primary:hover { background: var(--wood-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--walnut); border-color: var(--walnut); }
.btn-outline:hover { background: var(--walnut); color: #F5EFE4; transform: translateY(-2px); }
.btn-light { background: #F5EFE4; color: var(--walnut); }
.btn-light:hover { background: var(--gold); color: var(--walnut); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- 頁頭 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 40px; width: auto; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: .06em; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 8px 14px; font-size: 15px; color: var(--ink-soft);
  border-radius: 8px; transition: all .2s;
}
.nav a:hover { color: var(--wood-dark); background: var(--bg-soft); }
.nav a.active { color: var(--wood-dark); font-weight: 700; }
.nav .nav-cta { background: var(--walnut); color: #F5EFE4; padding: 10px 22px; border-radius: 999px; }
.nav .nav-cta:hover { background: var(--wood-dark); color: #fff; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: all .3s; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 86vh; display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(24,18,10,.78) 0%, rgba(24,18,10,.55) 45%, rgba(24,18,10,.15) 100%);
}
.hero-content { position: relative; z-index: 2; color: #F5EFE4; padding: 100px 0; max-width: 720px; }
.hero-eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: .28em; font-weight: 600;
  color: var(--gold); border: 1px solid rgba(201,160,99,.5); border-radius: 999px;
  padding: 7px 18px; margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--font-head); font-size: clamp(34px, 5vw, 58px);
  line-height: 1.32; font-weight: 700; margin-bottom: 22px;
}
.hero p.lead { font-size: clamp(15px, 1.6vw, 18px); color: rgba(245,239,228,.92); margin-bottom: 34px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-trust {
  position: relative; z-index: 2; margin-top: 0;
  background: var(--walnut); border-top: 1px solid rgba(201,160,99,.25);
}
.trust-row { display: grid; grid-template-columns: repeat(6, 1fr); }
.trust-item { padding: 22px 10px; text-align: center; color: rgba(245,239,228,.85); font-size: 14px; border-right: 1px solid rgba(255,255,255,.08); }
.trust-item:last-child { border-right: none; }
.trust-item strong { display: block; color: var(--gold); font-size: 15px; margin-bottom: 2px; }

/* ---------- 統計 ---------- */
.stats { background: var(--bg-alt); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 56px 0; }
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-head); font-size: clamp(40px, 5vw, 56px); font-weight: 700;
  color: var(--wood-dark); line-height: 1;
}
.stat-num span { font-size: .5em; margin-left: 2px; }
.stat-label { margin-top: 10px; color: var(--ink-soft); font-size: 15px; }

/* ---------- 區段 ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-soft); }
.section-dark { background: var(--walnut); color: #EFE7D8; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-head .eyebrow {
  color: var(--wood); font-size: 13px; font-weight: 700; letter-spacing: .26em;
  text-transform: uppercase; margin-bottom: 14px; display: block;
}
.section-dark .section-head .eyebrow { color: var(--gold); }
.section-head h2 {
  font-family: var(--font-head); font-size: clamp(26px, 3.4vw, 38px); font-weight: 700;
  line-height: 1.4; margin-bottom: 16px;
}
.section-head p { color: var(--ink-soft); font-size: 16px; }
.section-dark .section-head p { color: rgba(239,231,216,.75); }

/* ---------- 網格卡片 ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: all .3s ease; border: 1px solid var(--line);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.06); }
.card-img .tag {
  position: absolute; top: 14px; left: 14px; background: rgba(53,41,29,.82); color: #F5EFE4;
  font-size: 12px; padding: 5px 12px; border-radius: 999px; letter-spacing: .04em;
}
.card-body { padding: 24px; }
.card-body h3 { font-family: var(--font-head); font-size: 19px; margin-bottom: 8px; line-height: 1.45; }
.card-body p { color: var(--ink-soft); font-size: 14.5px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--wood-dark); font-weight: 600; font-size: 14px; }
.card-link::after { content: "→"; transition: transform .25s; }
.card:hover .card-link::after { transform: translateX(4px); }

.card-factory .card-img { aspect-ratio: 16/10; }
.card-factory .num {
  font-family: var(--font-head); color: var(--gold); font-size: 14px; font-weight: 700; letter-spacing: .2em;
}

/* ---------- 雙欄 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.split-img img { width: 100%; height: 100%; object-fit: cover; }
.split-text h2 {
  font-family: var(--font-head); font-size: clamp(24px, 3vw, 34px); line-height: 1.45; margin-bottom: 18px;
}
.split-text p { color: var(--ink-soft); margin-bottom: 16px; font-size: 15.5px; }
.split-text .eyebrow { color: var(--wood); font-size: 13px; font-weight: 700; letter-spacing: .26em; margin-bottom: 12px; display: block; }
.mini-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.mini-badge {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: 13px; color: var(--ink-soft); font-weight: 600;
}

/* ---------- 流程 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step {
  position: relative; background: var(--white); border-radius: var(--radius);
  padding: 36px 26px; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-head); font-size: 44px; font-weight: 700;
  color: var(--bg-alt); line-height: 1; display: block; margin-bottom: 14px;
  -webkit-text-stroke: 1px var(--wood); color: transparent;
}
.step h3 { font-family: var(--font-head); font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 14.5px; }
.steps-dark .step { background: var(--walnut-2); border-color: rgba(255,255,255,.1); }
.steps-dark .step::before { -webkit-text-stroke: 1px var(--gold); }
.steps-dark .step p { color: rgba(239,231,216,.8); }

/* ---------- 徽章帶 ---------- */
.badge-strip { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.badge-pill {
  background: rgba(255,255,255,.06); border: 1px solid rgba(201,160,99,.4);
  color: #EFE7D8; padding: 14px 26px; border-radius: 999px; font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.badge-pill::before { content: "✓"; color: var(--gold); font-weight: 700; }

/* ---------- CTA / 表單 ---------- */
.cta-section { background: var(--walnut); color: #EFE7D8; }
.cta-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.cta-grid h2 { font-family: var(--font-head); font-size: clamp(24px, 3vw, 34px); line-height: 1.45; margin-bottom: 16px; }
.cta-grid p { color: rgba(239,231,216,.8); margin-bottom: 26px; }
.form-card { background: var(--walnut-2); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 34px; }
.form-card h3 { font-family: var(--font-head); font-size: 22px; margin-bottom: 6px; }
.form-card .sub { color: rgba(239,231,216,.7); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: rgba(239,231,216,.75); margin-bottom: 7px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07); color: #EFE7D8; font-size: 15px; font-family: var(--font-body);
  outline: none; transition: border .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field select option { color: var(--ink); }
.form-msg { display: none; margin-top: 14px; padding: 12px 16px; border-radius: 10px; background: rgba(201,160,99,.18); border: 1px solid rgba(201,160,99,.5); color: #EFE7D8; font-size: 14px; }

/* ---------- 頁尾 ---------- */
.site-footer { background: #211A12; color: rgba(239,231,216,.75); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 64px 0 44px; }
.footer-brand img { height: 38px; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.8; }
.footer h4 { color: #F5EFE4; font-size: 15px; font-weight: 700; margin-bottom: 18px; letter-spacing: .05em; }
.footer ul li { margin-bottom: 10px; font-size: 14px; }
.footer ul a:hover { color: var(--gold); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: rgba(239,231,216,.5);
}

/* ---------- 浮動 WhatsApp ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.28); transition: transform .25s;
}
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }

/* ---------- 頁面內部頁 ---------- */
.page-hero {
  background: var(--walnut); color: #F5EFE4; padding: 72px 0 64px; text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% -20%, rgba(201,160,99,.22), transparent 60%);
}
.page-hero .container { position: relative; }
.page-hero .crumb { font-size: 13px; color: var(--gold); letter-spacing: .2em; margin-bottom: 16px; }
.page-hero h1 { font-family: var(--font-head); font-size: clamp(28px, 4vw, 44px); line-height: 1.4; margin-bottom: 14px; }
.page-hero p { color: rgba(245,239,228,.8); max-width: 640px; margin: 0 auto; font-size: 15.5px; }

.page-section { padding: 72px 0; }
.page-section-alt { background: var(--bg-soft); }

.detail-head { margin-bottom: 44px; }
.detail-head h2 { font-family: var(--font-head); font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 14px; }
.detail-head p { color: var(--ink-soft); }
.detail-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.detail-features li {
  display: flex; gap: 10px; align-items: flex-start; background: var(--white);
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 15px;
}
.detail-features li::before { content: "✓"; color: var(--wood); font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.gallery img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery img:first-child { grid-column: 1 / -1; aspect-ratio: 21/10; object-fit: cover; }
.gallery img:not(:first-child) { aspect-ratio: 4/3; object-fit: cover; }

/* ---------- 響應式 ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .trust-row { grid-template-columns: repeat(3, 1fr); }
  .trust-item { border-bottom: 1px solid rgba(255,255,255,.08); }
}

@media (max-width: 860px) {
  .nav {
    position: fixed; top: 76px; left: 0; right: 0; background: var(--bg);
    flex-direction: column; align-items: stretch; padding: 16px 6%; gap: 4px;
    border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .3s;
    box-shadow: var(--shadow-lg);
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 14px; }
  .nav .nav-cta { text-align: center; }
  .nav-toggle { display: block; }
  .grid-3, .grid-2, .cta-grid, .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 76vh; }
}

@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .grid-4, .grid-3, .steps { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img:first-child { aspect-ratio: 4/3; }
  .hero-cta .btn { width: 100%; }
}
