/* =========================================================
   请我喝杯咖啡 · 单页样式
   暖纸底 + 墨字 + 一处朱红。改色只改 :root。
   ========================================================= */

:root {
  --paper: #fbf8f1;
  --card: #ffffff;
  --ink: #221f1c;
  --ink-2: #4a443c;
  --muted: #857b70;
  --line: #ede6da;
  --line-2: #dcd2c2;
  --red: #c8452d;
  --red-soft: #f9ece7;
  --wechat: #07943f;
  --wechat-soft: #e7f5ec;
  --alipay: #1677ff;
  --alipay-soft: #e9f1fe;

  --wrap: 980px;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 30px 70px -56px rgba(72, 48, 24, 0.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(closest-side at 50% 50%, rgba(250, 235, 208, 0.85), rgba(250, 235, 208, 0)),
    radial-gradient(closest-side at 50% 50%, rgba(248, 227, 218, 0.7), rgba(248, 227, 218, 0));
  background-size: 1100px 720px, 820px 560px;
  background-position: -140px -220px, calc(100% + 100px) -180px;
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: #f4efe6;
  border-radius: 4px;
  padding: 1px 5px;
  color: #6b6157;
}

::selection { background: var(--red-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -80px; left: 16px;
  z-index: 99;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-size: 14px;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ---------- 顶栏 ---------- */

.brow {
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brow-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.who { display: flex; align-items: center; gap: 9px; }

.who-ava {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: cover;
}

.who-name { font-size: 14px; font-weight: 600; letter-spacing: 0.01em; }

.brow-note {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- 首屏 ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 56px;
  padding-top: 76px;
  padding-bottom: 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}

.title {
  font-size: clamp(46px, 7.8vw, 82px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}

.br-m { display: none; }

.mark {
  position: relative;
  display: inline-block;
}

.mark-line {
  position: absolute;
  left: -3%;
  bottom: -0.1em;
  width: 106%;
  height: 0.16em;
  overflow: visible;
}

.lead {
  font-size: clamp(16px, 1.7vw, 18.5px);
  line-height: 1.7;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
  max-width: 30em;
}

.sub {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
  max-width: 34em;
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.art-frame {
  width: 250px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #f4ebdb;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  box-shadow: 0 24px 44px -34px rgba(80, 55, 30, 0.6);
}

.art-img {
  width: 114%;
  max-width: none;
  transform: translateY(3%);
}

.art-tag {
  position: absolute;
  right: -6px;
  bottom: 4px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--paper);
  border: 1px dashed var(--line-2);
  border-radius: 999px;
  padding: 3px 11px;
  transform: rotate(-3deg);
}

/* ---------- 请客券 ---------- */

.pay {
  padding-bottom: 8px;
  scroll-margin-top: 80px;
}

.voucher {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.vc-body {
  display: flex;
  align-items: stretch;
  padding: 34px 20px 26px;
}

.vc-stub {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 13px 20px 15px;
  border-top: 1px dashed var(--line-2);
  background: #fdfbf7;
}

.vc-hint-line {
  font-size: 12.5px;
  color: var(--ink-2);
}

.voucher.is-empty .vc-hint-line { display: none; }

.vc-price {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.vc-price i {
  font-style: normal;
  color: var(--line-2);
}

.vc-col {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vc-perf {
  flex: 0 0 1px;
  width: 1px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--line-2) 0 5px,
    transparent 5px 12px
  );
  margin: 6px 0;
}

.vc-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
}

.vc-icon {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
}
.vc-icon svg { width: 19px; height: 19px; }
.vc-icon--wechat { background: var(--wechat-soft); color: var(--wechat); }
.vc-icon--alipay { background: var(--alipay-soft); color: var(--alipay); }

.vc-head h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* 二维码 */

.qr-box {
  position: relative;
  width: 100%;
  max-width: 238px;
  aspect-ratio: 1;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: zoom-in;
  transition: border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s;
}
.qr-box:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -24px rgba(72, 48, 24, 0.6);
}

.qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.qr-empty {
  position: absolute;
  inset: 10px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: 6px;
  padding: 10px;
}
.qr-box.is-empty { cursor: default; }
.qr-box.is-empty:hover { transform: none; box-shadow: none; }
.qr-box.is-empty .qr-img { visibility: hidden; }
.qr-box.is-empty .qr-empty { display: flex; }

.qr-empty-cycle {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  position: relative;
}
.qr-empty-cycle::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--red-soft);
}

.qr-empty p {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
}

.vc-copy {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--line-2);
  padding-bottom: 1px;
  transition: color 0.25s, border-color 0.25s;
}
.vc-copy:hover { color: var(--red); border-color: var(--red); }
.vc-copy[hidden] { display: none; }

/* ---------- 钱花在哪 ---------- */

.use {
  padding-top: 72px;
  padding-bottom: 76px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px 30px;
  align-items: start;
}

.use-body { max-width: 40em; }

.use h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  padding-top: 3px;
  letter-spacing: 0.02em;
}

