/* ============================================================
   GuoFeng Home · Design System
   水墨青绿 · 现代东方美学
   ============================================================ */


:root {
  /* —— 色板：青瓷 / 远山 / 墨色 / 鎏金 —— */
  --bg: #f4f7f7;
  --bg-alt: #e9f0f1;
  --surface: #ffffff;
  --surface-2: #f8fbfb;
  --ink: #14262c;
  --ink-2: #2c4049;
  --muted: #5c717c;
  --faint: #93a5ad;
  --line: rgba(20, 44, 55, 0.10);
  --line-strong: rgba(20, 44, 55, 0.18);

  /* 品牌主色：青瓷绿 */
  --brand: #0d8373;
  --brand-2: #14b8a6;
  --brand-3: #0b6659;
  --brand-soft: rgba(13, 131, 115, 0.10);
  --brand-grad: linear-gradient(135deg, #0d8373 0%, #16876e 40%, #3c8d91 100%);

  /* 点睛：鎏金 */
  --gold: #c2933c;
  --gold-soft: rgba(194, 147, 60, 0.12);

  /* 功能 */
  --danger: #c2554d;
  --ok: #2c9e7a;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(18, 40, 50, 0.05);
  --shadow-md: 0 8px 24px rgba(18, 40, 50, 0.08);
  --shadow-lg: 0 20px 50px rgba(18, 40, 50, 0.12);
  --shadow-brand: 0 12px 32px rgba(13, 131, 115, 0.22);

  --font-serif: "LXGW WenKai Screen", "LXGW WenKai", "霞鹜文楷", "霞鹜文楷 屏幕版", "Noto Serif SC", "Songti SC", serif;
  --font-sans: "LXGW WenKai Screen", "LXGW WenKai", "霞鹜文楷", "霞鹜文楷 屏幕版", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;

  --max: 1120px;
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b161c;
    --bg-alt: #0f1e26;
    --surface: #13232c;
    --surface-2: #182b35;
    --ink: #eef5f5;
    --ink-2: #c6d5d9;
    --muted: #8aa2ab;
    --faint: #5c727c;
    --line: rgba(200, 225, 230, 0.10);
    --line-strong: rgba(200, 225, 230, 0.18);

    --brand: #2bb8a3;
    --brand-2: #34d0ba;
    --brand-3: #1a9c87;
    --brand-soft: rgba(43, 184, 163, 0.12);
    --brand-grad: linear-gradient(135deg, #0e6e62 0%, #169887 45%, #2c768d 100%);

    --gold: #d6ac5a;
    --gold-soft: rgba(214, 172, 90, 0.14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.46);
    --shadow-brand: 0 14px 36px rgba(14, 110, 98, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }

/* ---------- 布局 ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  box-shadow: var(--shadow-brand);
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav a {
  color: var(--ink-2);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: 0.2s ease;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
}
@media (max-width: 860px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px 16px 18px;
    box-shadow: var(--shadow-md);
  }
}
.menu-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
}
@media (max-width: 860px) { .menu-btn { display: inline-flex; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(20, 184, 166, 0.18), transparent 60%),
    radial-gradient(700px 360px at 10% 100%, rgba(194, 147, 60, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  pointer-events: none;
  opacity: 0.55;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.hero h1 {
  margin: 20px 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.18;
  letter-spacing: 0.02em;
  font-weight: 900;
}
.hero h1 .accent {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 0 0 28px;
  max-width: 680px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.9;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: 0.22s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  color: #fff;
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.btn-gold {
  background: linear-gradient(135deg, #d2a24a, #b88730);
  color: #241803;
  box-shadow: 0 10px 28px rgba(194, 147, 60, 0.28);
}

/* ---------- 卡片 ---------- */
.grid {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: 0.25s ease;
  overflow: hidden;
  color: inherit;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  background: var(--brand-soft);
  margin-bottom: 16px;
}
.card h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 1.22rem;
  letter-spacing: 0.02em;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}
.card .meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  background: var(--bg-alt);
  color: var(--muted);
  border: 1px solid var(--line);
}
.tag-brand {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 24%, transparent);
}
.tag-gold {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 28%, transparent);
}

/* 顶栏渐变描边卡片 */
.card-featured {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--brand), var(--gold)) border-box;
  border: 1.5px solid transparent;
}

/* ---------- 分区标题 ---------- */
.section {
  padding: 72px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  letter-spacing: 0.03em;
}
.section-head .sub {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 560px;
}
.section-kicker {
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ---------- 页头（内页） ---------- */
.page-hero {
  padding: 56px 0 36px;
  background:
    radial-gradient(700px 300px at 80% 0%, rgba(20, 184, 166, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  margin: 10px 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}
.page-hero .lead {
  color: var(--muted);
  max-width: 720px;
  font-size: 1.05rem;
}
.breadcrumb {
  display: flex;
  gap: 8px;
  color: var(--faint);
  font-size: 0.88rem;
}
.breadcrumb a { color: var(--muted); }

/* ---------- 表格 / 代码 / 提示 ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.panel-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.12rem;
}
.panel-body { padding: 20px; }

.copy-line {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  word-break: break-all;
}
.copy-line code {
  flex: 1;
  color: var(--ink-2);
}
.btn-copy {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: var(--radius-xs);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: var(--font-sans);
}
.btn-copy:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.notice {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  color: var(--ink-2);
  font-size: 0.94rem;
}
.notice-brand {
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th,
table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.data th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface-2);
}
table.data tr:hover td { background: color-mix(in srgb, var(--brand) 4%, transparent); }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ---------- 频率 / 卡片列表 ---------- */
.freq-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
}
.freq-card h3 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1.18rem;
}
.freq-card .code {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}
.freq-card .loc {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 6px 0 14px;
}
.freq-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
  font-size: 0.92rem;
}
.freq-row .k { color: var(--muted); }
.freq-row .v { font-family: var(--font-mono); color: var(--ink); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 40px;
  padding: 42px 0 34px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}
@media (max-width: 820px) {
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
.site-footer h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: var(--font-serif);
}
.site-footer a {
  display: block;
  color: var(--muted);
  padding: 3px 0;
}
.site-footer a:hover { color: var(--brand); }
.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 0.85rem;
}

/* ---------- 工具 ---------- */
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; } .mt-4 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 28px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 36px 0;
}

/* 入场动画 */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    animation: fadeUp 0.7s cubic-bezier(.2,.7,.2,1) both;
  }
  .delay-1 { animation-delay: 0.08s; }
  .delay-2 { animation-delay: 0.16s; }
  .delay-3 { animation-delay: 0.24s; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
