/* 古意人米粿 — 品牌形象網站
   配色來自品牌本色：紅麴取紅、糯米取白。
   底色改為米白，只有頁尾維持深色，全站僅此一處明暗反轉（刻意的收尾手法，非隨意切換）。
   字體維持 Noto Serif TC（標題，襯線，呼應老店的手寫招牌感）＋ Noto Sans TC（內文）。
*/

@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@500;700;900&family=Noto+Sans+TC:wght@400;500;600&display=swap");

:root {
  --bg: #faf3e6;
  --bg-soft: #f2e6ce;
  --surface: #fffdf8;
  --surface-2: #f5e9d2;
  --line: rgba(124, 28, 28, 0.14);
  --line-strong: rgba(124, 28, 28, 0.28);
  --text: #2c1b12;
  --text-dim: #5b4534;
  --text-mute: #8c7358;
  --red: #7c1c1c;
  --red-strong: #c23a2c;
  --red-bright: #e0503c;
  --gold: #8a5a1e;
  --gold-soft: #c79a4e;

  --ink: #1c1611;
  --ink-soft: #241c15;
  --ink-line: rgba(205, 163, 92, 0.18);
  --cream-text: #f4ead8;

  --font-display: "Noto Serif TC", serif;
  --font-body: "Noto Sans TC", sans-serif;

  --max: 1180px;
  --radius: 14px;
  --radius-pill: 999px;
  --nav-h: 104px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(250, 243, 230, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-mark {
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark img {
  display: block;
  height: 58px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 15px;
  color: var(--text-dim);
  transition: color 0.2s ease;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--red-strong);
}

.nav-links a.active {
  color: var(--red-strong);
  border-bottom-color: var(--red-strong);
  font-weight: 600;
}

/* Selector must out-weigh `.nav-links a` above, otherwise that rule's
   `padding: 4px 0` wins and the pill collapses onto the text. */
.nav-links a.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: var(--red-strong);
  color: #fff;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  border-bottom: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}

.nav-links a.nav-cta i {
  font-size: 17px;
  flex-shrink: 0;
}

.nav-links a.nav-cta:hover {
  background: var(--red-bright);
  color: #fff;
}

.nav-links a.nav-cta:active {
  transform: translateY(1px) scale(0.98);
}

/* ---------- 導覽列的下拉子選單（歲時祭祀資料庫） ---------- */

/* 讓 .nav-links 撐滿導覽列高度，有子選單的那一項才能 align-self: stretch，
   子選單用 top: 100% 就會剛好貼在導覽列下緣，不會跟導覽列重疊，
   滑鼠從主項目移到子選單之間也不會有「空隙斷開」的死角。 */
.nav-links {
  height: var(--nav-h);
}

.nav-links li.has-sub {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.nav-links a.sub-parent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-links a.sub-parent i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.nav-links li.has-sub:hover a.sub-parent i,
.nav-links li.has-sub:focus-within a.sub-parent i {
  transform: rotate(180deg);
}

.nav-links .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 300px;
  max-width: calc(100vw - 24px);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 32px rgba(28, 17, 10, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 60;
}

.nav-links li.has-sub:hover .sub-menu,
.nav-links li.has-sub:focus-within .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-links .sub-menu li {
  width: 100%;
}

.nav-links .sub-menu a {
  display: block;
  padding: 11px 20px;
  font-size: 14.5px;
  line-height: 1.5;
  white-space: nowrap;
  border-bottom: none;
}

.nav-links .sub-menu a:hover {
  background: var(--bg-soft);
  color: var(--red-strong);
}

.nav-links .sub-menu a.active {
  background: var(--bg-soft);
  color: var(--red-strong);
  font-weight: 600;
  border-bottom: none;
}

.nav-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

/* 導覽列的漢堡斷點。項目變長就要重算：橫排最少需要的寬度 =
   brand-mark 寬 + nav-links.scrollWidth + wrap 左右 padding。
   目前 6 項（「品牌故事」「商品與價格」「歲時祭祀資料庫」各帶一個下拉箭頭）量到約 1019px，
   所以斷點設 1040px 留餘裕。
   底下另外兩處 860px 的斷點是內文版面用的，跟導覽列無關，不要一起改。 */
@media (max-width: 1040px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-check:checked ~ .wrap .nav-links {
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a.active {
    border-bottom: 1px solid var(--line);
    background: var(--bg-soft);
  }

  .nav-links .nav-cta {
    margin: 16px 24px;
    display: inline-flex;
  }

  /* 手機沒有 hover，子選單直接攤開成縮排的清單，不做展開收合 */
  .nav-links li.has-sub {
    display: block;
    align-self: auto;
    position: static;
  }

  /* 桌機的 .nav-links a.sub-parent 是 inline-flex，權重比 .nav-links a 的 block 高，
     手機不改回 block 的話，這一項的底色只會跟著文字寬度，不會滿版。 */
  .nav-links a.sub-parent {
    display: block;
  }

  .nav-links a.sub-parent i {
    display: none;
  }

  .nav-links .sub-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .nav-links .sub-menu a {
    padding: 14px 24px 14px 42px;
    font-size: 14px;
    white-space: normal;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn i {
  font-size: 17px;
  flex-shrink: 0;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: var(--red-strong);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-bright);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.24);
}

.btn-outline {
  background: transparent;
  color: var(--red-strong);
  border-color: var(--line-strong);
}

.btn-outline:hover {
  border-color: var(--red-strong);
  background: rgba(194, 58, 44, 0.06);
}

/* ---------- Page header band (subpages) ---------- */

.page-header {
  position: relative;
  padding: 74px 0 56px;
  color: #fff;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(28, 17, 10, 0.82) 0%, rgba(28, 17, 10, 0.55) 55%, rgba(28, 17, 10, 0.32) 100%);
}

.page-header .eyebrow {
  color: var(--gold-soft);
}

.page-header h1 {
  color: #fff;
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: 12px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  max-width: 56ch;
}

.page-header.no-photo {
  background: linear-gradient(135deg, var(--ink) 0%, #33241a 100%);
  padding: 62px 0 44px;
}

.page-header.no-photo::before {
  content: none;
}

/* ---------- 最新消息跑馬燈（首頁，導覽列下方） ----------
   左側是固定不動的「最新消息」標籤，右側才是滾動區。
   滾動用的是「同一段文字排成偶數份、整條往左推 50%」的做法：
   推完剛好後半段接上前半段原本的位置，所以看起來是無縫循環。
   HTML 裡只寫一句話，副本數量與速度由 script.js 依畫面寬度算好再補上
   （文字只有一句時整條會比畫面窄，中間就會空一大段，所以必須補到夠寬）。
   滑鼠移上去會暫停，方便讀完；使用者若在系統開了「減少動態效果」，
   就完全不動、改成可以自己橫向捲的一行。 */

.news-bar {
  background: var(--red-strong);
  color: #fff;
  padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.news-bar .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.news-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-pill);
  line-height: 1.6;
}

.news-label i {
  font-size: 15px;
}

.news-viewport {
  flex: 1;
  overflow: hidden;
  /* 兩端淡出，文字進出時不會硬生生被切斷 */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.news-track {
  display: flex;
  width: max-content;
}

/* 只有在 script.js 把副本補齊之後才開始跑，否則單獨一句話推 -50% 會被切一半 */
.news-track.is-scrolling {
  animation: news-scroll var(--news-duration, 26s) linear infinite;
}

.news-viewport:hover .news-track,
.news-viewport:focus-within .news-track {
  animation-play-state: paused;
}

.news-item {
  flex-shrink: 0;
  padding: 12px 80px 12px 0;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

@keyframes news-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 720px) {
  .news-bar .wrap {
    gap: 10px;
  }

  .news-label {
    font-size: 13px;
    padding: 3px 10px;
  }

  .news-item {
    font-size: 14px;
    padding-right: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-viewport {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .news-track.is-scrolling {
    animation: none;
  }

  /* 不動的時候副本是多餘的，藏起來免得同一句話出現好幾次 */
  .news-item + .news-item {
    display: none;
  }
}

/* ---------- 側邊社群按鈕（每一頁都有，固定在畫面右緣） ----------
   咖啡色底＋白色圖示，跟頁尾的深色是同一個色系，不跟硃紅的電話按鈕搶。
   z-index 40 比導覽列的 50 低，捲到頂端時導覽列還是壓在上面。

   為什麼是「貼在導覽列下方」而不是垂直置中：畫面右緣垂直置中的位置
   已經被兩個既有元件佔走了——首頁 hero 的「下一張」箭頭、商品詳情頁的
   「下一個」三角鍵，兩者都是 position: fixed／absolute 且垂直置中，
   社群鈕擺在那裡會把它們整顆蓋掉。這兩個元件的實際 y 座標會隨視窗高度
   跟著 hero 高度變動，靠偏移量閃避在不同螢幕上會失準，所以改成固定貼在
   上方——那一帶只有背景圖，跟任何按鈕都不會撞，而且不必動到 hero。 */

.social-rail {
  position: fixed;
  right: 14px;
  top: calc(var(--nav-h) + 24px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 首頁導覽列下面還有一條最新消息跑馬燈，社群鈕要再往下讓開 */
body:has(.news-bar) .social-rail {
  top: calc(var(--nav-h) + 74px);
}

.social-rail a {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #5a3d24;
  color: #fff;
  font-size: 23px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(28, 22, 17, 0.28);
  transition: background 0.2s ease, transform 0.2s ease;
}

.social-rail a:hover,
.social-rail a:focus-visible {
  background: #744f2e;
  transform: translateX(-3px);
}

@media (max-width: 720px) {
  /* 手機畫面窄，直排會佔掉右邊一長條，改成橫排一列 */
  .social-rail {
    flex-direction: row;
    right: 10px;
    top: calc(var(--nav-h) + 12px);
    gap: 8px;
  }

  body:has(.news-bar) .social-rail {
    top: calc(var(--nav-h) + 58px);
  }

  .social-rail a {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

/* ---------- Hero carousel (home) ---------- */

.hero-carousel {
  position: relative;
  height: min(78vh, 720px);
  min-height: 460px;
  overflow: hidden;
  isolation: isolate;
}

.hero-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
  height: 100%;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 12, 8, 0.86) 0%, rgba(20, 12, 8, 0.42) 42%, rgba(20, 12, 8, 0.08) 68%);
}

.hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0 0 56px;
  pointer-events: none;
}

.hero-copy .wrap {
  pointer-events: auto;
}

.hero-copy h1 {
  color: #fff;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.25;
  margin-bottom: 16px;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 16.5px;
  max-width: 46ch;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(28, 17, 10, 0.42);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.hero-nav:hover {
  background: rgba(28, 17, 10, 0.68);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

@media (max-width: 720px) {
  .hero-carousel {
    height: 82vh;
    min-height: 520px;
  }

  .hero-copy {
    padding-bottom: 40px;
  }

  .hero-nav {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }
}

/* ---------- Category quick nav ---------- */

.cat-nav {
  padding: 46px 0 8px;
}

.cat-nav-row {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.cat-nav-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  width: 108px;
  text-align: center;
}

.cat-nav-thumb {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--line-strong), 0 10px 22px rgba(124, 28, 28, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-nav-item:hover .cat-nav-thumb {
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px var(--red-strong), 0 14px 26px rgba(124, 28, 28, 0.2);
}

.cat-nav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-nav-item span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
}

/* ---------- Section shell ---------- */

section {
  padding: 84px 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  border-bottom: none;
}

.section-head {
  max-width: 640px;
  margin-bottom: 46px;
}

.section-head h2 {
  font-size: clamp(27px, 3.1vw, 37px);
  margin-bottom: 14px;
}

.section-head p {
  color: var(--text-dim);
  font-size: 16px;
}

/* ---------- Pillars (bento 2x2) ---------- */

.pillars {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto;
  gap: 18px;
}

.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-end;
  min-height: 190px;
  position: relative;
  isolation: isolate;
}

.pillar:first-child {
  grid-row: span 2;
  min-height: 400px;
}

.pillar.has-photo {
  background-size: cover;
  background-position: center;
  color: #fff;
}

.pillar.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(190deg, rgba(28, 17, 10, 0.2) 10%, rgba(28, 17, 10, 0.88) 92%);
  border-radius: inherit;
}

.pillar.has-photo h3,
.pillar.has-photo p {
  color: #fff;
}

.pillar.has-photo p {
  color: rgba(255, 255, 255, 0.82);
}

a.pillar {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.pillar:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(124, 28, 28, 0.14);
}

.pillar-more {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--red-strong);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pillar.has-photo .pillar-more {
  color: #fff;
}

.pillar-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(194, 58, 44, 0.1);
  color: var(--red-strong);
  font-size: 22px;
  flex-shrink: 0;
}

.pillar.has-photo .pillar-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.pillar h3 {
  font-size: 20px;
}

.pillar p {
  color: var(--text-dim);
  font-size: 14.5px;
}

@media (max-width: 720px) {
  .pillars {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .pillar:first-child {
    grid-row: auto;
    min-height: 260px;
  }
}

/* ---------- Product tabs (pure CSS, no JS) ---------- */

.tabs-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.tabs-bar label {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tabs-bar label:hover {
  border-color: var(--red-strong);
  color: var(--red-strong);
}

.tab-panel {
  display: none;
}

#tab-featured:checked ~ .tabs-bar label[for="tab-featured"],
#tab-migruo:checked ~ .tabs-bar label[for="tab-migruo"],
#tab-mochi:checked ~ .tabs-bar label[for="tab-mochi"],
#tab-jisi:checked ~ .tabs-bar label[for="tab-jisi"],
#tab-season:checked ~ .tabs-bar label[for="tab-season"],
#tab-combo:checked ~ .tabs-bar label[for="tab-combo"] {
  background: var(--red-strong);
  border-color: var(--red-strong);
  color: #fff;
}

#tab-featured:checked ~ .tab-panels .panel-featured,
#tab-migruo:checked ~ .tab-panels .panel-migruo,
#tab-mochi:checked ~ .tab-panels .panel-mochi,
#tab-jisi:checked ~ .tab-panels .panel-jisi,
#tab-season:checked ~ .tab-panels .panel-season,
#tab-combo:checked ~ .tab-panels .panel-combo {
  display: block;
}

.cat-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 30px;
}

.cat-head img {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cat-head p {
  color: var(--text-dim);
  font-size: 15px;
}

.cat-intro {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 26px;
  max-width: 60ch;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

a.product-card,
a.combo-card,
a.rank-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

a.product-card:hover,
a.combo-card:hover,
a.rank-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 28px rgba(124, 28, 28, 0.1);
}

.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold);
}

.product-card h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.product-card .tags {
  font-size: 12.5px;
  color: var(--text-mute);
  margin-bottom: 10px;
}

.product-card .price {
  color: var(--red-strong);
  font-weight: 700;
  font-size: 15px;
}

.combo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.combo-card h4 {
  font-size: 17px;
  margin-bottom: 8px;
}

.combo-card p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 10px;
}

.combo-card .price {
  color: var(--red-strong);
  font-weight: 700;
  font-size: 15px;
}

/* 麻糬手作DIY 的小標。DIY 三款用的是與其他商品相同的 .product-grid／.product-card，
   只是沒有商品詳情頁，所以寫成 div 而不是 a（hover 效果只掛在 a.product-card 上）。 */
.diy-title {
  margin-top: 34px;
  margin-bottom: 16px;
  font-size: 19px;
}

/* ---------- Featured / ranked picks ---------- */

.rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.rank-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-card .rank-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.rank-card .rank-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red-strong);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-body {
  padding: 16px 18px 20px;
}

.rank-body h4 {
  font-size: 15.5px;
  margin-bottom: 6px;
}

.rank-body .price {
  color: var(--red-strong);
  font-weight: 700;
  font-size: 14.5px;
}

@media (max-width: 640px) {
  .cat-head {
    grid-template-columns: 1fr;
  }
}

/* ---------- Story timeline ---------- */

.story-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: start;
}

/* 只針對左欄那張大圖，不能寫成 .story-layout img，
   否則時間軸裡每一代的人物照也會跟著變成 sticky 黏在畫面上。 */
.story-layout > img {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line-strong);
}

