@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ===== CSS 变量 ===== */
:root {
  --cream: #f5e6c8;
  --gold: #d4a574;
  --dark: #262117;
  --dark-70: rgba(38,33,23,0.7);
  --dark-30: rgba(38,33,23,0.3);
  --gold-light: #e8c49a;
  --gold-dark: #b8854a;
  --warm-white: #fdf6eb;
  --card-radius: 28px;
  --font-main: 'Lexend', 'Source Sans 3', system-ui, sans-serif;
  --nav-h: 64px;
  --sidebar-w: 240px;
  --content-max: 720px;
  --wrap-max: 1080px;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--cream);
  color: var(--dark);
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 16px);
  position: relative;
  overflow-x: hidden;
}

/* ===== 胶片颗粒噪点 ===== */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: multiply;
}

/* ===== 链接 ===== */
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--dark); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ===== 顶部条 ===== */
.top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--dark);
  color: var(--cream);
  border-bottom: 2px solid var(--gold);
  min-height: 48px;
}
.brand-name a {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.brand-name a:hover { color: var(--cream); text-decoration: none; }
.top-tagline {
  font-size: 0.8rem;
  color: var(--gold-light);
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumb {
  font-size: 0.78rem;
  color: var(--gold-light);
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumb a { color: var(--gold); }

/* ===== Hero — 首页错位 Polaroid ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 20px 16px;
  min-height: 45vh;
  max-height: 52vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cream) 60%, var(--gold-light) 100%);
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212,165,116,0.18));
  pointer-events: none;
}
.hero-collage {
  position: relative;
  flex: 0 0 auto;
  width: 48%;
  height: 38vh;
}
.polaroid {
  position: absolute;
  background: #fff;
  padding: 8px 8px 28px;
  border-radius: 4px;
  box-shadow: 2px 4px 18px var(--dark-30);
  transition: transform 0.3s ease;
}
.polaroid:hover { transform: rotate(0deg) scale(1.03) !important; }
.polaroid--left {
  left: 0; top: 10%;
  width: 58%;
  transform: rotate(-3.5deg);
  z-index: 2;
}
.polaroid--right {
  right: 0; top: 0;
  width: 54%;
  transform: rotate(4deg);
  z-index: 1;
}
.polaroid--single {
  position: relative;
  display: inline-block;
  transform: rotate(-1.5deg);
}
.polaroid--story-a {
  position: absolute;
  left: 0; top: 5%;
  width: 56%;
  transform: rotate(-3deg);
  z-index: 2;
}
.polaroid--story-b {
  position: absolute;
  right: 0; top: 0;
  width: 52%;
  transform: rotate(3.5deg);
  z-index: 1;
}
.polaroid-label {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  color: var(--dark-70);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-img, .story-hero-img, .story-extra-img, .section-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  filter: sepia(0.18) contrast(1.05) saturate(0.88);
  object-fit: cover;
}
.hero-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-radius: 2px;
}
.hero-placeholder--b { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }

.hero-text {
  flex: 1;
  text-align: right;
  padding-right: 8px;
  z-index: 3;
}
.hero-h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
  margin-bottom: 10px;
}
.hero-desc {
  font-size: 0.92rem;
  color: var(--dark-70);
  max-width: 300px;
  margin-left: auto;
  margin-bottom: 8px;
}
.hero-date { font-size: 0.78rem; color: var(--gold-dark); }

/* ===== Section Hero ===== */
.section-hero-banner {
  padding: 20px 20px 0;
  display: flex;
  justify-content: center;
  background: var(--cream);
}
.section-hero-banner .polaroid--single {
  max-width: 360px;
}
.section-hero-img { max-height: 260px; object-fit: cover; }

/* ===== Story Polaroids ===== */
.story-polaroids {
  position: relative;
  height: 280px;
  margin-bottom: 24px;
  overflow: visible;
}
.polaroid--story-a, .polaroid--story-b { width: 48%; }
.story-extra-img { max-height: 200px; object-fit: cover; }

/* ===== main レイアウト ===== */
main {
  display: flex;
  gap: 0;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 20px 16px 32px;
  align-items: flex-start;
}
.wrap {
  flex: 1;
  min-width: 0;
}
.content-section {
  width: 100%;
}
.main-article {
  background: var(--warm-white);
  border-radius: var(--card-radius);
  padding: 28px 24px 32px;
  box-shadow: 0 2px 12px var(--dark-30);
  border-top: 3px solid var(--gold);
  position: relative;
}

/* ===== 标题 ===== */
h1 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; line-height: 1.3; margin-bottom: 12px; color: var(--dark); }
h2 { font-size: 1.15rem; font-weight: 600; color: var(--dark); margin: 24px 0 6px; }
h3 { font-size: 1rem; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
hr {
  border: none;
  border-top: 2px solid var(--gold);
  margin: 0 0 18px;
  opacity: 0.6;
}

/* ===== 正文 ===== */
.prose-block {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--dark);
  margin: 16px 0 24px;
}
.prose-block p { margin-bottom: 14px; }
.prose-block h2 { margin-top: 28px; }
.prose-block h3 { margin-top: 20px; }
.prose-block ul, .prose-block ol { padding-left: 1.4em; margin-bottom: 14px; }
.prose-block li { margin-bottom: 6px; }
.prose-block a { color: var(--gold-dark); border-bottom: 1px solid var(--gold-light); }
.prose-block img { max-width: 100%; border-radius: 12px; margin: 12px 0; filter: sepia(0.1) contrast(1.03); }

/* ===== 日期/标签 ===== */
.pub-date {
  font-size: 0.8rem;
  color: var(--gold-dark);
  margin-bottom: 14px;
  font-weight: 500;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag-pill {
  background: var(--gold-light);
  color: var(--dark);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}
.tag-pill:hover { background: var(--gold); text-decoration: none; }
.tag-eyebrow {
  display: inline-block;
  background: var(--gold);
  color: var(--dark);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  margin-right: 10px;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.tag-h1 { display: flex; align-items: center; margin-bottom: 12px; }

/* ===== 卡片网格 ===== */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin: 20px 0 28px;
}
.card {
  background: var(--cream);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--dark-30);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-bottom: 3px solid var(--gold);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px var(--dark-30); }
.card-media { overflow: hidden; }
.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: sepia(0.15) contrast(1.04) saturate(0.85);
  transition: filter 0.3s;
}
.card:hover .card-img { filter: sepia(0.05) contrast(1.06) saturate(0.95); }
.card-body { padding: 14px 16px 10px; }
.card-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.card-title a { color: var(--dark); }
.card-title a:hover { color: var(--gold-dark); text-decoration: none; }
.card-date { font-size: 0.75rem; color: var(--gold-dark); margin-bottom: 6px; }
.card-desc { font-size: 0.82rem; color: var(--dark-70); line-height: 1.5; }
.card-accent { height: 0; }

/* ===== 子页 dl 列表 ===== */
.child-list {
  margin: 0 0 24px;
  border-left: 3px solid var(--gold);
  padding-left: 16px;
}
.child-list dt { margin-top: 12px; font-weight: 600; font-size: 0.95rem; }
.child-list dt a { color: var(--dark); }
.child-list dt a:hover { color: var(--gold-dark); }
.child-list dd { font-size: 0.82rem; color: var(--dark-70); margin-left: 0; margin-bottom: 4px; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  margin-left: 24px;
  position: sticky;
  top: 20px;
  background: var(--warm-white);
  border-radius: 20px;
  padding: 20px 16px;
  box-shadow: 0 2px 10px var(--dark-30);
  border-top: 3px solid var(--gold);
}
.sidebar h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }
.aside-nav { display: block; }
.aside-nav dt { margin-top: 10px; font-size: 0.85rem; font-weight: 600; }
.aside-nav dt a { color: var(--dark); }
.aside-nav dt a:hover { color: var(--gold-dark); }
.aside-nav dd { font-size: 0.75rem; color: var(--dark-70); margin: 0; line-height: 1.4; }
.sidebar-link { margin-top: 16px; font-size: 0.82rem; }

