/* ============================================================
   A3G 模板库 · 样式
   方向：暖纸底 + 近黑字 + 发丝线，克制、专业，服务「已成交客户选型」
   ============================================================ */

:root {
  --bg:            #faf9f7;
  --surface:       #ffffff;
  --line:          #eae7e2;
  --line-strong:   #d8d4cd;
  --ink:           #16181c;
  --ink-2:         #5b6068;
  --ink-3:         #93989f;
  --accent:        #16181c;

  --header-bg:     rgba(250,249,247,.86);
  --chip-bg:       #f1efeb;
  --chip-hover:    #e8e5df;
  --media-bg:      #efece8;
  --soft-bg:       #f2f0ec;

  --geo-bg:        #16181c;
  --geo-fg:        #f2efe9;
  --geo-muted:     #9ea3ab;
  --geo-eyebrow:   #8b8f96;
  --geo-line:      rgba(255,255,255,.12);

  --card-shadow:   rgba(20,22,26,.34);
  --radius:        12px;
  --max:           1280px;
  --ease:          cubic-bezier(.22,.61,.36,1);
}

html[data-theme="dark"] {
  --bg:            #0f1012;
  --surface:       #16181c;
  --line:          #23252a;
  --line-strong:   #34373e;
  --ink:           #f1eee8;
  --ink-2:         #a3a8b0;
  --ink-3:         #6c7178;
  --accent:        #f1eee8;

  --header-bg:     rgba(15,16,18,.86);
  --chip-bg:       #212429;
  --chip-hover:    #2c3037;
  --media-bg:      #17191d;
  --soft-bg:       #23262c;

  --geo-bg:        #15171a;
  --geo-fg:        #f1eee8;
  --geo-muted:     #8e939b;
  --geo-eyebrow:   #6c7178;
  --geo-line:      rgba(255,255,255,.10);
  --card-shadow:   rgba(0,0,0,.55);
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body { transition: background-color .25s var(--ease), color .25s var(--ease); }

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  font-size: 13px; font-weight: 700; letter-spacing: .14em;
  color: var(--ink);
}
.brand-sep { width: 1px; height: 13px; background: var(--line-strong); }
.brand-text { font-size: 13.5px; color: var(--ink-2); letter-spacing: .06em; }

.nav { display: flex; gap: 2px; }
.nav a {
  padding: 6px 14px; border-radius: 7px;
  font-size: 13.5px; color: var(--ink-2);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); }

/* ---------- 明暗切换 ---------- */

