/* =====================================================================
   MetroPulse — Core Design System
   Modern Editorial · v2
   Design tokens, reset, scaffolding, shared utilities
   ===================================================================== */

:root {
  /* ---- Brand & palette (Modern Editorial) ---- */
  --brand: #0f4c3a;          /* deep forest green */
  --brand-2: #16a06a;        /* fresh leaf */
  --brand-soft: #e7f3ee;     /* pale mint wash */
  --accent: #c8772e;         /* warm amber for highlights */
  --ink: #16201c;            /* near-black green */
  --ink-2: #455049;          /* secondary text */
  --muted: #7a837d;          /* tertiary text */
  --line: #e3e7e4;           /* hairline borders */
  --paper: #fbfaf7;          /* warm paper background */
  --card: #ffffff;           /* surface */
  --card-2: #f4f6f3;         /* subtle panel */

  /* ---- Feedback ---- */
  --ok: #16a06a;
  --warn: #c8772e;
  --err: #c0392b;

  /* ---- Typography ---- */
  --serif: "Noto Serif SC", Georgia, "Times New Roman", "Songti SC", serif;
  --sans: "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* ---- Layout ---- */
  --maxw: 1180px;
  --maxw-narrow: 820px;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  /* ---- Shadows ---- */
  --sh-sm: 0 1px 2px rgba(16, 32, 28, .05);
  --sh: 0 6px 20px rgba(16, 32, 28, .08);
  --sh-lg: 0 18px 48px rgba(16, 32, 28, .14);
  --ring: 0 0 0 3px rgba(22, 160, 106, .22);

  /* ---- Motion ---- */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t: .25s;
}

/* ============================ Reset ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.2; margin: 0 0 .55em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; color: var(--ink-2); }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
blockquote { margin: 0 0 1.2rem; padding: .2rem 0 .2rem 1.1rem; border-left: 3px solid var(--brand-2); color: var(--ink-2); font-style: italic; }
hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ============================ Layout ============================ */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.container.narrow { max-width: var(--maxw-narrow); }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

/* ============================ Utilities ============================ */
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: .6rem;
}
/* 屏幕阅读器专用：模板中 nav / newsletter 的 label 依赖此类隐藏 */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.muted { color: var(--muted); }
.text-center { text-align: center; }
.lead { font-size: 1.12rem; color: var(--ink-2); }

.grid { display: grid; gap: 26px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-sm { gap: 10px; }
.gap-md { gap: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); color: #fff; transform: translateY(-2px); box-shadow: var(--sh); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); transform: translateY(-2px); }

/* ============================ Cards ============================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: transparent; }

/* ============================ Responsive ============================ */
@media (max-width: 992px) {
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}

/* ============================ Motion ============================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { animation: fadeUp .6s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