.use p {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 40em;
}

.use-soft {
  margin-top: 8px;
  color: var(--muted) !important;
  font-size: 14px !important;
}

/* ---------- 精神支持 ---------- */

.spirit {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px dashed var(--line-2);
  padding: 0 0 1px;
  transition: color 0.25s, border-color 0.25s;
}
.spirit:hover {
  color: var(--red);
  border-color: var(--red);
}

.spirit-note {
  min-height: 18px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s;
}
.spirit-note.show { opacity: 1; }

/* ---------- 页脚 ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
}

.foot-in { display: grid; gap: 6px; }

.foot-main {
  font-size: 12.5px;
  color: var(--muted);
}

.foot-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.foot-copy {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #a89e92;
  margin-top: 6px;
}

.foot-sep { color: #cbc1b3; }

.foot-link {
  font-size: 12px;
  color: #a89e92;
  border-bottom: 1px dashed transparent;
  padding: 0;
  transition: color 0.25s, border-color 0.25s;
}
.foot-link:hover { color: var(--red); border-color: var(--red); }

/* ---------- 弹层 ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(46, 34, 24, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade 0.22s ease;
}
.overlay[hidden] { display: none; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.overlay-panel {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 92vh;
  overflow: auto;
  padding: 26px 24px 22px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 50px 100px -40px rgba(40, 26, 12, 0.6);
  text-align: center;
  animation: rise 0.32s var(--ease);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.overlay-x {
  position: absolute;
  top: 10px; right: 12px;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  border-radius: 9px;
  transition: background 0.2s, color 0.2s;
}
.overlay-x:hover { background: #f5efe6; color: var(--ink); }

.qr-stage {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 16px;
}
.qr-stage img {
  width: 100%;
  max-height: 54vh;
  object-fit: contain;
  margin: 0 auto;
}

.overlay-hint {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 18px;
}

.overlay-actions { display: flex; gap: 10px; }
.overlay-actions .btn { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.985); }

.btn-solid {
  background: var(--ink);
  color: #fff;
}
.btn-solid:hover { background: #352f29; }

.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink-2);
  background: #fff;
}
.btn-ghost:hover { border-color: var(--muted); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  transform: translate(-50%, 14px);
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fdfaf4;
  font-size: 13px;
  box-shadow: 0 18px 40px -18px rgba(30, 20, 10, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s, transform 0.26s var(--ease);
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 大拇指 ---------- */

.thumb-pop {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 92;
  width: 64px;
  transform: translate(-50%, 8px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.thumb-pop.show { opacity: 1; transform: translate(-50%, -16px) scale(1); }

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 24px;
    padding-top: 52px;
    padding-bottom: 48px;
  }
  .art-tag { display: none; }
  .use { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 700px) {
  .wrap { padding: 0 20px; }
  .brow-note { display: none; }
  .brow-in { height: 56px; }

  .hero {
    display: block;
    position: relative;
    padding-top: 30px;
    padding-bottom: 40px;
  }
  .hero-art {
    position: absolute;
    top: 74px;
    right: 0;
    width: 118px;
  }
  .art-frame { width: 118px; }
  .br-m { display: inline; }
  .eyebrow { padding-right: 0; margin-bottom: 12px; }
  .title {
    font-size: clamp(46px, 13.4vw, 64px);
    line-height: 1.1;
    margin-bottom: 18px;
    max-width: calc(100% - 128px);
  }
  .lead { font-size: 16px; }
  .sub { font-size: 14px; }
  .sub br { display: none; }

  .voucher {
    border-radius: 20px;
  }
  .vc-body {
    flex-direction: column;
    padding: 26px 16px 20px;
  }
  .vc-col { padding: 0; }
  .vc-stub {
    padding: 12px 16px 14px;
  }
  .vc-price { gap: 6px; }
  .vc-perf {
    width: auto;
    height: 1px;
    flex: 0 0 1px;
    margin: 24px 8px;
    background-image: repeating-linear-gradient(
      to right,
      var(--line-2) 0 5px,
      transparent 5px 12px
    );
  }
  .qr-box { max-width: 230px; }

  .use { padding-top: 44px; padding-bottom: 52px; }
  .use p { font-size: 15px; }
  .foot { padding: 24px 0 36px; }
}

@media (max-width: 380px) {
  .hero-art { width: 100px; top: 68px; }
  .qr-box { max-width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
