/* ============================================================
   Maple Forest 楓林 — 網站樣式
   顏色取自 logo：品牌綠 #1E9416、嫩綠 #66B325；
   深色區段用松綠，強調色用制服螢光綠。
   ============================================================ */
:root {
  --pine: #13291C;
  --pine-2: #1C3A28;
  --brand: #1E9416;      /* logo 綠（裝飾用） */
  --brand-dark: #177A11; /* 白底文字／按鈕用，對比足夠 */
  --leaf: #66B325;       /* logo 嫩綠 */
  --lime: #C8E63C;       /* 制服螢光綠 */
  --paper: #F5F4EC;
  --sand: #E7E5D8;
  --white: #FFFFFF;
  --ink: #16201A;
  --muted: #4A564E;
  --line: #D6D3C4;
  --radius: 20px;
  --max: 1240px;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--serif); font-weight: 900; }
.skip { position: absolute; left: -999px; top: 0; background: var(--lime); color: var(--pine); padding: 12px 16px; z-index: 100; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px; }
.brand { display: flex; align-items: center; }
.brand img { height: 64px; width: auto; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px;
  padding: 10px 2px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--brand-dark); }
.nav a[aria-current="page"] { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 700; }
.nav .btn { padding: 12px 20px; border-bottom: 0; }
.nav a.btn-brand, .nav a.btn-brand:hover { color: var(--white); }
.menu-toggle {
  display: none; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); color: var(--ink); align-items: center; justify-content: center; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 14px 26px; border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-brand { background: var(--brand-dark); color: var(--white); }
.btn-brand:hover { background: #126310; color: var(--white); }
.btn-lime { background: var(--lime); color: var(--pine); }
.btn-lime:hover { color: var(--pine); background: #D6F05A; }
.btn-dark { background: var(--pine); color: var(--paper); }
.btn-dark:hover { color: var(--lime); }
.btn-ghost-light { color: var(--paper); border-color: #5E7A66; }
.btn-ghost-light:hover { color: var(--lime); border-color: var(--lime); }
.btn-ghost-dark { color: var(--pine); border-color: var(--pine); }
.btn-ghost-dark:hover { color: var(--pine); background: rgba(19, 41, 28, 0.06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Common sections ---------- */
.section { padding: 104px 0; }
.section-sand { background: var(--sand); }
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.2em; color: var(--brand-dark);
}
.eyebrow::before { content: ""; width: 36px; height: 2px; background: currentColor; }
.on-dark .eyebrow { color: var(--lime); }
.h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(32px, 4vw, 50px); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.section-head > div { display: flex; flex-direction: column; gap: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; min-height: 44px; }
.text-link svg { width: 20px; height: 20px; transition: transform .15s ease; }
.text-link:hover svg { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { background: var(--pine); color: var(--paper); padding: 72px 0 104px; overflow: hidden; position: relative; }
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 179, 37, 0.18), transparent 70%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(42px, 6vw, 82px); letter-spacing: 0.02em; line-height: 1.12; }
.hero h1 em { font-style: normal; color: var(--lime); }
.hero p { font-size: 19px; line-height: 1.85; color: #D5DDD3; max-width: 520px; }
.hero-photos { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 250px 250px; gap: 16px; }
.hero-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.hero-photos img:first-child { grid-row: span 2; }

/* ---------- Page title (inner pages) ---------- */
.page-title { background: var(--pine); color: var(--paper); padding: 72px 0 84px; }
.page-title .container { display: flex; flex-direction: column; gap: 20px; }
.page-title h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(38px, 5vw, 66px); line-height: 1.15; }
.page-title p { font-size: 18px; color: #D5DDD3; max-width: 640px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.card {
  display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
a.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(19, 41, 28, 0.45); color: var(--ink); }
.card-media { overflow: hidden; aspect-ratio: 4 / 3; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 10px; }
.card-tag { font-size: 14px; font-weight: 700; color: var(--brand-dark); letter-spacing: 0.06em; }
.card-title { font-family: var(--serif); font-weight: 900; font-size: 25px; }
.card-text { font-size: 16px; color: var(--muted); }
.card-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.card-list li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); margin-right: 10px; vertical-align: middle; }

.feature { display: flex; flex-direction: column; gap: 18px; text-decoration: none; color: var(--ink); }
.feature .card-media { aspect-ratio: 4 / 5; border-radius: var(--radius); }
.feature:hover { color: var(--ink); }
.feature:hover .card-media img { transform: scale(1.04); }

/* ---------- CTA band ---------- */
.cta { background: var(--lime); color: var(--pine); padding: 88px 0; }
.cta .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.cta h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 4vw, 46px); }
.cta p { font-size: 18px; margin-top: 10px; }

