/* =========================================================
   博盛佳國際有限公司 — V1「綠脈」
   山林大地 × 企業信賴
   ========================================================= */

:root {
  --bg: #F8F7F2;
  --ink: #14352A;        /* 深墨綠：主色 */
  --moss: #48745A;       /* 苔綠 */
  --sage: #DFE8DE;       /* 淺苔面 */
  --gold: #C19A3D;       /* 收成金 */
  --body: #2E3B34;       /* 正文深灰綠 */
  --white: #FFFFFF;
  --line: rgba(20, 53, 42, .14);
  --shadow: 0 2px 6px rgba(20, 53, 42, .06);
  --shadow-lift: 0 14px 30px rgba(20, 53, 42, .14);
  --radius-card: 12px;
  --radius-pill: 999px;
  --font-serif: "Noto Serif TC", "PMingLiU", serif;
  --font-sans: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-kai: "LXGW WenKai TC", "DFKai-SB", "Noto Serif TC", serif;
  --container: 1120px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--moss); }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--ink); line-height: 1.35; margin: 0 0 .6em; }
h1 { font-weight: 900; }
h2, h3 { font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.3em; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 20px; z-index: 200;
  border-radius: 0 0 8px 0; text-decoration: none;
}
.skip-link:focus-visible { left: 0; }

/* ---------- 導覽列 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 247, 242, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--container); margin: 0 auto;
  padding: 12px 24px; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.brand img {
  width: 46px; height: 46px;
  object-fit: contain;
}
.brand-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.12rem; letter-spacing: .04em; }
.brand-name small {
  display: block; font-family: var(--font-sans); font-weight: 400;
  font-size: .68rem; color: var(--moss); letter-spacing: .12em;
}
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; cursor: pointer; color: var(--ink);
}
.nav-toggle .bars { display: block; width: 22px; height: 2px; background: currentColor; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor;
}
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }

.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  display: block; padding: 8px 14px;
  color: var(--body); text-decoration: none; font-weight: 500; font-size: .95rem;
  border-radius: var(--radius-pill);
  transition: background-color .2s ease, color .2s ease;
}
.nav-menu a:hover { background: var(--sage); color: var(--ink); }
.nav-menu a[aria-current="page"] { color: var(--ink); font-weight: 700; background: var(--sage); }
.nav-menu .nav-cta a {
  background: var(--ink); color: #fff; margin-left: 8px; padding: 9px 20px;
}
.nav-menu .nav-cta a:hover { background: var(--moss); color: #fff; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 13px 32px; font-family: var(--font-sans); font-weight: 700; font-size: 1rem;
  border: 2px solid transparent; line-height: 1.5;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #D2AC52; }
.btn-outline-light { border-color: rgba(255,255,255,.65); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); box-shadow: none; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--moss); }
.btn-outline { border-color: var(--moss); color: var(--moss); background: transparent; }
.btn-outline:hover { background: var(--sage); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 60% 45% at 72% 18%, rgba(193, 154, 61, .22), transparent 70%),
    linear-gradient(180deg, #0C241C 0%, #14352A 52%, #1E4A38 100%);
  color: #E8EFE8;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--container); margin: 0 auto;
  padding: 96px 24px 40px;
  position: relative; z-index: 2;
  text-align: center;
}
.hero .eyebrow { color: #D9C58F; }
.hero h1 {
  font-family: var(--font-kai);
  font-weight: 700;
  color: #F4F1E4;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  letter-spacing: .1em;
  margin-bottom: .5em;
  text-wrap: balance;
}
.hero h1 .gold { color: var(--gold); }
.hero-sub {
  max-width: 620px; margin: 0 auto 2.2em;
  color: rgba(232, 239, 232, .88);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }

.hero-fade { animation: heroFade 1.1s ease-out both; }
.hero-fade-late { animation: heroFade 1.1s ease-out .35s both; }
@keyframes heroFade {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 層疊山稜線（簽名元素） */
.ridge { line-height: 0; }
.ridge svg { width: 100%; height: auto; }
.hero .ridge { position: relative; z-index: 1; margin-top: -8px; }

/* 區段間山稜分隔（淺色頁面用） */
.ridge-divider { line-height: 0; }
.ridge-divider svg { width: 100%; height: auto; display: block; }

