/* 色票取自北投：地熱谷的青磺水、硫磺黃（也是蛋黃）、陽明山的綠、溫泉旅館的檜木 */
:root {
  --paper: #EEF5F1;
  --sky: #D5EAE2;
  --ink: #1F2B26;
  --moss: #355E4B;
  --muted: #56685F;
  --line: #B4CEC2;
  --sulfur: #EBC23F;
  --hinoki: #D9AD72;
  --wood-dark: #8A5A32;

  --font-body: "Huninn", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-brush: "LXGW WenKai TC", "Kaiti TC", "BiauKai", "DFKai-SB", serif;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--moss); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--wood-dark); outline-offset: 2px; border-radius: 4px; }

/* ---------- 開頭：陽明山下的早餐攤 ---------- */

.hero {
  position: relative;
  background: var(--sky);
}

.scene {
  display: block;
  width: 100%;
  /* 高度跟著寬度走，螢幕比畫面寬的時候，左右兩邊延伸出去的山會補滿 */
  height: min(63.6vw, 520px);
}

.scene-label {
  font-family: var(--font-brush);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 6px;
  fill: #5A3A1E;
}

/* 舊溫泉旅館門口那種直式木牌 */
.signboard {
  position: absolute;
  top: 0;
  left: max(12px, calc(50% - 400px));
  z-index: 1;
  margin: 0;
  padding: 0.7em 0.35em 0.8em;
  writing-mode: vertical-rl;
  font-family: var(--font-brush);
  font-weight: 700;
  font-size: clamp(1.75rem, 7.5vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0.12em;
  color: #3D2612;
  background:
    repeating-linear-gradient(90deg, transparent 0 7px, rgb(138 90 50 / 0.12) 7px 8px),
    var(--hinoki);
  border: 3px solid var(--wood-dark);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 0 rgb(61 38 18 / 0.18);
}

.steam path {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: rise 5.5s ease-in-out infinite;
  opacity: 0;
}
.steam path:nth-child(2) { animation-delay: 1.8s; }
.steam path:nth-child(3) { animation-delay: 3.6s; }

@keyframes rise {
  0%   { transform: translateY(10px) scaleY(0.8); opacity: 0; }
  35%  { opacity: 0.85; }
  100% { transform: translateY(-26px) scaleY(1.1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .steam path { animation: none; opacity: 0.7; }
}

/* 溫泉水面，接到下面的菜單 */
.spring-edge {
  display: block;
  width: 100%;
  height: 18px;
  margin-top: -17px;
  position: relative;
  fill: var(--paper);
}

.intro {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 20px;
}
.intro p { margin: 0; font-size: 1.2rem; }
.map-link { font-size: 1rem; }

/* ---------- 首頁菜單大類 ---------- */

[hidden] { display: none !important; }

.menu-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 16px 30px;
  scroll-margin-top: 12px;
}

.menu-heading { margin-bottom: 16px; }
.eyebrow {
  margin: 0 0 2px;
  color: var(--wood-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.menu-heading h2,
.detail-header h2 {
  margin: 0;
  font-family: var(--font-brush);
  font-size: clamp(1.8rem, 6vw, 2.45rem);
  line-height: 1.2;
  color: var(--moss);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  --card-color: #E2EFE9;
  min-height: 152px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--ink);
  background: var(--card-color);
  border: 1.5px solid var(--line);
  border-radius: 18px 7px 18px 7px;
  text-decoration: none;
  box-shadow: 0 4px 0 rgb(53 94 75 / 0.1);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.category-card:nth-child(3n + 2) { --card-color: #F6E8B8; }
.category-card:nth-child(3n) { --card-color: #EBDCC8; }
.category-card:first-child {
  grid-column: 1 / -1;
  min-height: 132px;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  background: var(--moss);
  color: #fff;
  border-color: var(--moss);
  border-radius: 7px 22px 7px 22px;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgb(53 94 75 / 0.12);
}
.category-card__icon {
  width: 58px;
  height: 58px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--moss);
}
.category-card:first-child .category-card__icon {
  width: 72px;
  height: 72px;
  color: var(--sulfur);
}
.category-card__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: auto;
}
.category-card:first-child .category-card__copy { margin-top: 0; }
.category-card__copy strong {
  font-family: var(--font-brush);
  font-size: 1.38rem;
  line-height: 1.25;
}
.category-card__copy small {
  margin-top: 3px;
  color: inherit;
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 0.76;
}
.category-card__arrow {
  align-self: flex-end;
  font-family: sans-serif;
  font-size: 1.8rem;
  line-height: 1;
}
.category-card:first-child .category-card__arrow { align-self: center; }

@media (min-width: 720px) {
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .category-card:first-child { grid-column: span 2; }
}

/* ---------- 第二層：細項 ---------- */

.menu-detail { max-width: 760px; margin: 0 auto; }
.detail-header {
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--line);
}
.back-link {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}
.detail-header__title { display: flex; align-items: center; gap: 10px; }
.detail-header__icon {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: var(--moss);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.detail-header > p { margin: 5px 0 0 62px; color: var(--muted); font-size: 0.95rem; }
.detail-body { padding-top: 20px; }
.detail-prompt {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}
.base-tabs {
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 0 16px 11px;
  overflow-x: auto;
  scrollbar-width: none;
}
.base-tabs::-webkit-scrollbar { display: none; }
.base-tab {
  flex: none;
  padding: 8px 15px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}
.base-tab[aria-selected="true"] {
  border-color: var(--moss);
  color: #fff;
  background: var(--moss);
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.13);
}
.base-panel {
  margin-top: 6px;
  padding: 18px 18px 20px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 7px 22px 7px 22px;
  box-shadow: 0 5px 0 rgb(53 94 75 / 0.08);
}
.selection-label {
  margin: 0 0 9px;
  font-family: var(--font-brush);
  color: var(--moss);
  font-size: 1.18rem;
  font-weight: 700;
}
.category-content { max-width: 680px; }

.cat__note {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--muted);
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
}

.row__leader {
  flex: 1;
  min-width: 12px;
  border-bottom: 2px dotted var(--line);
  transform: translateY(-0.3em);
}

.row__price {
  font-variant-numeric: tabular-nums;
  font-size: 1.2rem;
  white-space: nowrap;
}
.row__price small {
  margin-left: 2px;
  font-size: 0.75em;
  color: var(--muted);
}

.drinks__temps { display: flex; gap: 6px; margin: 4px 0 8px; }
.pill {
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.95rem;
  background: var(--sky);
}
.pill:last-child { background: #F6DFA0; }
.drinks__list { margin: 0 0 6px; font-size: 1.2rem; }

.print-menu { display: none; }

/* ---------- 顧店的人 ---------- */

.crew {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 16px 8px;
  border-top: 1.5px solid var(--line);
}
.crew h2 {
  margin: 0 0 12px;
  font-family: var(--font-brush);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--moss);
}

.crew__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
}
@media (min-width: 720px) {
  .crew__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.crew__person { text-align: center; }
.crew__figure {
  display: block;
  width: 96px;
  height: 160px;
  margin: 0 auto 4px;
  background: radial-gradient(circle at 50% 42%, var(--sky) 0 46%, transparent 47%);
}
.crew__name {
  margin: 0;
  font-family: var(--font-brush);
  font-weight: 700;
  font-size: 1.35rem;
}

/* ---------- 頁尾 ---------- */

.footer {
  max-width: 1080px;
  margin: 32px auto 0;
  padding: 20px 16px 40px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}
.footer p { margin: 0; }
.footer__mark { width: 28px; height: 28px; color: var(--moss); }

/* ---------- 列印成店裡貼的價目表（A4 橫式） ---------- */

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 10.5pt; line-height: 1.35; }
  .hero, .intro, .menu-home, .menu-detail, .crew, .footer { display: none !important; }
  .menu-shell { max-width: none; padding: 0; }
  .print-menu { display: block; columns: 4; column-gap: 10mm; }
  .print-title {
    display: block;
    column-span: all;
    margin: 0 0 4mm;
    font-family: var(--font-brush);
    font-weight: 700;
    font-size: 20pt;
  }
  .print-cat { break-inside: avoid; padding-bottom: 4mm; }
  .print-cat h3 { margin: 0 0 2mm; font-family: var(--font-brush); font-size: 14pt; color: var(--moss); }
  .row { padding: 1px 0; }
  .row__price { font-size: 10.5pt; }
}
