/* 蝾螈 · 公共组件（header / 按钮 / 区块标题 / 标签 / 页脚），依赖 tokens.css */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.015em; line-height: 1.25; }

p { margin: 0; }

ul, ol, dl, dd, figure { margin: 0; padding: 0; }

li { list-style: none; }

[hidden] { display: none !important; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: #f5f5f3;
  border-bottom: 1px solid #e4e4de;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 27px;
  font-size: 14px;
  color: #343530;
  letter-spacing: 0.01em;
}

.site-nav a { position: relative; padding: 6px 0; white-space: nowrap; }

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost { padding: 0 4px; color: var(--ink); border-radius: 4px; }
.btn-ghost:hover { color: var(--accent); }

.arrow::after { content: "→"; }

/* ------------------------------------------------------------ 区块标题 */

.section-head h2 {
  font-size: 34px;
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.tag {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.more {
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------------------------------------------------------------- 页脚 */

.site-footer {
  background: var(--bg-footer);
  color: #cfd6d8;
  padding: 32px 0 28px;
  font-size: 12.5px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.brand-footer { color: #fff; font-size: 24px; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: #b9c3c6;
}

.footer-nav a:hover { color: #fff; }

.footer-bottom {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.disclaimer { color: #9fabad; max-width: 900px; line-height: 1.7; }

.copyright { color: #7f8d90; }

/* ------------------------------------------------------ 组件响应式 */

@media (max-width: 1180px) {
  :root { --gutter: 36px; }
  .site-nav { gap: 18px; font-size: 13px; }
}

@media (max-width: 767px) {
  :root { --gutter: 22px; }

  .site-header { height: 68px; }
  .brand { font-size: 22px; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px var(--gutter) 20px;
    background: #f5f5f3;
    border-bottom: 1px solid #e4e4de;
    box-shadow: 0 12px 24px rgba(24, 30, 28, 0.08);
  }

  .site-nav.is-open { display: flex; }
  .site-nav a { width: 100%; padding: 11px 0; border-bottom: 1px solid #e8e8e2; font-size: 15px; }
  .site-nav a:last-child { border-bottom: 0; }

  .btn { min-height: 44px; padding: 0 20px; font-size: 14px; }
  .btn-ghost { padding: 0 2px; }

  .section-head h2 { font-size: 25px; }
  .section-head p { font-size: 14px; margin-top: 9px; }

  .site-footer { padding: 24px 0 22px; }
  .footer-nav { gap: 12px 16px; }
  .footer-bottom { margin-top: 18px; padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
