/* ============ 卡密研究分享 · 自然主题设计系统 ============ */
:root {
  --forest: #2F5D50;
  --forest-deep: #234840;
  --forest-soft: #3d7264;
  --moss: #7A8B5A;
  --olive: #A3AD7A;
  --cream: #F5F1E8;
  --cream-warm: #EFE8D8;
  --paper: #FBF9F3;
  --terra: #C8734A;
  --terra-soft: #D98E6B;
  --ink: #2B2A26;
  --ink-soft: #56534b;
  --line: #e2dccc;
  --shadow-sm: 0 1px 2px rgba(43,42,38,.06), 0 2px 8px rgba(43,42,38,.05);
  --shadow-md: 0 6px 20px rgba(35,72,64,.10), 0 2px 6px rgba(35,72,64,.06);
  --shadow-lg: 0 18px 48px rgba(35,72,64,.16);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1160px;
  --serif: "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(122,139,90,.10), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(200,115,74,.08), transparent 38%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ---------- 导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,241,232,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 38px; height: 38px; border-radius: 11px; box-shadow: var(--shadow-sm); }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .5px; color: var(--forest-deep); }
.brand__tag { font-size: 11px; color: var(--moss); letter-spacing: 3px; }
.nav__links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav__links a {
  display: block; padding: 8px 16px; border-radius: 999px;
  font-size: 15px; color: var(--ink-soft); transition: all .25s ease;
}
.nav__links a:hover { color: var(--forest-deep); background: rgba(122,139,90,.14); }
.nav__links a.active { color: var(--cream); background: var(--forest); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--forest-deep); }

/* ---------- 通用区块 ---------- */
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section__head { max-width: 640px; margin-bottom: 44px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--terra); font-weight: 600; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: var(--terra); display: inline-block; }
.section__title { font-family: var(--serif); font-weight: 700; font-size: clamp(26px, 3.4vw, 40px); color: var(--forest-deep); line-height: 1.25; }
.section__desc { margin-top: 14px; color: var(--ink-soft); font-size: 16px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-size: 15px; font-weight: 500;
  cursor: pointer; border: 1.5px solid transparent; transition: all .25s ease;
}
.btn--primary { background: var(--terra); color: #fff; box-shadow: 0 6px 16px rgba(200,115,74,.28); }
.btn--primary:hover { background: #b3623c; transform: translateY(-2px); }
.btn--ghost { border-color: var(--forest); color: var(--forest-deep); }
.btn--ghost:hover { background: var(--forest); color: var(--cream); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--forest-deep); color: rgba(245,241,232,.86); padding: 56px 0 28px; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer__brand img { width: 40px; height: 40px; border-radius: 11px; }
.footer__brand b { font-family: var(--serif); font-size: 19px; color: var(--cream); }
.footer p { font-size: 14px; color: rgba(245,241,232,.66); max-width: 320px; }
.footer h4 { font-size: 14px; letter-spacing: 2px; color: var(--olive); margin-bottom: 16px; text-transform: uppercase; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { font-size: 14px; color: rgba(245,241,232,.78); transition: color .2s; }
.footer ul a:hover { color: #fff; }
.footer__bottom {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(245,241,232,.14);
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: center;
  text-align: center; font-size: 13px; color: rgba(245,241,232,.6);
}
.footer__bottom a { color: rgba(245,241,232,.82); transition: color .2s; }
.footer__bottom a:hover { color: #fff; text-decoration: underline; }
.footer__beian { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 首页主视觉 ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 78% 20%, rgba(122,139,90,.22), transparent 55%),
    linear-gradient(160deg, var(--cream) 0%, var(--cream-warm) 100%);
}
.hero__leaf { position: absolute; z-index: -1; opacity: .5; pointer-events: none; }
.hero__leaf--1 { top: -40px; right: -30px; width: 320px; transform: rotate(18deg); opacity: .28; }
.hero__leaf--2 { bottom: -70px; left: -50px; width: 260px; transform: rotate(-24deg); opacity: .2; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero__title { font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 5.4vw, 66px); line-height: 1.1; color: var(--forest-deep); letter-spacing: 1px; }
.hero__title em { font-style: normal; color: var(--terra); position: relative; }
.hero__lead { margin-top: 24px; font-size: 18px; color: var(--ink-soft); max-width: 520px; }
.hero__actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero__note { margin-top: 22px; font-size: 13px; color: var(--moss); display: flex; align-items: center; gap: 8px; }
.hero__card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px;
  padding: 30px; box-shadow: var(--shadow-lg); position: relative;
}
.hero__card h3 { font-family: var(--serif); color: var(--forest-deep); font-size: 20px; margin-bottom: 6px; }
.hero__specimen {
  margin-top: 18px; border-radius: var(--radius); padding: 22px;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-soft) 100%);
  color: var(--cream); position: relative; overflow: hidden;
}
.hero__specimen::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(200,115,74,.35); }
.hero__specimen .lbl { font-size: 11px; letter-spacing: 3px; opacity: .8; text-transform: uppercase; }
.hero__specimen .code { font-family: "Courier New", monospace; font-size: 22px; letter-spacing: 3px; margin-top: 10px; font-weight: 700; }
.hero__specimen .meta { margin-top: 14px; font-size: 12px; opacity: .78; }

