/* CATALK 官网 · 纸质手账风格。颜色取自 Theme.swift（见 design-system/README.md §3.1），不要另起新色。 */
:root {
  --cream: #FFF8E7;        /* brandCream */
  --paper: #FDF6E3;        /* brandCreamLight */
  --paper-white: #FFFCF3;  /* paperWhite */
  --label: #FFFAEE;        /* paperLabel */
  --caramel: #E67E22;      /* brandCaramel：只给主操作 */
  --coral: #FFB088;        /* brandCoral */
  --ink: #5D4037;          /* brandText */
  --muted: #847468;        /* inkMuted */
  --faint: #82766B;        /* inkFaint */
  --line: #E4D3BA;         /* tabBarLine */
  --icon: #B88061;         /* iconBrown */
  --button-text: #FFF9E9;
  --font: "LXGW WenKai", "Kaiti SC", "STKaiti", "KaiTi", serif;
  --max: 1040px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.7;
  position: relative;
  isolation: isolate;
}
/* 纸纹：透明度 0.3，multiply */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("img/paper-grain.png") repeat;
  background-size: 256px;
  opacity: .3;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -1;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 4px; }
a:focus-visible { outline: 3px solid #B95C19; outline-offset: 4px; border-radius: 4px; }

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

/* 图标：单色 SVG 作为遮罩，颜色跟随 currentColor */
.icon {
  display: inline-block;
  width: 22px; height: 22px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}

/* 顶栏 */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; font-weight: 500; letter-spacing: 1px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; box-shadow: 0 2px 4px #70502B1C; }
.top nav { display: flex; gap: 22px; font-size: 16px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }

/* 首屏 */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px; padding-bottom: 72px;
}
.hero h1 { font-size: clamp(38px, 6vw, 56px); font-weight: 500; line-height: 1.25; margin: 0 0 18px; letter-spacing: 2px; }
.hero .lead { font-size: 19px; color: var(--muted); margin: 0 0 32px; max-width: 30em; }
.primary {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 26px;
  background: var(--caramel); color: var(--button-text);
  border-radius: 12px; text-decoration: none; font-size: 17px; font-weight: 500;
  box-shadow: 0 4px 9px #98561E26;
  transition: transform .16s ease-out;
}
.primary:active { transform: translateY(2px); }
.primary svg { width: 20px; height: 20px; fill: currentColor; }
.hero .note { font-size: 14px; color: var(--faint); margin: 14px 0 0; }

/* 相框 + 胶带 + 名签 */
.frame {
  position: relative;
  background: var(--paper-white);
  padding: 12px 12px 20px;
  border-radius: 2px;
  transform: rotate(-2deg);
  box-shadow: 0 6px 14px #66502C22;
  max-width: 420px; margin: 0 auto;
}
.frame img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.tape {
  position: absolute; top: -15px; left: calc(50% - 45px);
  width: 91px; height: 29px;
  background: #EAD4A373;
  transform: rotate(-5deg);
  clip-path: polygon(2% 0, 98% 2%, 96% 17%, 100% 28%, 97% 41%, 100% 56%, 96% 73%, 100% 92%, 0 100%, 3% 84%, 0 70%, 3% 54%, 0 32%, 4% 16%);
}
.badge {
  position: absolute; left: 50%; bottom: -18px;
  transform: translateX(-50%) rotate(-3deg);
  background: var(--label);
  padding: 4px 16px;
  border-radius: 3px;
  box-shadow: 0 2px 4px #70502B1C;
  font-size: 18px; font-weight: 500; white-space: nowrap;
}

/* 区块标题 */
.section { padding-top: 56px; padding-bottom: 24px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 500; margin: 0 0 8px; }
.section-title .icon { width: 26px; height: 26px; color: var(--icon); }
.section-sub { color: var(--muted); margin: 0 0 28px; font-size: 16px; }

/* 撕纸卡片 */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  position: relative; isolation: isolate;
  padding: 24px 24px 26px;
  filter: drop-shadow(0 3px 3px #6B482418);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--paper);
  -webkit-mask: url("img/torn-paper.svg") center / 100% 100%;
  mask: url("img/torn-paper.svg") center / 100% 100%;
}
.card h3 { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 500; margin: 0 0 8px; }
.card h3 .icon { color: var(--icon); }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

/* 标签胶囊：浅底 = 原色 35% 混 #FFFAF0 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 17px; font-size: 13px; white-space: nowrap;
  background: color-mix(in srgb, var(--tag) 35%, #FFFAF0);
}
.chip .icon { width: 16px; height: 16px; }

/* 截图 */
.shots {
  display: flex; gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 4px 18px;
  scrollbar-width: thin;
}
.shots img {
  flex: none; width: 220px; height: auto;
  border-radius: 14px;
  scroll-snap-align: start;
  box-shadow: 0 4px 10px #70502B1F;
}

/* 结尾 */
.closing { text-align: center; padding-top: 56px; padding-bottom: 64px; }
.closing p { color: var(--muted); margin: 0 0 20px; font-size: 17px; }

/* 页脚 */
footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 36px;
  font-size: 14px; color: var(--faint);
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; }
footer a { color: var(--faint); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }

/* 正文页（隐私政策） */
.doc { max-width: 720px; padding-top: 44px; padding-bottom: 56px; }
.doc h1 { font-size: 34px; font-weight: 500; margin: 0 0 6px; }
.doc .meta { color: var(--faint); font-size: 14px; margin: 0 0 30px; }
.doc h2 { font-size: 21px; font-weight: 500; margin: 32px 0 8px; }
.doc p, .doc li { font-size: 16px; }
.doc ul { padding-left: 1.3em; }
.doc li { margin: 4px 0; }

@media (max-width: 760px) {
  .hero h1 { font-size: 32px; }
  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 36px; padding-bottom: 48px; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; font-size: 17px; }
  .frame { max-width: 320px; }
  .features { grid-template-columns: 1fr; }
  .shots img { width: 180px; }
  .top nav { gap: 16px; font-size: 15px; }
  .brand { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 图标表（url 写在本文件里，相对路径以本文件为基准） */
.i-paw { --i: url("img/paw.svg"); }
.i-mic { --i: url("img/mic.svg"); }
.i-tag { --i: url("img/tag.svg"); }
.i-bars { --i: url("img/bars.svg"); }
.i-cat { --i: url("img/cat.svg"); }
.i-heart { --i: url("img/heart.svg"); }
.i-bowl { --i: url("img/bowl.svg"); }
.i-door { --i: url("img/door.svg"); }
.i-moon { --i: url("img/moon.svg"); }
