/* =========================================================
   阿公那代冰 — 古早味剉冰店
   色票：米黃紙、朱紅、磁磚綠、冰薄荷、黑糖棕、墨
   ========================================================= */
:root {
  --paper: #F4EBD6;
  --paper-2: #EADCBC;
  --paper-3: #E0CDA4;
  --ink: #2A1E16;
  --ink-2: #4A3A2C;
  --ink-soft: #7A6650;
  --red: #B83A2E;
  --red-dark: #8E2A21;
  --teal: #2E7D73;
  --teal-dark: #1F5952;
  --mint: #A8D8CC;
  --mustard: #E3AE3C;
  --sugar: #6B3E22;

  --f-serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --f-hand: "LXGW WenKai TC", "Noto Serif TC", "DFKai-SB", "BiauKai", serif;

  --header-h: 76px;
  --awning-h: 22px;
  --wrap: 1200px;
  --radius: 4px;
  --shadow: 0 10px 30px rgba(42, 30, 22, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-serif);
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("../assets/art/paper.webp");
  background-size: 512px;
  line-height: 1.85;
  letter-spacing: .04em;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 900; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.vertical { writing-mode: vertical-rl; text-orientation: upright; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 共用圖樣（Gemini 圖未產生前，用 CSS 圖樣墊底） ---------- */
.bg-tile {
  background-color: var(--teal);
  background-image:
    url("../assets/art/pattern-tile.webp"),
    radial-gradient(circle at 50% 50%, var(--mustard) 0 9%, transparent 10%),
    radial-gradient(circle at 0 0, var(--paper) 0 18%, transparent 19%),
    radial-gradient(circle at 100% 0, var(--paper) 0 18%, transparent 19%),
    radial-gradient(circle at 0 100%, var(--paper) 0 18%, transparent 19%),
    radial-gradient(circle at 100% 100%, var(--paper) 0 18%, transparent 19%);
  background-size: 220px, 60px 60px, 60px 60px, 60px 60px, 60px 60px, 60px 60px;
}
.bg-window {
  background-color: var(--paper-2);
  background-image:
    url("../assets/art/pattern-window.webp"),
    repeating-linear-gradient(45deg, rgba(46,125,115,.22) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(-45deg, rgba(46,125,115,.22) 0 2px, transparent 2px 22px);
  background-size: 240px, auto, auto;
}

/* 遮雨棚（紅白條紋＋扇形下緣） */
.awning {
  height: var(--awning-h);
  background: repeating-linear-gradient(90deg, var(--red) 0 36px, var(--paper) 36px 72px);
  -webkit-mask: radial-gradient(18px 12px at 18px 10px, #000 99%, transparent 100%) 0 0 / 36px 100% repeat-x,
                linear-gradient(#000, #000) 0 0 / 100% 10px no-repeat;
          mask: radial-gradient(18px 12px at 18px 10px, #000 99%, transparent 100%) 0 0 / 36px 100% repeat-x,
                linear-gradient(#000, #000) 0 0 / 100% 10px no-repeat;
  filter: drop-shadow(0 3px 2px rgba(42,30,22,.25));
}

/* 印章 */
.seal {
  display: inline-grid; place-items: center;
  width: 2.2em; height: 2.2em;
  background: var(--red); color: var(--paper);
  font-family: var(--f-hand); font-weight: 700; font-size: .5em; line-height: 1;
  border-radius: 6px; transform: rotate(-6deg);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px var(--red);
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .75em 1.8em;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--ink); color: var(--paper);
  font-weight: 700; letter-spacing: .15em;
  transition: background .25s, color .25s, transform .25s;
}
.btn:hover { background: var(--red); border-color: var(--red); transform: translateY(-2px); }
.btn--red { background: var(--red); border-color: var(--red); }
.btn--red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { color: var(--paper); }
.btn--light { background: transparent; border-color: var(--paper); color: var(--paper); }
.btn--light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn::after { content: "→"; font-family: sans-serif; }

/* ---------- 產品照片預留位置 ---------- */
.ph {
  position: relative; margin: 0;
  aspect-ratio: var(--ratio, 4 / 3);
  display: grid; place-content: center; gap: .3em; text-align: center;
  padding: 1em;
  background:
    repeating-linear-gradient(-45deg, rgba(184,58,46,.07) 0 12px, transparent 12px 24px),
    var(--paper-2);
  border: 2px dashed rgba(184,58,46,.55);
  color: var(--red-dark);
  overflow: hidden;
  background-size: cover; background-position: center;
}
.ph .ph-tag {
  justify-self: center;
  font-size: .72rem; letter-spacing: .25em;
  padding: .15em .8em; border-radius: 99px;
  background: var(--red); color: var(--paper);
}
.ph .ph-name { font-family: var(--f-hand); font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.ph .ph-file { font-size: .7rem; color: var(--ink-soft); letter-spacing: .05em; font-family: ui-monospace, Consolas, monospace; }
.ph.has-img { border: 0; }
.ph.has-img > :not(img) { display: none; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: transform .35s;
}
.site-header__bar {
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
  display: flex; align-items: center;
}
.site-header__bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(1400px, 100% - 32px); }
.site-header.is-hidden { transform: translateY(calc(-100% - 4px)); }

.logo { display: flex; align-items: center; gap: 12px; }
.logo__emblem {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--red) url("../assets/art/emblem.webp") center/cover;
  border: 3px solid var(--ink);
  display: grid; place-items: center;
  color: var(--paper); font-family: var(--f-hand); font-weight: 700; font-size: 1.15rem; line-height: 1;
}
.logo__emblem span { writing-mode: vertical-rl; letter-spacing: 0; }
.logo__emblem.has-img span { display: none; }
.logo__text { display: grid; line-height: 1.1; }
.logo__name { font-size: 1.55rem; font-weight: 900; letter-spacing: .12em; }
.logo__sub { font-size: .62rem; letter-spacing: .32em; color: var(--red); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__item { position: relative; }
.nav__link {
  display: block; padding: 10px 14px;
  font-weight: 700; letter-spacing: .12em; font-size: .98rem;
  border-radius: var(--radius);
  transition: color .2s, background .2s;
}
.nav__link:hover, .nav__item.is-active > .nav__link { color: var(--red); }
.nav__item.is-active > .nav__link { background: rgba(184,58,46,.08); }
.nav__sub {
  position: absolute; top: 100%; left: 50%; min-width: 150px;
  translate: -50% 8px; opacity: 0; visibility: hidden;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; transition: .2s;
}
.nav__item:hover .nav__sub, .nav__item:focus-within .nav__sub { opacity: 1; visibility: visible; translate: -50% 2px; }
.nav__sub a { display: block; padding: 6px 12px; font-size: .9rem; white-space: nowrap; border-radius: 3px; }
.nav__sub a:hover { background: var(--red); color: var(--paper); }

.burger {
  display: none; width: 48px; height: 48px; border: 2px solid var(--ink); background: transparent; border-radius: var(--radius);
  position: relative;
}
.burger span, .burger::before, .burger::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: .3s;
}
.burger::before { top: 15px; } .burger span { top: 22px; } .burger::after { top: 29px; }
body.menu-open .burger::before { top: 22px; rotate: 45deg; }
body.menu-open .burger::after { top: 22px; rotate: -45deg; }
body.menu-open .burger span { opacity: 0; }

/* 手機版選單：像老店掛牆的直式價目木牌 */
.mobile-menu {
  position: fixed; inset: calc(var(--header-h)) 0 0; z-index: 90;
  background: var(--ink); color: var(--paper);
  display: flex; flex-direction: row-reverse; justify-content: center; gap: 10px;
  padding: 48px 16px; overflow-x: auto;
  opacity: 0; visibility: hidden; transition: .3s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu a {
  writing-mode: vertical-rl; text-orientation: upright;
  background: var(--paper); color: var(--ink);
  padding: 22px 10px; border-radius: 3px;
  font-size: 1.2rem; font-weight: 900; letter-spacing: .4em;
  box-shadow: 0 4px 0 var(--sugar);
  align-self: flex-start;
}
.mobile-menu a.is-active { background: var(--red); color: var(--paper); }

/* 右側固定直式標籤 */
.side-tabs { position: fixed; right: 0; top: 50%; translate: 0 -50%; z-index: 80; display: grid; gap: 10px; }
.side-tabs a {
  writing-mode: vertical-rl; text-orientation: upright;
  padding: 18px 10px; color: var(--paper);
  font-weight: 900; letter-spacing: .35em; font-size: .95rem;
  border-radius: 6px 0 0 6px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px;
  transition: padding .25s;
}
.side-tabs a small { text-orientation: mixed; font-size: .6rem; letter-spacing: .25em; opacity: .8; }
.side-tabs a:hover { padding-right: 18px; }
.side-tabs .is-menu { background: var(--teal); }
.side-tabs .is-join { background: var(--red); }

/* 浮動按鈕 */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 10px; }
.fab a, .fab button {
  width: 52px; height: 52px; border-radius: 50%; border: 0;
  display: grid; place-items: center; box-shadow: var(--shadow);
  font-weight: 900; font-size: .8rem;
}
.fab .is-line { background: #06C755; color: #fff; }
.fab .is-top { background: var(--ink); color: var(--paper); opacity: 0; visibility: hidden; transition: .3s; }
body.scrolled .fab .is-top { opacity: 1; visibility: visible; }

main { padding-top: calc(var(--header-h) + 3px); }

/* =========================================================
   區塊標題
   ========================================================= */
.sec { position: relative; padding: clamp(64px, 9vw, 120px) 0; }
.sec-title { text-align: center; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-title h2 {
  display: inline-flex; align-items: center; gap: .3em;
  font-family: var(--f-hand); font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: .18em;
}
.sec-title h2 .seal { font-size: .5em; }
.sec-title p { margin: .6em 0 0; color: var(--ink-soft); letter-spacing: .2em; }
.sec-title .en { display: block; font-size: .72rem; letter-spacing: .5em; color: var(--red); font-weight: 700; margin-bottom: .4em; }
.sec-title--light h2, .sec-title--light p { color: var(--paper); }
.sec-title--light .en { color: var(--mustard); }

/* =========================================================
   首頁：主視覺輪播
   ========================================================= */
.hero { position: relative; height: calc(100svh - var(--header-h)); min-height: 520px; max-height: 900px; overflow: hidden; background: var(--ink); }
.hero__slide {
  position: absolute; inset: 0;
  background: var(--art) center/cover no-repeat, var(--fallback);
  opacity: 0; transition: opacity 1.2s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide.is-active .hero__copy { animation: rise 1.2s .2s both; }
.hero__slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(42,30,22,.55), transparent 55%); }
.hero__inner { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; width: min(1400px, 100% - 32px); margin-inline: auto; padding-top: var(--awning-h); }
.hero__copy { display: flex; flex-direction: row-reverse; align-items: flex-start; gap: 22px; }
/* 春聯式紅紙直書 */
.hero__couplet {
  writing-mode: vertical-rl; text-orientation: upright;
  background: var(--red); color: var(--paper);
  padding: 28px 18px; border-radius: 3px;
  font-family: var(--f-hand); font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 3rem); letter-spacing: .25em; line-height: 1.25;
  box-shadow: 6px 8px 0 rgba(42,30,22,.35);
  position: relative;
}
.hero__couplet::before { content: ""; position: absolute; inset: 7px; border: 1.5px solid rgba(244,235,214,.6); }
.hero__couplet--paper { background: var(--paper); color: var(--ink); font-size: clamp(1rem, 1.6vw, 1.25rem); padding: 20px 12px; letter-spacing: .3em; margin-top: 60px; }
.hero__couplet--paper::before { border-color: rgba(42,30,22,.3); }
.hero__inner { padding-left: clamp(0px, 4vw, 60px); }
.hero__dots { position: absolute; left: clamp(16px, 4vw, 60px); bottom: 30px; z-index: 3; display: flex; gap: 14px; }
.hero__dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--paper); background: transparent; padding: 0; }
.hero__dots button.is-active { background: var(--paper); }
.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; translate: -50% 0; z-index: 3;
  color: var(--paper); font-size: .7rem; letter-spacing: .4em; display: grid; justify-items: center; gap: 6px;
}
.hero__scroll::after { content: ""; width: 1px; height: 38px; background: var(--paper); animation: drip 1.8s infinite; transform-origin: top; }
.awning--hero { position: absolute; top: 0; left: 0; right: 0; z-index: 4; }

@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* =========================================================
   首頁：最新消息
   ========================================================= */
.news-sec { background: var(--paper); }
.news-layout { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 60px); align-items: start; }
.news-head { display: flex; flex-direction: row-reverse; gap: 14px; }
.news-head h2 {
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: var(--f-hand); font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: .25em;
  color: var(--ink);
}
.news-head p { writing-mode: vertical-rl; text-orientation: upright; margin: 1.2em 0 0; color: var(--ink-soft); letter-spacing: .3em; font-size: .9rem; }
.news-head .seal { font-size: 1.6rem; margin-top: .4em; }

.carousel { position: relative; }
.carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 24px) / 3);
  gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: 8px; scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
