/* 養生良茶 · Healthy Herbal Tea — demo shopfront
   Concept: a Hong Kong herbal apothecary's prescription ledger, not a generic tea shop grid.
   Every product reads like a dispensary slip — ingredients, effect tags, a steeping dial, a
   red stamp. fossil.css owns palette-adjacent tokens (--ds-*), focus rings, reduced motion and
   the tap floor; everything below (layout, the card, the dial, the stamp) belongs here. */

:root {
  --accent: #a13d2e;

  --tea-cream: var(--ds-bone-050);
  --tea-parchment: var(--ds-bone-100);
  --tea-line: var(--ds-bone-300);
  --tea-ink: var(--ds-ink-on-light);
  --tea-ink-soft: var(--ds-ink-on-light-soft);

  --tea-sage: #7c9070;
  --tea-sage-deep: #57694c;
  --tea-brown: #6b4a35;
  --tea-brown-line: #8a6a45;
  --tea-stamp: #a13d2e;
  --tea-gold: var(--accent);

  --tea-radius: 3px;
  /* A hard, small paper-lifted offset — not the generic thin-border/wide-soft-blur combo. */
  --tea-shadow: 3px 4px 0 rgba(26, 20, 13, 0.1), 0 1px 2px rgba(26, 20, 13, 0.12);
  --tea-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--tea-cream);
  color: var(--tea-ink);
  font-family: var(--ds-font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

.wrap { max-width: var(--tea-max); margin-inline: auto; padding-inline: 1.5rem; }
@media (min-width: 900px) { .wrap { padding-inline: 2.5rem; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--ds-font-inscription);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tea-brown);
}
.eyebrow::before {
  content: '';
  width: 1.4em;
  height: 1px;
  background: var(--tea-brown-line);
  display: inline-block;
}

.crumb {
  display: block;
  font-size: 0.88rem;
  color: var(--tea-ink-soft);
  margin-bottom: 0.7rem;
}
.crumb a { color: var(--tea-brown); }
.crumb a:hover { text-decoration: underline; }
.crumb span[aria-hidden] { margin-inline: 0.4em; opacity: 0.6; }

h1, h2, h3 { font-family: var(--ds-font-body); font-weight: 700; margin: 0; color: var(--tea-ink); }
h1 { font-size: clamp(2.1rem, 5vw + 1rem, 3.6rem); line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw + 0.9rem, 2.3rem); line-height: 1.2; }
h3 { font-size: 1.15rem; line-height: 1.35; }
p { color: var(--tea-ink-soft); }
.lede { font-size: 1.08rem; max-width: 46ch; }

/* ── buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85rem 1.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--tea-radius);
  border: 1.5px solid transparent;
  transition: transform 0.2s var(--ds-ease-out), background 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--tea-brown); color: var(--tea-cream); }
.btn-primary:hover { background: var(--tea-ink); transform: translateY(-2px); }
.btn-ghost { border-color: var(--tea-brown-line); color: var(--tea-brown); }
.btn-ghost:hover { background: rgba(138, 106, 69, 0.08); transform: translateY(-2px); }
.btn-stamp { border-color: var(--tea-stamp); color: var(--tea-stamp); }
.btn-stamp:hover { background: rgba(161, 61, 46, 0.08); transform: translateY(-2px); }

.icon { width: 1.2em; height: 1.2em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ── nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 250, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(138, 106, 69, 0.16);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding-block: 0.85rem; gap: 1rem; }
.nav-brand { display: inline-flex; align-items: center; gap: 0.65rem; }
.nav-brand img { width: 40px; height: 40px; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand-text b { font-size: 1rem; letter-spacing: 0.02em; color: var(--tea-ink); }
.nav-brand-text span {
  font-family: var(--ds-font-inscription);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--tea-sage-deep);
  text-transform: uppercase;
}
.nav-links { display: none; align-items: center; gap: 2rem; font-size: 0.92rem; }
.nav-links a { position: relative; padding-block: 0.3rem; }
.nav-links a[aria-current='page'] { color: var(--tea-brown); font-weight: 600; }
.nav-links a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--tea-stamp);
}
.nav-cta { display: none; }
.nav-burger { display: inline-flex; padding: 0.4rem; }
.nav-burger svg { width: 22px; height: 22px; stroke: var(--tea-ink); stroke-width: 1.6; fill: none; }
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding-block: 0.5rem 1rem;
  border-top: 1px solid rgba(138, 106, 69, 0.16);
}
.nav-mobile a { padding: 0.7rem 0; font-size: 1rem; }
.nav-mobile[data-open] { display: flex; }

@media (min-width: 800px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: none; }
}

/* ── demo ribbon override: square chip already handled by fossil.css ── */

