/* ═══════════════════════════════════════════════
   農產／畜牧場 模板 — 示範店:日安蛋場・日安蛋(雲林土庫,虛構)
   視覺基調:蛋黃色品牌黃 + 米白暖底 + 襯線中文大標

   改色只要動下面 --brand / --brand-dark / --brand-deep / --brand-soft 四個變數:
     蛋雞場 → 蛋黃黃 #f2b203(預設)
     蔬果／有機農場 → 葉綠 #4f8a35 / #3a6626 / #2b4a1b / #eaf3e2
     米糧／雜糧 → 稻穗金棕 #b8862b / #96681c / #6b4a10 / #f7ecd6
     畜牧(肉品)→ 磚紅 #b8503a / #94382a / #6b2418 / #f9e6e0
   ═══════════════════════════════════════════════ */

:root {
  --brand: #f2b203;          /* 品牌黃(蛋黃色,取自店家 logo)*/
  --brand-dark: #c98a00;
  --brand-deep: #8a5f00;
  --brand-soft: #fff5d6;
  --ink: #33291c;            /* 暖調深棕(取代純黑,配米白底更柔)*/
  --ink-soft: #6f6354;
  --bg: #fffdf8;
  --bg-alt: #fbf4e6;         /* 米白區塊底 */
  --hairline: #ece0c9;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 8px 28px rgba(51, 41, 28, .09);
  --shadow-lg: 0 18px 46px rgba(51, 41, 28, .14);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-serif: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.85; font-size: 16px; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-deep); text-decoration: none; }
ul, ol { list-style: none; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 3px; border-radius: 4px; }

/* ── 按鈕 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 15px; white-space: nowrap; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--brand); color: #3a2c05; }
.btn-primary:hover { background: #ffc21f; }
.btn-outline { border-color: var(--brand-dark); color: var(--brand-deep); background: #fff; }
.btn-outline:hover { background: var(--brand-soft); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; background: rgba(255,255,255,.1); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.btn-ghost.btn-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost.btn-dark:hover { background: var(--ink); color: #fff; }
.btn-lg { padding: 15px 30px; font-size: 17px; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,253,248,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 84px; }
.logo { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.logo img { width: 44px; height: 44px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.3; }
.logo-text strong { font-family: var(--font-serif); font-size: 21px; font-weight: 900; letter-spacing: .04em; }
.logo-text em { font-style: normal; font-size: 12px; color: var(--brand-dark); letter-spacing: .18em; font-weight: 500; }
.main-nav { display: flex; gap: 2px; margin-left: auto; }
.main-nav a { color: var(--ink); font-weight: 500; padding: 9px 12px; border-radius: 9px; font-size: 15px; }
.main-nav a:hover { background: var(--brand-soft); color: var(--brand-deep); }
.header-cta { display: flex; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; }

/* ── Hero ── */
.hero {
  background:
    linear-gradient(96deg, rgba(38,28,10,.86) 0%, rgba(38,28,10,.66) 46%, rgba(38,28,10,.28) 100%),
    url("../assets/hero.jpg") center / cover no-repeat;
  min-height: clamp(560px, 78vh, 760px);
  display: flex; align-items: center; padding: 84px 0;
}
.hero-text { max-width: 720px; }
.hero-eyebrow {
  display: inline-block; color: #ffd766; font-weight: 700; letter-spacing: .2em; font-size: 14px;
  border-left: 3px solid var(--brand); padding-left: 12px; margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-serif); font-weight: 900; color: #fff;
  font-size: clamp(42px, 7vw, 82px); line-height: 1.16; letter-spacing: .04em; margin-bottom: 22px;
  text-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.hero h1 .dot { color: var(--brand); }
.hero h1 .accent { color: var(--brand); }
.hero-sub { color: rgba(255,255,255,.9); font-size: clamp(15px, 1.7vw, 18px); margin-bottom: 26px; }
.hero-sub strong { color: #ffd766; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.badge {
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.34); color: #fff;
  border-radius: 999px; padding: 7px 15px; font-size: 14px; font-weight: 500;
  backdrop-filter: blur(4px);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── 四支柱條 ── */