.timeline li {
  position: relative;
  padding: 0 0 40px 32px;
  /* 每一代都有一張人物照，照片在左、文字在右；照片欄寬度固定，
     時間軸的圓點才會一直對齊在同一條線上。 */
  display: grid;
  grid-template-columns: 164px 1fr;
  gap: 24px;
  align-items: start;
}

.timeline-photo {
  width: 100%;
  /* 三張原圖比例不一樣（去背白底、直式、橫式都有），統一裁成 3:4，
     時間軸看起來才整齊。裁切位置偏上，優先保住人的臉。 */
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 30%;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red-strong);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-gen {
  color: var(--red-strong);
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.timeline li h3 {
  font-size: 21px;
  margin-bottom: 10px;
}

.timeline li p {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 54ch;
}

/* 全站 p 的 margin 被歸零，某一代的敘事拆成多段時要自己補段落間距。 */
.timeline li p + p {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .story-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .story-layout > img {
    position: static;
  }

  /* 窄螢幕：照片改成放在文字上方，不再擠成兩欄 */
  .timeline li {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .timeline-photo {
    max-width: 200px;
  }
}

/* ---------- Ingredients scroll ---------- */

/* 粿皮與內餡的介紹卡：一次全部排在頁面上，不做左右拉動。
   固定三欄，剛好讓三張「粿皮」排成第一列，六張「內餡」排成後面兩列。 */
.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .ingredient-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .ingredient-grid {
    grid-template-columns: 1fr;
  }
}

.ingredient-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}