.carousel__nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.carousel__nav button {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; font-family: sans-serif; font-size: 1.1rem;
  transition: .2s;
}
.carousel__nav button:hover { background: var(--ink); color: var(--paper); }

.news-card { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
.news-card:hover { transform: translateY(-6px); box-shadow: 8px 10px 0 var(--ink); }
.news-card .ph { border-width: 0 0 2px; border-style: solid; border-color: var(--ink); }
.news-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card__meta { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--ink-soft); }
.tag { background: var(--teal); color: var(--paper); padding: .1em .7em; border-radius: 99px; font-size: .72rem; letter-spacing: .15em; }
.tag--red { background: var(--red); }
.tag--mustard { background: var(--mustard); color: var(--ink); }
.news-card h3 { font-size: 1.12rem; }
.news-card p { font-size: .9rem; color: var(--ink-2); margin: 0; }
.news-card__more { margin-top: auto; font-weight: 700; color: var(--red); font-size: .88rem; }

/* =========================================================
   首頁：品牌介紹
   ========================================================= */
.brand-sec { padding: 0; }
.brand-grid { display: grid; grid-template-columns: 1fr minmax(320px, 620px) 1fr; min-height: 760px; }
.brand-art { background: var(--art) center/cover no-repeat, var(--fallback); }
.brand-card {
  margin: clamp(40px, 6vw, 80px) 0; position: relative; z-index: 2;
  background: var(--paper); color: var(--ink);
  padding: clamp(36px, 5vw, 56px) clamp(24px, 4vw, 52px);
  text-align: center; box-shadow: var(--shadow);
  outline: 3px solid var(--red); outline-offset: -14px;
}
.brand-card::before { content: ""; position: absolute; inset: 20px; border: 1px solid rgba(184,58,46,.4); pointer-events: none; }
.brand-card__emblem { width: 120px; height: 120px; margin: 0 auto 18px; }
.brand-card__emblem .logo__emblem { width: 100%; height: 100%; font-size: 2.2rem; border-width: 4px; }
.brand-card h2 { font-family: var(--f-hand); font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: .15em; margin-bottom: .2em; }
.brand-card h2 + .lead { color: var(--red); font-weight: 700; letter-spacing: .3em; font-size: .92rem; }
.brand-card hr { border: 0; border-top: 1px dashed rgba(42,30,22,.35); margin: 22px 0; }
.brand-card p { color: var(--ink-2); font-size: .98rem; }
.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 26px 0 30px; }
.promise { display: grid; justify-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .08em; }
.promise__icon {
  --art: none;
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--paper-2) var(--art) center/cover; border: 2px solid var(--red);
  display: grid; place-items: center; color: var(--red); font-family: var(--f-hand); font-size: 1.6rem; font-weight: 700;
}
.promise__icon.has-img { color: transparent; }