/* ---------- 统计条 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 26px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat__num { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--terra); }
.stat__label { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s ease, box-shadow .3s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card__visual {
  height: 168px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.card__visual .code { font-family: "Courier New", monospace; font-weight: 700; letter-spacing: 2px; font-size: 18px; text-shadow: 0 1px 4px rgba(0,0,0,.25); }
.card__visual::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23ffffff' stroke-width='0.5' opacity='0.12'/%3E%3C/svg%3E"); }
.card__body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.badge { align-self: flex-start; font-size: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(122,139,90,.16); color: var(--forest-deep); font-weight: 500; }
.card__title { font-family: var(--serif); font-size: 19px; color: var(--forest-deep); margin: 12px 0 8px; }
.card__text { font-size: 14px; color: var(--ink-soft); flex: 1; }
.card__meta { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--moss); display: flex; justify-content: space-between; }

/* ---------- 筛选标签 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.chip {
  padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--paper); font-size: 14px; color: var(--ink-soft); cursor: pointer; transition: all .2s;
}
.chip:hover { border-color: var(--olive); }
.chip.active { background: var(--forest); color: var(--cream); border-color: var(--forest); }

/* ---------- 内页头部横幅 ---------- */
.page-hero { position: relative; padding: 72px 0 58px; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, var(--forest-deep), var(--forest) 70%);
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .12;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 5C20 12 16 24 20 40c6-12 12-20 22-27-8 8-13 18-14 30 8 0 15-5 18-13 4-10 1-22-16-25z' fill='%23F5F1E8'/%3E%3C/svg%3E"); }
.page-hero .eyebrow { color: var(--olive); }
.page-hero .eyebrow::before { background: var(--olive); }
.page-hero h1 { font-family: var(--serif); font-size: clamp(30px, 4.4vw, 50px); color: var(--cream); line-height: 1.2; }
.page-hero p { margin-top: 16px; max-width: 620px; color: rgba(245,241,232,.82); font-size: 17px; }

/* ---------- 研究笔记 ---------- */
.note {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; box-shadow: var(--shadow-sm); transition: box-shadow .3s, transform .3s;
}
.note:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.note__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.note__date { font-size: 13px; color: var(--moss); }
.note__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 12px; color: var(--terra); background: rgba(200,115,74,.1); padding: 3px 10px; border-radius: 999px; }
.note__title { font-family: var(--serif); font-size: 22px; color: var(--forest-deep); margin-bottom: 10px; }
.note__summary { color: var(--ink-soft); font-size: 15px; }
.note__body { margin-top: 16px; color: var(--ink-soft); font-size: 15px; display: none; }
.note__body.open { display: block; animation: fade .4s ease; }
.note__body p { margin-bottom: 12px; }
.note__body h4 { font-family: var(--serif); color: var(--forest-deep); margin: 16px 0 8px; font-size: 17px; }
.note__body code { background: var(--cream-warm); padding: 2px 7px; border-radius: 6px; font-family: "Courier New", monospace; font-size: 13px; color: var(--forest-deep); }
.note__body ul { padding-left: 20px; margin-bottom: 12px; }
.note__toggle { margin-top: 16px; background: none; border: 0; color: var(--terra); font-size: 15px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; padding: 0; font-family: var(--sans); }
.note__toggle:hover { text-decoration: underline; }

/* ---------- 关于页 ---------- */
.prose { max-width: 760px; }
.prose p { margin-bottom: 18px; color: var(--ink-soft); font-size: 16px; }
.prose h3 { font-family: var(--serif); color: var(--forest-deep); font-size: 24px; margin: 34px 0 14px; }
.notice {
  background: rgba(122,139,90,.1); border-left: 4px solid var(--moss);
  padding: 20px 24px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 26px 0;
}
.notice b { color: var(--forest-deep); }
.info-list { list-style: none; display: grid; gap: 14px; margin-top: 20px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; }
.info-list .ic { color: var(--terra); flex-shrink: 0; margin-top: 2px; }
.info-list b { color: var(--forest-deep); display: block; margin-bottom: 2px; }
.info-list span { color: var(--ink-soft); font-size: 14px; }

/* ---------- 动画 ---------- */
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; }
.reveal.in { animation: rise .7s cubic-bezier(.22,.61,.36,1) forwards; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .28s; } .d4 { animation-delay: .38s; }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal.in { animation: none; opacity: 1; } html { scroll-behavior: auto; } }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 8px; display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { border-radius: var(--radius-sm); }
  .nav__toggle { display: inline-flex; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .container { padding: 0 18px; }
}

