/* ===== 好油品味｜國產油茶資訊網 ===== */

:root{
  /* Palette */
  --rice:        #FBF7EA;       /* 米白 base */
  --rice-2:      #F4EED9;       /* warm cream */
  --paper:       #FFFDF6;       /* card */
  --ink:         #2A2A22;       /* main text */
  --ink-soft:    #5C5648;       /* secondary text */
  --ink-mute:    #8E8674;       /* muted */
  --line:        #E5DEC4;       /* hairline */
  --line-soft:   #EFE9D2;

  /* Brand */
  --green:       #4F6B3A;       /* 油茶綠 deep */
  --green-deep:  #3A5128;
  --leaf:        #8FB069;       /* 嫩葉綠 */
  --leaf-soft:   #C7D8A3;
  --yolk:        #E9B83A;       /* 茶油黃 */
  --yolk-soft:   #F5DA86;
  --yolk-bg:     #FBE9A8;
  --seed:        #7A5638;       /* 茶籽棕 */
  --seed-soft:   #B58A66;

  /* Type */
  --serif: "Noto Serif TC", "Source Han Serif TC", "PingFang TC", "Songti TC", "Times New Roman", serif;
  --sans:  "Noto Sans TC",  "Source Han Sans TC",  "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", sans-serif;
  --mono:  "JetBrains Mono", "Menlo", monospace;
}

