/* 古意人米粿 — 品牌形象網站
   配色來自品牌本色：紅麴取紅、糯米取白。
   底色改為米白，只有頁尾維持深色，全站僅此一處明暗反轉（刻意的收尾手法，非隨意切換）。
   字體維持 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-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;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    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: 400px;
  }

  .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;
  }

  .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;
}

/* ---------- 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-note {
  margin-top: 24px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: baseline;
}

.diy-note strong {
  color: var(--text);
  font-size: 15px;
}

.diy-note span {
  color: var(--text-dim);
  font-size: 14px;
}

/* ---------- 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 {
  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;
}

.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;
}

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

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

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

.ingredient-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}

.ingredient-scroll::-webkit-scrollbar {
  height: 6px;
}

.ingredient-scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

.ingredient-card {
  scroll-snap-align: start;
  flex: 0 0 236px;
  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;
}

.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);
}

.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);
}

/* ---------- 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;
  }
}
