/* 一閒 YIXIAN 网站 · 公共样式（颜色变量见 tokens.css） */

:root {
  --serif: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --sans: 'Noto Sans SC', 'Noto Sans CJK SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
.nowrap { white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.rule { height: 1px; background: var(--line); }

/* ---------- 页眉 ---------- */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.seal {
  width: 24px; height: 24px; border: 1.5px solid var(--zhusha); color: var(--zhusha);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 14px; font-weight: 600; line-height: 1;
}
.brand-cn { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 2px; }
.brand-en { font-size: 11px; letter-spacing: 3px; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 15px; }
.nav a { text-decoration: none; padding: 12px 0; color: var(--ink); }
.nav a[aria-current="page"] { color: var(--qingdai); border-bottom: 1.5px solid var(--qingdai); }

/* ---------- 首屏 ---------- */
.hero {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px 64px; padding-top: clamp(32px, 5vw, 72px); padding-bottom: clamp(40px, 5vw, 72px);
}
.hero-text { flex: 1 1 460px; min-width: 0; }
.hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(34px, 6.4vw, 72px); line-height: 1.32; letter-spacing: 2px;
}
.hero-sub { margin: 20px 0 0; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.9; color: var(--ink-3); max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 26px;
  background: var(--qingdai); color: var(--on-qingdai); text-decoration: none;
  font-size: 15px; letter-spacing: 1px; border-radius: 2px;
}
.text-link {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--ink);
  text-decoration: none; font-size: 15px; border-bottom: 1px solid var(--ink);
}
.hero-figure { flex: 0 1 320px; min-width: 0; margin: 0 auto; padding: 8px 24px; }
.hero-figure img { display: block; width: 100%; max-width: 210px; height: auto; margin: 0 auto; }

/* ---------- 三个去处 ---------- */
.projects { padding-top: 8px; padding-bottom: clamp(64px, 8vw, 110px); }
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; margin-bottom: 28px;
}
.section-head h2, .h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: 2px; }
.section-head p { margin: 0; font-size: 14px; color: var(--muted); }
.cards { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.card-main {
  flex: 2 1 520px; min-width: 0; min-height: 360px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  background: var(--qingdai); color: var(--on-qingdai); text-decoration: none;
  padding: clamp(28px, 4vw, 48px); border-radius: 2px;
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tag { font-size: 12px; letter-spacing: 3px; color: var(--on-qingdai-muted); }
.pill { font-size: 12px; letter-spacing: 1px; border: 1px solid var(--on-qingdai-line); padding: 4px 10px; border-radius: 999px; }
.card-main h3 { margin: 36px 0 0; font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 4.2vw, 48px); letter-spacing: 3px; line-height: 1.2; }
.card-en { margin: 6px 0 0; font-size: 12px; letter-spacing: 4px; color: var(--on-qingdai-muted); }
.card-main .card-desc { margin: 28px 0 0; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.8; max-width: 22em; }
.card-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.steps-line { margin: 0; font-family: var(--serif); font-size: 14px; letter-spacing: 2px; line-height: 2; color: var(--on-qingdai-muted); }
.go-light { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: 1px; border-bottom: 1px solid var(--on-qingdai); padding-bottom: 4px; }
.card-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.card {
  flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  background: var(--card); color: var(--ink); text-decoration: none;
  padding: clamp(24px, 3vw, 36px); border-radius: 2px;
}
.card h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: 2px; }
.card .card-en { font-size: 11px; letter-spacing: 3px; color: var(--muted); }
.card .card-desc { margin: 18px 0 0; font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.go { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--qingdai); }

/* ---------- 关于 ---------- */
.about { background: var(--paper-2); }
.about .wrap { display: flex; flex-wrap: wrap; gap: 32px 64px; padding-top: clamp(64px, 8vw, 110px); padding-bottom: clamp(64px, 8vw, 110px); }
.about-head { flex: 1 1 240px; min-width: 0; }
.mark { width: 20px; height: 1.5px; background: var(--zhusha); margin-top: 20px; }
.about-body { flex: 2 1 440px; min-width: 0; font-size: 16px; line-height: 2; color: var(--ink-2); }
.about-body p { margin: 0; }
.about-body p + p { margin-top: 18px; }

/* ---------- 页脚 ---------- */
.site-footer { padding-top: 48px; padding-bottom: 40px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 48px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .seal { width: 22px; height: 22px; font-size: 13px; }
.footer-brand .brand-cn { font-size: 15px; }
.footer-nav { font-size: 14px; }
.footer-nav a { color: var(--ink-2); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: var(--muted); margin-top: 20px; }
.footer-bottom a { color: var(--muted); }
.site-footer .rule { margin-top: 28px; }

/* ---------- 介绍页 ---------- */
.page-hero { padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(48px, 6vw, 80px); }
.eyebrow { margin: 0 0 24px; font-size: 13px; letter-spacing: 4px; color: var(--qingdai); }
.page-hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(24px, 4.6vw, 52px); line-height: 1.4; letter-spacing: 2px;
}
.lead { margin: 28px 0 0; font-size: 17px; line-height: 1.9; color: var(--ink-3); max-width: 34em; }
.note { font-size: 14px; color: var(--muted); }
.page-body { padding-bottom: clamp(72px, 9vw, 120px); }
.page-body .h2 { font-size: 24px; margin-bottom: 24px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 1px solid var(--line); }
.steps li { padding: 24px 20px 28px 0; border-bottom: 1px solid var(--line); }
.steps .num { margin: 0; font-family: var(--serif); font-size: 13px; color: var(--zhusha); letter-spacing: 2px; }
.steps h3 { margin: 10px 0 0; font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: 2px; }
.steps p { margin: 10px 0 0; font-size: 15px; line-height: 1.8; color: var(--ink-3); }
.disclaimer { margin: 40px 0 0; font-size: 14px; line-height: 1.9; color: var(--muted); max-width: 40em; }

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.list .item { flex: 1 1 420px; min-width: 0; }
.list h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.6; letter-spacing: 1px; }
.list .by { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.status { font-size: 13px; letter-spacing: 1px; color: var(--muted); white-space: nowrap; }
.status.done { color: var(--qingdai); }

.films { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 20px; }
.film { min-width: 0; margin: 0; }
.still { aspect-ratio: 16 / 9; background: #E4DFD3; display: flex; align-items: center; justify-content: center; border-radius: 2px; font-size: 12px; letter-spacing: 2px; color: var(--muted); }
.still img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.film-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 14px; }
.film h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: 1px; }

