/* 利元建築 — 網站樣式 */
:root {
  --bg: #faf7f2;
  --bg-alt: #f1ebe1;
  --ink: #2b2622;
  --ink-soft: #6b625a;
  --wood: #a0754a;
  --wood-dark: #7d5835;
  --green: #3f4b3e;
  --line: #e2d9cc;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(43, 38, 34, 0.08);
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1160px, 92%); margin: 0 auto; }
section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.35; }
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--wood);
  margin-bottom: 12px;
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 12px; }
.section-head p { color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 500;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--wood); color: var(--white); }
.btn-primary:hover { background: var(--wood-dark); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-light { border-color: var(--white); color: var(--white); background: transparent; }
.btn-light:hover { background: var(--white); color: var(--ink); }
.btn-wa { background: #25d366; color: var(--white); }
.btn-wa:hover { background: #1ebe5a; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--wood); color: var(--white);
  display: grid; place-items: center; font-size: 1.2rem;
}
.logo small { display: block; font-family: var(--sans); font-size: 0.65rem; font-weight: 400; letter-spacing: 0.25em; color: var(--ink-soft); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-size: 0.95rem; color: var(--ink-soft); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links .btn { color: var(--white); padding: 9px 20px; font-size: 0.9rem; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

/* Hero */
.hero { padding: 80px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--wood); }
.hero p.lead { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 28px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.hero-tags span {
  font-size: 0.85rem; padding: 6px 14px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-visual { position: relative; }
.hero-visual .ph { aspect-ratio: 4 / 5; border-radius: 24px; }
.hero-badge {
  position: absolute; left: -28px; bottom: 36px;
  background: var(--white); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
}
.hero-badge strong { font-family: var(--serif); font-size: 2rem; color: var(--wood); line-height: 1; }
.hero-badge span { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.4; }

/* Placeholder visuals (replace with real photos) */
.ph {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #d9c7ae 0%, #b99671 55%, #8c6a49 100%);
  display: flex; align-items: flex-end;
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,0.12) 0 22%, transparent 22%),
    linear-gradient(90deg, transparent 62%, rgba(255,255,255,0.18) 62% 64%, transparent 64%),
    radial-gradient(circle at 75% 25%, rgba(255,255,255,0.35) 0 9%, transparent 10%);
}
.ph-label {
  position: relative; margin: 14px; font-size: 0.75rem;
  background: rgba(255,255,255,0.85); padding: 4px 10px; border-radius: 6px; color: var(--ink-soft);
}
.ph-2 { background: linear-gradient(160deg, #e7e2da 0%, #c9c0b3 50%, #8f8a80 100%); }
.ph-3 { background: linear-gradient(160deg, #cfd6c8 0%, #9aa892 55%, #5f6d5a 100%); }
.ph-4 { background: linear-gradient(160deg, #efe6d8 0%, #d8c3a3 50%, #a58660 100%); }
.ph-5 { background: linear-gradient(160deg, #d6d2cd 0%, #9e958c 55%, #5d554e 100%); }
.ph-6 { background: linear-gradient(160deg, #f0dccb 0%, #d4a98a 55%, #9c6d4f 100%); }

/* Stats strip */
.stats { background: var(--green); color: var(--white); padding: 44px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-grid.stats-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-grid strong { display: block; font-family: var(--serif); font-size: 2rem; }
.stats-grid span { font-size: 0.9rem; opacity: 0.8; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px 28px; border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--bg-alt); display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 18px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }

/* Packages */
.package { display: flex; flex-direction: column; }
.package.featured { border: 2px solid var(--wood); position: relative; }
.package.featured::before {
  content: "最受歡迎"; position: absolute; top: -13px; left: 28px;
  background: var(--wood); color: var(--white); font-size: 0.8rem;
  padding: 2px 12px; border-radius: 999px;
}
.package .price { font-family: var(--serif); font-size: 2rem; color: var(--wood); margin: 10px 0 4px; }
.package .price small { font-size: 0.95rem; color: var(--ink-soft); }
.package ul { list-style: none; margin: 18px 0 26px; flex: 1; }
.package li { padding: 7px 0 7px 26px; position: relative; font-size: 0.95rem; border-bottom: 1px dashed var(--line); }
.package li::before { content: "✓"; position: absolute; left: 0; color: var(--wood); font-weight: 700; }
.note { text-align: center; margin-top: 24px; font-size: 0.85rem; color: var(--ink-soft); }

/* Portfolio */
.work { border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.work .ph { aspect-ratio: 4 / 3; }
.work-body { padding: 18px 20px 22px; }
.work-body h3 { font-size: 1.1rem; }
.work-meta { font-size: 0.85rem; color: var(--ink-soft); }
.tag { display: inline-block; font-size: 0.75rem; padding: 2px 10px; border-radius: 999px; background: var(--bg-alt); color: var(--wood-dark); margin-bottom: 8px; }
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filters button {
  font-family: inherit; font-size: 0.95rem; padding: 8px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); cursor: pointer; color: var(--ink-soft);
}
.filters button.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.work.hidden { display: none; }
.center { text-align: center; margin-top: 44px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; counter-reset: step; }
.step { text-align: center; padding: 0 6px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: grid; place-items: center; margin: 0 auto 14px;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--white); border: 1.5px solid var(--wood);
  font-family: var(--serif); font-size: 1.1rem; color: var(--wood);
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: 0.88rem; color: var(--ink-soft); }

/* Warranty */
.warranty-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.warranty-table th, .warranty-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.warranty-table th { background: var(--ink); color: var(--white); font-weight: 500; }
.warranty-table td:last-child { color: var(--wood-dark); font-weight: 600; }

/* Testimonials */
.quote { position: relative; }
.quote p { font-size: 1rem; color: var(--ink); margin-bottom: 16px; }
.quote .who { font-size: 0.85rem; color: var(--ink-soft); }
.quote::before { content: "“"; font-family: var(--serif); font-size: 4rem; color: var(--wood); line-height: 0.5; display: block; margin-bottom: 10px; }

/* FAQ */
.faq { max-width: 800px; margin: 0 auto; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 18px 24px; }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--wood); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 12px; color: var(--ink-soft); }

/* Forms */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-info h2 { font-size: 2rem; margin-bottom: 16px; }
.contact-info p { color: var(--ink-soft); margin-bottom: 24px; }
.contact-list { list-style: none; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.form { background: var(--white); border-radius: 20px; padding: 36px; border: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.9rem; margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 1rem; background: var(--bg); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--wood); border-color: transparent; }
.form small { display: block; color: var(--ink-soft); margin-top: 10px; font-size: 0.82rem; }

/* Page hero (sub pages) */
.page-hero { padding: 72px 0 40px; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 12px; }
.page-hero p { color: var(--ink-soft); max-width: 620px; margin: 0 auto; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.75); padding: 56px 0 28px; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.site-footer .logo { color: var(--white); margin-bottom: 14px; }
.site-footer .logo small { color: rgba(255,255,255,0.6); }
.site-footer h4 { color: var(--white); margin-bottom: 12px; font-weight: 500; }
.site-footer ul { list-style: none; }
.site-footer li { padding: 4px 0; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; font-size: 0.82rem; text-align: center; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: var(--white);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}
.wa-float svg { width: 30px; height: 30px; fill: currentColor; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .hero-badge { left: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  section { padding: 72px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--line); padding: 8px 0 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-4, .form-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .form { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Monitoring & care */
.steps-4 { grid-template-columns: repeat(4, 1fr); }
.plan .tag { margin-bottom: 4px; align-self: flex-start; }
.plan .who { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 4px; }
@media (max-width: 980px) { .steps-4 { grid-template-columns: repeat(2, 1fr); } }

/* Feature split */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature-split h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.feature-split > div > p { color: var(--ink-soft); margin-bottom: 18px; }
.check-list { list-style: none; }
.check-list li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px dashed var(--line); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--wood); font-weight: 700; }
.feature-split .ph { aspect-ratio: 4 / 3; border-radius: 20px; }
@media (max-width: 980px) {
  .feature-split { grid-template-columns: 1fr; }
}

/* Language switch */
.nav-links .lang-switch { font-size: 0.85rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.nav-links .lang-switch:hover { border-color: var(--ink); }

/* Real photos */
.photo { overflow: hidden; background: var(--bg-alt); }
.photo img { width: 100%; height: 100%; object-fit: contain; }
.hero-visual .photo { aspect-ratio: 4 / 5; border-radius: 24px; }
.feature-split .photo { aspect-ratio: 4 / 3; border-radius: 20px; }
.work[data-gallery] { cursor: pointer; }
.work-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.work-img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s ease; }
.work:hover .work-img img { transform: none; }
.work-count {
  position: absolute; right: 12px; bottom: 12px; font-size: 0.75rem;
  background: rgba(43, 38, 34, 0.75); color: var(--white); padding: 3px 10px; border-radius: 999px;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 17, 15, 0.92);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 88vw; max-height: 84vh; border-radius: 10px; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,0.12); color: var(--white); border: none;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,0.25); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 20px; color: rgba(255,255,255,0.8); font-size: 0.9rem; }
.work-badge {
  position: absolute; left: 12px; top: 12px; font-size: 0.75rem; font-weight: 500;
  background: var(--white); color: var(--wood-dark); padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--wood);
}

/* Design demo */
.demo-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.demo-tabs button {
  font-family: inherit; font-size: 1rem; padding: 10px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-soft);
}
.demo-tabs button b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-alt); margin-right: 6px; font-size: 0.8rem; }
.demo-tabs button.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.demo-tabs button.active b { background: var(--wood); color: var(--white); }
.demo-canvas { height: min(70vh, 640px); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #f1ebe1; touch-action: none; }
.demo-plans { margin-bottom: 12px; }
.demo-plans button { font-size: 0.92rem; padding: 8px 18px; }
.demo-plans button.active { background: var(--wood); border-color: var(--wood); }
.demo-rooms button { font-size: 0.85rem; padding: 6px 14px; }
.demo-rooms button.active { background: var(--green); border-color: var(--green); color: var(--white); }

.demo-living-notes { margin-top: 28px; padding: 24px; border: 1px solid var(--line, #e5ddd2); border-radius: 16px; background: var(--bg-alt); }
.demo-living-notes h2 { font-size: 1.25rem; margin-bottom: 10px; }
.demo-living-notes ul { padding-left: 1.25rem; margin-top: 12px; }
.demo-living-notes li { margin: 8px 0; line-height: 1.8; }
.demo-living-notes[hidden] { display: none; }

.demo-renders { margin-top: 32px; }
.demo-renders[hidden] { display: none; }
.demo-render-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 20px 0; }
.demo-render-grid figure { margin: 0; overflow: hidden; border: 1px solid var(--line, #e5ddd2); border-radius: 12px; background: var(--bg-alt); }
.demo-render-grid img { display: block; width: 100%; height: 310px; object-fit: contain; }
.demo-render-grid figcaption { padding: 12px 16px; font-weight: 500; }
@media (max-width: 600px) { .demo-render-grid { grid-template-columns: 1fr; } .demo-render-grid img { height: auto; max-height: 440px; } }

.demo-canvas[hidden], .demo-photo-stage[hidden], .demo-tabs[hidden], #demoPhotoHint[hidden], #demoModelHint[hidden] { display: none; }
.demo-photo-stage { margin: 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #eee8df; }
.demo-photo-stage a { display: block; }
.demo-photo-stage img { display: block; width: 100%; height: min(72vh, 740px); object-fit: contain; background: #eee8df; }
.demo-photo-stage figcaption { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 84px 16px 22px; background: var(--white); }
.demo-photo-stage figcaption span { color: var(--ink-soft); font-size: 0.82rem; }
.demo-presentation button { font-size: 0.9rem; }
@media(max-width:600px) { .demo-photo-stage img { height: auto; max-height: 72vh; } .demo-photo-stage figcaption { padding: 12px 74px 12px 14px; align-items: start; flex-direction: column; gap: 4px; } }

.demo-render-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.demo-render-controls[hidden] { display: none; }
.demo-render-controls .demo-tabs { margin: 0; gap: 6px; }
.demo-render-controls button { font-size: 0.82rem; padding: 7px 14px; }
#demoRenderStatus { color: var(--ink-soft); font-size: 0.82rem; }

.demo-solar { padding: 1rem; background: #f4eee6; border-radius: 12px; margin: 1rem 0; }
.demo-solar label { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin: .6rem 0; }
.demo-solar input[type=range] { flex: 1; min-width: 130px; accent-color: #946e48; }
.demo-solar output { min-width: 7rem; font-variant-numeric: tabular-nums; }
.demo-walk { padding: .7rem 0; }
.demo-walk .demo-tabs button { min-width: 60px; min-height: 48px; }
.demo-canvas:focus-visible { outline: 3px solid #946e48; outline-offset: 3px; }

@media (min-width: 981px) {
  .steps-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
