/* 绘光介绍页：配色和 App 的 Theme.swift 一致，日间米色纸张、奶白卡片、墨绿主色、朱红点缀；夜间纯黑底、深灰卡片 */
:root {
  color-scheme: light dark;
  --paper: #f4f2e9;
  --card: #fcfbf6;
  --line: rgba(0, 0, 0, .06);
  --ink: #212621;
  --muted: #787d75;
  --green: #3c614a;
  --green-soft: rgba(60, 97, 74, .10);
  --vermilion: #bd3b29;
  --on-green: #fff;
  /* 封面插画是浅色的，标题一直用日间的墨色 */
  --cover-ink: #212621;
  --cover-red: #bd3b29;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000;
    --card: #1c1c1e;
    --line: rgba(255, 255, 255, .09);
    --ink: #f0f0eb;
    --muted: #9ea19a;
    --green: #5e9170;
    --green-soft: rgba(94, 145, 112, .18);
    --vermilion: #eb664f;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  line-height: 1.7;
}
img, video { display: block; max-width: 100%; }
a { color: var(--green); }

.shell { width: min(1080px, 100% - 32px); margin: 0 auto; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.topnav { display: flex; align-items: center; gap: 22px; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.topnav a:hover { color: var(--ink); }
.topnav a.pill { color: var(--on-green); }

/* 墨绿胶囊按钮，和 App 的「开始绘制」一样 */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 18px;
  background: var(--green); color: var(--on-green);
  font-weight: 650; font-size: 17px; text-decoration: none;
  transition: opacity .15s;
}
.pill:hover { opacity: .88; }
.pill-small { padding: 7px 16px; border-radius: 14px; font-size: 14px; }

/* 封面：秋天街角的循环动画 + 「绘光」标题，位置按封面宽度算，和 App 首页一样 */
.hero { padding: 28px 0 8px; }
.cover {
  position: relative; container-type: inline-size;
  aspect-ratio: 1140 / 650; overflow: hidden;
  border-radius: 28px; border: 1px solid var(--line);
  background: #efe6d6 url("/site/hero-autumn.jpg") center / cover no-repeat;
}
.cover-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-title { position: absolute; inset: 0; pointer-events: none; }
.cover-title strong {
  position: absolute; left: 2.9cqw; top: calc(24.5% - 1.09cqw);
  font-size: 10.9cqw; font-weight: 600; letter-spacing: .04em; line-height: 1.2;
  color: var(--cover-ink);
}
.cover-line {
  position: absolute; left: 2.8cqw; top: 53.8%;
  width: 31.5cqw; height: .95cqw; border-radius: 1cqw; background: var(--cover-red);
}
.cover-title em {
  position: absolute; left: 2.9cqw; top: calc(61.5% - .36cqw);
  font-size: 3.6cqw; font-style: normal; font-weight: 500; letter-spacing: .42em; line-height: 1.2;
  color: var(--cover-ink);
}

.hero-text { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 36px 4px 12px; }
h1 { margin: 0 0 12px; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.25; letter-spacing: .01em; }
.lead { margin: 0; max-width: 620px; color: var(--muted); font-size: 17px; }
.download { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.qr { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
/* 二维码一直是白底黑码，夜间也一样，扫码更稳 */
.qr img { width: 88px; height: 88px; padding: 7px; border-radius: 12px; background: #fff; }

/* 分区 */
.section { padding: 56px 0 8px; }
.section-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.badge {
  flex-shrink: 0; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--green); color: var(--on-green);
  font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
}
h2 { margin: 0; font-size: clamp(22px, 3vw, 28px); line-height: 1.3; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 640px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  margin: 0; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--line); background: var(--card);
}
.card img, .card video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--green-soft); }
.card figcaption { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.card b { font-size: 16px; font-weight: 650; }
.card span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.new {
  display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 8px;
  background: var(--vermilion); color: #fff;
  font-size: 11px; font-style: normal; font-weight: 650; line-height: 18px; vertical-align: 2px;
}

/* 三步 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step; display: flex; flex-direction: column; gap: 4px;
  padding: 20px 20px 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--card);
}
.steps li::before { content: "0" counter(step); color: var(--vermilion); font-weight: 700; font-size: 14px; letter-spacing: .08em; }
.steps b { font-size: 17px; }
.steps span { color: var(--muted); font-size: 14px; }

/* 隐私 */
.privacy { padding: clamp(22px, 4vw, 40px); border-radius: 28px; background: var(--green-soft); }
.privacy h2 { margin-bottom: 14px; }
.privacy ul { margin: 0 0 16px; padding-left: 20px; }
.privacy li { margin: 6px 0; }
.privacy a { font-weight: 650; text-decoration: none; }

.closing { padding-top: 64px; text-align: center; }
.closing p { margin: 6px 0 22px; color: var(--muted); }

.footer { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 64px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px; }
.footer nav { display: flex; gap: 22px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer p { margin: 0; }

@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  /* 三张卡排两列时，落单的最后一张占满一行：图在左、文字在右 */
  .grid-3 > .card:last-child:nth-child(odd) { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .hero-text { flex-direction: column; align-items: flex-start; gap: 22px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topnav a:not(.pill) { display: none; }
  .hero { padding-top: 16px; }
  .cover { border-radius: 22px; }
  .hero-text { padding: 24px 2px 4px; }
  .lead { font-size: 16px; }
  /* 手机上直接点按钮下载，不显示二维码 */
  .qr { display: none; }
  .download, .download .pill { width: 100%; }
  .grid { gap: 12px; }
  .card { border-radius: 18px; }
  .card figcaption { padding: 10px 12px 12px; }
  .card b { font-size: 15px; }
  .section { padding-top: 44px; }
}