/* ---------- 區段 ---------- */
.section { padding: 72px 0; }
.section-sage { background: var(--sage); }
.section-ink { background: var(--ink); color: #DFE8DE; }
.section-ink h2, .section-ink h3 { color: #F4F1E4; }

.eyebrow {
  font-family: var(--font-kai);
  color: var(--moss);
  font-size: .95rem;
  letter-spacing: .35em;
  margin-bottom: .5em;
  display: block;
}
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .4em; }
.section-lead { max-width: 640px; font-size: 1.05rem; margin-bottom: 2em; }
.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

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

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.card h3 { font-size: 1.15rem; margin-bottom: .5em; }
.card p { font-size: .95rem; margin-bottom: 0; }
.card .card-icon {
  width: 52px; height: 52px; margin-bottom: 18px;
  color: var(--moss);
  background: var(--sage);
  border-radius: 50%;
  display: grid; place-items: center;
}
.card .card-icon svg { width: 28px; height: 28px; }

.card-link { text-decoration: none; color: inherit; display: block; }
.card-link .more { color: var(--gold); font-weight: 700; font-size: .9rem; margin-top: 12px; display: inline-block; }

/* ---------- 產品佔位圖 ---------- */
.product-figure {
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  height: 190px;
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.product-figure svg { width: 64px; height: 64px; opacity: .95; }
.product-figure img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.product-figure.has-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(14,42,33,.55));
}
.product-figure.has-photo .figure-label { z-index: 1; }
.import-photos {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.import-photos figure {
  margin: 0; background: #fff;
  border: 1px solid var(--sage-line, #DFE8DE); border-radius: var(--radius-card);
  overflow: hidden;
}
.import-photos figure:first-child { grid-column: 1 / -1; }
.import-photos img { display: block; width: 100%; height: 180px; object-fit: cover; }
.import-photos figure:first-child img { height: 210px; }
.import-photos figcaption {
  font-family: var(--font-kai); font-size: .8rem; letter-spacing: .14em;
  color: var(--moss); text-align: center; padding: 8px 6px;
}
.product-figure .figure-label {
  position: absolute; bottom: 10px; right: 14px;
  font-family: var(--font-kai); font-size: .82rem; letter-spacing: .18em;
  color: rgba(255,255,255,.85);
}
.pf-fresh   { background: linear-gradient(135deg, #2F5D46, #7BA98B); }
.pf-care    { background: linear-gradient(135deg, #7A5A3A, #C19A3D); }
.pf-soil    { background: linear-gradient(135deg, #3E3A2B, #8A7B4F); }
.pf-feed    { background: linear-gradient(135deg, #1E4A38, #48745A); }
.pf-misc    { background: linear-gradient(135deg, #35564A, #6E927D); }
.product-card { padding: 0; overflow: hidden; }
.product-card .product-body { padding: 24px 26px 28px; }
.product-card h3 { display: flex; align-items: baseline; gap: 10px; }
.product-card h3 .en { font-family: var(--font-sans); font-weight: 400; font-size: .75rem; color: var(--moss); letter-spacing: .1em; }
.product-card ul { margin: .6em 0 0; padding-left: 1.2em; font-size: .93rem; }
.product-card li { margin-bottom: .3em; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  font-size: .78rem; font-weight: 500;
  background: var(--sage); color: var(--ink);
  border-radius: var(--radius-pill); padding: 3px 12px;
}
.tag-gold { background: rgba(193,154,61,.16); color: #8A6B24; }

/* ---------- 數字/重點列 ---------- */
.value-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  text-align: center;
}
.value-strip .value {
  font-family: var(--font-kai);
  font-size: 1.5rem; color: var(--ink); letter-spacing: .2em;
}
.value-strip .value small { display: block; font-family: var(--font-sans); font-size: .82rem; letter-spacing: .05em; color: var(--moss); margin-top: 6px; }

/* ---------- 圖文並排 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .visual {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ---------- 技術頁圖解 ---------- */
.diagram-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow);
}
.diagram-panel figcaption { font-size: .88rem; color: var(--moss); margin-top: 14px; }

/* ---------- 流程步驟 ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li {
  counter-increment: step;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-serif); font-weight: 900; font-size: 1.6rem;
  color: var(--gold);
  display: block; margin-bottom: 8px;
}
.steps h3 { font-size: 1.05rem; margin-bottom: .4em; }
.steps p { font-size: .9rem; margin: 0; }

/* ---------- 引言 ---------- */
.quote-band {
  text-align: center;
  padding: 84px 24px;
}
.quote-band blockquote {
  margin: 0 auto; max-width: 760px;
  font-family: var(--font-kai);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  letter-spacing: .14em; line-height: 2;
  color: #F4F1E4;
}
.quote-band cite { display: block; margin-top: 20px; font-style: normal; font-family: var(--font-sans); font-size: .9rem; color: var(--gold); letter-spacing: .3em; }

/* ---------- CTA 帶 ---------- */
.cta-band {
  background:
    radial-gradient(ellipse 50% 60% at 80% 20%, rgba(193,154,61,.18), transparent 70%),
    linear-gradient(160deg, #14352A, #1E4A38);
  border-radius: 18px;
  color: #E8EFE8;
  padding: 56px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { color: #F4F1E4; margin-bottom: .3em; font-size: 1.6rem; }
.cta-band p { margin: 0; color: rgba(232,239,232,.85); }

/* ---------- 表單 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: .92rem; color: var(--ink); }
.form-field label .req { color: #B0532E; font-weight: 400; margin-left: 2px; }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-sans); font-size: 1rem; color: var(--body);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: none;
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(72, 116, 90, .25);
}
.form-note { font-size: .85rem; color: var(--moss); margin-top: 14px; }

/* ---------- 聯絡資訊 ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
  font-size: .97rem;
}
.contact-list li:last-child { border-bottom: none; }
.contact-list .ci {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--sage); color: var(--moss);
  display: grid; place-items: center;
}
.contact-list .ci svg { width: 19px; height: 19px; }
.contact-list strong { display: block; color: var(--ink); font-size: .85rem; }
.contact-list a { color: var(--body); text-decoration: none; }
.contact-list a:hover { color: var(--moss); text-decoration: underline; }

/* 地圖佔位 */
.map-placeholder {
  border-radius: var(--radius-card);
  min-height: 320px;
  background:
    linear-gradient(rgba(223,232,222,.55), rgba(223,232,222,.55)),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(72,116,90,.18) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(72,116,90,.18) 39px 40px),
    #EDF2EC;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  text-align: center; color: var(--moss);
  padding: 32px;
}
.map-placeholder svg { width: 44px; height: 44px; margin: 0 auto 12px; }
.map-placeholder p { margin: 0; font-size: .92rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0E2A21;
  color: rgba(223, 232, 222, .8);
  font-size: .92rem;
}
.footer-ridge svg { display: block; width: 100%; height: auto; }
.footer-main {
  max-width: var(--container); margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
}
.footer-main h3 {
  color: #F4F1E4; font-size: 1rem; letter-spacing: .1em;
  margin-bottom: 14px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 44px; height: 44px; object-fit: contain; }
.footer-brand .fb-name { font-family: var(--font-serif); font-weight: 700; color: #F4F1E4; }
.footer-brand .fb-name small { display: block; font-family: var(--font-sans); font-weight: 400; font-size: .7rem; letter-spacing: .12em; color: rgba(223,232,222,.6); }
.footer-slogan { font-family: var(--font-kai); letter-spacing: .18em; color: var(--gold); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(223,232,222,.8); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(223,232,222,.15);
  text-align: center; padding: 18px 24px;
  font-size: .8rem; color: rgba(223,232,222,.5);
}

/* ---------- 頁首橫幅（內頁） ---------- */
.page-hero {
  background:
    radial-gradient(ellipse 55% 60% at 78% 10%, rgba(193,154,61,.16), transparent 70%),
    linear-gradient(175deg, #0C241C, #1B4132);
  color: #E8EFE8;
}
.page-hero-inner {
  max-width: var(--container); margin: 0 auto;
  padding: 72px 24px 28px; text-align: center;
}
.page-hero .eyebrow { color: #D9C58F; }
.page-hero h1 {
  color: #F4F1E4; font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: .06em; margin-bottom: .4em;
}
.page-hero p { max-width: 620px; margin: 0 auto; color: rgba(232,239,232,.85); }
.page-hero .ridge { margin-top: 24px; }

/* ---------- RWD ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .split { gap: 32px; }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 10px 16px 18px;
    box-shadow: 0 18px 30px rgba(20,53,42,.12);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { border-radius: 10px; padding: 12px 16px; }
  .nav-menu .nav-cta a { margin-left: 0; text-align: center; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .value-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 28px; }
  .hero-inner { padding-top: 72px; }
}

/* ---------- 動作偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .card:hover, .btn:hover { transform: none; }
}