/* =========================================================
   首頁：古早配料（橫向滑動）
   ========================================================= */
.topping-sec { background: var(--ink); color: var(--paper); overflow: hidden; }
.topping-sec::before { content: ""; position: absolute; inset: 0 0 auto; height: 14px; }
.topping-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(320px, 38vw, 540px);
  gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding-left: max(16px, calc((100vw - var(--wrap)) / 2));
}
.topping-track::-webkit-scrollbar { display: none; }
.topping {
  scroll-snap-align: start;
  display: grid; grid-template-columns: 1fr auto; border-right: 1px solid rgba(244,235,214,.15);
  height: clamp(440px, 46vw, 580px);
}
.topping .ph { aspect-ratio: auto; height: 100%; border: 0; background-color: #3a2c22; color: var(--paper); }
.topping .ph .ph-name { color: var(--paper); }
.topping .ph .ph-file { color: rgba(244,235,214,.6); }
.topping__text {
  writing-mode: vertical-rl; text-orientation: upright;
  padding: 30px 22px; height: 100%; overflow: hidden;
  background: #33261d;
}
.topping__cat { display: block; color: var(--mustard); font-size: .85rem; letter-spacing: .3em; margin-left: 12px; }
.topping__name { font-family: var(--f-hand); font-size: 1.7rem; letter-spacing: .25em; margin-left: 16px; }
.topping__desc { font-size: .9rem; line-height: 2; color: rgba(244,235,214,.82); margin: 0; letter-spacing: .12em; }
.topping-nav { display: flex; justify-content: center; gap: 12px; margin-top: 36px; }
.topping-nav button { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--paper); background: transparent; color: var(--paper); font-family: sans-serif; font-size: 1.2rem; }
.topping-nav button:hover { background: var(--paper); color: var(--ink); }

