/* 设计语言：建筑导向系统的清晰度 × 野外笔记的真实感 × 创业工作台的迭代痕迹
   色彩：暖纸色 #F5F2E8 / 深墨绿 #1B2421 / 石板绿 #485650 / 赭红 #AE4E2A（仅重点与链接） */
:root {
  --paper: #F5F2E8;
  --ink: #1B2421;
  --slate: #485650;
  --accent: #AE4E2A;
  --line: #DDD6C2;
  --card: #FBFAF4;
  --radius: 10px;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-title: "Songti SC", "STSong", "Noto Serif SC", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--font-mono); font-size: 0.9em; }
.muted { color: var(--slate); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }

/* 无障碍：跳过导航 */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* 页眉 */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--line);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: rgba(245, 242, 232, 0.88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(27, 36, 33, 0.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 24px; height: 24px; border-radius: 5px; display: inline-block; object-fit: cover; }
.brand-text { font-family: var(--font-title); font-weight: 700; letter-spacing: 0.05em; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--slate); text-decoration: none; padding: 8px 12px; border-radius: 6px;
}
.site-nav a:hover { color: var(--ink); background: rgba(27,36,33,0.06); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; }

/* 页面 */
.page { padding: 48px 0 64px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase; margin: 0 0 12px;
}
h1 { font-family: var(--font-title); font-size: 2rem; line-height: 1.4; margin: 0 0 16px; }
.hero-title { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.lede { font-size: 1.1rem; color: var(--slate); max-width: 40em; }
.section-title { font-family: var(--font-title); font-size: 1.35rem; margin: 56px 0 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.draft-note { color: var(--accent); font-size: 0.9rem; }
.name-line { margin-top: 24px; }

/* 待补充徽标：诚实占位，不伪装成真实内容 */
.todo-badge {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  color: var(--accent); border: 1px dashed var(--accent); border-radius: 4px;
  padding: 1px 8px; margin: 0 2px; white-space: nowrap;
}

/* 按钮 */
.btn { display: inline-block; text-decoration: none; border-radius: 8px; padding: 12px 22px; font-weight: 600; margin: 6px 8px 6px 0; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #2A3632; }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: rgba(27,36,33,0.06); }
.btn-link { color: var(--accent); padding: 12px 8px; }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
a[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* 卡片与网格 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.card-kicker { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.15em; color: var(--accent); margin: 0 0 8px; text-transform: uppercase; }
.card h3 { font-family: var(--font-title); margin: 0 0 12px; font-size: 1.2rem; }
.card-label { font-weight: 600; }
.card-title { font-size: 1.15rem; margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.platform-card.featured { border-left: 4px solid var(--accent); }
.field-list { margin: 0 0 16px; }
.field-list > div { display: grid; grid-template-columns: 7em 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dotted var(--line); }
.field-list dt { color: var(--slate); font-size: 0.9rem; }
.field-list dd { margin: 0; }

/* 分流入 */
.entry-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink);
}
.entry-card:hover { border-color: var(--ink); }
.entry-card h3 { font-family: var(--font-title); margin: 0 0 12px; }
.entry-card p { margin: 6px 0; font-size: 0.95rem; color: var(--slate); }
.entry-card .go { color: var(--accent); font-weight: 600; margin-top: 12px; }

/* 方法列表 */
.method-list { padding-left: 1.2em; }
.method-list li { margin-bottom: 10px; }

/* 页脚 */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; margin-top: 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-title { font-family: var(--font-title); font-weight: 700; margin: 0 0 8px; }

/* 移动端：单列 */
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--paper); flex-direction: column; padding: 8px 20px 16px;
    border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .page { padding: 32px 0 48px; }
  .field-list > div { grid-template-columns: 1fr; gap: 2px; }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ============ 视觉升级：Hero / 画廊 / 动效 ============ */

/* 全幅 Hero：满月跑者照片 + 深墨绿渐变罩 */
.hero {
  position: relative;
  min-height: min(92vh, 780px);
  display: flex; align-items: center;
  color: var(--paper);
  overflow: clip;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("images/hero-moon-v2.jpg") center 32% / cover no-repeat, var(--ink);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(27, 36, 33, 0.62) 0%,
    rgba(27, 36, 33, 0.28) 42%,
    rgba(27, 36, 33, 0.82) 100%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; padding: 110px 20px 84px; }
.hero-inner > * { animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-inner > *:nth-child(2) { animation-delay: 0.08s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.16s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.24s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.32s; }
.hero-inner > *:nth-child(6) { animation-delay: 0.4s; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}
.eyebrow-light { color: #E4B58E; }
.hero-title {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1.35; text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero-lede { font-size: 1.15rem; color: rgba(245, 242, 232, 0.88); max-width: 38em; }
.draft-note-light { color: #E4B58E; }
.name-line-light { margin-top: 26px; color: rgba(245, 242, 232, 0.9); }
.hero-actions { margin-top: 28px; }

/* 深色底上的按钮变体 */
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #FFFFFF; }
.btn-outline-light { border: 1px solid rgba(245, 242, 232, 0.85); color: var(--paper); background: transparent; }
.btn-outline-light:hover { background: rgba(245, 242, 232, 0.14); }
.btn-link-light { color: #E4B58E; }

/* 野外画廊：横滑胶片条 */
.gallery {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: min(72vw, 330px);
  gap: 18px; overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 14px;
  scrollbar-width: thin;
}
.shot { scroll-snap-align: start; margin: 0; }
.shot img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius); display: block;
  border: 1px solid var(--line);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.shot:hover img { transform: scale(1.025); box-shadow: 0 14px 32px rgba(27, 36, 33, 0.18); }
.shot figcaption { font-size: 0.86rem; color: var(--slate); margin-top: 10px; }
.about-shot { max-width: 420px; margin: 8px 0 8px; }
.about-shot img { aspect-ratio: 3 / 4; }

/* 滚动渐入 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

/* 卡片悬浮：轻微上浮 + 阴影 */
.card, .entry-card { transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease; }
.card:hover, .entry-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(27, 36, 33, 0.10); border-color: #C9C0A6; }

/* 路由切换：页面淡入 */
main.page-enter .page:not([hidden]) { animation: page-in 0.45s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } }

/* Hero 在小屏上收敛高度 */
@media (max-width: 760px) {
  .hero { min-height: 86vh; }
  .hero-inner { padding: 84px 20px 64px; }
  .gallery { grid-auto-columns: min(78vw, 300px); }
}
