/* 拼好运 pinhaoyun.com — 产品宣传页样式
   色板与规范来自 docs/brand-guide.md（浅色卡通风）
   移动优先：320/390/480px 无横向溢出；桌面 ≥900px 两栏布局 */

:root {
  /* 颜色与圆角取自 design-tokens/tokens.css（npm run tokens 生成），此处只做别名 */
  --paper: var(--ph-paper);
  --surface: var(--ph-surface);
  --cloud: var(--ph-cloud);
  --ink: var(--ph-ink);
  --muted: var(--ph-muted);
  --primary: var(--ph-primary);
  --sky: var(--ph-sky);
  --yellow: var(--ph-yellow);
  --pink: var(--ph-pink);
  --line: var(--ph-line);
  --radius-card: var(--ph-radius-card);
  --radius-button: var(--ph-radius-button);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, p { margin: 0; }

a {
  color: var(--primary);
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 页头 ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img { border-radius: 10px; }

.brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--primary);
}

.brand-domain {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 650;
  color: var(--muted);
  line-height: 1.2;
}

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
}

.site-nav a {
  text-decoration: none;
  font-weight: 650;
  padding: 10px 2px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 40px 0 48px;
  background:
    radial-gradient(420px 260px at 85% 10%, var(--cloud), transparent 70%),
    var(--paper);
}

.hero .wrap {
  display: grid;
  gap: 28px;
  align-items: center;
}

.hero-text .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 1.4px;
  color: var(--primary);
  background: var(--cloud);
  border-radius: 999px;
  padding: 5px 14px;
}

.hero-text h1 {
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -0.8px;
  margin: 18px 0 14px;
}

.hero-text h1 strong { color: var(--primary); }

.hero-text .lead {
  color: var(--muted);
  max-width: 46ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--radius-button);
  padding: 12px 22px;
  font-weight: 750;
  font-size: 15px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 120ms;
}

.button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 0 #183F78;
}

.button.secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: #AAC4E7;
}

.button:active { transform: translateY(1px) scale(0.99); }

.hero-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.hero-art {
  display: grid;
  place-items: center;
  position: relative;
}

.hero-art::before {
  content: "";
  position: absolute;
  width: min(78%, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cloud);
}

.hero-art img {
  position: relative;
  width: min(72%, 280px);
  transform: rotate(-3deg);
}

/* ---------- 通用区块 ---------- */

.section { padding: 48px 0; }

.section + .section { border-top: 1px dashed var(--line); }

.section-head { margin-bottom: 26px; }

.section-head h2 {
  font-size: 26px;
  letter-spacing: -0.5px;
}

.section-head p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 56ch;
}

/* ---------- 它是什么 ---------- */

.what-card {
  background: var(--surface);
  border: 1.5px solid #BCD2ED;
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: 0 7px 0 #DDE8F5;
}

.what-card > p { max-width: 60ch; }

.what-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  list-style: none;
  padding: 0;
}

.what-list li {
  background: var(--cloud);
  border-radius: 18px;
  padding: 14px 18px;
}

.what-list b { color: var(--primary); }

.what-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
  background: var(--yellow);
  border-radius: 14px;
  padding: 12px 16px;
  color: #684717;
}

/* ---------- 怎么玩 ---------- */

.steps {
  display: grid;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
  text-align: center;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.step img {
  width: 120px;
  margin: 10px auto 14px;
}

.step h3 { font-size: 18px; }

.step p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.steps-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  border: 1px dashed #AAC4E7;
  background: var(--cloud);
  border-radius: 16px;
  padding: 14px 18px;
}

/* ---------- 贴纸墙 ---------- */

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}

.wall-grid figure {
  margin: 0;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  text-align: center;
}

.wall-grid img { width: 100%; }

.wall-grid figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.wall-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 怎么打开 ---------- */

.open-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  counter-reset: open;
}

.open-steps li {
  counter-increment: open;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
}

.open-steps li::before {
  content: counter(open);
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--cloud);
  color: var(--primary);
  font-weight: 800;
}

.open-steps kbd {
  font-family: inherit;
  background: var(--yellow);
  color: #684717;
  border-radius: 8px;
  padding: 2px 10px;
  font-weight: 750;
}

/* ---------- 隐私 ---------- */

.privacy-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.privacy-list li {
  padding-left: 26px;
  position: relative;
  color: var(--ink);
}

.privacy-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 800;
}

.privacy-list .dim { color: var(--muted); font-size: 14px; }

/* ---------- 反馈 / 演示 ---------- */

.feedback-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
}

.feedback-card p + p { margin-top: 10px; }

.demo-link {
  display: block;
  margin-top: 18px;
  border: 1px dashed #AAC4E7;
  border-radius: 18px;
  padding: 16px 18px;
  background: var(--cloud);
  text-decoration: none;
}

.demo-link b { color: var(--primary); }

.demo-link span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  font-size: 13px;
  color: var(--muted);
}

.site-footer .wrap {
  display: grid;
  gap: 6px;
}

.site-footer a { color: var(--muted); }

/* ---------- 桌面 ---------- */

@media (min-width: 900px) {
  .hero { padding: 64px 0 72px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 40px; }
  .hero-text h1 { font-size: 42px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .what-list { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .hero-art img { transform: none; }
}
