/* 名晟茶行 — design tokens */
:root {
  --leaf: #7FA27A;
  --leaf-soft: #E8EFE4;
  --brew: #2F4A3A;
  --brew-mute: #5E7264;
  --paper: #F7F4EC;
  --paper-deep: #ECE7DA;
  --paper-lift: #FBF9F4;
  --gold: #C9A46A;
  --line: #D6D9CF;

  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", sans-serif;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s6: 48px; --s8: 64px; --s12: 96px; --s16: 128px;
  --radius: 6px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --wrap: 1120px;
}
html[lang="ja"] { --serif: "Noto Serif JP", "Hiragino Mincho ProN", serif; --sans: "Noto Sans JP", "Hiragino Sans", sans-serif; }
html[lang="ko"] { --serif: "Noto Serif KR", serif; --sans: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif; }
html[lang="en"] body { letter-spacing: .005em; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  background: var(--paper); color: var(--brew);
  font-family: var(--sans); font-size: 17px; line-height: 1.8; letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.3; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; width: 100%; object-fit: cover; border-radius: var(--radius); }
address { font-style: normal; }
.dim { color: var(--brew-mute); font-size: 15px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--s3)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 244, 236, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: var(--s4); height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.logo-slot {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px dashed var(--leaf);
  display: grid; place-items: center; font-size: 10px; letter-spacing: .1em; color: var(--leaf); flex: none;
}
.logo-img { width: 44px; height: 44px; object-fit: contain; border-radius: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: .14em; }
html[lang="en"] .brand-name { letter-spacing: .04em; }
.brand-sub { font-size: 11px; letter-spacing: .2em; color: var(--brew-mute); }
.nav { display: flex; gap: var(--s3); font-size: 15px; }
.nav a { position: relative; padding-block: var(--s1); color: var(--brew-mute); transition: color .2s; white-space: nowrap; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: var(--leaf); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--brew); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.lang-switch { display: flex; gap: 2px; font-size: 13px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-switch a { padding: 4px 10px; border-radius: 999px; color: var(--brew-mute); transition: background .2s, color .2s; white-space: nowrap; }
.lang-switch a:hover { color: var(--brew); }
.lang-switch a[aria-current] { background: var(--brew); color: var(--paper); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s1);
  min-height: 48px; padding: 0 var(--s4); border-radius: 999px; font-size: 15px; letter-spacing: .08em;
  transition: background .25s var(--ease), color .25s, transform .15s;
}
.btn-primary { background: var(--brew); color: var(--paper); }
.btn-primary:hover { background: #3E5E4B; }
.btn-ghost { border: 1px solid var(--brew); }
.btn-ghost:hover { background: var(--brew); color: var(--paper); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Section rhythm ---------- */
section { padding-block: var(--s16); }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s2); font-size: 13px; letter-spacing: .3em; color: var(--leaf); margin-bottom: var(--s3); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.section-title { font-size: clamp(30px, 4vw, 44px); margin-bottom: var(--s3); }
.lead { color: var(--brew-mute); max-width: 34em; }

/* ---------- Placeholders ---------- */
.ph-img {
  width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(127, 162, 122, .08) 14px 15px), var(--paper-deep);
  display: grid; place-items: center; color: var(--brew-mute); font-size: 12px; letter-spacing: .2em;
}
.ph-line { height: 12px; border-radius: 3px; background: var(--paper-deep); }
.ph-line + .ph-line { margin-top: 10px; }

/* ---------- Hero ---------- */
.hero { padding-block: var(--s12) var(--s16); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s8); align-items: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: var(--s4);
  font-size: 14px; letter-spacing: .25em; color: var(--brew);
  padding: 8px 16px 8px 12px; border-radius: 999px; background: var(--leaf-soft); transition: background .2s;
}
.hero-kicker:hover { background: #DCE7D6; }
.pin { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--leaf); flex: none; }
.hero h1 { font-size: clamp(52px, 8.5vw, 108px); letter-spacing: .1em; line-height: 1.12; }
html[lang="en"] .hero h1 { letter-spacing: 0; line-height: 1.02; }
.hero h1 .soft { color: var(--leaf); }
.hero-sub { margin-top: var(--s4); font-size: clamp(18px, 1.6vw, 21px); color: var(--brew-mute); max-width: 26em; }
.hero-cta { margin-top: var(--s6); display: flex; flex-wrap: wrap; gap: var(--s2); }
.hero-visual { position: relative; }
.hero-stamp {
  position: absolute; left: calc(-1 * var(--s6)); bottom: var(--s6);
  font-family: var(--serif); font-size: 18px; letter-spacing: .3em;
  background: var(--paper); padding: var(--s3) var(--s2); border-radius: var(--radius); border: 1px solid var(--line);
}
html[lang="zh-TW"] .hero-stamp, html[lang="ja"] .hero-stamp { writing-mode: vertical-rl; letter-spacing: .5em; }
.hero-stamp b { color: var(--gold); font-weight: 600; }
.hero::before {
  content: ""; position: absolute; right: -12vw; top: -10vw; width: 46vw; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 162, 122, .16), transparent 68%); pointer-events: none;
}