.ingredient-card .kind {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--red-strong);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.ingredient-card h4 {
  font-size: 18px;
  margin-bottom: 10px;
}

.ingredient-card p {
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- Solar terms (jieqi) ---------- */

.season-tabs-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
}

.season-tabs-bar label {
  flex: 1;
  text-align: center;
  padding: 14px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.season-tabs-bar label .season-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}

.season-tabs-bar label .season-range {
  display: block;
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 3px;
}

#season-spring:checked ~ .season-tabs-bar label[for="season-spring"],
#season-summer:checked ~ .season-tabs-bar label[for="season-summer"],
#season-autumn:checked ~ .season-tabs-bar label[for="season-autumn"],
#season-winter:checked ~ .season-tabs-bar label[for="season-winter"] {
  background: var(--red-strong);
  border-color: var(--red-strong);
}

#season-spring:checked ~ .season-tabs-bar label[for="season-spring"] .season-name,
#season-spring:checked ~ .season-tabs-bar label[for="season-spring"] .season-range,
#season-summer:checked ~ .season-tabs-bar label[for="season-summer"] .season-name,
#season-summer:checked ~ .season-tabs-bar label[for="season-summer"] .season-range,
#season-autumn:checked ~ .season-tabs-bar label[for="season-autumn"] .season-name,
#season-autumn:checked ~ .season-tabs-bar label[for="season-autumn"] .season-range,
#season-winter:checked ~ .season-tabs-bar label[for="season-winter"] .season-name,
#season-winter:checked ~ .season-tabs-bar label[for="season-winter"] .season-range {
  color: #fff;
}