*,*::before,*::after{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
html{ scroll-behavior: smooth; }
body{
  font-family: var(--sans);
  color: var(--ink);
  background: var(--rice);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img{ max-width: 100%; height: auto; display: block; }
a{ color: var(--green-deep); text-decoration: none; }
a:hover{ color: var(--seed); }

h1,h2,h3,h4{
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-wrap: balance;
  margin: 0;
}
h1{ font-size: clamp(2rem, 4vw, 3rem); line-height: 1.25; }
h2{ font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.3; }
h3{ font-size: 1.25rem; line-height: 1.4; }
h4{ font-size: 1.05rem; line-height: 1.4; }

p{ margin: 0 0 1em; text-wrap: pretty; }

/* ===== Layout ===== */
.container{ width: min(1180px, 100% - 48px); margin-inline: auto; }
.container--narrow{ width: min(760px, 100% - 40px); margin-inline: auto; }
.container--reading{ width: min(700px, 100% - 40px); margin-inline: auto; }

.section{ padding: 88px 0; position: relative; }
.section--tight{ padding: 56px 0; }
.section--first{ padding-top: 32px; }

/* ===== Header ===== */
.site-header{
  position: sticky; top: 0; z-index: 30;
  background: rgba(251,247,234, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .container{
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px; gap: 24px;
}
.brand{ display: flex; align-items: center; gap: 14px; }
.brand-mark{
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--yolk);
  display: grid; place-items: center;
  position: relative;
  box-shadow: 0 2px 0 var(--seed-soft);
}
.brand-mark svg{ width: 28px; height: 28px; }
.brand-text{ line-height: 1.1; }
.brand-title{ font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--ink); }
.brand-sub{ font-size: 12px; color: var(--ink-soft); letter-spacing: 0.04em; }

.nav{ display: flex; align-items: center; gap: 4px; }
.nav a{
  position: relative;
  padding: 8px 14px;
  font-size: 15px; color: var(--ink);
  border-radius: 999px;
}
.nav a:hover{ background: var(--rice-2); color: var(--green-deep); }
.nav a.active{ background: var(--green); color: #fff; }
.nav a.active:hover{ background: var(--green-deep); color: #fff; }

.nav-toggle{
  display: none;
  width: 40px; height: 40px; border: none; background: transparent;
  cursor: pointer; padding: 8px;
}
.nav-toggle svg{ width: 24px; height: 24px; }

@media (max-width: 920px){
  .nav-toggle{ display: block; }
  .nav{
    position: absolute; top: 76px; right: 12px; left: 12px;
    display: none; flex-direction: column; align-items: stretch;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px; gap: 2px;
    box-shadow: 0 12px 40px rgba(58,40,16,0.08);
  }
  .nav.open{ display: flex; }
  .nav a{ padding: 12px 16px; border-radius: 12px; }
}

/* ===== Footer ===== */
.site-footer{
  background: #2F3D24;
  color: #E8E5D6;
  padding: 56px 0 32px;
  margin-top: 96px;
  position: relative;
}
.site-footer a{ color: #E8E5D6; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover{ color: var(--yolk-soft); }
.footer-grid{
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
}
@media (max-width: 720px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-title{ font-family: var(--serif); font-size: 18px; margin-bottom: 12px; color: #FFF; }
.footer-text{ font-size: 14px; line-height: 1.8; color: #C8C5B5; }
.footer-links{ list-style: none; padding: 0; margin: 0; font-size: 14px; }
.footer-links li{ margin-bottom: 8px; }
.footer-legal{
  border-top: 1px solid #3F4F31;
  margin-top: 40px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-size: 13px; color: #A8A597;
}

/* ===== Buttons ===== */
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn--primary{ background: var(--green); color: #fff; box-shadow: 0 2px 0 var(--green-deep); }
.btn--primary:hover{ background: var(--green-deep); color: #fff; transform: translateY(-1px); }
.btn--ghost{ border-color: var(--green); color: var(--green-deep); background: transparent; }
.btn--ghost:hover{ background: var(--green); color: #fff; }
.btn--yolk{ background: var(--yolk); color: var(--ink); box-shadow: 0 2px 0 var(--seed); }
.btn--yolk:hover{ background: #F5C84A; }

/* ===== Tag / Pill ===== */
.tag{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 13px; line-height: 1.6;
  background: var(--rice-2); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.tag--green{ background: #E8F0DA; color: var(--green-deep); border-color: #D2DEBE; }
.tag--yolk{ background: #FBECB5; color: #6B4D14; border-color: #ECD78F; }
.tag--seed{ background: #EADBC8; color: #5C3F25; border-color: #DCC5A8; }
.tag--leaf{ background: #DDE9C2; color: #3F5824; border-color: #C8D7A3; }
.tag--soft{ background: var(--paper); color: var(--ink-soft); border-color: var(--line); }

/* ===== Cards ===== */
.card{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
  display: flex; flex-direction: column;
}
.card:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(58,40,16,0.08);
  border-color: var(--leaf-soft);
}
.card-media{
  position: relative;
  aspect-ratio: 16/8;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rice-2), var(--yolk-bg) 120%);
  display: flex; align-items: center; justify-content: center;
}
.card-media img{
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  transition: transform 0.5s ease;
}
.card:hover .card-media img{ transform: scale(1.05); }
.card-media::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(251,247,234,0.45) 100%);
  pointer-events: none;
}
.card-body{ padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-eyebrow{
  font-size: 12.5px; letter-spacing: 0.08em; color: var(--green-deep);
  font-weight: 500; text-transform: uppercase;
}
.card-title{
  font-family: var(--serif); font-size: 19px; font-weight: 700;
  line-height: 1.45; color: var(--ink);
}
.card-summary{ font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; }
.card-foot{
  margin-top: auto;
  font-size: 13px; color: var(--ink-mute);
  display: flex; justify-content: space-between; align-items: center;
}

/* ===== Grids ===== */
.grid{ display: grid; gap: 24px; }
.grid--3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px){
  .grid--3,.grid--4{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px){
  .grid--2,.grid--3,.grid--4{ grid-template-columns: 1fr; }
}

/* ===== Hero (home) ===== */
.hero{
  position: relative;
  padding: 0;
  overflow: hidden;
}
.hero-banner{
  position: relative;
  width: 100%;
  min-height: 540px;
  background-image: url('../images/illust/01.png');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  display: flex; align-items: center;
}
.hero-banner::before{
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(251,247,234,0.50) 0%, rgba(251,247,234,0.10) 30%, rgba(251,247,234,0.10) 60%, rgba(251,247,234,0.94) 100%),
    radial-gradient(ellipse 60% 70% at 50% 50%, rgba(251,247,234,0.55), transparent 70%);
  pointer-events: none;
}
.hero-banner .container{ position: relative; z-index: 1; padding-top: 80px; padding-bottom: 80px; }
.hero-inner{
  max-width: 640px;
  text-align: center;
  margin: 0 auto;
  background: rgba(251,247,234,0.72);
  backdrop-filter: blur(6px);
  border-radius: 28px;
  padding: 40px 36px;
  box-shadow: 0 12px 40px rgba(58,40,16,0.06);
  border: 1px solid rgba(229,222,196,0.6);
}
.hero-inner .hero-actions{ justify-content: center; }
@media (max-width: 720px){
  .hero-banner{ min-height: 460px; background-position: center bottom; }
  .hero-banner .container{ padding-top: 32px; padding-bottom: 32px; align-self: flex-start; display: flex; }
  .hero-banner::before{
    background:
      linear-gradient(180deg, rgba(251,247,234,0.92) 0%, rgba(251,247,234,0.60) 35%, rgba(251,247,234,0.20) 55%, rgba(251,247,234,0.05) 100%);
  }
  .hero-inner{ padding: 28px 22px; }
}

.hero-eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--green-deep);
  background: #E8F0DA; padding: 6px 14px; border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1{
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.2; margin-bottom: 20px;
}
.hero-lead{ font-size: 18px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 28px; max-width: 36em; }
.hero-actions{ display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art{ position: relative; }
.hero-art-frame{
  border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--rice-2);
  box-shadow: 0 20px 50px rgba(58,40,16,0.08);
}
.hero-art-frame img{ display: block; width: 100%; height: auto; }

/* Decorative yellow blob */
.blob{ position: absolute; pointer-events: none; z-index: 0; }
.blob--yolk{
  width: 360px; height: 360px;
  background: radial-gradient(closest-side, var(--yolk-bg), transparent);
  border-radius: 50%;
  filter: blur(2px);
}

/* ===== Section header ===== */
.sec-head{
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
  margin-bottom: 36px; flex-wrap: wrap;
}
.sec-head h2{ font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.sec-head p{ color: var(--ink-soft); margin: 8px 0 0; max-width: 50ch; }
.sec-link{
  color: var(--green-deep); font-weight: 500; font-size: 15px;
  border-bottom: 1.5px solid var(--leaf);
  padding-bottom: 2px;
}
.sec-link:hover{ color: var(--seed); border-color: var(--yolk); }

/* ===== Category tile (home + listings) ===== */
.cat-tile{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: all 0.2s ease;
  min-height: 180px;
  position: relative; overflow: hidden;
}
.cat-tile:hover{
  background: #FFFCF0;
  border-color: var(--yolk-soft);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(58,40,16,0.08);
}
.cat-tile-num{
  font-family: var(--serif); font-size: 13px; color: var(--seed);
  letter-spacing: 0.12em;
}
.cat-tile-title{
  font-family: var(--serif); font-size: 20px; font-weight: 700;
  color: var(--ink); line-height: 1.35;
}
.cat-tile-desc{ font-size: 14px; color: var(--ink-soft); line-height: 1.7; flex: 1; }
.cat-tile-count{
  font-size: 13px; color: var(--green-deep);
  display: inline-flex; align-items: center; gap: 6px;
}
.cat-tile-icon{
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: var(--yolk-bg); border-radius: 12px;
  display: grid; place-items: center;
  color: var(--seed);
}

/* ===== Reading: article body ===== */
.prose{
  font-size: 17.5px; line-height: 1.95;
  color: #1f1d17;
}
.prose h2{
  font-size: 1.55rem; margin-top: 2.4em; margin-bottom: 0.6em;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--leaf-soft);
  position: relative;
}
.prose h2::before{
  content: ""; display: inline-block; width: 8px; height: 8px;
  background: var(--yolk); border-radius: 50%;
  margin-right: 10px; vertical-align: middle;
}
.prose h3{ font-size: 1.2rem; margin-top: 1.8em; margin-bottom: 0.5em; color: var(--green-deep); }
.prose p{ margin: 0 0 1.1em; }
.prose ul, .prose ol{ padding-left: 1.5em; margin: 0 0 1.2em; }
.prose li{ margin-bottom: 0.4em; }
.prose blockquote{
  margin: 1.8em 0;
  padding: 18px 24px;
  background: var(--rice-2);
  border-left: 4px solid var(--yolk);
  border-radius: 0 14px 14px 0;
  color: var(--ink-soft);
  font-style: normal;
}
.prose strong{ color: var(--seed); }

.article-hero{
  background: linear-gradient(180deg, #F9EFB8 0%, var(--rice) 100%);
  padding: 72px 0 56px;
  margin-bottom: 56px;
  position: relative; overflow: hidden;
}
.article-hero--illust{
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  padding: 96px 0 80px;
}
.article-hero--illust .article-hero-overlay{
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(251,247,234, 0.96) 0%, rgba(251,247,234,0.88) 45%, rgba(251,247,234,0.55) 75%, rgba(251,247,234,0.20) 100%),
    linear-gradient(180deg, rgba(251,247,234,0.4) 0%, rgba(251,247,234,0.6) 100%);
  z-index: 0;
}
@media (max-width: 720px){
  .article-hero--illust{ padding: 64px 0 56px; }
  .article-hero--illust .article-hero-overlay{
    background:
      linear-gradient(180deg, rgba(251,247,234,0.65) 0%, rgba(251,247,234,0.9) 60%, rgba(251,247,234,0.98) 100%);
  }
}
.article-meta{
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.article-title{
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.25; margin-bottom: 16px;
}
.article-lead{ font-size: 18px; color: var(--ink-soft); max-width: 38em; line-height: 1.8; }
.article-reader{
  margin-top: 24px; padding: 14px 18px;
  background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 14px; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 10px;
}
.article-reader strong{ color: var(--green-deep); font-weight: 600; }

.toc{
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 24px; margin: 32px 0;
}
.toc-title{
  font-family: var(--serif); font-weight: 700; font-size: 15px;
  color: var(--green-deep); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.toc ol{ margin: 0; padding-left: 1.3em; color: var(--ink-soft); font-size: 15px; line-height: 1.9; }
.toc ol li::marker{ color: var(--yolk); }
.toc a{ color: var(--ink-soft); }
.toc a:hover{ color: var(--green-deep); }

.article-next{
  margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.article-next-link{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--rice-2); color: var(--ink); font-size: 15px;
}
.article-next-link:hover{ background: var(--yolk-soft); color: var(--ink); }

/* ===== Award card ===== */
.award-card{
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.award-card:hover{ transform: translateY(-2px); box-shadow: 0 12px 24px rgba(58,40,16,0.08); }
.award-card--top{
  background: linear-gradient(180deg, #FFF8E0 0%, var(--paper) 60%);
  border-color: var(--yolk-soft);
  box-shadow: 0 6px 0 #F0DA8B inset;
}
.award-card .ribbon{
  position: absolute; top: -10px; left: 22px;
  padding: 4px 14px; font-size: 13px; font-weight: 600;
  border-radius: 999px;
  background: var(--yolk); color: var(--ink);
  box-shadow: 0 2px 0 var(--seed-soft);
}
.award-card .ribbon--top{
  background: #D5793A; color: #FFF8E5;
  box-shadow: 0 2px 0 #A85822;
}
.award-card .ribbon--good{
  background: #6E9344; color: #FFF;
  box-shadow: 0 2px 0 #4E6E2A;
}
.award-card .ribbon--silver{
  background: #B5B0A0; color: #2A2A22;
  box-shadow: 0 2px 0 #8E8674;
}
.award-card .ribbon--bronze{
  background: #B58A66; color: #FFF;
  box-shadow: 0 2px 0 #7A5638;
}

/* ===== Purchase CTA panel inside awards page ===== */
.purchase-cta{
  margin: 16px 0 0;
  background: linear-gradient(135deg, #FFF8E0 0%, var(--paper) 70%);
  border: 1px solid var(--yolk-soft);
  border-radius: 22px;
  padding: 32px;
  display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 32px;
  align-items: center;
}
.purchase-cta-art img{
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 16px;
}
@media (max-width: 720px){
  .purchase-cta{ grid-template-columns: 1fr; padding: 24px; }
}
.award-year{ font-size: 13px; color: var(--ink-mute); }
.award-name{ font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.4; }
.award-meta{ font-size: 14px; color: var(--ink-soft); }

/* ===== Filter chips ===== */
.chips{
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 32px;
}
.chip{
  display: inline-flex; align-items: center;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-soft);
  font-size: 14px; cursor: pointer; transition: all 0.15s;
  font-family: inherit;
}
.chip:hover{ border-color: var(--leaf); color: var(--green-deep); }
.chip.active{ background: var(--green); color: #fff; border-color: var(--green); }

/* ===== Highlight pull ===== */
.callout{
  background: #FFFCF0;
  border: 1px solid #ECD78F;
  border-radius: 16px;
  padding: 20px 22px;
  display: flex; gap: 16px; align-items: flex-start;
  font-size: 15px; line-height: 1.75;
}
.callout-icon{
  flex-shrink: 0; width: 32px; height: 32px;
  background: var(--yolk); border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
}

/* ===== Course/Event/Resource lists ===== */
.row-item{
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px 26px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
  transition: all 0.2s;
}
.row-item:hover{ border-color: var(--leaf-soft); background: #FFFEF6; }
.row-item .row-tag{ font-size: 13px; }
.row-item .row-title{ font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.4; margin-bottom: 4px; }
.row-item .row-meta{ font-size: 13.5px; color: var(--ink-soft); }
.row-item .row-cta{ color: var(--green-deep); font-size: 14px; white-space: nowrap; }
@media (max-width: 700px){
  .row-item{ grid-template-columns: 1fr; gap: 10px; }
}

/* ===== Hand-drawn touches ===== */
.wave-divider{
  display: block; width: 100%; height: 28px;
  color: var(--leaf-soft);
}

.scribble-underline{
  background-image: linear-gradient(transparent 60%, var(--yolk-bg) 60%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 4px;
}

/* ===== Utility ===== */
.text-center{ text-align: center; }
.muted{ color: var(--ink-soft); }
.small{ font-size: 14px; }
.mb-0{ margin-bottom: 0; }
.mb-1{ margin-bottom: 8px; }
.mb-2{ margin-bottom: 16px; }
.mb-3{ margin-bottom: 24px; }
.mt-3{ margin-top: 24px; }
.sr-only{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Skip yellow blob backgrounds for hero sections */
.hero-bg{
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(242,200,75,0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(143,176,105,0.15), transparent 60%);
  z-index: 0; pointer-events: none;
}
.hero > .container{ position: relative; z-index: 1; }

/* Print */
@media print {
  .site-header, .site-footer, .article-next{ display: none; }
}
