/* =========================================================
   TakaHala 台灣隆源農機 — Design System
   純 CSS，無外部相依（字型除外）。可直接部署至任何主機。
   ========================================================= */

/* ---------- 設計變數 Design Tokens ---------- */
:root {
  /* 品牌色 —— 深耕綠 + 豐收金 + 土壤棕 */
  --green-900: #0f3d27;
  --green-800: #14512f;
  --green-700: #196a3d;
  --green-600: #1f8049;
  --green-500: #2f9e5e;
  --green-100: #e4f2e9;
  --green-050: #f1f8f3;

  --gold-600: #c98a04;
  --gold-500: #e0a500;
  --gold-100: #fdf3d6;

  --soil-800: #4a3a2a;

  /* 中性色 */
  --ink:      #1b1a16;
  --ink-soft: #45443d;
  --muted:    #6f6e64;
  --line:     #e5e3da;
  --cream:    #f7f5ef;
  --cream-2:  #efece2;
  --white:    #ffffff;

  /* 版面 */
  --maxw: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(20,30,20,.08), 0 1px 2px rgba(20,30,20,.04);
  --shadow-md: 0 10px 30px rgba(15,61,39,.10), 0 4px 10px rgba(15,61,39,.06);
  --shadow-lg: 0 24px 60px rgba(15,61,39,.16);

  --ease: cubic-bezier(.2,.7,.2,1);

  /* 字型 */
  --font-tc: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei",
             "Heiti TC", "Segoe UI", system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-tc);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: .01em; }
