/* ==========================================================================
   易支付 UI · pages.css  (落地页 / 收银台 / 结果页)
   ========================================================================== */

/* ======================================================================
   落地页
   ====================================================================== */
.site { background: var(--bg); overflow-x: hidden; }

.site-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-nav-wrap { background: var(--surface); }
}
.site-nav {
  max-width: 1180px;
  margin: 0 auto;
  height: 66px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 34px;
}
.site-nav__links { display: flex; align-items: center; gap: 26px; margin-left: 8px; }
.site-nav__links a {
  font-size: 13px;
  color: var(--ink-2);
  transition: color .18s;
  position: relative;
}
.site-nav__links a:hover { color: var(--ink); }
.site-nav__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.hero-wrap { position: relative; overflow: hidden; }
.hero-wrap::before {
  content: "";
  position: absolute;
  inset: -160px -10% auto -10%;
  height: 640px;
  background:
    radial-gradient(560px 320px at 22% 30%, rgba(58, 92, 245, .14), transparent 62%),
    radial-gradient(520px 300px at 82% 12%, rgba(124, 92, 255, .12), transparent 60%);
  pointer-events: none;
}
.hero {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 62px 28px 52px;
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: 54px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--brand-ring); }
  50% { box-shadow: 0 0 0 6px rgba(58, 92, 245, .04); }
}
.hero h1 {
  margin-top: 20px;
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.14;
  letter-spacing: -.032em;
  font-weight: 700;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(115deg, var(--brand) 10%, #8b5cf6 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead {
  margin-top: 18px;
  max-width: 480px;
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--ink-2);
}
.hero__cta { display: flex; align-items: center; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.hero__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  font-size: 12px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.hero__meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero__meta .ico { width: 14px; height: 14px; color: var(--ok); }

.hero-visual { position: relative; }
.hero-card {
  position: relative;
  padding: 18px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-3);
  animation: floaty 7s var(--ease) infinite;
}
@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -7px, 0); }
}
.hero-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}
.hero-card__dots { display: flex; gap: 4px; }
.hero-card__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.hero-card__rows { display: flex; flex-direction: column; gap: 1px; margin-top: 10px; }
.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--surface-2);
}
.hero-row b { color: var(--brand); font-weight: 600; }
.hero-float {
  position: absolute;
  right: -14px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  font-size: 12px;
  animation: floaty 7s var(--ease) .8s infinite;
}
.hero-float .okico {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ok-50);
  color: var(--ok);
  flex: none;
}
.hero-float .okico .ico { width: 15px; height: 15px; }
.hero-float b { display: block; font-size: 12.5px; color: var(--ink); }
.hero-float span { font-size: 10.5px; color: var(--ink-3); }

.band { max-width: 1180px; margin: 0 auto; padding: 8px 28px; }
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.stat-strip > div {
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}
.stat-strip > div:last-child { border-right: 0; }
.stat-strip b {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
.stat-strip span { font-size: 12px; color: var(--ink-3); }

.section { max-width: 1180px; margin: 0 auto; padding: 64px 28px; }
.section__head { max-width: 560px; margin-bottom: 32px; }
.section__head h2 { font-size: 28px; letter-spacing: -.028em; line-height: 1.25; }
.section__head p { margin-top: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature {
  padding: 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s;
}
.feature:hover { transform: translate3d(0, -3px, 0); box-shadow: var(--sh-2); border-color: var(--line-2); }
.feature__ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand);
  margin-bottom: 16px;
}
.feature__ico .ico { width: 19px; height: 19px; }
.feature h3 { font-size: 15px; margin-bottom: 7px; }
.feature p { font-size: 12.8px; line-height: 1.72; color: var(--ink-3); }

.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.flow__step { position: relative; padding: 22px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.flow__step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.flow__step h4 { font-size: 13.5px; margin-bottom: 5px; }
.flow__step p { font-size: 12px; color: var(--ink-3); line-height: 1.65; }
.flow__step::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -14px;
  width: 14px;
  height: 1px;
  background: var(--line-2);
}
.flow__step:last-child::after { display: none; }

