/* ============================================================
   慢岛生活 · 全局样式
   风格：日式杂志 / 文艺风
   核心：留白、弱对比、温暖、手作感、不吵闹
   ============================================================ */

:root {
  /* 配色：米白底 + 苔绿 + 陶土橙 */
  --bg: #faf7f2;           /* 主背景，温暖米白 */
  --bg-warm: #f4efe6;      /* 次级背景，略深 */
  --ink: #2e2a26;          /* 正文，不用纯黑 */
  --ink-soft: #6b635a;     /* 次要文字 */
  --ink-faint: #9a9186;    /* 弱化文字 */
  --moss: #6b7f5e;         /* 苔绿，主强调色 */
  --moss-deep: #55684a;    /* 苔绿深色，hover */
  --clay: #c67b4e;         /* 陶土橙，点缀色 */
  --clay-soft: #e8d5c4;    /* 陶土淡色 */
  --line: #e3dcd1;         /* 细分割线 */
  --card: #ffffff;

  --radius: 14px;
  --radius-sm: 8px;

  /* 字体：标题用宋体，正文用黑体 */
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
                "Source Han Serif CN", "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
               "Source Han Sans CN", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* ---------- 排版 ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
  color: var(--ink);
}

h1 { font-size: clamp(28px, 4.5vw, 44px); letter-spacing: 0.06em; }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 19px; }

p { margin: 0 0 1.2em; }

a {
  color: var(--moss);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--moss-deep); }

/* 焦点可见性（无障碍） */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 布局容器 ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

main { flex: 1; }

/* ---------- 页头 ---------- */

.site-header {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 0.14em;
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  letter-spacing: 0.08em;
}

.site-nav a {
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 2px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--moss);
  transition: width 0.25s ease;
}

.site-nav a:hover { color: var(--moss); }
.site-nav a:hover::after { width: 100%; }

.site-nav a[aria-current="page"] {
  color: var(--moss);
}
.site-nav a[aria-current="page"]::after { width: 100%; }

/* ---------- 首页主视觉 ---------- */

.hero {
  padding: clamp(56px, 10vw, 108px) 0 clamp(40px, 7vw, 72px);
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 12.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 28px;
  padding-left: 0.42em;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-lede {
  max-width: 30em;
  margin: 0 auto;
  font-size: 16.5px;
  color: var(--ink-soft);
  line-height: 2;
}

.hero-rule {
  width: 1px;
  height: 56px;
  background: var(--line);
  margin: 44px auto 0;
}

.hero-cta {
  margin: 34px 0 0;
}

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

.section {
  padding: clamp(40px, 7vw, 72px) 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 26px);
}

.section-head .section-note {
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  margin-left: auto;
}

/* ---------- 分组标签 ---------- */

.group-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--ink-faint);
  margin: 44px 0 22px;
  text-transform: uppercase;
}

.group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.group-label:first-of-type { margin-top: 0; }

/* ---------- 新闻卡片网格 ---------- */

.news-grid {
  display: grid;
  /* 两列：每组 4 个入口正好排成 2×2，不会留下孤零零的一张 */
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.news-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease,
              box-shadow 0.22s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--clay-soft);
  box-shadow: 0 10px 28px rgba(120, 100, 80, 0.09);
}

.news-card:hover .news-name { color: var(--moss); }

.news-card:hover .news-arrow {
  transform: translateX(3px);
  color: var(--clay);
}

.news-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-warm);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.news-icon svg,
.news-icon img {
  width: 26px;
  height: 26px;
  display: block;
}

.news-body { min-width: 0; flex: 1; }

.news-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  transition: color 0.2s ease;
  line-height: 1.5;
}

.news-desc {
  display: block;
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.6;
}

.news-arrow {
  margin-left: auto;
  align-self: center;
  color: var(--ink-faint);
  font-size: 15px;
  transition: transform 0.2s ease, color 0.2s ease;
  flex: 0 0 auto;
}

/* ---------- 会员邀请条 ---------- */

.invite {
  margin: clamp(48px, 8vw, 88px) 0;
  padding: clamp(32px, 5vw, 52px);
  background: var(--bg-warm);
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--line);
}

.invite h2 {
  font-size: clamp(20px, 2.6vw, 26px);
  margin-bottom: 14px;
}

.invite p {
  color: var(--ink-soft);
  max-width: 32em;
  margin: 0 auto 28px;
  font-size: 15px;
  line-height: 1.9;
}

.btn {
  display: inline-block;
  padding: 13px 34px;
  background: var(--moss);
  color: #fff;
  border-radius: 999px;
  font-size: 14.5px;
  letter-spacing: 0.12em;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--moss-deep);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--card);
  color: var(--ink);
  border-color: var(--clay-soft);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 52px;
  margin-top: auto;
  font-size: 13px;
  color: var(--ink-faint);
}

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

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a { color: var(--ink-faint); }
.footer-links a:hover { color: var(--moss); }

/* ---------- 内容页 ---------- */

.prose {
  max-width: 40em;
  margin: 0 auto;
}

.prose h2 { margin-top: 2em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.6em; color: var(--ink-soft); }

/* ---------- 会员页占位 ---------- */

.gate {
  max-width: 34em;
  margin: clamp(48px, 9vw, 96px) auto;
  text-align: center;
  padding: clamp(36px, 6vw, 64px) clamp(24px, 5vw, 48px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.gate-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 26px;
  color: var(--clay);
}

.gate h1 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 16px;
}

.gate p {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 28px;
}

.gate-note {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.8;
}

/* ---------- 响应式 ---------- */

@media (max-width: 720px) {
  .site-header { padding: 20px 0; }
  .site-header .wrap { gap: 16px; }
  .site-nav { gap: 20px; font-size: 14px; }
  .wrap { padding: 0 20px; }
  .news-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
  .news-card { padding: 16px; gap: 13px; }
  .news-icon { flex-basis: 38px; width: 38px; height: 38px; border-radius: 10px; }
  .news-icon svg, .news-icon img { width: 22px; height: 22px; }
  .section-head { flex-wrap: wrap; gap: 8px; }
  .section-head .section-note { margin-left: 0; width: 100%; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 420px) {
  .news-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 18px; }
}

/* 尊重用户的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