/* ---------- Projects filter ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  min-height: 46px; padding: 10px 22px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 700;
  background: transparent; color: var(--pine); border: 2px solid #B9B6A6;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { border-color: var(--pine); }
.chip[aria-pressed="true"] { background: var(--pine); color: var(--lime); border-color: var(--pine); }
.count { color: var(--muted); }
.card[hidden] { display: none; }

.enquiry { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.enquiry-copy { display: flex; flex-direction: column; gap: 22px; }
.enquiry-copy p { font-size: 18px; color: var(--muted); }
.other-list { display: flex; flex-direction: column; gap: 12px; }
.other-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  min-height: 64px; padding: 18px 24px; border: 0; border-radius: 16px; background: var(--white);
  color: var(--ink); font-family: inherit; font-size: 18px; font-weight: 700; text-align: left; cursor: pointer;
  text-decoration: none; transition: transform .15s ease;
}
.other-btn:hover { transform: translateX(4px); color: var(--ink); }
.other-btn small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.other-btn svg { width: 22px; height: 22px; flex: none; }
.other-btn[hidden] { display: none; }

/* ---------- About ---------- */
.about-hero { background: var(--pine); color: var(--paper); padding: 72px 0 0; }
.about-intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
.about-intro > div { flex: 1 1 460px; display: flex; flex-direction: column; gap: 20px; }
.about-intro h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(38px, 5vw, 66px); line-height: 1.15; }
.about-intro p { flex: 1 1 360px; font-size: 18px; color: #D5DDD3; line-height: 1.85; }
.about-banner { width: 100%; height: 520px; object-fit: cover; border-radius: 24px 24px 0 0; }
.pillar { background: var(--white); border-radius: var(--radius); padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; }
.pillar .num { font-family: var(--serif); font-weight: 900; font-size: 54px; line-height: 1; color: var(--brand); }
.pillar h3 { font-size: 22px; }
.pillar p { color: var(--muted); }
.scope { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: stretch; }
.scope-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 28px 32px; margin: 32px 0; }
.scope-list div { border-top: 2px solid var(--pine); padding-top: 16px; }
.scope-list h3 { font-size: 20px; margin-bottom: 8px; }
.scope-list p { color: var(--muted); line-height: 1.9; }
.scope-photos { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 280px 280px; gap: 16px; }
.scope-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.scope-photos img:first-child { grid-row: span 2; }

/* ---------- Contact ---------- */
.contact-top { background: var(--pine); color: var(--paper); padding: 72px 0 168px; }
.contact-top .container { display: flex; flex-direction: column; gap: 20px; }
.contact-top h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(38px, 5vw, 66px); line-height: 1.15; }
.contact-top p { font-size: 18px; color: #D5DDD3; max-width: 640px; }
.contact-cards { margin-top: -110px; padding-bottom: 96px; }
.big-card {
  display: flex; flex-direction: column; gap: 26px; padding: 40px; border-radius: 24px;
  text-decoration: none; color: var(--pine); transition: transform .2s ease;
}
.big-card:hover { transform: translateY(-4px); color: var(--pine); }
.big-card.wa { background: var(--lime); }
.big-card.mail { background: var(--white); }
.big-card .icon { width: 64px; height: 64px; border-radius: 50%; background: var(--pine); color: var(--lime); display: flex; align-items: center; justify-content: center; }
.big-card .icon svg { width: 30px; height: 30px; }
.big-card .label { font-size: 15px; font-weight: 700; letter-spacing: 0.12em; }
.big-card .value { font-family: var(--serif); font-weight: 900; font-size: clamp(26px, 3vw, 36px); overflow-wrap: anywhere; }
.big-card .go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.big-card .go svg { width: 20px; height: 20px; }
.info-row { margin-top: 24px; background: var(--white); border-radius: 24px; padding: 36px 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 24px; }
.info-row dt { font-size: 14px; font-weight: 700; color: var(--brand-dark); letter-spacing: 0.1em; }
.info-row dd { margin: 6px 0 0; font-size: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pine); color: #D5DDD3; padding: 64px 0 36px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; max-width: 360px; }
.footer-logo { background: var(--white); border-radius: 14px; padding: 10px 14px; width: fit-content; }
.footer-logo img { height: 52px; width: auto; }
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.footer-nav a { color: #D5DDD3; text-decoration: none; padding: 4px 0; }
.footer-nav a:hover { color: var(--lime); }
.footer-contact a { color: #D5DDD3; }
.footer-contact a:hover { color: var(--lime); }
.copyright { border-top: 1px solid #2E4A38; padding-top: 24px; font-size: 14px; color: #A9B8AD; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; background: var(--brand-dark); color: var(--white);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5);
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.06); color: var(--white); }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .enquiry, .scope { grid-template-columns: 1fr; }
  .hero-photos { grid-template-rows: 200px 200px; }
  .about-banner { height: 340px; }
  .scope-photos { grid-template-rows: 200px 200px; }
}
@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .nav .btn { margin-top: 14px; justify-content: center; border-bottom: 0; }
  .brand img { height: 52px; }
  .header-inner { min-height: 76px; }
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 72px; }
}

