/* ============================================================
 * 造物社区 Demo · 样式
 * 纯 CSS，无外部依赖。配色改 :root 里的变量即可。
 * ============================================================ */

:root {
  --ink: #0b1a12;
  --ink-2: #22382c;
  --muted: #62756a;
  --muted-2: #8a9a90;
  --bg: #f4f7f3;
  --bg-2: #edf3ee;
  --surface: #ffffff;
  --line: #e2e9e3;
  --line-2: #d2ddd5;
  --green: #1f9d55;
  --green-2: #178247;
  --green-dark: #0c3d28;
  --green-soft: #e8f5ed;
  --orange: #ff7a3d;
  --orange-soft: #fff1e9;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 26, 18, .06), 0 4px 12px rgba(11, 26, 18, .04);
  --shadow: 0 10px 30px rgba(11, 26, 18, .08);
  --shadow-lg: 0 24px 60px rgba(11, 26, 18, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(31, 157, 85, .2);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

section[id] {
  scroll-margin-top: 88px;
}

.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}

.btn.primary {
  background: linear-gradient(135deg, #23b163, #137a43);
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 157, 85, .25);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(31, 157, 85, .3);
}

.btn.ghost {
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}

.btn.ghost:hover {
  border-color: var(--green);
  color: var(--green-2);
}

.btn.small {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

/* ---------- 顶部导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 247, 243, .84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, .9);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #24b463, #127a41);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(31, 157, 85, .28);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 17px;
  letter-spacing: .02em;
}

.brand-text small {
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--muted-2);
  font-weight: 700;
}

.demo-badge {
  margin-left: 2px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--orange-soft);
  color: #c2410c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  align-self: flex-start;
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background .2s ease, color .2s ease;
}

.nav a:hover {
  background: var(--green-soft);
  color: var(--green-2);
}

.nav a.active {
  background: var(--ink);
  color: #fff;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 74px;
  background:
    radial-gradient(900px 480px at 10% -12%, rgba(31, 157, 85, .15), transparent 62%),
    radial-gradient(720px 420px at 94% 6%, rgba(255, 122, 61, .1), transparent 60%),
    linear-gradient(180deg, #f7faf6, var(--bg));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 26, 18, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 26, 18, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 42%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 42%, transparent 78%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--green-2);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 5.4vw, 66px);
  line-height: 1.06;
  letter-spacing: -.03em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  color: var(--green);
  background: linear-gradient(180deg, transparent 64%, rgba(31, 157, 85, .17) 64%);
}

.hero-sub {
  max-width: 520px;
  font-size: 16.5px;
  color: var(--muted);
  margin: 0 0 30px;
}

/* 搜索 */

.hero-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  max-width: 560px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.hero-search:focus-within {
  border-color: rgba(31, 157, 85, .55);
  box-shadow: 0 0 0 4px rgba(31, 157, 85, .12);
}

.hero-search svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted-2);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.hero-search input::placeholder {
  color: var(--muted-2);
}

.hero-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.hero-search .btn {
  height: 40px;
  padding: 0 20px;
}

/* 统计 */

.hero-stats {
  display: flex;
  gap: 38px;
  margin-top: 34px;
}

.hero-stats > div {
  position: relative;
}

.hero-stats > div + div::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line-2);
}

.hero-stats strong {
  display: block;
  font-size: 26px;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.hero-stats span {
  font-size: 13px;
  color: var(--muted);
}

/* 右侧卡片堆 */

.hero-art {
  position: relative;
  height: 430px;
}

.stack {
  position: relative;
  width: 360px;
  height: 100%;
  margin-left: auto;
}

.stack-card {
  position: absolute;
  width: 282px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

.stack-card.side {
  opacity: .72;
  filter: saturate(.9);
}

.stack-card.side .mini-body {
  display: none;
}

.stack-card.side .mini-cover {
  border-radius: 18px;
}

.stack-card.left {
  top: 54px;
  left: 0;
  transform: rotate(-10deg) scale(.9);
  transform-origin: bottom left;
  z-index: 1;
}

.stack-card.right {
  top: 22px;
  right: 0;
  transform: rotate(8deg) scale(.92);
  transform-origin: bottom right;
  z-index: 2;
}

.stack-card.front {
  top: 116px;
  left: 38px;
  z-index: 3;
}

.hero-art:hover .stack-card.front {
  transform: translateY(-8px);
}

.mini-cover {
  height: 118px;
  display: grid;
  place-items: center;
  font-size: 46px;
  background: linear-gradient(135deg, var(--c1, #1f9d55), var(--c2, #0b3d2e));
  position: relative;
}

.mini-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000, transparent 78%);
  mask-image: radial-gradient(circle at 50% 45%, #000, transparent 78%);
}

.mini-body {
  padding: 12px 14px 14px;
}

.mini-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.mini-body strong {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}

.mini-tags {
  display: flex;
  gap: 5px;
  margin-bottom: 7px;
}

.mini-tags span {
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--green-soft);
  color: var(--green-2);
  font-size: 10px;
  font-weight: 700;
}

.mini-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 11px;
}

.float-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  animation: float 5.4s ease-in-out infinite;
  z-index: 4;
}

