/* === 城市风物志 — 编辑/杂志风格设计系统 v5 === */
:root {
  /* 五色系统 */
  --ink-black: #2c2c2c;
  --ink-dark: #3a3a3a;
  --ink-gray: #6b6b6b;
  --ink-light: #99968f;
  --paper-white: #f5f0e8;
  --paper-warm: #faf6f0;
  --paper-card: #fdfcf9;
  --celadon: #7aab8c;
  --celadon-dark: #5c8a71;
  --celadon-pale: #d4e8dc;
  --vermillion: #c23a2b;
  --vermillion-light: #d9534a;
  --vermillion-pale: #f5e0dd;
  --gold: #b8860b;
  --gold-light: #d4a843;
  --gold-pale: #f5ecd9;
  --border: #d9d2c4;
  --border-light: #e8e2d6;

  /* 圆角 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --serif: "Source Han Serif CN", "Noto Serif CJK SC", "STSong", "Songti SC", Georgia, serif;

  /* 排版比例 — 1.25 比例因子（Major Third） */
  --text-hero: 3.5rem;      /* 56px */
  --text-h1: 2.5rem;        /* 40px */
  --text-h2: 2rem;          /* 32px */
  --text-h3: 1.375rem;      /* 22px */
  --text-h4: 1.125rem;      /* 18px */
  --text-body: 1rem;        /* 16px */
  --text-small: 0.875rem;   /* 14px */
  --text-caption: 0.75rem;  /* 12px */

  /* 阴影系统 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.1);

  /* 间距基准 (8px) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--paper-white);
  color: var(--ink-black);
  line-height: 1.7;
  font-size: var(--text-body);
  /* 极淡的纸纹质感 */
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(122,171,140,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(184,134,11,0.04) 0%, transparent 50%);
}

/* === 顶部导航 v2 — 含汉堡菜单 === */
.site-header {
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--paper-warm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-logo {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-black);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo::before { content: "◆ "; color: var(--vermillion); }

/* 导航链接容器 */
.site-nav {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
}
.site-nav a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink-gray);
  text-decoration: none;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--ink-black);
  background: rgba(0,0,0,0.05);
}

/* 汉堡菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  transition: background var(--transition);
  position: relative;
  z-index: 101;
}
.menu-toggle:hover { background: rgba(0,0,0,0.05); }
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink-black);
  border-radius: 2px;
  transition: all var(--transition);
  transform-origin: center;
}
.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* === 容器 === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--space-5) 0; }

/* 区块交替背景 */
.section-alt {
  background: var(--paper-warm);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.section-celadon {
  background: linear-gradient(135deg, var(--celadon-pale) 0%, rgba(212,232,220,0.3) 100%);
  border-top: 1px solid rgba(122,171,140,0.15);
  border-bottom: 1px solid rgba(122,171,140,0.15);
}
.section-gold {
  background: linear-gradient(135deg, var(--gold-pale) 0%, rgba(245,236,217,0.3) 100%);
  border-top: 1px solid rgba(184,134,11,0.1);
  border-bottom: 1px solid rgba(184,134,11,0.1);
}

/* === 页面头部 === */
.page-header {
  padding: var(--space-5) 0 var(--space-3);
  text-align: center;
  position: relative;
}
.page-header::after {
  content: "◇ ◇ ◇";
  display: block;
  font-size: 11px;
  letter-spacing: 8px;
  color: var(--ink-light);
  margin-top: var(--space-2);
  opacity: 0.4;
}
.page-header h1 {
  font-family: var(--serif);
  font-size: var(--text-h1);
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink-black);
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.page-header p {
  font-size: var(--text-small);
  color: var(--ink-gray);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.text-accent { color: var(--vermillion); font-style: normal; }

.breadcrumb {
  font-size: 13px;
  color: var(--ink-light);
  margin-bottom: var(--space-3);
  padding: 8px 0;
}
.breadcrumb a { color: var(--ink-gray); text-decoration: none; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--ink-black); }
.breadcrumb .sep { margin: 0 8px; color: var(--border); }

/* === 标题区 === */
.section-header {
  text-align: center;
  margin-bottom: var(--space-4);
  position: relative;
}
.section-header h2 {
  font-family: var(--serif);
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--ink-black);
  line-height: 1.2;
}
.section-header p {
  font-size: var(--text-small);
  color: var(--ink-gray);
  margin-top: 8px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* 装饰性分隔线（标题装饰） */
.section-header::after {
  content: "◆";
  display: block;
  font-size: 12px;
  color: var(--vermillion);
  margin-top: var(--space-1);
  opacity: 0.5;
}

/* === 杂志网格 === */
.mag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mag-grid .featured { grid-column: 1 / -1; }

/* === 卡片 v2 — 更好的质感 === */
.card {
  background: var(--paper-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card h3 {
  font-family: var(--serif);
  font-size: var(--text-h3);
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink-black);
  line-height: 1.3;
}
.card p { color: var(--ink-gray); font-size: var(--text-small); line-height: 1.7; }

/* === 网格辅助 === */
.card-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* === 按钮 v2 === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: var(--text-small);
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  line-height: 1;
}
.btn-primary {
  background: var(--vermillion);
  color: #fff;
  box-shadow: 0 2px 8px rgba(194,58,43,0.2);
}
.btn-primary:hover {
  background: var(--vermillion-light);
  box-shadow: 0 4px 16px rgba(194,58,43,0.3);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--ink-black);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--ink-black);
  background: rgba(0,0,0,0.02);
}
.btn-sm { padding: 8px 20px; font-size: 13px; }
.btn-outline-celadon {
  background: transparent;
  color: var(--celadon-dark);
  border: 1px solid var(--celadon);
}
.btn-outline-celadon:hover {
  background: var(--celadon);
  color: #fff;
}