/* ---------- Moved notice ---------- */
.moved { background: var(--leaf-soft); padding-block: var(--s3); }
.moved .wrap { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); align-items: center; justify-content: space-between; font-size: 15px; }
.moved strong { font-family: var(--serif); font-size: 17px; letter-spacing: .1em; margin-right: var(--s2); }
.moved a { border-bottom: 1px solid currentColor; }

/* ---------- Find us ---------- */
.find-head { margin-bottom: var(--s8); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); counter-reset: step; }
.step figcaption { display: flex; gap: 12px; align-items: baseline; margin-top: var(--s2); font-size: 15px; }
.step-no { font-family: var(--serif); color: var(--gold); font-size: 15px; letter-spacing: .1em; flex: none; }
.step figcaption .ph-line { flex: 1; }
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); margin-top: var(--s12); align-items: stretch; }
.visit-info dl { display: grid; grid-template-columns: 6em 1fr; gap: var(--s3); margin-top: var(--s4); }
.visit-info dt { color: var(--brew-mute); font-size: 14px; letter-spacing: .15em; padding-top: 3px; }
.hours { list-style: none; }
.hours li { display: flex; justify-content: space-between; gap: var(--s3); max-width: 19em; }
.hours li.closed { color: var(--brew-mute); }
.hours li.today { font-weight: 500; color: var(--brew); }
.status {
  display: inline-flex; align-items: center; gap: var(--s1); min-height: 30px;
  font-size: 13px; letter-spacing: .08em; padding: 4px 14px; border-radius: 999px; background: var(--paper-deep);
}
.status:empty { visibility: hidden; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brew-mute); }
.status.open { background: var(--leaf-soft); }
.status.open::before { background: var(--leaf); box-shadow: 0 0 0 4px rgba(127, 162, 122, .25); }
.visit-actions { margin-top: var(--s6); display: flex; gap: var(--s2); flex-wrap: wrap; }
.map { border-radius: var(--radius); overflow: hidden; min-height: 420px; border: 1px solid var(--line); filter: saturate(.55) sepia(.12); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; min-height: 420px; }

/* ---------- Story ---------- */
.story { background: var(--paper-lift); }
.story .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s12); align-items: start; }
.story-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-top: var(--s6); }
.pillar { border-top: 1px solid var(--line); padding-top: var(--s3); }
.pillar .num { font-family: var(--serif); font-size: 40px; color: var(--leaf); line-height: 1; }
.pillar .num small { font-size: 18px; }
.pillar p { margin-top: var(--s1); color: var(--brew-mute); font-size: 15px; }
.story-copy { margin-top: var(--s6); }

/* ---------- Product cards ---------- */
.product-card { display: block; }
.product-card .frame { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper-deep); }
/* 統一照片調性：裁 4:5、淡暖色疊色，讓不同來源的照片看起來同系列 */
.product-card .frame img { aspect-ratio: 4 / 5; filter: saturate(.9) contrast(.96); transition: transform .7s var(--ease); border-radius: 0; }
.product-card .frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: rgba(201, 164, 106, .08); mix-blend-mode: multiply; }
.product-card .ph-img { transition: transform .7s var(--ease); border-radius: 0; }
a.product-card:hover .frame img, a.product-card:hover .ph-img { transform: scale(1.04); }
.product-card .meta { padding-top: var(--s3); }
.product-card h3 { font-size: 21px; min-height: 1.3em; }
.featured-head { display: flex; justify-content: space-between; align-items: end; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.grid-3 > :nth-child(2) { margin-top: var(--s8); }

/* ---------- FAQ ---------- */
.faq { background: var(--paper-lift); }
.faq-wrap { display: grid; grid-template-columns: 4fr 8fr; gap: var(--s8); align-items: start; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--s3); align-items: center; padding-block: var(--s3); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 19px; font-weight: 600; }
.faq-item summary::after { content: "+"; font-family: var(--serif); font-size: 24px; color: var(--leaf); transition: transform .3s var(--ease); flex: none; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: var(--s3); color: var(--brew-mute); max-width: 36em; }