.pill-1 {
  top: 6px;
  left: 0;
}

.pill-2 {
  bottom: 22px;
  right: 6px;
  animation-delay: -2.7s;
}

.float-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 157, 85, .16);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(31, 157, 85, .18); }
  50% { box-shadow: 0 0 0 7px rgba(31, 157, 85, .05); }
}

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

.section {
  padding: 84px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -.02em;
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  max-width: 380px;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- 工具栏 ---------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.chip {
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.chip:hover {
  border-color: var(--green);
  color: var(--green-2);
}

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.result-count {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.sort {
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
}

.sort button {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background .2s ease, color .2s ease;
}

.sort button.active {
  background: var(--green-soft);
  color: var(--green-2);
}

/* ---------- 项目卡片 ---------- */

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--line-2);
}

.card:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* 整卡可点击的链接层，覆盖在卡片内容之上 */
.card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.card-cover {
  position: relative;
  height: 158px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--c1, #1f9d55), var(--c2, #0b3d2e));
  overflow: hidden;
}

.card-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .15) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 82%);
  mask-image: radial-gradient(circle at 50% 40%, #000, transparent 82%);
}

.cover-emoji {
  position: relative;
  font-size: 58px;
  line-height: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .25));
  transform: translateY(2px);
  transition: transform .3s ease;
}

.card:hover .cover-emoji {
  transform: translateY(-2px) scale(1.06);
}

.cover-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--green-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.cover-cat {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .3);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 18px 16px;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.card-tags span {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.card-title {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -.01em;
}

.card-summary {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.author {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 62%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.author i {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-2);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.card-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
}

.card-stats .stars {
  color: #b45309;
  font-weight: 700;
}

.card-stats .license {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.meta-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
  font-size: 12px;
}

.meta-right > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-right svg {
  width: 14px;
  height: 14px;
}

.like-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 12px;
  transition: color .2s ease, transform .15s ease;
}

.like-btn svg {
  width: 14px;
  height: 14px;
}

.like-btn:hover {
  color: #e8503a;
}

.like-btn.liked {
  color: #e8503a;
}

.like-btn.liked svg {
  fill: #e8503a;
}

.like-btn:active {
  transform: scale(.92);
}

/* ---------- 空状态 ---------- */

.empty {
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: 24px;
  color: var(--muted);
}

.empty .empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 18px;
}

.empty p {
  margin: 0 0 18px;
  font-size: 14px;
}

/* ---------- 活动 ---------- */

.activity {
  padding: 24px 0 84px;
}

.activity-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.45fr .55fr;
  gap: 32px;
  align-items: center;
  overflow: hidden;
  padding: clamp(28px, 4vw, 52px);
  border-radius: 28px;
  background: linear-gradient(120deg, #0c3d28, #0a2a1d 55%, #123f2c);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.activity-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 82% 18%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 82% 18%, #000, transparent 72%);
}

.activity-card > * {
  position: relative;
  z-index: 1;
}

.activity-card .eyebrow {
  color: #8fe0ae;
}

.activity-card .eyebrow::before {
  background: #8fe0ae;
}

.activity h2 {
  margin: 10px 0 4px;
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -.02em;
}

.activity-sub {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #8fe0ae;
  letter-spacing: .06em;
}

.activity p {
  max-width: 560px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, .72);
  font-size: 14.5px;
}

.activity-rewards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.activity-rewards span {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 12.5px;
  font-weight: 600;
}

.activity-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  text-align: right;
}

.countdown small {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
}

.countdown strong {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #8fe0ae;
  white-space: nowrap;
}

.activity-side .btn.primary {
  background: #fff;
  color: var(--green-dark);
  box-shadow: none;
}

/* ---------- 加速计划 ---------- */

.program {
  padding: 84px 0;
  background: linear-gradient(180deg, var(--bg), #ecf3ed);
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 34px;
}

.program-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.program-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: var(--green-soft);
  opacity: .75;
}