/* === Hero 区 v2 === */
.hero {
  position: relative;
  padding: 100px 0 64px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--paper-warm) 0%, var(--paper-white) 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, var(--celadon-pale) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, var(--vermillion-pale) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, var(--gold-pale) 0%, transparent 50%);
  opacity: 0.5;
  pointer-events: none;
}
.hero-title {
  font-family: var(--serif);
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-black);
  margin-bottom: 20px;
  line-height: 1.15;
  position: relative;
}
.hero-sub {
  font-size: 18px;
  color: var(--ink-gray);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
  position: relative;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* 装饰性浮标 */
.hero-ornament {
  position: absolute;
  font-size: 64px;
  opacity: 0.06;
  pointer-events: none;
  font-family: var(--serif);
  user-select: none;
}

/* === 城市卡片 v2 — 更有质感 === */
.city-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.city-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.city-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.city-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
}
.city-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

.city-card .cc-body { padding: 18px 22px 22px; }
.city-card .cc-body h3 {
  font-family: var(--serif);
  font-size: var(--text-h3);
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink-black);
  transition: color var(--transition);
}
.city-card:hover .cc-body h3 { color: var(--vermillion); }
.city-card .cc-body .cc-sub { font-size: 13px; color: var(--ink-gray); line-height: 1.5; }
.city-card .cc-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-block;
  font-size: 11px;
  color: var(--celadon-dark);
  background: rgba(255,255,255,0.92);
  padding: 3px 12px;
  border-radius: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* === 文章卡片 v2 === */
.article-row { display: flex; flex-direction: column; }
.article-card {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition);
  align-items: center;
}
.article-card:hover {
  opacity: 1;
  padding-left: 8px;
}
.article-card:last-child { border-bottom: none; }
.article-card img {
  width: 140px;
  height: 100px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.4s ease;
}
.article-card:hover img { transform: scale(1.03); }
.article-card h4 {
  font-family: var(--serif);
  font-size: var(--text-h4);
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-black);
  transition: color var(--transition);
}
.article-card:hover h4 { color: var(--vermillion); }
.article-card p { font-size: var(--text-small); color: var(--ink-gray); line-height: 1.6; }

