/* ============================================================
   components.css — 三页共享组件（header / nav / button / card / footer）
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-weight: 700; line-height: 1.24; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-sm);
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ------------------------------------------------ 顶部导航 */
.site-header {
  position: relative;
  z-index: 30;
  background: rgba(249, 236, 213, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--h-header);
}
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  background: var(--bg-panel);
}
.logo-mark svg { width: 20px; height: 20px; }
.logo-text {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.main-nav a {
  position: relative;
  font-size: 14.5px;
  color: var(--ink-2);
  padding: 6px 0;
  white-space: nowrap;
  transition: color .16s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  font-size: 14px;
  cursor: pointer;
}
.nav-toggle svg { width: 16px; height: 16px; }

/* ------------------------------------------------ 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover { background: #653616; }
.btn-outline {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover { background: rgba(58, 38, 22, 0.06); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }

/* ------------------------------------------------ 区块标题（居中 + 饰线） */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 22px;
  font-size: 27px;
  letter-spacing: 0.04em;
  text-align: center;
}
.section-title::before,
.section-title::after {
  content: "";
  height: 1px;
  width: 46px;
  background: var(--line-strong);
}
.section-title .ornament {
  display: none;
}

/* ------------------------------------------------ 卡片与标签 */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-body { padding: 12px 14px 16px; }
.card-title {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.35);
}
.tag-accent { border-color: rgba(123, 67, 32, 0.35); color: var(--accent); }

/* ------------------------------------------------ 页脚 */
.site-footer {
  border-top: 1px solid var(--line-strong);
  background: var(--bg-band);
  margin-top: 0;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 0.9fr;
  gap: 40px;
  padding: 12px 0 6px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 30em;
}
.footer-label {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
}
.footer-links a {
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 0.5px 0;
  display: inline-block;
}
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-about p { font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 7px 0 9px;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