/* =========================================================
   首頁：人氣冰品
   ========================================================= */
.signature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.ice-card { position: relative; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 12px 12px 20px; transition: transform .3s, box-shadow .3s; }
.ice-card:hover { transform: rotate(-1deg) translateY(-6px); box-shadow: 8px 10px 0 var(--teal); }
.ice-card .ph { --ratio: 1 / 1; }
.ice-card h3 { font-family: var(--f-hand); font-size: 1.3rem; margin: 16px 0 6px; letter-spacing: .12em; }
.ice-card p { font-size: .88rem; color: var(--ink-2); margin: 0; }
.ice-card .price {
  position: absolute; top: -14px; right: -10px;
  background: var(--red); color: var(--paper); border-radius: 50%;
  width: 66px; height: 66px; display: grid; place-items: center; text-align: center;
  font-weight: 900; font-size: .8rem; line-height: 1.15; rotate: 10deg; box-shadow: 3px 4px 0 var(--ink);
}
.ice-card .badge { position: absolute; z-index: 2; top: 26px; left: -8px; box-shadow: 2px 2px 0 var(--ink); background: var(--mustard); color: var(--ink); font-size: .72rem; font-weight: 900; padding: 2px 10px; letter-spacing: .15em; }

/* =========================================================
   首頁：加盟
   ========================================================= */