.cta-band {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 72px;
}
.cta-inner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 40px 44px;
  border-radius: 24px;
  background: linear-gradient(120deg, #2438c9 0%, #3a5cf5 48%, #7c5cff 100%);
  color: #fff;
  flex-wrap: wrap;
}
.cta-inner::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  filter: blur(2px);
}
.cta-inner h2 { color: #fff; font-size: 26px; letter-spacing: -.025em; }
.cta-inner p { margin-top: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .78); }
.cta-inner .btn--ghost { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .26); color: #fff; }
.cta-inner .btn--ghost:hover { background: rgba(255, 255, 255, .2); }
.cta-inner .btn--white { background: #fff; color: #2438c9; }
.cta-inner .btn--white:hover { background: #f2f4ff; }

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.site-foot__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-3);
}
.site-foot__links { display: flex; gap: 18px; }
.site-foot__links a:hover { color: var(--ink); }

/* ======================================================================
   收银台
   ====================================================================== */
.pay-body {
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(58, 92, 245, .09), transparent 62%),
    radial-gradient(760px 420px at 94% -4%, rgba(124, 92, 255, .08), transparent 58%),
    var(--bg);
  min-height: 100vh;
}
.pay-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 20px 36px;
}
@media (min-width: 900px) and (min-height: 820px) {
  .pay-page { justify-content: center; }
}
.pay-top {
  width: min(950px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.pay-brand { display: flex; align-items: center; gap: 9px; }
.pay-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.pay-brand .brand__mark { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
.pay-brand__name { font-size: 14px; font-weight: 680; }
.pay-brand__sub { font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; }
.pay-safe {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.pay-safe .ico { width: 14px; height: 14px; color: var(--ok); }

.pay-card {
  width: min(950px, 100%);
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--sh-3);
  overflow: hidden;
  animation: riseIn .55s var(--ease) both;
}
.pay-left {
  padding: 34px 36px 30px;
  border-right: 1px dashed var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
  display: flex;
  flex-direction: column;
}
.pay-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
}
.pay-merchant { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.pay-merchant .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.pay-merchant__name { font-size: 13.5px; font-weight: 650; }
.pay-merchant__meta { font-size: 11.5px; color: var(--ink-3); }
.pay-product {
  margin-top: 22px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1.45;
  word-break: break-all;
}
.pay-amount {
  display: flex;
  align-items: baseline;
  gap: 1px;
  margin: 14px 0 4px;
  font-weight: 700;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.pay-amount .cur { font-size: 22px; font-weight: 600; color: var(--ink-2); margin-right: 3px; }
.pay-amount .int { font-size: 48px; line-height: 1; }
.pay-amount .dec { font-size: 24px; line-height: 1; color: var(--ink-2); }
.pay-amount-note { font-size: 12px; color: var(--ink-3); }

.pay-meta { margin-top: 26px; display: flex; flex-direction: column; gap: 0; }
.pay-meta__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}
.pay-meta__row:last-child { border-bottom: 0; }
.pay-meta__k { color: var(--ink-3); flex: none; }
.pay-meta__v { color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; word-break: break-all; }

.pay-trust {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--ink-4);
  flex-wrap: wrap;
}
.pay-trust span { display: inline-flex; align-items: center; gap: 4px; }
.pay-trust .ico { width: 13px; height: 13px; color: var(--ink-3); }

.pay-right { padding: 28px 34px 30px; display: flex; flex-direction: column; }
.pay-right__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.pay-right__title { font-size: 13px; font-weight: 650; color: var(--ink); }
.pay-timer { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pay-timer b { color: var(--warn); font-weight: 650; font-size: 13px; }

.pay-methods { display: flex; gap: 8px; margin-bottom: 18px; }
.pay-methods form { flex: 1 1 0; display: flex; min-width: 0; }
.pay-methods .pay-method { width: 100%; }
.pay-method {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  transition: border-color .2s, background-color .2s, transform .2s, box-shadow .2s;
}
.pay-method:hover { border-color: var(--ink-4); transform: translate3d(0, -1px, 0); }
.pay-method.is-active {
  border-color: var(--brand);
  background: var(--brand-50);
  color: var(--ink);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.pay-method .pm { width: 22px; height: 22px; border-radius: 7px; font-size: 11px; }

.pay-qr {
  position: relative;
  width: 194px;
  height: 194px;
  margin: 2px auto 12px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--sh-1);
  overflow: hidden;
}
[data-theme="dark"] .pay-qr { background: #f8fafc; }
.pay-qr svg { width: 100%; height: 100%; display: block; }
.pay-qr__scan {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  top: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--brand) 22%, var(--brand) 78%, transparent);
  box-shadow: 0 0 10px 2px rgba(58, 92, 245, .35);
  animation: qrScan 2.9s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes qrScan {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  8%   { opacity: 1; }
  50%  { transform: translate3d(0, 168px, 0); opacity: 1; }
  58%  { opacity: 0; }
  100% { transform: translate3d(0, 168px, 0); opacity: 0; }
}
.pay-qr__demo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1.5px dashed rgba(222, 59, 66, .55);
  color: rgba(222, 59, 66, .8);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.pay-hint { text-align: center; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.pay-hint b { color: var(--ink-2); font-weight: 600; }
.pay-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.pay-demo-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-3);
}
.pay-demo-tip .ico { width: 13px; height: 13px; margin-top: 1px; color: var(--warn); }

/* 结果状态 */
.pay-state {
  width: min(520px, 100%);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--sh-3);
  padding: 44px 36px 32px;
  text-align: center;
  animation: riseIn .5s var(--ease) both;
}
.state-ico {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ok-50);
  color: var(--ok);
  animation: popIn .5s var(--ease) both;
}
.state-ico--muted { background: var(--surface-3); color: var(--ink-3); }
.state-ico--warn { background: var(--warn-50); color: var(--warn); }
.state-ico svg { width: 38px; height: 38px; }
.state-ico .ring { stroke-dasharray: 150; stroke-dashoffset: 150; animation: drawRing .7s var(--ease) .1s forwards; }
.state-ico .tick { stroke-dasharray: 40; stroke-dashoffset: 40; animation: drawRing .4s var(--ease) .55s forwards; }
@keyframes drawRing { to { stroke-dashoffset: 0; } }