.program-card .step {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--green);
}

.program-card h3 {
  position: relative;
  z-index: 1;
  margin: 12px 0 8px;
  font-size: 20px;
}

.program-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- CTA ---------- */

.cta {
  padding: 84px 0;
}

.cta-card {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 64px);
  border-radius: 28px;
  background: linear-gradient(135deg, #1f9d55, #0e6d3d);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000, transparent 80%);
  mask-image: radial-gradient(circle at 50% 0%, #000, transparent 80%);
}

.cta-card > * {
  position: relative;
  z-index: 1;
}

.cta h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -.02em;
}

.cta p {
  max-width: 560px;
  margin: 0 auto 26px;
  color: rgba(255, 255, 255, .8);
  font-size: 15px;
}

.cta .btn.primary {
  background: #fff;
  color: var(--green-dark);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .16);
}

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

.site-footer {
  padding: 56px 0 28px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 36px;
}

.footer-brand p {
  max-width: 320px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.footer-col h4 {
  margin: 0 0 12px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  color: var(--ink-2);
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--green-2);
}

.footer-note p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 12.5px;
}

/* ---------- 弹层 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(6, 20, 13, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal.is-open {
  display: grid;
}

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  animation: modalIn .28s cubic-bezier(.2, .8, .2, 1) both;
  overscroll-behavior: contain;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--ink-2);
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  transition: background .2s ease, transform .2s ease;
}

.modal-close:hover {
  background: #fff;
  transform: rotate(90deg);
}

/* 项目详情 */

.detail-cover {
  position: relative;
  height: 216px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--c1, #1f9d55), var(--c2, #0b3d2e));
  overflow: hidden;
}

.detail-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .14) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
}

.detail-emoji {
  position: relative;
  font-size: 82px;
  line-height: 1;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .3));
}

.detail-body {
  padding: 26px 30px 30px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-title {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.detail-like {
  flex: none;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.detail-meta .author {
  font-size: 13px;
}

.detail-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.detail-meta svg {
  width: 14px;
  height: 14px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
}

.detail-tags span {
  padding: 3px 10px;
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.detail-text {
  margin: 0 0 22px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
}

.specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 22px;
}

.specs > div {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-2);
}

.specs dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
}

.specs dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* 发布表单 */

.form-body {
  padding: 26px 30px 30px;
}

.form-title {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: -.02em;
}

.form-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13.5px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  outline: 0;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 157, 85, .12);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hint {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 12px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch {
  width: 38px;
  height: 38px;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.swatch:hover {
  transform: translateY(-2px);
}

.swatch.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11, 26, 18, .08);
}

.form-error {
  display: none;
  margin: 4px 0 0;
  color: #d33;
  font-size: 13px;
}

.form-error.show {
  display: block;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

/* ---------- Toast ---------- */

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(11, 26, 18, .92);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .hero-inner {
    gap: 32px;
  }

  .stack {
    transform: scale(.9);
    transform-origin: top right;
  }
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-art {
    display: none;
  }

  .hero-sub {
    max-width: 640px;
  }

  .activity-card {
    grid-template-columns: 1fr;
  }

  .activity-side {
    align-items: flex-start;
    text-align: left;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .header-inner {
    height: 64px;
  }

  .hero {
    padding: 54px 0 56px;
  }

  .section,
  .program,
  .cta {
    padding: 64px 0;
  }

  .activity {
    padding: 12px 0 64px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1200px, 100% - 32px);
  }

  .brand-text small {
    display: none;
  }

  .demo-badge {
    display: none;
  }

  .header-actions .btn.primary {
    height: 38px;
    padding: 0 14px;
    font-size: 13.5px;
  }

  .hero h1 {
    font-size: clamp(34px, 9.2vw, 46px);
  }

  .hero-sub {
    font-size: 15px;
  }

  .hero-search {
    padding-left: 14px;
  }

  .hero-search .btn {
    padding: 0 16px;
  }

  .hero-stats {
    gap: 22px;
  }

  .hero-stats > div + div::before {
    left: -11px;
  }

  .hero-stats strong {
    font-size: 22px;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: none;
  }

  .toolbar {
    gap: 12px;
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card-cover {
    height: 148px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .modal {
    padding: 0;
    align-items: end;
  }

  .modal-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
  }

  .detail-body,
  .form-body {
    padding: 22px 20px 26px;
  }

  .detail-title {
    font-size: 22px;
  }

  .specs {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .hero-stats {
    gap: 16px;
  }

  .hero-stats > div + div::before {
    display: none;
  }

  .card-title {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