p  { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- 版面工具 ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tint { background: var(--white); }
.section--green {
  background: linear-gradient(160deg, var(--green-800), var(--green-900));
  color: #eaf3ec;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .82rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--green-600);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold-500); border-radius: 2px; }
.section--green .eyebrow { color: var(--gold-500); }
.section-head { max-width: 680px; margin-bottom: clamp(34px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.section-head p  { color: var(--muted); font-size: 1.05rem; }
.section--green .section-head p { color: #bcd3c3; }
.center { text-align: center; margin-inline: auto; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green-700); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--green-800); transform: translateY(-2px); }
.btn--gold { background: var(--gold-500); color: #3a2b00; }
.btn--gold:hover { background: var(--gold-600); color: #fff; transform: translateY(-2px); }
.btn--line { background: #06c755; color: #fff; }
.btn--line:hover { background: #05b64d; transform: translateY(-2px); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--green-600); color: var(--green-700); }
.btn--onGreen { background: #fff; color: var(--green-800); }
.btn--onGreen:hover { background: var(--gold-500); color: #3a2b00; transform: translateY(-2px); }
.btn--lg { padding: 17px 34px; font-size: 1.06rem; }

/* ---------- 頁首導覽 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,245,239,.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; gap: 20px; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .02em; }
.brand__mark {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: linear-gradient(150deg, var(--green-600), var(--green-800));
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-sm);
}
.brand__mark svg { width: 24px; height: 24px; }
.brand__name { font-size: 1.06rem; line-height: 1.15; }
.brand__name small { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); letter-spacing: .18em; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__links a {
  padding: 9px 15px; border-radius: 10px; font-weight: 600; color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.nav__links a:hover, .nav__links a.is-active { background: var(--green-100); color: var(--green-800); }
.nav__cta { margin-left: 10px; }
.nav__toggle {
  display: none; margin-left: auto; width: 46px; height: 46px; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  position: relative; transition: transform .2s, opacity .2s;
}
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after  { position: absolute; top: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(224,165,0,.16), transparent 60%),
    linear-gradient(165deg, var(--green-800) 0%, var(--green-900) 62%, #0a2c1b 100%);
  color: #eef5f0;
}
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center;
  padding-block: clamp(56px, 8vw, 108px);
}
.hero__badge {
  display: inline-flex; align-items: center; gap: .6em;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  padding: 7px 15px; border-radius: 999px; font-size: .84rem; font-weight: 600;
  color: #d8ecdd; margin-bottom: 22px;
}
.hero__badge b { color: var(--gold-500); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); letter-spacing: .005em; }
.hero h1 .accent { color: var(--gold-500); }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #c9ddce; max-width: 40ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__stats { display: flex; gap: 34px; margin-top: 46px; flex-wrap: wrap; }
.hero__stats .num { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; color: #fff; }
.hero__stats .num span { color: var(--gold-500); }
.hero__stats .lbl { font-size: .86rem; color: #a9c4b1; }

/* Hero 視覺方塊（可換成實拍照片） */
.hero__visual {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/5; min-height: 320px; box-shadow: var(--shadow-lg);
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.35)),
    repeating-linear-gradient(115deg, #2f7d4c 0 42px, #2a7346 42px 84px),
    linear-gradient(160deg, #3a9a5d, #1c5a37);
  border: 1px solid rgba(255,255,255,.14);
  display: flex; align-items: flex-end;
}
.hero__visual .tag {
  margin: 20px; background: rgba(15,61,39,.72); backdrop-filter: blur(6px);
  padding: 12px 16px; border-radius: 12px; font-size: .9rem; color: #eaf5ee;
  border: 1px solid rgba(255,255,255,.14);
}
.hero__wave { display: block; width: 100%; margin-top: -1px; color: var(--cream); }

/* ---------- 特色 / 為什麼選我們 ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-700); margin-bottom: 16px;
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ---------- 產品分類 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.cat:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--green-500); }
.cat__thumb {
  aspect-ratio: 16/11; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, var(--green-600), var(--green-800));
}
.cat:nth-child(4n+2) .cat__thumb { background: linear-gradient(150deg, #2e8b57, #14512f); }
.cat:nth-child(4n+3) .cat__thumb { background: linear-gradient(150deg, var(--gold-500), var(--soil-800)); }
.cat:nth-child(4n)   .cat__thumb { background: linear-gradient(150deg, #3a9a5d, #0f3d27); }
.cat__thumb svg { width: 46px; height: 46px; opacity: .95; }
.cat__body { padding: 18px 18px 20px; }
.cat__body h3 { font-size: 1.06rem; margin-bottom: 6px; }
.cat__body p { font-size: .9rem; color: var(--muted); margin: 0; }
.cat__more {
  margin-top: 12px; font-size: .9rem; font-weight: 700; color: var(--green-700);
  display: inline-flex; align-items: center; gap: .35em;
}
.cat:hover .cat__more { gap: .6em; }

/* ---------- 沿革時間軸 ---------- */
.timeline { position: relative; margin-top: 10px; }
.timeline::before {
  content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--green-500), var(--green-100));
}
.tl-item { position: relative; padding: 0 0 26px 52px; }
.tl-item::before {
  content: ""; position: absolute; left: 8px; top: 4px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--green-600); border: 3px solid var(--green-100);
}
.tl-year { font-weight: 800; color: var(--green-700); font-size: 1.05rem; }
.tl-item p { margin: 2px 0 0; color: var(--ink-soft); }

/* ---------- 理念清單 ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.value {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 22px 20px;
}
.value h3 { font-size: 1.08rem; color: #fff; margin-bottom: 6px; }
.value p { font-size: .92rem; color: #bcd3c3; margin: 0; }

/* ---------- CTA 區塊 ---------- */
.cta-band {
  background: linear-gradient(150deg, var(--gold-500), var(--gold-600));
  border-radius: var(--radius-lg); padding: clamp(34px, 5vw, 56px);
  display: grid; grid-template-columns: 1.4fr auto; gap: 26px; align-items: center;
  box-shadow: var(--shadow-lg); color: #3a2b00;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); color: #2a1f00; }
.cta-band p { margin: 0; color: #574200; font-weight: 500; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 聯絡頁 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.info-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm);
}
.info-row { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px dashed var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .ic { width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; }
.info-row .ic svg { width: 21px; height: 21px; }
.info-row .lbl { font-size: .8rem; color: var(--muted); letter-spacing: .05em; }
.info-row .val { font-weight: 600; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.social-links a {
  display: inline-flex; align-items: center; gap: .5em; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); font-weight: 600; font-size: .92rem; transition: .18s;
}
.social-links a:hover { border-color: var(--green-500); background: var(--green-050); transform: translateY(-2px); }

/* 表單 */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .94rem; }
.form-field label .req { color: #c0392b; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; font-family: inherit; font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: .85rem; color: var(--muted); }

/* ---------- 麵包屑 / 頁面標題 ---------- */
.page-hero {
  background: linear-gradient(160deg, var(--green-800), var(--green-900));
  color: #eaf3ec; padding-block: clamp(46px, 7vw, 84px);
}
.page-hero .eyebrow { color: var(--gold-500); }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.page-hero p { color: #c1d6c8; max-width: 60ch; margin: 0; }
.crumb { font-size: .88rem; color: #a9c4b1; margin-bottom: 14px; }
.crumb a:hover { color: #fff; }

/* ---------- 頁尾 ---------- */
.site-footer { background: #0c2c1c; color: #b9cfc0; padding-block: 56px 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: #b9cfc0; }
.site-footer a:hover { color: var(--gold-500); }
.site-footer .brand__name { color: #fff; }
.site-footer .brand__name small { color: #7ea38b; }
.footer-links li { margin-bottom: 9px; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.10);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .86rem; color: #86a693;
}

/* ---------- 浮動聯絡鈕 ---------- */
.float-contact {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; flex-direction: column; gap: 10px;
}
.float-contact a {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; box-shadow: var(--shadow-md); transition: transform .18s var(--ease);
}
.float-contact a:hover { transform: scale(1.08); }
.float-contact .fc-line { background: #06c755; }
.float-contact .fc-top  { background: var(--green-700); }
.float-contact a svg { width: 26px; height: 26px; }

/* ---------- 進場動畫 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 響應式 ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .site-header.nav-open .nav__links {
    display: flex; position: absolute; left: 0; right: 0; top: 74px; flex-direction: column;
    align-items: stretch; gap: 2px; background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 14px 22px 20px; box-shadow: var(--shadow-md);
  }
  .site-header.nav-open .nav__cta { display: flex; margin: 10px 22px 0; }
  .site-header.nav-open .nav__links a { padding: 13px 12px; }
}
@media (max-width: 520px) {
  .cat-grid { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 22px; }
}

/* ---------- 減少動態偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