.season-panel {
  display: none;
}

#season-spring:checked ~ .season-panels .panel-spring,
#season-summer:checked ~ .season-panels .panel-summer,
#season-autumn:checked ~ .season-panels .panel-autumn,
#season-winter:checked ~ .season-panels .panel-winter {
  display: block;
}

.season-intro {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 68ch;
  margin-bottom: 30px;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.term-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.term-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.term-head h3 {
  font-size: 21px;
}

.term-head .term-date {
  font-size: 12.5px;
  color: var(--text-mute);
  white-space: nowrap;
}

.term-meaning {
  color: var(--text-dim);
  font-size: 14.5px;
  margin-bottom: 14px;
}

.term-food {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
}

.term-food strong {
  color: var(--red-strong);
  font-weight: 700;
}

.term-card details {
  font-size: 13.5px;
  color: var(--text-dim);
}

.term-card summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 600;
  font-size: 13px;
  list-style: none;
}

.term-card summary::-webkit-details-marker {
  display: none;
}

.term-card summary::after {
  content: "  ›";
}

.term-card details[open] summary::after {
  content: "  ⌄";
}

.term-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  margin-top: 12px;
}

.term-detail-grid dt {
  color: var(--text-mute);
  font-size: 12px;
}

.term-detail-grid dd {
  margin: 2px 0 0;
  color: var(--text-dim);
}