/* ---------- Case list (工程案例) ---------- */
.case-card {
  display: grid; grid-template-columns: 1.2fr 1fr; background: var(--white); border-radius: 24px;
  overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease;
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -28px rgba(19, 41, 28, 0.5); color: var(--ink); }
.case-card .card-media { aspect-ratio: auto; min-height: 380px; }
.case-card-body { padding: 44px 44px 40px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.case-no { font-family: var(--serif); font-weight: 900; font-size: 64px; line-height: 1; color: var(--brand); }
.case-card h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(28px, 3vw, 38px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 14px; font-weight: 700; color: var(--pine); background: #E4F2C4; border-radius: 999px; padding: 6px 14px; }
.case-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 4px 0 0; }
.case-meta dt { font-size: 13px; font-weight: 700; color: var(--brand-dark); letter-spacing: 0.1em; }
.case-meta dd { margin: 2px 0 0; font-size: 16px; }
.case-list { display: flex; flex-direction: column; gap: 32px; }
.more-note { margin-top: 32px; text-align: center; color: var(--muted); }

/* ---------- Case detail ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; color: #A9B8AD; }
.breadcrumb a { color: #D5DDD3; text-decoration: none; }
.breadcrumb a:hover { color: var(--lime); }
.case-hero-img { width: 100%; height: clamp(320px, 50vw, 600px); object-fit: cover; border-radius: 24px 24px 0 0; margin-top: 48px; }
.case-detail { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; }
.case-detail .prose { display: flex; flex-direction: column; gap: 20px; font-size: 18px; color: var(--muted); }
.case-detail .prose h2 { color: var(--ink); }
.work-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.work-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--ink); }
.work-list svg { width: 24px; height: 24px; flex: none; color: var(--brand); margin-top: 3px; }
.fact-box { background: var(--white); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 112px; }
.fact-box dl { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.fact-box dt { font-size: 13px; font-weight: 700; color: var(--brand-dark); letter-spacing: 0.1em; }
.fact-box dd { margin: 2px 0 0; font-size: 17px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.gallery button {
  padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery button:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10, 20, 14, 0.94);
  display: none; align-items: center; justify-content: center; padding: 64px 72px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lb-btn {
  position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.12); color: #fff; display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { background: rgba(255,255,255,0.24); }
.lb-btn svg { width: 26px; height: 26px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #D5DDD3; font-size: 15px; }

@media (max-width: 960px) {
  .case-card, .case-detail { grid-template-columns: 1fr; }
  .case-card .card-media { min-height: 260px; }
  .case-card-body { padding: 32px 28px; }
  .fact-box { position: static; }
  .lightbox { padding: 64px 12px; }
}

/* ---------- Before / after ---------- */
.ba { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 20px; }
.ba figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.ba img { width: 100%; height: 100%; object-fit: cover; }
.ba figcaption {
  position: absolute; left: 16px; top: 16px; padding: 6px 16px; border-radius: 999px;
  font-weight: 700; font-size: 15px; background: var(--pine); color: var(--paper);
}
.ba figure.after figcaption { background: var(--lime); color: var(--pine); }

/* ---------- Case grid + prev/next ---------- */
.case-tile .card-body { gap: 12px; }
.case-tile .card-tag { display: flex; justify-content: space-between; gap: 12px; }
.case-tile .card-title { font-size: 22px; }
.case-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; margin-top: 56px; }
.case-nav a {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 26px; border-radius: 16px;
  background: var(--white); color: var(--ink); text-decoration: none; transition: transform .15s ease;
}
.case-nav a:hover { transform: translateY(-2px); color: var(--ink); }
.case-nav small { font-size: 14px; font-weight: 700; color: var(--brand-dark); letter-spacing: 0.08em; }
.case-nav span { font-family: var(--serif); font-weight: 900; font-size: 20px; }
.case-nav .next { text-align: right; }

/* ---------- Clients ---------- */
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.client {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  height: 128px; padding: 20px 24px; display: flex; align-items: center; justify-content: center;
}
.client img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
@media (max-width: 520px) {
  .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .client { height: 96px; padding: 14px; }
}

/* ---------- Social ---------- */
.social { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #D5DDD3; text-decoration: none; font-weight: 700; width: fit-content; }
.social svg { width: 28px; height: 28px; }
.social:hover { color: var(--lime); }
