/* =========================================================
   随心画板 · 微信小程序官网
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --ink: #14171a;
  --ink-soft: #3d444d;
  --muted: #6c757d;
  --brand: #007aff;
  --brand-dark: #0062cc;
  --brand-soft: rgba(0, 122, 255, 0.1);
  --line: #e9ecef;
  --line-strong: #dfe3e8;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 12px 34px rgba(16, 24, 40, 0.09);
  --wrap: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 11px; padding-bottom: 11px; }
.nav__brand { display: flex; align-items: center; gap: 11px; }
.nav__mark {
  width: 34px; height: 34px; flex: none; border-radius: 11px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, #4fa8ff, var(--brand) 60%, var(--brand-dark));
  box-shadow: 0 5px 14px rgba(0, 122, 255, 0.35);
}
.nav__mark svg { width: 19px; height: 19px; }
.nav__name { font-weight: 700; font-size: 15.5px; display: flex; flex-direction: column; line-height: 1.25; }
.nav__name em { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--muted); letter-spacing: 0.03em; }
.nav__links { display: flex; gap: 24px; font-size: 14.5px; color: var(--ink-soft); }
.nav__links a:hover { color: var(--brand); }

/* ---------- 首屏 ---------- */
.hero { padding: 66px 0 72px; background:
  radial-gradient(900px 420px at 12% -10%, rgba(0, 122, 255, 0.09), transparent 70%),
  radial-gradient(700px 380px at 92% 6%, rgba(185, 131, 255, 0.1), transparent 72%);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.02fr;
  gap: 56px;
  align-items: center;
}
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  font-size: 13px; color: var(--brand-dark);
  background: var(--brand-soft); border: 1px solid rgba(0, 122, 255, 0.18);
}
.hero h1 {
  margin: 18px 0 0;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.24; letter-spacing: -0.02em; font-weight: 800;
}
.hl { color: var(--brand); }
.hero__sub { margin-top: 18px; font-size: 16.5px; color: var(--muted); max-width: 520px; }

.qr-card {
  margin-top: 30px;
  display: flex; align-items: center; gap: 18px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  max-width: 420px;
}
.qr-card img { width: 100px; height: 100px; border-radius: 10px; flex: none; }
.qr-card__text b { font-size: 15.5px; }
.qr-card__text p { font-size: 13.5px; color: var(--muted); margin-top: 5px; }

/* ---------- 试画区 ---------- */
.demo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}
.demo__pad { position: relative; aspect-ratio: 4 / 3; background: #fff; }
.demo__pad canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.demo__hint {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 15px; color: #b9c0c8;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.demo__hint.hide { opacity: 0; }

.demo__toolbar { border-top: 1px solid var(--line); background: #fff; padding: 14px 16px 16px; }
.demo__row { display: flex; align-items: center; justify-content: center; gap: 9px; flex-wrap: wrap; }
.tbtn {
  width: 38px; height: 38px; flex: none;
  border-radius: 50%; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--ink-soft); background: #fff;
  transition: all 0.2s ease;
}
.tbtn svg { width: 18px; height: 18px; }
.tbtn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.tbtn.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); box-shadow: 0 3px 12px rgba(0, 122, 255, 0.22); }
.tbtn.more { font-size: 21px; font-weight: 600; line-height: 1; padding-bottom: 2px; }
.swatch {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%; border: 1.5px solid var(--line-strong);
  transition: all 0.2s ease;
}
.swatch:hover { transform: scale(1.08); }
.swatch.active { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); transform: scale(1.06); }
.sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }

/* 「+」展开的更多颜色，和小程序里一样 */
.demo__more { display: none; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 13px; }
.demo__more.open { display: flex; }

.demo__size { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.demo__size span { font-size: 13.5px; color: var(--muted); flex: none; }
.demo__size input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 999px; background: #e6eaee; outline: none;
}
.demo__size input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--line-strong);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.2); cursor: pointer;
}
.demo__size input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--line-strong); cursor: pointer;
}
.demo__tip { font-size: 12.5px; color: var(--muted); text-align: center; padding: 0 18px 16px; }

/* ---------- 通用区块 ---------- */
.section { padding: 78px 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--line); }
.sec-head { max-width: 620px; margin-bottom: 44px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
.sec-title { font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.sec-sub { margin-top: 14px; color: var(--muted); font-size: 15.5px; }

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.feat {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(0, 122, 255, 0.3); }
.feat__ico { font-size: 26px; line-height: 1; }
.feat h3 { margin: 14px 0 8px; font-size: 17px; font-weight: 700; }
.feat p { font-size: 14.5px; color: var(--muted); }

.steps .step {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px; position: relative;
}
.step__num {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 800; font-size: 15px;
}
.step h3 { margin: 14px 0 8px; font-size: 17px; font-weight: 700; }
.step p { font-size: 14.5px; color: var(--muted); }

.cta {
  margin-top: 40px;
  display: flex; align-items: center; gap: 24px;
  padding: 26px 30px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.cta img { width: 116px; height: 116px; border-radius: 12px; flex: none; }
.cta h3 { font-size: 20px; font-weight: 800; }
.cta p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 30px; background: #fff; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand b { font-size: 15px; }
.footer__brand p { font-size: 13px; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--ink-soft); }
.footer__links a:hover { color: var(--brand); }
.footer__legal {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between;
  font-size: 12.5px; color: var(--muted);
}
.footer__legal a:hover { color: var(--ink-soft); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 48px 0 56px; }
  .grid--3 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .cta { flex-direction: column; align-items: flex-start; gap: 18px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  .nav__links { gap: 16px; font-size: 13.5px; }
  .qr-card { flex-direction: column; align-items: flex-start; gap: 14px; }
  .demo__row { gap: 8px; }
  .tbtn { width: 36px; height: 36px; }
  .swatch { width: 30px; height: 30px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