.jieqi-intro {
  max-width: 720px;
}

/* ---------- Product / positioning detail pages ---------- */

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 28px;
}

.detail-back:hover {
  color: var(--red-strong);
}

.detail-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 52px;
  align-items: start;
}

.detail-layout img {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  width: 100%;
  height: auto;
}

.detail-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--red-strong);
  background: rgba(194, 58, 44, 0.08);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  margin-bottom: 16px;
}

.detail-layout h1 {
  font-size: clamp(26px, 3.4vw, 36px);
  margin-bottom: 20px;
}

.detail-section {
  margin-bottom: 26px;
}

.detail-section h3 {
  font-size: 15px;
  color: var(--gold);
  margin-bottom: 8px;
}

.detail-section p {
  color: var(--text-dim);
  font-size: 15.5px;
  max-width: 58ch;
}

.spec-box {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 26px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-item .spec-label {
  font-size: 12.5px;
  color: var(--text-mute);
}

.spec-item .spec-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--red-strong);
  font-family: var(--font-display);
}

.spec-item .spec-note {
  font-size: 12.5px;
  color: var(--text-mute);
}

.detail-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* 商品詳情頁左右兩側的翻頁三角鍵（由 工具/產生商品頁.py 產生，
   只出現在 網站/products/ 底下的商品詳情頁）。
   白色圓鍵＋硃紅實心三角：頁面底色是米白，三角形本身若也用白色會看不見，
   所以「白色」指的是鍵，三角形用品牌的硃紅。 */