/* ---------- Products page ---------- */
.page-head { padding-block: var(--s12) var(--s8); }
.page-head h1 { font-size: clamp(44px, 6vw, 72px); letter-spacing: .08em; }
.page-head p:not(.eyebrow) { margin-top: var(--s3); color: var(--brew-mute); max-width: 30em; }
.catalog { padding-top: 0; }
.tea { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s8); align-items: center; padding-block: var(--s8); border-top: 1px solid var(--line); }
.tea:nth-child(even) { grid-template-columns: 7fr 5fr; }
.tea:nth-child(even) .product-card { order: 2; justify-self: end; }
.tea .product-card { max-width: 420px; width: 100%; }
.tea-no { font-family: var(--serif); font-size: 15px; letter-spacing: .3em; color: var(--gold); }
.tea h2 { font-size: clamp(28px, 3.2vw, 38px); margin-top: var(--s2); min-height: 1.3em; }
.tea-desc { margin-top: var(--s3); max-width: 30em; }
.brew-tips { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s6); margin-top: var(--s6); padding-top: var(--s3); border-top: 1px dashed var(--line); }
.brew-tips dt { font-size: 13px; letter-spacing: .15em; color: var(--brew-mute); }
.brew-tips dd { font-family: var(--serif); font-size: 20px; min-height: 1.4em; margin-top: 4px; }
.brew-tips dd:empty::after { content: ""; display: block; width: 3.5em; height: 12px; margin-top: 8px; border-radius: 3px; background: var(--paper-deep); }
.cta-band { background: var(--leaf-soft); text-align: center; padding-block: var(--s12); }
.cta-band h2 { font-size: clamp(26px, 3vw, 34px); }
.cta-band p { color: var(--brew-mute); margin-top: var(--s2); }
.cta-band .btn { margin-top: var(--s4); }

/* ---------- Language suggestion ---------- */
.lang-suggest {
  position: fixed; left: 50%; bottom: var(--s3); transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: var(--s2); padding: 10px 10px 10px 20px;
  background: var(--brew); color: var(--paper); border-radius: 999px; font-size: 14px;
  box-shadow: 0 8px 30px rgba(47, 74, 58, .25); max-width: calc(100% - 2 * var(--s3));
}
.lang-suggest a { background: var(--paper); color: var(--brew); padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.lang-suggest button { background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; padding: 0 8px; opacity: .7; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brew); color: rgba(247, 244, 236, .78); padding-block: var(--s8); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between; align-items: flex-end; }
.site-footer .brand-name { color: var(--paper); }
.site-footer a:hover { color: var(--paper); }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .product-card .frame img, .product-card .ph-img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav .hide-sm { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero .wrap, .story .wrap, .visit, .faq-wrap { grid-template-columns: 1fr; gap: var(--s6); }
  .hero-visual { max-width: 420px; }
  .hero-stamp { left: auto; right: var(--s2); bottom: var(--s2); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 > :nth-child(2) { margin-top: 0; }
  .grid-3 > :nth-child(3) { display: none; }
  .tea, .tea:nth-child(even) { grid-template-columns: 1fr; gap: var(--s4); }
  .tea:nth-child(even) .product-card { order: 0; justify-self: start; }
}
@media (max-width: 720px) {
  section { padding-block: var(--s12); }
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 8px var(--s3); }
  .nav { order: 3; width: 100%; gap: var(--s3); font-size: 14px; }
  .brand-name { font-size: 17px; }
  .lang-switch { font-size: 12px; }
  .lang-switch a { padding: 3px 8px; }
  .story-pillars { grid-template-columns: 1fr; }
  .brew-tips { gap: var(--s4); }
}
@media (max-width: 560px) {
  .grid-3, .steps { grid-template-columns: 1fr; }
  .grid-3 > :nth-child(3) { display: block; }
}