/* === 标签 v2 === */
.ac-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}
.ac-tag.default  { background: var(--gold-pale); color: var(--gold); }
.ac-tag.culture  { background: var(--vermillion-pale); color: var(--vermillion); }
.ac-tag.nature   { background: var(--celadon-pale); color: var(--celadon-dark); }
.ac-tag.food     { background: #fde8d0; color: #d97706; }
.ac-tag.travel   { background: #dbeafe; color: #2563eb; }
.ac-tag.history  { background: #f3e8ff; color: #7c3aed; }

/* === 弹窗 === */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.25s ease;
}
.overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.modal h2 { font-family: var(--serif); font-size: var(--text-h3); margin-bottom: var(--space-2); color: var(--ink-black); }
.modal p { color: var(--ink-gray); font-size: var(--text-small); line-height: 1.6; margin-bottom: var(--space-1); }

/* === 页脚 v2 === */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding: var(--space-5) 24px var(--space-3);
  margin-top: 64px;
  background: var(--paper-warm);
  position: relative;
}
.site-footer::before {
  content: "◇ ◇ ◇";
  display: block;
  text-align: center;
  font-size: 11px;
  letter-spacing: 8px;
  color: var(--ink-light);
  opacity: 0.3;
  margin-bottom: var(--space-4);
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto var(--space-4);
}
.footer-brand { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink-black); }
.footer-brand span { color: var(--vermillion); }
.footer-desc { font-size: 13px; color: var(--ink-gray); margin-top: 8px; line-height: 1.6; max-width: 300px; }
.site-footer h4 {
  font-size: 13px; font-weight: 600; margin-bottom: var(--space-1);
  color: var(--ink-black); text-transform: uppercase; letter-spacing: 0.05em;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul a { font-size: 13px; color: var(--ink-gray); text-decoration: none; transition: color var(--transition); }
.site-footer ul a:hover { color: var(--ink-black); }
.footer-bottom {
  text-align: center; padding-top: 20px;
  border-top: 1px solid var(--border-light);
  font-size: 12px; color: var(--ink-light);
  max-width: var(--max-width); margin: 0 auto;
}

/* === 装饰性元素 === */
.divider-ornament {
  text-align: center;
  font-size: 12px;
  color: var(--ink-light);
  letter-spacing: 8px;
  opacity: 0.3;
  padding: var(--space-3) 0;
}

/* 城市详情页统计数字 */
.stat-block {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--paper-warm);
  border: 1px solid var(--border-light);
}
.stat-number {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 11px;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === 响应式 v2 === */
@media (max-width: 1024px) {
  .mag-grid, .city-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3, .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 72px 0 48px; }
  .hero-title { font-size: 2.8rem; }
}

@media (max-width: 768px) {
  :root {
    --text-hero: 2.2rem;
    --text-h1: 1.8rem;
    --text-h2: 1.5rem;
    --text-h3: 1.125rem;
  }

  .site-header { padding: 0 12px; gap: 8px; }

  /* 汉堡菜单显示 */
  .menu-toggle { display: flex; }

  /* 导航默认隐藏，通过 JS 切换 */
  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--paper-warm);
    flex-direction: column;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    z-index: 99;
    gap: 2px;
    overflow-x: visible;
  }
  .site-nav.open {
    display: flex;
    animation: slideDown 0.25s ease;
  }
  .site-nav a {
    padding: 12px 14px;
    font-size: 15px;
    border-radius: var(--radius-sm);
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .hero { padding: 52px 0 36px; }
  .hero-sub { font-size: 16px; }

  .mag-grid, .city-grid, .card-grid-2, .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
  .article-card {
    flex-direction: column;
    padding: 16px 0;
    gap: 12px;
  }
  .article-card:hover { padding-left: 0; }
  .article-card img { width: 100%; height: 200px; }
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .page-header { padding: var(--space-4) 0 var(--space-2); }
  .page-header h1 { font-size: var(--text-h1); }
  .section { padding: var(--space-4) 0; }
  .card-grid-2 { grid-template-columns: 1fr; }

  .city-card img { height: 200px; }
}