.side-pager .side-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 6px 18px rgba(28, 17, 10, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-strong);
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease, transform 0.15s ease;
}

.side-pager .side-prev {
  left: 22px;
}

.side-pager .side-next {
  right: 22px;
}

.side-pager .side-arrow:hover {
  background: var(--red-strong);
  border-color: var(--red-strong);
  color: #fff;
  box-shadow: 0 8px 22px rgba(194, 58, 44, 0.28);
}

.side-pager .side-prev:hover {
  transform: translateY(-50%) translateX(-3px);
}

.side-pager .side-next:hover {
  transform: translateY(-50%) translateX(3px);
}

/* 手機螢幕窄，鍵縮小並更貼邊，才不會壓到商品內容。 */
@media (max-width: 720px) {
  .side-pager .side-arrow {
    width: 40px;
    height: 40px;
    font-size: 19px;
  }

  .side-pager .side-prev {
    left: 8px;
  }

  .side-pager .side-next {
    right: 8px;
  }
}

.prose {
  max-width: 68ch;
}

.prose p {
  color: var(--text-dim);
  font-size: 16.5px;
  margin-bottom: 20px;
}

.prose p:last-child {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .detail-layout img {
    position: static;
  }
}

/* ---------- Contact ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info dl {
  margin: 0 0 28px;
}

.contact-info dt {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--red-strong);
  font-weight: 600;
  margin-bottom: 6px;
}

.contact-info dd {
  margin: 0 0 22px;
  font-size: 18px;
  color: var(--text);
}

.contact-info dd a {
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  display: inline-block;
  padding: 6px 0;
}

.contact-info dd a:hover {
  color: var(--red-strong);
  border-color: var(--red-strong);
}

.contact-info dd .muted {
  font-size: 15px;
  color: var(--text-mute);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* LINE 按鈕用咖啡色，跟側邊社群鈕同一個底色，不跟硃紅的電話按鈕搶主角 */