/* ===== 各页 h1 ===== */
.section-h1, .tag-h1, .story-h1, .about-h1, .privacy-h1 { margin-bottom: 8px; }

/* ===== 返回链接 ===== */
.back-link { margin-top: 24px; font-size: 0.88rem; }
.back-link a { color: var(--gold-dark); font-weight: 500; }

/* ===== About logo ===== */
.about-logo-wrap { margin-bottom: 16px; }
.about-logo { max-width: 120px; border-radius: 12px; }

/* ===== 页脚 ===== */
.site-footer {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--gold-light);
}
.footer-brand {
  font-size: 0.85rem;
  color: var(--dark-70);
}
.footer-brand a { color: var(--dark); font-weight: 600; }
.footer-copy {
  font-size: 0.75rem;
  color: var(--dark-70);
}
.footer-copy a { color: var(--gold-dark); }

/* ===== 底部固定导航条 ===== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 8000;
  background: var(--dark);
  border-top: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: var(--nav-h);
  min-height: 56px;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.25);
}
.bottom-brand {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.85rem;
}
.bottom-brand a { color: var(--gold); white-space: nowrap; }
.bottom-brand a:hover { color: var(--cream); text-decoration: none; }

.bottom-nav { flex: 1; overflow-x: auto; scrollbar-width: none; }
.bottom-nav::-webkit-scrollbar { display: none; }

.pill-nav {
  display: flex;
  flex-direction: row;
  gap: 6px;
  white-space: nowrap;
  align-items: center;
  padding: 6px 0;
}
.pill-nav dt, .pill-nav dd { display: inline; }
.pill-nav dd { display: none; }
.pill-nav dt a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  min-height: 40px;
  background: rgba(212,165,116,0.15);
  border: 1px solid var(--gold);
  border-radius: 24px;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.pill-nav dt a:hover {
  background: var(--gold);
  color: var(--dark);
  text-decoration: none;
}

.bottom-search { flex-shrink: 0; }
.bottom-search form { display: flex; gap: 4px; }
.bottom-search input {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 6px 12px;
  color: var(--cream);
  font-size: 0.78rem;
  font-family: var(--font-main);
  width: 100px;
  min-height: 40px;
  outline: none;
}
.bottom-search input::placeholder { color: rgba(245,230,200,0.5); }
.bottom-search input:focus { border-color: var(--gold-light); background: rgba(255,255,255,0.15); }
.bottom-search button {
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  font-family: var(--font-main);
  transition: background 0.2s;
}
.bottom-search button:hover { background: var(--gold-light); }

/* ===== Stagger 动效 ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: fadeUp 0.45s ease both;
  animation-delay: calc(var(--stagger, 0) * 80ms);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
  .polaroid, .card { transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== 移动端 ≤ 768px ===== */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  main {
    flex-direction: column;
    padding: 12px 10px 24px;
    gap: 16px;
  }
  .sidebar {
    width: 100%;
    margin-left: 0;
    position: static;
    border-radius: 16px;
    padding: 16px 14px;
  }
  .hero {
    flex-direction: column-reverse;
    min-height: auto;
    max-height: none;
    padding: 16px 12px 12px;
    gap: 16px;
  }
  .hero-collage { width: 100%; height: 36vw; min-height: 120px; }
  .hero-text { text-align: left; padding-right: 0; }
  .hero-desc { margin-left: 0; }

  .section-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .card-img { height: 130px; }

  .bottom-nav-bar { padding: 0 8px; gap: 6px; }
  .bottom-brand { display: none; }
  .bottom-search input { width: 72px; }

  .main-article { padding: 18px 14px 24px; border-radius: 18px; }

  .story-polaroids { height: 200px; }
  .polaroid--story-a, .polaroid--story-b { width: 52%; }
}

/* ===== 超窄 ≤ 375px ===== */
@media (max-width: 375px) {
  html { font-size: 16px; }
  .section-grid { grid-template-columns: 1fr; }
  .hero-collage { height: 28vw; }
  .bottom-search input { width: 56px; font-size: 0.72rem; }
  .pill-nav dt a { padding: 8px 10px; font-size: 0.72rem; }
  .story-polaroids { height: 160px; }
}

/* ===== 大屏 ≥ 1100px ===== */
@media (min-width: 1100px) {
  .section-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 32px 40px 20px; }
}