.back { color: var(--ink-2); text-decoration: none; padding: 12px 0; }
.footer-bottom span { padding: 12px 0; }

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

/* 悬停与按下：统一用深一档青黛 */
.btn:hover, .btn:active, .card-main:hover, .card-main:active { background: var(--qingdai-hover); }
.go:hover, .eyebrow a:hover { color: var(--qingdai-hover); }
.card:hover { background: var(--qingdai-soft); }
.nav a:hover { color: var(--qingdai); }

/* ======================================================================
   v8.3 移动端紧凑化（只在 ≤600px 生效，桌面端不受影响）
   适配 320–430px；重点测试 360 / 390 / 430
   ====================================================================== */
.menu-btn { display: none; }

@media (max-width: 600px) {
  .wrap { padding-left: 20px; padding-right: 20px; }

  /* 页眉：Logo 缩小约 15%，导航收紧 */
  .site-header { padding-top: 8px; padding-bottom: 8px; gap: 4px 16px; flex-wrap: nowrap; }
  .brand { gap: 8px; }
  .seal { width: 20px; height: 20px; font-size: 12px; }
  .brand-cn { font-size: 14.5px; letter-spacing: 1.5px; }
  .brand-en { font-size: 9.5px; letter-spacing: 2.5px; }
  .nav { gap: 0 18px; font-size: 14px; flex-wrap: nowrap; }
  .nav a { padding: 12px 0; }

  /* 首屏：标题缩小约 20%，上下间距减少约 30% */
  .hero { gap: 12px; padding-top: 22px; padding-bottom: 26px; }
  .hero h1 { font-size: 27px; letter-spacing: 1.5px; }
  .hero-sub { margin-top: 12px; font-size: 15.5px; line-height: 1.8; }
  .actions { margin-top: 18px; gap: 8px 22px; }
  /* 小玄龟：显示尺寸缩小约 25%，去掉容器多余内边距 */
  .hero-figure { padding: 0; margin: 0 auto; }
  .hero-figure img { max-width: 158px; }

  /* 三个去处 */
  .projects { padding-top: 4px; padding-bottom: 44px; }
  .section-head { margin-bottom: 16px; gap: 4px 16px; }
  .section-head h2 { font-size: 22px; }
  .cards { gap: 12px; }
  /* 和易主卡片：内边距减少约 25%，不再强制最小高度 */
  .card-main { min-height: 0; padding: 21px; gap: 22px; }
  .card-main h3 { margin-top: 18px; font-size: 32px; }
  .card-main .card-desc { margin-top: 12px; font-size: 16.5px; line-height: 1.7; }
  .card-foot { gap: 10px; }
  .steps-line { line-height: 1.8; }
  /* 书院、映像卡片：压缩高度，收紧标题、简介与按钮的距离 */
  .card-col { gap: 12px; }
  .card { padding: 18px 20px; gap: 10px; }
  .card h3 { font-size: 22px; }
  .card .card-en { margin-top: 4px; }
  .card .card-desc { margin-top: 8px; font-size: 15.5px; line-height: 1.7; }
  .go { min-height: 32px; }

  /* 关于：正文字号与行距适当缩小 */
  .about .wrap { gap: 12px; padding-top: 42px; padding-bottom: 42px; }
  .about-head .h2 { font-size: 22px; }
  .mark { margin-top: 12px; }
  .about-body { font-size: 15px; line-height: 1.85; }
  .about-body p + p { margin-top: 12px; }

  /* 页脚：减少上下留白 */
  .site-footer { padding-top: 28px; padding-bottom: 20px; }
  .footer-top { gap: 4px 24px; }
  .footer-nav { gap: 0 18px; flex-wrap: wrap; }
  .site-footer .rule { margin-top: 12px; }
  .footer-bottom { margin-top: 4px; }

  /* 介绍页同样收紧页首与段落间距 */
  .page-hero { padding-top: 36px; padding-bottom: 32px; }
  .eyebrow { margin-bottom: 14px; }
  .lead { margin-top: 18px; font-size: 16px; line-height: 1.8; }
  .page-body { padding-bottom: 48px; }
  .page-body .h2 { font-size: 21px; margin-bottom: 14px; }
  .steps li { padding: 16px 0 18px; }
  .disclaimer { margin-top: 24px; }
  .list li { padding: 16px 0; }
  .films { gap: 22px 16px; }
}

/* 宽度不足（<360px）时，导航收进菜单 */
@media (max-width: 359px) {
  .site-header { flex-wrap: wrap; }
  .js .menu-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 4px;
    background: none; border: 0; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
  }
  .js .menu-btn svg { width: 18px; height: 18px; }
  .js .site-header .nav { display: none; width: 100%; flex-direction: column; gap: 0; padding-bottom: 6px; }
  .js .site-header .nav.open { display: flex; }
  .js .site-header .nav a { padding: 11px 0; border-top: 1px solid var(--line); }
  .js .site-header .nav a[aria-current="page"] { border-bottom: 0; }
}