.btn-line {
  background: #5a3d24;
  color: #fff;
}

.btn-line:hover {
  background: #744f2e;
}

.btn-line img {
  flex-shrink: 0;
}

.contact-note {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--text-dim);
  max-width: 46ch;
}

.map-frame {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  min-height: 320px;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}

@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer (only dark section on the site, by design) ---------- */

.site-footer {
  --bg: var(--ink);
  --text: var(--cream-text);
  --text-dim: rgba(244, 234, 216, 0.72);
  --text-mute: rgba(244, 234, 216, 0.52);
  --line: var(--ink-line);
  background: var(--bg);
  color: var(--text);
  padding: 52px 0 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--cream-text);
  margin-bottom: 14px;
}

.footer-brand span {
  color: var(--gold-soft);
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-dim);
  max-width: 40ch;
  line-height: 1.9;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 14.5px;
}

.footer-links a:hover {
  color: var(--gold-soft);
}

.footer-meta {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 30px;
}

/* ---------- Phone popover (desktop only, see script.js) ----------
   On a mouse/desktop device, tel: links can't dial anything, so clicking
   one instead pops this small card with both numbers to read or copy.
   On touch devices this never fires; the tel: link dials normally. */

.phone-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.phone-popover-backdrop.is-open {
  display: block;
}

.phone-popover {
  position: fixed;
  z-index: 201;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-width: 250px;
  box-shadow: 0 22px 50px rgba(28, 17, 10, 0.22);
}

.phone-popover-title {
  font-size: 12.5px;
  color: var(--text-mute);
  margin-bottom: 10px;
  padding-right: 22px; /* keep the text clear of the close button */
}

.phone-popover-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--text-mute);
  cursor: pointer;
  padding: 4px;
}

.phone-popover-close:hover {
  color: var(--red-strong);
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  text-decoration: none;
  color: var(--text);
  border-top: 1px solid var(--line);
}

.phone-row:first-of-type {
  border-top: none;
  padding-top: 2px;
}

.phone-row:hover .phone-number {
  color: var(--red-bright);
}

.phone-row-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(194, 58, 44, 0.1);
  color: var(--red-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.phone-label {
  display: block;
  font-size: 12px;
  color: var(--text-mute);
}

.phone-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--red-strong);
}

/* ---------- 媒體報導（media.html） ----------
   卡片只放 YouTube 的官方縮圖，不嵌 iframe：嵌了會從 YouTube 拉一大包 script，
   拖慢頁面又多一堆第三方追蹤，點擊改成開新分頁到原始影片。 */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

a.media-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

a.media-card:hover,
a.media-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 28px rgba(124, 28, 28, 0.1);
}

.media-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

a.media-card:hover .media-thumb img {
  transform: scale(1.04);
}

/* 播放鍵：影音類的卡片才放。若之後加入純文字報導，那張卡把 .media-play 整段拿掉，
   讓人一眼分得出點下去是看影片還是讀文章。 */
.media-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.media-play i {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(194, 58, 44, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  padding-left: 4px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, background 0.18s ease;
}

a.media-card:hover .media-play i {
  transform: scale(1.08);
  background: var(--red-strong);
}

.media-body {
  padding: 18px 20px 20px;
}

.media-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-mute);
  margin-bottom: 8px;
}

.media-outlet {
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.media-kind {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  font-size: 11.5px;
}

.media-body h3 {
  font-size: 16.5px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.media-body p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 0;
}

.media-body .card-arrow {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .media-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .media-play i {
    width: 52px;
    height: 52px;
    font-size: 24px;
  }
}

/* ---------- Scroll reveal ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
