/* ============================================================
   金银瓶导航 — Exaggerated Minimalism Editorial
   Playfair Display + Source Serif 4 · #000 / #fff
   ============================================================ */

/* ── 字体预加载占位（由 head.js 的 Google Fonts link 提供） ── */

/* ── 重置 ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── 自定义属性 ── */
:root {
  --c-black: #000000;
  --c-white: #ffffff;
  --c-ink: #111111;
  --c-muted: #555555;
  --c-border: #222222;
  --c-card-bg: rgba(255,255,255,0.04);
  --c-card-border: rgba(255,255,255,0.12);

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Source Serif 4', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  --radius: 4px;
  --max-content: 720px;
  --max-wide: 1200px;
}

/* ── 基础 ── */
html {
  font-size: 17px;
  scroll-behavior: smooth;
  background: var(--c-black);
  color: var(--c-white);
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  background: var(--c-black);
  color: var(--c-white);
}

/* ── 链接 ── */
a {
  color: var(--c-white);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}
a:hover { opacity: 0.65; }

/* ── 包裹层 ── */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   顶部导航：两行（品牌行 + 菜单行）
   结构：nav > ol > li > a
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-black);
  border-bottom: 1px solid var(--c-border);
}

.brand-bar {
  padding: 1.25rem var(--space-md);
  border-bottom: 1px solid var(--c-border);
}

.brand-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--c-white);
}

.site-nav {
  padding: 0 var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.site-nav ol {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav ol li {
  flex-shrink: 0;
}

.site-nav ol li a {
  display: block;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--c-border);
  transition: color 0.15s;
}

.site-nav ol li:first-child a { border-left: 1px solid var(--c-border); }
.site-nav ol li a:hover,
.site-nav ol li a[aria-current="page"] {
  color: var(--c-white);
  background: rgba(255,255,255,0.06);
}

/* ============================================================
   main 布局：section 内容 + aside 侧栏
   结构：main > section > div
   ============================================================ */
main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  max-width: var(--max-wide);
  margin: 0 auto;
  width: 100%;
  align-items: start;
}

main > section {
  border-right: 1px solid var(--c-border);
  min-width: 0;
}

main > section > div {
  padding: var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--c-border);
}

/* ── Aside 侧边栏 ── */
.site-aside {
  padding: var(--space-md) var(--space-sm);
  position: sticky;
  top: 90px;
}

.aside-block {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--c-border);
}

.aside-block:last-child {
  border-bottom: none;
}

.aside-block h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 0.75rem;
}

.aside-block hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 0.5rem 0 0.75rem;
}

.aside-nav {
  list-style: none;
}

.aside-nav li {
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.aside-nav li a {
  display: block;
  padding: 0.45rem 0;
  font-size: 0.85rem;
  text-decoration: none;
  color: rgba(255,255,255,0.7);
  transition: color 0.15s;
}

.aside-nav li a:hover { color: var(--c-white); }

.aside-text {
  font-size: 0.83rem;
  color: var(--c-muted);
  line-height: 1.6;
}

/* ============================================================
   首页 Hero：右侧图 · 左侧文 · ~70vh
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  min-height: 70vh;
  align-items: center;
  padding: var(--space-xl) var(--space-md) !important;
  border-bottom: 2px solid var(--c-white) !important;
}

.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-md);
}

.hero__h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 8rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: var(--c-white);
}

.hero__desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  max-width: 420px;
  line-height: 1.7;
}

.hero__cta {
  display: inline-block;
  padding: 0.85rem 2rem;
  border: 2px solid var(--c-white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--c-white);
  transition: background 0.2s, color 0.2s;
  min-height: 48px;
  line-height: 1.2;
}

.hero__cta:hover {
  background: var(--c-white);
  color: var(--c-black);
  opacity: 1;
}

.hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.hero__media--empty {
  background: linear-gradient(135deg, #111 0%, #222 100%);
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ============================================================
   Eyebrow 标签
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 0.5rem;
}

/* ============================================================
   频道页 Hero
   ============================================================ */
.channel-hero {
  padding: var(--space-lg) var(--space-md) !important;
  border-bottom: 2px solid var(--c-white) !important;
  min-height: 40vh;
  display: flex;
  align-items: center;
}

.channel-hero__inner {
  max-width: 640px;
}

.channel-hero__h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0.5rem 0 1rem;
}

.channel-hero__desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}

/* ============================================================
   文章页标题区
   ============================================================ */
.article-header {
  padding: var(--space-md) var(--space-md) !important;
  border-bottom: 1px solid var(--c-border) !important;
}

.article-h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: var(--space-sm) 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-top: var(--space-sm);
}

.article-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-muted);
}

.article-channel {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.2em 0.6em;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: rgba(255,255,255,0.6);
}

.article-hero {
  margin-top: var(--space-md);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
}

.article-hero__img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   面包屑
   ============================================================ */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-muted);
  margin-bottom: var(--space-sm);
}

.breadcrumb ol li a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.breadcrumb ol li a:hover { color: var(--c-white); }
.bc-sep { color: var(--c-border); }

/* ============================================================
   静态页 Hero
   ============================================================ */
.page-hero {
  padding: var(--space-xl) var(--space-md) var(--space-lg) !important;
  border-bottom: 2px solid var(--c-white) !important;
}

.page-hero__h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 6rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0.5rem 0 1rem;
}

.page-hero__desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  line-height: 1.7;
}

/* ============================================================
   h2 装饰（h2 + hr 同级紧跟）
   ============================================================ */
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h2 + hr {
  border: none;
  border-top: 2px solid var(--c-white);
  margin-bottom: var(--space-md);
}

h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

h3 + hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin-bottom: var(--space-sm);
}

