/* Yunwu 云雾: shared brand layer for the home, /teas/ and /brew/. Song dynasty restraint: celadon, ink, one pine accent. */
:root {
  --bg: #e4ebe6;
  --surface: #f4f7f4;
  --ink: #17211c;
  --muted: #55625a;
  --line: #cbd6cf;
  --pine: #24493a;
  --chip: #d3ded7;
  --display: "Marcellus", "Times New Roman", serif;
  --text: "Afacad", "Helvetica Neue", Arial, sans-serif;
  --brush: "Ma Shan Zheng", "Kaiti SC", "STKaiti", serif;
  --zh: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --margin: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --gap: clamp(16px, 2vw, 28px);
  --pad: clamp(120px, 16vw, 220px);
  --head: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --liquor: #d9b45a;
}

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html.is-bag-open { overflow: hidden; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { height: auto; }
[hidden] { display: none !important; }
::selection { background: var(--pine); color: #fff; }

[lang="zh-Hans"] { font-family: var(--zh); line-break: strict; letter-spacing: 0.08em; }
.brush, .brush[lang] { font-family: var(--brush); font-weight: 400; letter-spacing: 0.02em; line-height: 1; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 200; background: var(--pine); color: #fff; padding: 12px 20px; border-radius: 999px; text-decoration: none; font-weight: 500; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--margin), var(--max)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* Type */
.h-hero { font: 400 clamp(42px, 6.2vw, 92px) / 1.04 var(--display); letter-spacing: -0.012em; margin: 0; text-wrap: balance; }
.h2 { font: 400 clamp(34px, 4.2vw, 58px) / 1.08 var(--display); letter-spacing: -0.008em; text-wrap: balance; }
.lede { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6; color: var(--muted); max-width: 30em; }
.zh-line { font-size: clamp(17px, 1.5vw, 20px); font-weight: 300; line-height: 1.85; letter-spacing: 0.08em; color: var(--ink); }
.label { font: 500 13px/1.4 var(--text); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* Links and buttons: one hover style, the kit's spot */
a { text-decoration: none; }
.tlink { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; border: 0; background: none; font: 500 16px/1.3 var(--text); color: var(--ink); cursor: pointer; }
.tlink:focus-visible { outline: 2px solid var(--pine); outline-offset: 4px; border-radius: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 52px; padding: 0 28px; border-radius: 999px; border: 1px solid transparent; font: 500 16px/1 var(--text); letter-spacing: 0.01em; white-space: nowrap; cursor: pointer; transition: transform 0.2s var(--ease), color 0.45s, border-color 0.45s, background-color 0.45s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; }
.btn-primary { background: var(--pine); color: #fff; --k-fill: var(--ink); --k-fill-ink: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(23, 33, 28, 0.3); --k-fill: var(--chip); --k-fill-ink: var(--ink); }
.btn-ghost:is(:hover, :focus-visible) { border-color: var(--pine); }
.btn-sm { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-wide { width: 100%; }
.btn .k-arrow svg { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); transition: border-color 0.3s, transform 0.2s var(--ease); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:active { transform: scale(0.97); }
.icon-btn:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }

/* Choice chips (radio pills) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(23, 33, 28, 0.24); font-size: 16px; cursor: pointer; user-select: none; --k-fill: var(--chip); --k-fill-ink: var(--ink); transition: background-color 0.45s, color 0.45s, border-color 0.45s, transform 0.2s var(--ease); }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; color: inherit; }
.chip:has(input:checked) { background: var(--pine); border-color: var(--pine); color: #fff; --k-fill: var(--pine); --k-fill-ink: #fff; }
.chip:has(input:focus-visible) { outline: 2px solid var(--pine); outline-offset: 3px; }
.chip:active { transform: scale(0.97); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 14px; }

/* Header */
.site-head { position: fixed; inset: 0 0 auto; z-index: 60; height: var(--head); background: var(--bg); border-bottom: 1px solid transparent; transition: border-color 0.5s; }
.site-head.is-lined { border-bottom-color: var(--line); }
.head-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; color: var(--ink); }
.brand-en { font: 400 24px/1 var(--display); letter-spacing: 0.02em; }
.brand-zh { font-size: 13px; letter-spacing: 0.14em; color: var(--muted); }
.brand:focus-visible { outline: 2px solid var(--pine); outline-offset: 6px; border-radius: 2px; }
.head-right { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 36px); }
.nav { display: flex; gap: clamp(16px, 2.6vw, 36px); }
.nav a { font-size: 16px; padding: 8px 0; color: var(--ink); }
.nav a[aria-current="page"] { background-size: 100% 1px; background-position: 0 100%; }
.nav a:focus-visible { outline: 2px solid var(--pine); outline-offset: 4px; }
.bag-btn { gap: 8px; }
.bag-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--chip); color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; transition: background-color 0.45s, color 0.45s; }
.bag-btn:is(:hover, :focus-visible) .bag-count { background: var(--surface); }

/* The gaiwan */
.cup { position: relative; width: var(--cup, min(500px, 38vw)); aspect-ratio: 1; flex: none; }
.cup-ring { position: absolute; inset: -6%; width: 112%; height: 112%; max-width: none; overflow: visible; }
.ring-track { fill: none; stroke: var(--line); }
.ring-prog { fill: none; stroke: var(--pine); stroke-linecap: butt; opacity: 0; }
.cup-photo { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: #e9eee9; }
.cup-photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--gaiwan-pos, 50% 50%); transform: scale(var(--gaiwan-zoom, 1)); }
.cup-liquor, .cup-ripple { position: absolute; inset: calc((100% - var(--bowl, 64%)) / 2); border-radius: 50%; pointer-events: none; }
.cup-liquor { background-color: var(--liquor); mix-blend-mode: multiply; opacity: 0; -webkit-mask-image: radial-gradient(circle closest-side, #000 82%, transparent 100%); mask-image: radial-gradient(circle closest-side, #000 82%, transparent 100%); transition: background-color 1.2s var(--ease); }
.cup-ripple { border: 1px solid rgba(255, 255, 255, 0.8); opacity: 0; }

/* Footer */
.site-foot { background: var(--surface); border-top: 1px solid var(--line); padding: clamp(80px, 10vw, 140px) 0 36px; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 56px; align-items: start; }
.foot-brand { grid-column: 1 / span 5; }
.foot-brand .brand-en { font-size: 32px; }
.foot-brand p { margin-top: 18px; color: var(--muted); max-width: 22em; }
.foot-nav { grid-column: 7 / span 2; display: grid; gap: 6px; }
.foot-nav a { justify-self: start; padding: 4px 0; color: var(--ink); }
.foot-nav a:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; }
.foot-qr { grid-column: 9 / span 4; display: flex; gap: 22px; align-items: flex-start; justify-self: end; }
.foot-qr svg, .pay-qr svg { width: 112px; height: 112px; flex: none; background: #fff; border: 1px solid var(--line); }
.foot-qr p { font-size: 16px; line-height: 1.45; }
.foot-qr .label { margin: 8px 0 14px; font-size: 12px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: clamp(64px, 8vw, 110px); padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }

/* Bag drawer */
.drawer-scrim { position: fixed; inset: 0; z-index: 90; background: var(--ink); opacity: 0; visibility: hidden; transition: opacity 0.6s var(--ease), visibility 0.6s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); transform: translateX(100%); visibility: hidden; transition: transform 0.75s var(--ease), visibility 0.75s; }
.is-bag-open .drawer-scrim { opacity: 0.3; visibility: visible; }
.is-bag-open .drawer { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.drawer-title { font: 400 28px/1.1 var(--display); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 28px; overscroll-behavior: contain; }
.bag-empty { padding: 48px 0; display: grid; gap: 12px; justify-items: start; color: var(--muted); }
.bag-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.bag-photo { width: 64px; height: 64px; overflow: hidden; background: var(--line); }
.bag-photo img, .tea-photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transform: scale(var(--zoom, 1)); transform-origin: var(--pos, 50% 50%); }
.bag-text { display: grid; gap: 2px; }
.bag-zh { font-size: 13px; color: var(--muted); }
.bag-en { font: 400 20px/1.25 var(--display); }
.bag-price { font: 400 18px/1.3 var(--display); padding-top: 18px; }
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; }
.qty-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; transition: border-color 0.3s, transform 0.2s var(--ease); }
.qty-btn:hover { border-color: var(--ink); }
.qty-btn:active { transform: scale(0.97); }
.qty-btn:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.qty-n { min-width: 72px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.drawer-foot { padding: 24px 28px 28px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.drawer-sum { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; }
.drawer-total { font: 400 30px/1 var(--display); }
.drawer-note { font-size: 15px; line-height: 1.5; color: var(--muted); }
.drawer-pay { padding: 40px 28px; display: grid; gap: 14px; justify-items: start; }
.pay-qr svg { width: 168px; height: 168px; }
.pay-title { font: 400 24px/1.2 var(--display); margin-top: 10px; }

@media (max-width: 900px) {
  .foot-brand { grid-column: 1 / -1; }
  .foot-nav { grid-column: 1 / span 4; }
  .foot-qr { grid-column: 5 / -1; justify-self: start; }
}
@media (max-width: 600px) {
  :root { --head: 64px; }
  .brand-en { font-size: 22px; }
  .brand-zh { font-size: 12px; }
  .head-right, .nav { gap: 16px; }
  .bag-btn { padding: 0 14px; }
  .foot-nav { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; gap: 24px; }
  .foot-qr { grid-column: 1 / -1; }
  .drawer-head, .drawer-body, .drawer-foot, .drawer-pay { padding-inline: 20px; }
}