.pay-state h1 { font-size: 22px; letter-spacing: -.02em; }
.pay-state .state-sub { margin-top: 8px; font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.state-amount {
  margin: 22px 0 4px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.state-card {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: left;
}
.state-actions { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.state-foot { margin-top: 20px; font-size: 11.5px; color: var(--ink-4); }

.pay-foot {
  margin-top: 22px;
  font-size: 11.5px;
  color: var(--ink-4);
  text-align: center;
  line-height: 1.8;
}
.pay-foot a { color: var(--ink-3); }
.pay-foot a:hover { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  .pay-qr__scan { display: none; }
  .hero-card,
  .hero-float { animation: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; }
  .hero-visual { max-width: 460px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow__step:nth-child(2)::after { display: none; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip > div:nth-child(2) { border-right: 0; }
  .stat-strip > div:nth-child(1),
  .stat-strip > div:nth-child(2) { border-bottom: 1px solid var(--line); }
  .pay-card { grid-template-columns: minmax(0, 1fr); }
  .pay-left { border-right: 0; border-bottom: 1px dashed var(--line); padding: 28px 26px 24px; }
  .pay-right { padding: 24px 26px 26px; }
  .pay-amount .int { font-size: 42px; }
}

@media (max-width: 620px) {
  .site-nav { height: 60px; padding: 0 18px; gap: 12px; }
  .site-nav__links { display: none; }
  .hero { padding: 34px 18px 30px; }
  .hero h1 { font-size: 30px; }
  .hero .lead { font-size: 14px; }
  .section { padding: 44px 18px; }
  .section__head h2 { font-size: 23px; }
  .feature-grid, .flow { grid-template-columns: 1fr; }
  .flow__step::after { display: none; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip > div { padding: 16px; }
  .stat-strip b { font-size: 20px; }
  .cta-inner { padding: 28px 24px; }
  .cta-inner h2 { font-size: 21px; }
  .band, .cta-band { padding-left: 18px; padding-right: 18px; }
  .site-foot__inner { padding: 22px 18px; }
  .pay-page { padding: 16px 12px 26px; }
  .pay-top { margin-bottom: 12px; }
  .pay-safe { display: none; }
  .pay-left { padding: 22px 20px 20px; }
  .pay-right { padding: 20px; }
  .pay-amount .int { font-size: 38px; }
  .pay-product { font-size: 15px; margin-top: 18px; }
  .pay-qr { width: 176px; height: 176px; }
  .pay-methods { gap: 6px; }
  .pay-method { font-size: 11px; gap: 5px; height: 42px; }
  .pay-state { padding: 34px 22px 26px; }
  .state-amount { font-size: 30px; }
  .hero-float { display: none; }
}