.join-sec { color: var(--paper); background: var(--ink); padding: 0; }
.join-hero {
  position: relative; padding: clamp(60px, 8vw, 110px) 0;
  background: linear-gradient(90deg, rgba(42,30,22,.92) 0 45%, rgba(42,30,22,.35)), var(--art) center/cover, var(--fallback);
}
.join-hero__copy { max-width: 560px; }
.join-hero h2 { font-family: var(--f-hand); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: .2em; display: flex; align-items: center; gap: .3em; margin-bottom: .5em; }
.join-hero h2 .seal { font-size: .45em; }
.join-hero .lead { color: var(--mustard); font-weight: 700; letter-spacing: .15em; }
.join-hero p { color: rgba(244,235,214,.86); }
.join-plans { display: grid; grid-template-columns: 1fr 1fr; }
.join-plan { padding: clamp(32px, 4vw, 56px) clamp(20px, 4vw, 60px); display: grid; gap: 10px; align-content: start; }
.join-plan:nth-child(1) { background: var(--teal); }
.join-plan:nth-child(2) { background: var(--red); }
.join-plan h3 { font-family: var(--f-hand); font-size: 1.7rem; letter-spacing: .2em; }
.join-plan p { margin: 0 0 12px; color: rgba(244,235,214,.9); }
.join-plan .btn { justify-self: start; }

/* =========================================================
   門市據點
   ========================================================= */