.theme-toggle {
  width: 34px; height: 34px; margin-left: 4px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: none; color: var(--ink-2);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.theme-toggle:hover { background: var(--chip-bg); color: var(--ink); }
.theme-toggle svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
html[data-theme="light"] .i-sun  { display: none; }
html[data-theme="dark"]  .i-moon { display: none; }

/* ---------- 首屏 ---------- */

.hero { padding: 92px 0 44px; text-align: center; }

.eyebrow {
  margin: 0 0 22px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .22em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -.035em;
  color: var(--ink);
}

.hero-sub {
  margin: 0 auto 34px; max-width: 560px;
  color: var(--ink-2); font-size: 15.5px; line-height: 1.75;
}
.hero-sub b { color: var(--ink); font-weight: 600; }

.search-box {
  position: relative;
  display: flex; align-items: center;
  width: 100%; max-width: 520px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color .2s var(--ease);
}
.search-box:focus-within { border-color: var(--ink); }
.search-icon {
  width: 17px; height: 17px; margin-left: 18px; flex: none;
  fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round;
}
.search-box input {
  flex: 1; width: 100%;
  padding: 15px 16px; border: 0; background: none; outline: none;
  font-size: 14.5px; color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box input::-webkit-search-cancel-button { display: none; }
.q-clear {
  margin-right: 10px; width: 24px; height: 24px; flex: none;
  border: 0; border-radius: 50%;
  background: var(--chip-bg); color: var(--ink-2);
  font-size: 16px; line-height: 1;
  display: grid; place-items: center;
}
.q-clear:hover { background: var(--chip-hover); color: var(--ink); }

.stats {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 30px; color: var(--ink-3); font-size: 13px;
}
.stats b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.stats .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

/* ---------- 筛选 ---------- */

.filter-wrap {
  position: sticky; top: 64px; z-index: 40;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.filter-wrap > .wrap { padding-top: 14px; padding-bottom: 14px; }

.filter-row { display: flex; align-items: flex-start; gap: 14px; padding: 5px 0; }
.filter-label {
  flex: none; width: 34px; padding-top: 5px;
  font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }

.chip {
  padding: 4px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--chip-bg);
  color: var(--ink-2);
  font-size: 13px; line-height: 1.6;
  transition: color .15s var(--ease), background .15s var(--ease);
  white-space: nowrap;
}
.chip:hover { color: var(--ink); background: var(--chip-hover); }
.chip.on {
  color: #fff; background: var(--ink); font-weight: 500;
}

/* ---------- 结果行 ---------- */

.main { padding-top: 30px; padding-bottom: 96px; }

.result-line {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.result-right { display: flex; align-items: center; gap: 16px; }

.sort { display: flex; gap: 2px; }
.sort-btn {
  padding: 3px 10px; border: 0; border-radius: 5px;
  background: none; color: var(--ink-3); font-size: 12.5px;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.sort-btn:hover { color: var(--ink-2); }
.sort-btn.on { color: var(--ink); background: var(--soft-bg); font-weight: 500; }

.reset {
  padding: 3px 10px; border: 0; border-radius: 5px;
  background: none; color: var(--ink-2); font-size: 12.5px;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}
.reset:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ---------- 列表 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 34px 28px;
}

.card {
  display: block;
  border-radius: var(--radius);
  animation: cardIn .45s var(--ease) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 缩略图：彩色底 + 浏览器框 */

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 20px 20px 0;
  background: color-mix(in srgb, var(--tone, #8b93a1) 11%, var(--bg));
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.card:hover .card-media {
  box-shadow: 0 18px 40px -22px var(--card-shadow);
  transform: translateY(-3px);
}

.frame {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 7px 7px 0 0;
  box-shadow: 0 14px 30px -14px rgba(10,12,16,.42);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover .frame {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px -18px rgba(10,12,16,.5);
}

.frame-bar {
  flex: none;
  height: 16px;
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px;
  background: #f4f2ef;
  border-bottom: 1px solid #eae7e2;
}
.frame-bar i {
  width: 5px; height: 5px; border-radius: 50%;
  background: #d8d4ce;
}

.frame img {
  width: 100%; height: calc(100% - 16px);
  object-fit: cover; object-position: top center;
  display: block;
}
.frame.no-img img { display: none; }

.frame .ph {
  position: absolute; inset: 16px 0 0;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #e2ded8, #ccc6bd);
  color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .06em;
}

.card-overlay {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center;
  background: rgba(16,18,22,.34);
  opacity: 0;
  transition: opacity .28s var(--ease);
}
.card:hover .card-overlay { opacity: 1; }

.card-cta {
  padding: 9px 22px;
  background: #fff; color: #16181c;
  border-radius: 7px;
  font-size: 13px; font-weight: 600;
  letter-spacing: .02em;
  transform: translateY(6px);
  transition: transform .28s var(--ease);
}
.card:hover .card-cta { transform: translateY(0); }



.card-body { padding: 14px 2px 0; }
.card-title {
  margin: 0 0 8px;
  font-size: 15px; font-weight: 600; line-height: 1.5;
  letter-spacing: -.005em;
  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;
  font-size: 12.5px; color: var(--ink-3);
}
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.tag {
  padding: 1px 7px; border-radius: 4px;
  background: var(--soft-bg); color: var(--ink-2);
  font-size: 11.5px; letter-spacing: .01em;
}
.tag-color { background: none; color: var(--ink-3); padding-left: 0; }
.tag-plat { background: var(--soft-bg); color: var(--ink-2); }

.card-right { display: flex; align-items: center; gap: 8px; flex: none; }
.swatch {
  width: 8px; height: 8px; border-radius: 50%;
  flex: none; opacity: .85;
}

/* ---------- 空状态 ---------- */

.empty { padding: 100px 0; text-align: center; color: var(--ink-3); }
.empty p { margin: 0 0 20px; font-size: 14.5px; }
.btn-ghost {
  padding: 9px 20px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: none; color: var(--ink-2); font-size: 13.5px;
}
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); }

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
}
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand .brand-mark { display: block; margin-bottom: 10px; }
.footer-brand p { margin: 0; font-size: 13px; color: var(--ink-3); letter-spacing: .02em; }
.footer-note { text-align: right; font-size: 12.5px; color: var(--ink-3); line-height: 1.9; }
.footer-note p { margin: 0; }
.muted { color: var(--ink-3); }

/* ---------- GEO 板块 ---------- */

.geo-band {
  background: var(--geo-bg);
  color: var(--geo-fg);
  padding: 88px 0;
  margin-top: 40px;
}
.geo-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }

.eyebrow.light { color: var(--geo-eyebrow); }
.geo-lead h2 {
  margin: 0 0 20px;
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.25;
  color: var(--geo-fg);
}
.geo-sub {
  margin: 0; max-width: 420px;
  font-size: 14.5px; line-height: 1.85;
  color: var(--geo-muted);
}

.geo-list {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 34px 36px;
  align-content: start;
}
.geo-list li {
  padding-top: 16px;
  border-top: 1px solid var(--geo-line);
}
.geo-list h3 {
  margin: 0 0 9px;
  font-size: 14.5px; font-weight: 600;
  color: var(--geo-fg); letter-spacing: .01em;
}
.geo-list p {
  margin: 0;
  font-size: 13px; line-height: 1.75;
  color: var(--geo-muted);
}

.geo-note {
  margin: 34px 0 0;
  padding-top: 24px;
  max-width: 420px;
  border-top: 1px solid var(--geo-line);
  font-size: 13.5px; line-height: 1.8; color: var(--geo-muted);
}
.geo-note b { color: var(--geo-fg); font-weight: 600; }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .geo-band { padding: 60px 0; }
  .geo-inner { grid-template-columns: 1fr; gap: 40px; }
  .geo-list { gap: 26px 24px; }
}


@media (max-width: 820px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 56px 0 34px; }
  .hero h1 { font-size: 31px; }
  .hero-sub { font-size: 14.5px; margin-bottom: 26px; }
  .stats { gap: 12px; font-size: 12.5px; margin-top: 24px; }

  .filter-wrap { top: 60px; }
  .filter-row { flex-direction: column; gap: 8px; padding: 4px 0; }
  .filter-label { width: auto; padding-top: 0; }
  .chips {
    overflow-x: auto; flex-wrap: nowrap;
    padding-bottom: 2px; scrollbar-width: none;
  }
  .chips::-webkit-scrollbar { display: none; }

  .result-line { flex-wrap: wrap; gap: 10px; }
  .grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-inner { flex-direction: column; gap: 20px; }
  .footer-note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
