/* base.css —— 全站公共设计系统（login/home/blog/tool/resource 共用）
   改这里 = 全站统一换肤。 */

:root {
  --bg: #faf9f5;
  --bg-warm: #f0eee6;
  --ink: #1f1e1d;
  --ink-soft: #6b6862;
  --accent: #cc785c;
  --accent-dark: #b3613f;
  --line: #e6e3da;
  --radius: 16px;
  --maxw: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- 固定背景（工作台图铺底 + 米色蒙版） ---------- */
.page-bg {
  position: fixed; inset: 0; z-index: -1;
  background: url('assets/home-workspace.png') center center / cover no-repeat;
}
.page-bg::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(250, 249, 245, 0.62);
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 10px;
  font-family: inherit; font-size: .98rem; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: all .2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 内容区块 + 标题 ---------- */
section.block {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px clamp(20px, 5vw, 64px);
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.section-title {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.section-sub {
  color: var(--ink-soft); font-weight: 300;
  max-width: 54ch; margin-bottom: 40px;
}

/* ---------- 卡片网格（文字一律深色，不蓝） ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.card {
  display: block; text-decoration: none;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: 0 8px 28px rgba(31, 30, 29, 0.06);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:visited, .card:hover, .card:focus { color: var(--ink); }
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(31, 30, 29, 0.12);
}
.card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--bg-warm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; margin-bottom: 18px;
}
.card h3 { color: var(--ink); font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: .95rem; font-weight: 300; }
.card .tag {
  display: inline-block; margin-top: 18px;
  font-size: .82rem; color: var(--accent);
  background: rgba(204, 120, 92, 0.1);
  padding: 4px 12px; border-radius: 20px;
}

/* ---------- 返回链接 ---------- */
.back {
  display: inline-block; margin-bottom: 26px;
  color: var(--ink-soft); text-decoration: none; font-size: .95rem;
  transition: color .2s ease;
}
.back:hover { color: var(--accent); }

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 36px clamp(20px, 5vw, 64px);
  text-align: center;
  color: var(--ink-soft);
  font-size: .9rem; font-weight: 300;
  background: rgba(250, 249, 245, 0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
footer .brand-sm { color: var(--ink); font-weight: 500; }
footer a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
footer a:hover { color: var(--accent); }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