.store-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 34px; }
.store-tabs button {
  padding: .6em 1.6em; border: 2px solid var(--ink); background: var(--paper); border-radius: 99px;
  font-weight: 700; letter-spacing: .15em; transition: .2s;
}
.store-tabs button.is-active, .store-tabs button:hover { background: var(--ink); color: var(--paper); }
.store-panel { display: none; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 52px); align-items: center; }
.store-panel.is-active { display: grid; animation: rise .6s both; }
.store-panel .ph { --ratio: 4 / 3; }
.store-info h3 { font-family: var(--f-hand); font-size: 1.9rem; letter-spacing: .15em; margin-bottom: 12px; }
.store-info dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 24px; }
.store-info dt { font-weight: 900; color: var(--red); letter-spacing: .2em; }
.store-info dd { margin: 0; }
.store-info .btns { display: flex; flex-wrap: wrap; gap: 12px; }
.todo { background: rgba(227,174,60,.35); padding: 0 .3em; border-radius: 2px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--ink); color: rgba(244,235,214,.82); font-size: .9rem; }
.site-footer__band { height: 46px; }
.site-footer__main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.site-footer h4 { color: var(--paper); font-size: 1rem; letter-spacing: .25em; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(244,235,214,.2); }
.site-footer .logo__name { color: var(--paper); }
.site-footer .logo__sub { color: var(--mustard); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a:hover { color: var(--mustard); }
.site-footer__social { display: flex; gap: 10px; margin-top: 14px; }
.site-footer__social a { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(244,235,214,.5); display: grid; place-items: center; font-size: .72rem; font-weight: 900; }
.site-footer__bottom { border-top: 1px solid rgba(244,235,214,.15); padding: 18px 0; font-size: .78rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: rgba(244,235,214,.55); }

/* =========================================================
   內頁共用
   ========================================================= */
.page-banner {
  position: relative; height: clamp(240px, 32vw, 380px);
  background: var(--art) center/cover no-repeat, var(--fallback);
  display: grid; place-items: center;
}
.page-banner::before { content: ""; position: absolute; inset: 0; background: rgba(42,30,22,.35); }
.page-banner .awning { position: absolute; inset: 0 0 auto; }
.page-banner__title {
  position: relative; z-index: 2; text-align: center;
  background: var(--paper); padding: 18px 40px 14px; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--red);
}
.page-banner__title h1 { font-family: var(--f-hand); font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: .3em; }
.page-banner__title span { font-size: .7rem; letter-spacing: .5em; color: var(--red); font-weight: 700; }
.crumbs { font-size: .8rem; color: var(--ink-soft); padding: 18px 0 0; letter-spacing: .1em; }
.crumbs a:hover { color: var(--red); }
.crumbs + .sec { padding-top: clamp(40px, 5vw, 64px); }

.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 40px; }
.filter-tabs button { padding: .5em 1.4em; border: 2px solid var(--ink); background: transparent; border-radius: 99px; font-weight: 700; letter-spacing: .12em; transition: .2s; }
.filter-tabs button.is-active, .filter-tabs button:hover { background: var(--red); border-color: var(--red); color: var(--paper); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }

/* 菜單頁：老店價目表 */
.menu-board { background: var(--sugar); padding: clamp(24px, 4vw, 44px); border-radius: 6px; border: 6px solid #4b2b17; box-shadow: var(--shadow); color: var(--paper); }
.menu-board h3 { font-family: var(--f-hand); text-align: center; font-size: 1.6rem; letter-spacing: .3em; margin-bottom: 24px; }
.menu-board__list { display: flex; flex-direction: row-reverse; flex-wrap: wrap; justify-content: center; gap: 12px; }
.menu-plaque {
  writing-mode: vertical-rl; text-orientation: upright;
  background: var(--paper); color: var(--ink); padding: 18px 10px; border-radius: 3px;
  font-weight: 900; letter-spacing: .3em; font-size: 1.1rem;
  box-shadow: 0 4px 0 #3b2212; display: flex; justify-content: space-between; gap: 18px; min-height: 260px;
}
.menu-plaque small { color: var(--red); letter-spacing: .1em; text-orientation: mixed; font-size: .85rem; }

.menu-item { display: grid; gap: 10px; }
.menu-item .ph { --ratio: 1 / 1; }
.menu-item h3 { font-family: var(--f-hand); font-size: 1.25rem; letter-spacing: .1em; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.menu-item h3 small { font-family: var(--f-serif); color: var(--red); font-size: .9rem; white-space: nowrap; }
.menu-item p { font-size: .88rem; color: var(--ink-2); margin: 0; }
.menu-cat { scroll-margin-top: calc(var(--header-h) + 20px); }
.menu-cat + .menu-cat { margin-top: 80px; }
.menu-cat__head { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.menu-cat__head h2 { font-family: var(--f-hand); font-size: 2rem; letter-spacing: .2em; }
.menu-cat__head::after { content: ""; flex: 1; border-top: 2px dashed var(--ink); }

/* 時間軸 */
.timeline { position: relative; display: grid; gap: 40px; padding-left: 40px; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; border-left: 3px dotted var(--red); }
.timeline__item { position: relative; display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: center; }
.timeline__item::before { content: ""; position: absolute; left: -36px; top: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--red); }
.timeline__year { font-family: var(--f-hand); font-size: 2rem; color: var(--red); font-weight: 700; }
.timeline__item h3 { font-size: 1.25rem; margin: 2px 0 8px; }

/* 步驟 */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: s; }
.step { background: var(--paper); border: 2px solid var(--ink); padding: 26px 14px 20px; text-align: center; position: relative; border-radius: var(--radius); }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -18px; left: 50%; translate: -50% 0; width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: var(--paper); display: grid; place-items: center; font-weight: 900; }
.step h3 { font-size: 1.05rem; letter-spacing: .15em; margin-bottom: 6px; }
.step p { font-size: .82rem; margin: 0; color: var(--ink-2); }

/* 優勢卡 */
.feature { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 28px 24px; display: grid; gap: 10px; justify-items: start; }
.feature .promise__icon { width: 64px; height: 64px; font-size: 1.4rem; }
.feature h3 { font-size: 1.15rem; letter-spacing: .12em; }
.feature p { margin: 0; font-size: .9rem; color: var(--ink-2); }