/* ── hero ── */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(86vh, 760px);
  display: flex;
  align-items: flex-end;
  color: var(--tea-cream);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 11, 7, 0.15) 0%, rgba(14, 11, 7, 0.2) 40%, rgba(20, 15, 8, 0.88) 100%);
}
.hero-inner { position: relative; z-index: 2; padding-block: 3rem 3.5rem; width: 100%; }
.hero-tag { color: var(--ds-signal); }
.hero-tag::before { background: var(--ds-signal); }
.hero h1 { color: var(--tea-cream); max-width: 14ch; margin-block: 0.6rem 1rem; }
.hero .lede { color: var(--ds-bone-200); max-width: 42ch; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero .btn-ghost { border-color: rgba(245, 236, 215, 0.5); color: var(--tea-cream); }
.hero .btn-ghost:hover { background: rgba(245, 236, 215, 0.12); }

/* ── trust strip ── */
.trust {
  border-block: 1px solid rgba(138, 106, 69, 0.16);
  background: var(--tea-parchment);
}
.trust-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem 1rem;
  padding-block: 1.6rem;
}
@media (min-width: 720px) { .trust-row { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; color: var(--tea-ink-soft); }
.trust-item .icon { color: var(--tea-sage-deep); width: 1.4em; height: 1.4em; }

/* ── section rhythm ── */
.band { padding-block: clamp(3.2rem, 7vw, 5.5rem); }
.band-parchment { background: var(--tea-parchment); }
.band-ink { background: var(--ds-strata-900); color: var(--ds-ink-on-dark); }
.band-ink h1, .band-ink h2, .band-ink h3 { color: var(--ds-ink-on-dark); }
.band-ink p { color: var(--ds-ink-on-dark-soft); }
.band-ink .eyebrow { color: var(--ds-signal); }
.band-ink .eyebrow::before { background: var(--ds-signal); }
.band-ink .ledger { border-color: rgba(201, 183, 154, 0.22); }
.band-ink .ledger-row { border-color: rgba(201, 183, 154, 0.22); }
.band-ink .ledger-num { color: var(--ds-signal); }
.band-ink .ledger-tag { color: var(--ds-ink-on-dark-soft); border-color: rgba(201, 183, 154, 0.4); }

/* philosophy split — asymmetric, text left / drawer graphic right */
.split {
  display: grid;
  gap: 2.4rem;
  align-items: center;
}
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; } }
.split-reverse { direction: rtl; }
.split-reverse > * { direction: ltr; }

.drawer-art { position: relative; aspect-ratio: 4 / 3; }
.drawer-art svg { width: 100%; height: 100%; }

/* ── ledger rows (use-cases / services) — deliberately not cards ── */
.ledger { border-top: 1px solid rgba(138, 106, 69, 0.22); }
.ledger-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem 1.4rem;
  align-items: start;
  padding-block: 1.5rem;
  border-bottom: 1px solid rgba(138, 106, 69, 0.22);
}
.ledger-num { font-family: var(--ds-font-inscription); color: var(--tea-brown-line); font-size: 0.92rem; padding-top: 0.15rem; }
.ledger-row h3 { margin-bottom: 0.35rem; }
.ledger-row p { margin: 0; max-width: 52ch; }
.ledger-tag {
  align-self: center;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--tea-sage-deep);
  border: 1px solid var(--tea-sage);
  border-radius: 2px;
  padding: 0.25rem 0.6rem;
  white-space: nowrap;
}

/* ── prescription card (the signature product component) ── */
.rx-grid { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .rx-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .rx-grid { grid-template-columns: repeat(3, 1fr); } }