.pillars { background: var(--brand); color: #3a2c05; padding: 34px 0; }
.pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.pillar + .pillar { border-left: 1px solid rgba(58,44,5,.18); }
.pillar strong {
  display: block; font-family: var(--font-serif); font-size: clamp(24px, 3vw, 34px);
  font-weight: 900; letter-spacing: .04em; line-height: 1.3;
}
.pillar p { font-size: 14px; line-height: 1.6; margin-top: 4px; color: #4d3c0a; }

/* ── 認證條(選配區塊,店家沒有認證就把 HTML 的 #certs 整段刪掉)── */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cert {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius);
  border-top: 4px solid var(--brand-dark); padding: 26px 22px; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cert:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cert-mark {
  display: inline-grid; place-items: center; min-width: 62px; height: 34px; padding: 0 12px;
  border-radius: 8px; background: var(--brand-soft); color: var(--brand-deep);
  font-family: var(--font-serif); font-weight: 900; font-size: 17px; letter-spacing: .08em;
  margin-bottom: 14px;
}
.cert strong { display: block; font-family: var(--font-serif); font-size: 17px; font-weight: 700; margin-bottom: 7px; }
.cert p { color: var(--ink-soft); font-size: 14px; line-height: 1.7; }

/* ── 區塊通用 ── */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-brand { background: var(--ink); color: #fdf8ee; }
.section-brand .section-title, .section-brand .section-sub { color: #fdf8ee; }
.section-brand .section-sub { color: rgba(253,248,238,.76); }
.section-eyebrow {
  text-align: center; color: var(--brand-dark); font-weight: 700;
  letter-spacing: .26em; font-size: 13px; text-transform: uppercase; margin-bottom: 12px;
}
.section-brand .section-eyebrow { color: var(--brand); }
.section-title {
  font-family: var(--font-serif); font-weight: 900; text-align: center;
  font-size: clamp(27px, 3.9vw, 42px); line-height: 1.4; letter-spacing: .03em; margin-bottom: 14px;
}
.section-sub {
  text-align: center; color: var(--ink-soft); font-size: 16px;
  max-width: 720px; margin: 0 auto 48px;
}

/* ── 特色卡 ── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  padding: 34px 28px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.card-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  background: var(--brand-soft); font-size: 27px; margin-bottom: 18px;
}
.card h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin-bottom: 10px; letter-spacing: .02em; }
.card p { color: var(--ink-soft); font-size: 15px; }

/* ── 產品卡 ── */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.product-body { padding: 24px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-family: var(--font-serif); font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.product-spec {
  font-size: 13px; color: var(--brand-deep); font-weight: 700; letter-spacing: .04em;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--hairline);
}
.product-body > p:not(.product-spec):not(.product-price) { color: var(--ink-soft); font-size: 14.5px; flex: 1; }
.product-price { margin-top: 16px; font-weight: 700; color: var(--ink); font-size: 15px; }

/* ── 流程 ── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.step {
  background: #fff; border: 1px solid var(--hairline); border-top: 4px solid var(--brand);
  border-radius: var(--radius); padding: 30px 24px 28px; position: relative;
}
.step-no {
  font-family: var(--font-serif); font-size: 40px; font-weight: 900;
  color: var(--brand); line-height: 1; display: block; margin-bottom: 10px;
}
.step h3 { font-family: var(--font-serif); font-size: 20px; margin-bottom: 8px; letter-spacing: .06em; }
.step p { color: var(--ink-soft); font-size: 14.5px; }

/* ── 場區相簿 ── */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.gallery figure { border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.gallery img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  padding: 15px 20px; font-size: 14.5px; font-weight: 500; color: var(--ink);
  border-top: 3px solid var(--brand);
}

/* ── 品牌故事 ── */
.story-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.story-photo img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 8 / 9; object-fit: cover; }
.story-text .section-eyebrow, .story-text .section-title { text-align: left; }
.story-text .section-title { margin-bottom: 20px; }
.story-text p { color: var(--ink-soft); margin-bottom: 16px; }
.story-text blockquote {
  font-family: var(--font-serif); font-size: clamp(20px, 2.4vw, 27px); font-weight: 700;
  color: var(--brand-deep); letter-spacing: .12em; margin: 26px 0;
  padding-left: 20px; border-left: 4px solid var(--brand);
}

/* ── 批發通路 chips ── */
.chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 48px; }
.chip {
  background: rgba(255,255,255,.06); border: 1px solid rgba(242,178,3,.32);
  border-radius: var(--radius); padding: 22px 24px;
}
.chip strong { display: block; font-size: 17px; font-weight: 700; margin-bottom: 5px; }
.chip p { font-size: 14px; color: rgba(253,248,238,.7); }
.cta-band {
  border-top: 1px solid rgba(242,178,3,.32); padding-top: 40px; text-align: center;
}
.cta-band > p { font-size: clamp(17px, 2.1vw, 21px); margin-bottom: 22px; }
.cta-band strong { color: var(--brand); }
.cta-band .hero-cta { justify-content: center; }
.section-brand .btn-ghost.btn-dark { border-color: rgba(253,248,238,.6); color: #fdf8ee; }
.section-brand .btn-ghost.btn-dark:hover { background: #fdf8ee; color: var(--ink); }

/* ── FAQ ── */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 4px 22px; transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item[open] { border-color: var(--brand); box-shadow: var(--shadow); }
.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 17px 30px 17px 0; list-style: none;
  position: relative; font-size: 16.5px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  color: var(--brand-dark); font-size: 25px; font-weight: 400; line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--ink-soft); font-size: 15px; padding: 0 0 20px; }

/* ── 聯絡 + 地圖 ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.contact-info .section-eyebrow, .contact-info .section-title, .contact-info .section-sub { text-align: left; margin-left: 0; }
.contact-info .section-sub { margin-bottom: 28px; }
.contact-list { margin-bottom: 30px; }
.contact-list li {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px;
  padding: 14px 0; border-bottom: 1px dashed var(--hairline); font-size: 15.5px;
}
.contact-list strong { color: var(--brand-deep); font-weight: 700; }
.map-embed {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid var(--hairline); background: #fff;
}
.map-embed iframe { width: 100%; height: 480px; border: 0; display: block; }

/* ── Footer ── */
.site-footer { background: var(--ink); color: rgba(253,248,238,.82); padding: 56px 0 0; }
.footer-inner {
  display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(253,248,238,.14);
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-name { font-family: var(--font-serif); font-size: 22px; font-weight: 900; color: #fff; letter-spacing: .05em; }
.footer-slogan { font-size: 13px; color: var(--brand); letter-spacing: .16em; }
.footer-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; align-content: start; }
.footer-nav a { color: rgba(253,248,238,.82); font-size: 14.5px; }
.footer-nav a:hover { color: var(--brand); }
.footer-contact p { font-size: 14.5px; margin-bottom: 6px; }
.footer-contact a { color: var(--brand); }
.footer-copy { text-align: center; padding: 22px 0; font-size: 13px; color: rgba(253,248,238,.5); }

/* ── 浮動撥號鈕 ── */
.call-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 120;
  display: flex; align-items: center; gap: 8px;
  background: var(--brand); color: #3a2c05; font-weight: 700;
  padding: 14px 22px; border-radius: 999px; box-shadow: 0 8px 26px rgba(51,41,28,.3);
  transition: transform .16s ease, box-shadow .16s ease;
}
.call-float:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(51,41,28,.38); }

/* ── 捲動顯示動畫 ──
   內容預設是「看得見」的:只有 main.js 成功掛上 IntersectionObserver 後,
   才會在 <html> 加上 .js-reveal 把元素藏起來等進場。
   JS 沒載到 / 被擋 / 出錯時整頁照樣讀得到,不會變空白頁。 */
.js-reveal .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
.js-reveal .card-grid .reveal:nth-child(2), .js-reveal .product-grid .reveal:nth-child(2),
.js-reveal .steps .reveal:nth-child(2), .js-reveal .gallery .reveal:nth-child(2),
.js-reveal .chip-grid .reveal:nth-child(2),
.js-reveal .cert-grid .reveal:nth-child(2) { transition-delay: .08s; }
.js-reveal .card-grid .reveal:nth-child(3), .js-reveal .product-grid .reveal:nth-child(3),
.js-reveal .steps .reveal:nth-child(3), .js-reveal .gallery .reveal:nth-child(3),
.js-reveal .chip-grid .reveal:nth-child(3),
.js-reveal .cert-grid .reveal:nth-child(3) { transition-delay: .16s; }
.js-reveal .card-grid .reveal:nth-child(4), .js-reveal .product-grid .reveal:nth-child(4),
.js-reveal .steps .reveal:nth-child(4), .js-reveal .gallery .reveal:nth-child(4),
.js-reveal .chip-grid .reveal:nth-child(4),
.js-reveal .cert-grid .reveal:nth-child(4) { transition-delay: .24s; }

/* ═══════ RWD:1024 / 768 / 375 ═══════ */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .chip-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: 1fr; gap: 36px; }
  .story-photo img { aspect-ratio: 16 / 10; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .map-embed iframe { height: 380px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .main-nav a { padding: 8px 9px; font-size: 14px; }
  .header-cta .btn-outline { display: none; }
}

@media (max-width: 768px) {
  html { scroll-padding-top: 72px; }
  .header-inner { height: 72px; gap: 12px; }
  .logo img { width: 38px; height: 38px; }
  .logo-text strong { font-size: 18px; }
  .logo-text em { font-size: 11px; letter-spacing: .12em; }
  .header-cta { margin-left: auto; }
  .header-cta .btn { padding: 9px 16px; font-size: 14px; }
  .nav-toggle {
    display: grid; gap: 5px; width: 42px; height: 42px; place-content: center;
    border-radius: 10px; border: 1px solid var(--hairline); background: #fff;
  }
  .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow); padding: 8px 4%; display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 14px 8px; font-size: 16px; border-bottom: 1px solid var(--hairline); border-radius: 0; }
  .main-nav a:last-child { border-bottom: 0; }

  .hero { min-height: auto; padding: 64px 0 72px; background-position: 62% center; }
  .hero-sub br { display: none; }
  .section { padding: 60px 0; }
  .section-sub { margin-bottom: 34px; }
  .pillars { padding: 26px 0; }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .pillar:nth-child(3) { border-left: 0; }
  .card-grid, .product-grid, .steps, .gallery, .chip-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cert { padding: 20px 14px; }
  .cert p { font-size: 13px; }
  .card { padding: 26px 22px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); justify-items: center; }
  .contact-list li { grid-template-columns: 72px 1fr; gap: 10px; font-size: 15px; }
  .call-float { right: 14px; bottom: 14px; padding: 13px 19px; }
  .hero-cta .btn, .cta-band .btn { flex: 1 1 100%; }
}

@media (max-width: 380px) {
  .call-float span { display: none; }
  .call-float { padding: 15px; }
  .badge { font-size: 13px; padding: 6px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .product:hover, .cert:hover, .call-float:hover { transform: none; }
  .gallery figure:hover img { transform: none; }
}

@media print {
  .site-header, .call-float, .map-embed, .nav-toggle { display: none; }
  .hero { background: none; color: var(--ink); min-height: auto; padding: 20px 0; }
  .hero h1, .hero-sub, .badge { color: var(--ink); }
  .js-reveal .reveal { opacity: 1 !important; transform: none !important; }
}