hr {
  border: none;
  border-top: 1px solid var(--c-border);
}

/* ============================================================
   卡片（玻璃拟态 · 4px 圆角）
   ============================================================ */
.card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.07);
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card h3 a {
  text-decoration: none;
  color: var(--c-white);
}

.card p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-top: 0.4rem;
}

.card time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-muted);
  display: block;
  margin-bottom: 0.3rem;
}

.card__more,
.card__link {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: none;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
  transition: color 0.15s;
}

.card__more:hover,
.card__link:hover { color: var(--c-white); }

/* ============================================================
   首页：频道格栅 + 文章格栅
   ============================================================ */
.channel-grid,
.article-grid,
.related-list,
.child-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* ── 子页卡片列表（契约：ul>li>section>h3/p） ── */
.child-list li > section,
.related-list li > section {
  height: 100%;
}

/* ============================================================
   关于页频道列表
   ============================================================ */
.about-channel-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-channel-list li {
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--c-border);
  color: rgba(255,255,255,0.7);
}

/* ============================================================
   正文排版 (.prose)
   ============================================================ */
.prose {
  max-width: var(--max-content);
}

.prose p {
  margin-bottom: 1.4em;
  line-height: 1.8;
  font-size: 1.05rem;
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: 0.4em;
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.4em;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.prose li { margin-bottom: 0.4em; line-height: 1.7; }

.prose a {
  color: var(--c-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong { font-weight: 700; }

.prose blockquote {
  border-left: 3px solid var(--c-white);
  padding-left: 1.2em;
  margin: 1.5em 0;
  color: rgba(255,255,255,0.7);
  font-style: italic;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(255,255,255,0.1);
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

/* ============================================================
   页脚：四栏 · footer > div×n
   ============================================================ */
.site-footer {
  background: var(--c-black);
  border-top: 2px solid var(--c-white);
  margin-top: auto;
}

.site-footer > div {
  padding: var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--c-border);
}

/* 四栏布局 */
.site-footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  grid-template-rows: auto auto;
}

.site-footer > div:nth-child(1) { grid-column: 1; }
.site-footer > div:nth-child(2) { grid-column: 2; }
.site-footer > div:nth-child(3) { grid-column: 3; }
.site-footer > div:nth-child(4) { grid-column: 4; }

.footer-copy {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-muted);
  border-top: 1px solid var(--c-border);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}

.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 0.8rem;
}

.site-footer ul {
  list-style: none;
}

.site-footer ul li {
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.site-footer ul li a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.87rem;
  text-decoration: none;
  color: rgba(255,255,255,0.6);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.site-footer ul li a:hover { color: var(--c-white); }

.footer-legal p {
  font-size: 0.8rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

.footer-legal a {
  color: rgba(255,255,255,0.5);
  text-decoration: underline;
}

/* ── 页脚联系表单 ── */
.footer-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-form label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--c-muted);
}

.footer-form input[type="email"] {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-white);
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  font-family: var(--font-body);
  width: 100%;
  min-height: 42px;
  outline: none;
  transition: border-color 0.15s;
}

.footer-form input[type="email"]:focus {
  border-color: rgba(255,255,255,0.4);
}

.footer-form button {
  background: var(--c-white);
  color: var(--c-black);
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  min-height: 42px;
  transition: opacity 0.15s;
  align-self: flex-start;
}

.footer-form button:hover { opacity: 0.8; }

/* ============================================================
   空状态
   ============================================================ */
.empty-hint,
.aside-empty {
  font-size: 0.85rem;
  color: var(--c-muted);
}

/* ============================================================
   Scroll Reveal 动效
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   响应式：平板 ≤900px
   ============================================================ */
@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
  }

  main > section {
    border-right: none;
  }

  .site-aside {
    position: static;
    border-top: 1px solid var(--c-border);
    padding: var(--space-md);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
  }

  .aside-block {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    border-right: 1px solid var(--c-border);
    padding-right: var(--space-sm);
  }

  .aside-block:last-child { border-right: none; }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer > div:nth-child(1) { grid-column: 1 / -1; }
  .site-footer > div:nth-child(2) { grid-column: 1; }
  .site-footer > div:nth-child(3) { grid-column: 2; }
  .site-footer > div:nth-child(4) { grid-column: 1 / -1; }
}

/* ============================================================
   响应式：手机 ≤600px
   ============================================================ */
@media (max-width: 600px) {
  :root {
    --space-md: 1.25rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
  }

  .hero {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    padding: var(--space-lg) var(--space-md) !important;
  }

  .hero__media {
    order: -1;
    aspect-ratio: 16/9;
  }

  .hero__text { align-items: center; text-align: center; }
  .hero__desc { max-width: none; }

  .site-nav ol {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav ol li a {
    padding: 0.75rem 0.75rem;
    font-size: 0.72rem;
  }

  .channel-grid,
  .article-grid,
  .related-list,
  .child-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer > div:nth-child(1),
  .site-footer > div:nth-child(2),
  .site-footer > div:nth-child(3),
  .site-footer > div:nth-child(4) {
    grid-column: 1;
  }

  .site-aside {
    display: flex;
    flex-direction: column;
  }

  .aside-block {
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-sm);
  }

  .breadcrumb ol {
    font-size: 0.7rem;
  }

  main > section > div {
    padding: var(--space-md) var(--space-md);
  }
}

/* ============================================================
   375px 无横向滚动保障
   ============================================================ */
@media (max-width: 375px) {
  body { overflow-x: hidden; }
  .site-wrapper { overflow-x: hidden; }

  .hero__h1 {
    font-size: clamp(2rem, 12vw, 3.5rem);
  }
}