.rx-card {
  position: relative;
  background: var(--tea-cream);
  border: 1.5px solid rgba(138, 106, 69, 0.32);
  border-radius: var(--tea-radius);
  box-shadow: var(--tea-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rx-card::before {
  /* the tear-perforation edge under the photo */
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 0;
  border-top: 2px dashed rgba(138, 106, 69, 0.4);
  z-index: 3;
}
.rx-media { position: relative; aspect-ratio: 4 / 3; background: var(--tea-parchment); }
.rx-media img { width: 100%; height: 100%; object-fit: cover; }
.rx-media.rx-media--icon { display: flex; align-items: center; justify-content: center; }
.rx-media.rx-media--icon svg { width: 46%; height: 46%; stroke: var(--tea-brown); stroke-width: 1.2; }
.rx-stamp {
  position: absolute;
  top: 0.8rem; right: 0.8rem;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1.6px solid var(--tea-stamp);
  color: var(--tea-stamp);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ds-font-body);
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  transform: rotate(-9deg);
  opacity: 0.92;
  background: rgba(253, 250, 243, 0.55);
  backdrop-filter: blur(2px);
}
.rx-body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.rx-name-cn { font-size: 1.15rem; font-weight: 700; }
.rx-name-note { font-size: 0.8rem; color: var(--tea-ink-soft); }
.rx-effects { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rx-effect {
  display: inline-flex; align-items: center; gap: 0.3em;
  font-size: 0.72rem;
  border: 1px solid var(--tea-sage);
  color: var(--tea-sage-deep);
  border-radius: 2px;
  padding: 0.2rem 0.5rem;
}
.rx-effect .icon { width: 0.95em; height: 0.95em; }
.rx-ingredients { font-size: 0.88rem; color: var(--tea-ink-soft); margin: 0; }
.rx-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(138, 106, 69, 0.3);
  font-size: 0.88rem;
}
.rx-price { color: var(--tea-brown); font-weight: 600; }
.rx-cta { color: var(--tea-stamp); font-weight: 600; display: inline-flex; align-items: center; gap: 0.3em; }
.rx-cta .icon { width: 1em; height: 1em; }

/* ── steeping dial — the signature move ── */
.dial-block {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.dial { width: 108px; height: 108px; flex: none; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: rgba(138, 106, 69, 0.2); stroke-width: 6; }
.dial-fill {
  fill: none;
  stroke: var(--tea-stamp);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 251;
  stroke-dashoffset: 251;
  transition: stroke-dashoffset 1.6s var(--ds-ease-out);
}
.dial[data-inview] .dial-fill { stroke-dashoffset: 63; }
.dial-label {
  position: relative;
  margin-top: -78px;
  text-align: center;
  font-family: var(--ds-font-inscription);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--tea-brown);
}
.dial-label b { display: block; font-family: var(--ds-font-body); font-size: 1.35rem; letter-spacing: 0; color: var(--tea-ink); }

/* ── footer ── */
.site-footer { background: var(--ds-strata-900); color: var(--ds-ink-on-dark-soft); padding-block: 3rem 2rem; }
.site-footer p { color: var(--ds-ink-on-dark-soft); }
.footer-grid { display: grid; gap: 2.2rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }
.footer-brand img { width: 34px; height: 34px; }
.footer-brand b { color: var(--ds-ink-on-dark); font-size: 1.05rem; }
.footer h3 { color: var(--ds-ink-on-dark); font-size: 0.88rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.9rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.88rem; }
.footer-links a:hover { color: var(--ds-signal); }
.footer-bottom {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(201, 183, 154, 0.16);
  font-size: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: space-between;
}

/* ── reveal on scroll ──────────────────────────────────────────────────────
 * Visible by DEFAULT — content must never depend on a real scroll gesture to
 * exist. JS opts elements INTO the hidden pre-reveal state only when it can
 * also guarantee revealing them (IntersectionObserver present, motion not
 * reduced). Otherwise: no JS, a slow script, a print/PDF render, or a
 * screenshot tool that never dispatches a scroll event would leave the
 * content permanently at opacity:0 — confirmed with Playwright: a full-page
 * capture with zero scroll calls left every [data-reveal] section invisible.
 */
[data-reveal] { transition: opacity 0.7s var(--ds-ease-out), transform 0.7s var(--ds-ease-out); }
[data-reveal].pre-reveal { opacity: 0; transform: translateY(18px); }
[data-reveal].pre-reveal.in { opacity: 1; transform: none; }

@media print {
  [data-reveal].pre-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── page-specific: about ── */
.value-row { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .value-row { grid-template-columns: repeat(3, 1fr); } }
.value-item { border-left: 2px solid var(--tea-sage); padding-left: 1rem; }
.value-item .icon { color: var(--tea-sage-deep); width: 1.6em; height: 1.6em; margin-bottom: 0.6rem; }

.stall-note {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--tea-cream);
  border: 1px solid rgba(138, 106, 69, 0.25);
  border-radius: var(--tea-radius);
  padding: 1.1rem 1.3rem;
}
.stall-note .icon { width: 1.5em; height: 1.5em; color: var(--tea-stamp); flex: none; margin-top: 0.15rem; }

/* ── page-specific: contact ── */
.contact-grid { display: grid; gap: 2.4rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.channel-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(138, 106, 69, 0.28);
  border-radius: var(--tea-radius);
  background: var(--tea-cream);
  margin-bottom: 1rem;
}
.channel-card .icon { width: 1.8em; height: 1.8em; color: var(--tea-brown); flex: none; }
.channel-card b { display: block; }
.channel-card span { font-size: 0.88rem; color: var(--tea-ink-soft); }
.channel-card:hover { border-color: var(--tea-brown); }

/* ── page-specific: shop filter chips ── */
.filter-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.filter-chip {
  font-size: 0.88rem;
  border: 1px solid rgba(138, 106, 69, 0.35);
  border-radius: 2px;
  padding: 0.4rem 0.85rem;
  color: var(--tea-ink-soft);
}
.filter-chip[aria-pressed='true'] { background: var(--tea-brown); color: var(--tea-cream); border-color: var(--tea-brown); }