/* 表單 */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; background: var(--paper); border: 2px solid var(--ink); padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); box-shadow: 10px 10px 0 var(--teal); }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; letter-spacing: .1em; }
.form label.full { grid-column: 1 / -1; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: .7em .9em; border: 2px solid var(--ink-soft); border-radius: var(--radius); background: #FBF6EA; color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px rgba(184,58,46,.15); }
.form textarea { min-height: 150px; resize: vertical; }
.form .req { color: var(--red); }
.form__actions { grid-column: 1 / -1; display: flex; justify-content: center; }
.form__note { grid-column: 1 / -1; font-size: .8rem; color: var(--ink-soft); text-align: center; margin: 0; }

/* 徵才 */
.job { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 2px dashed rgba(42,30,22,.3); }
.job__type { writing-mode: vertical-rl; text-orientation: upright; background: var(--teal); color: var(--paper); padding: 12px 6px; font-weight: 900; letter-spacing: .25em; border-radius: 3px; }
.job__type.is-part { background: var(--mustard); color: var(--ink); }
.job h3 { font-size: 1.25rem; margin-bottom: 4px; }
.job ul { margin: 0; padding-left: 1.2em; font-size: .9rem; color: var(--ink-2); }

/* 文章列表 */
.news-list { display: grid; gap: 0; }
.news-row { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 28px 0; border-bottom: 2px dashed rgba(42,30,22,.25); align-items: center; }
.news-row .ph { --ratio: 4 / 3; }
.news-row h3 { font-size: 1.25rem; margin: 6px 0; }
.news-row p { color: var(--ink-2); font-size: .92rem; margin: 0 0 8px; }
.news-row[hidden] { display: none; }

/* 進場動畫 */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease var(--d, 0ms), transform .9s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   RWD
   ========================================================= */
@media (max-width: 1180px) {
  .nav { display: none; }
  .burger { display: block; }
  .signature-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-grid { grid-template-columns: .5fr minmax(320px, 620px) .5fr; }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 34px; }
}
@media (max-width: 900px) {
  .carousel__track { grid-auto-columns: calc((100% - 24px) / 2); }
  .brand-grid { grid-template-columns: 1fr; min-height: 0; }
  .brand-art { display: none; }
  .brand-card { margin: 0; outline-offset: -10px; }
  .store-panel, .grid-2 { grid-template-columns: 1fr; }
  .site-footer__main { grid-template-columns: 1fr 1fr; }
  .site-footer__main > :first-child { grid-column: 1 / -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .timeline__item { grid-template-columns: 1fr; }
  .news-row { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .logo__emblem { width: 44px; height: 44px; font-size: .95rem; }
  .logo__name { font-size: 1.25rem; }
  .logo__sub { font-size: .5rem; letter-spacing: .12em; white-space: nowrap; }
  .side-tabs { display: none; }
  .news-layout { grid-template-columns: 1fr; }
  .news-head { flex-direction: row; justify-content: center; }
  .news-head h2, .news-head p { writing-mode: horizontal-tb; }
  .news-head { flex-direction: column; align-items: center; text-align: center; }
  .news-head p { margin: 0; }
  .carousel__track { grid-auto-columns: 82%; }
  .promises { grid-template-columns: repeat(2, 1fr); }
  .topping-track { grid-auto-columns: 86%; }
  .topping__name { font-size: 1.4rem; }
  .join-plans { grid-template-columns: 1fr; }
  .join-hero { background: linear-gradient(rgba(42,30,22,.82), rgba(42,30,22,.82)), var(--art) center/cover, var(--fallback); }
  .signature-grid { gap: 16px; }
  .ice-card .price { width: 54px; height: 54px; font-size: .7rem; right: -6px; }
  .grid-3 { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .job { grid-template-columns: auto 1fr; }
  .job .btn { grid-column: 1 / -1; justify-self: start; }
  .hero__couplet--paper { display: none; }
  .site-footer__main { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .signature-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* 視差 */
.hero__slide { transform: translateY(var(--py, 0px)); }
.hero { --py: 0px; }
.brand-art, .join-hero { background-position: center var(--art-y, 50%) !important; }
/* 單一門市時不留分頁按鈕的空位 */
.store-tabs:empty { display: none; }
.menu-plaque small { display: block; }

/* 產品照是真實圖片，搜尋引擎才讀得到 */
.ph { position: relative; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* 店家 logo */
.logo__img { display: block; height: 68px; width: auto; }
.logo--plate { display: inline-flex; padding: 10px 14px; background: var(--paper); border-radius: var(--radius); }
.logo--plate .logo__img { height: 110px; }
.brand-card__logo { display: block; width: min(240px, 70%); height: auto; margin: 0 auto 8px; }
@media (max-width: 760px) { .logo__img { height: 52px; } .logo--plate .logo__img { height: 96px; } }

/* 店名字級 */
.logo .logo__name { font-size: 2.1rem; white-space: nowrap; }
@media (max-width: 760px) { .logo .logo__name { font-size: 1.6rem; } }

/* 內容區底色：有文字的區塊不放花磚，花磚只留給頁尾裝飾帶 */
.sec.bg-window { background: #EADFC6; }

/* 價格與標籤在照片上方 */
.ice-card .price, .ice-card .badge { z-index: 2; }

/* 卡片避開右側標籤 */
@media (min-width: 761px) and (max-width: 1420px) { #signature .wrap { padding-left: 72px; padding-right: 72px; } }

/* 已結束的活動 */
.tag.tag--ended { background: #6f6257; color: #fff; }
.news-card:has(.tag--ended) .ph img, .news-row:has(.tag--ended) .ph img { opacity: .45; filter: grayscale(.7); }

/* 加料區木牌 */
.menu-plaque {
  background: #d9b27c url("../assets/art/wood-plaque.webp") 0 0 / 300px auto;
  color: #2f1b0e;
  text-shadow: 0 1px 0 rgba(255, 240, 210, .55);
  box-shadow: 0 4px 0 #3b2212, inset 0 0 0 1px rgba(70, 40, 15, .35), inset 0 0 14px rgba(70, 40, 15, .22);
}
.menu-plaque:nth-child(2n) { background-position: -70px -120px; }
.menu-plaque:nth-child(3n) { background-position: -150px -260px; }
.menu-plaque:nth-child(5n) { background-position: -210px -60px; }

/* 木牌字級 */
.menu-plaque { font-size: 1.55rem; padding: 18px 12px; }
