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

/* ===== CSS 变量 ===== */
:root {
  --cream: #f5e6c8;
  --caramel: #d4a574;
  --dark: #262117;
  --dark-80: rgba(38,33,23,0.8);
  --dark-40: rgba(38,33,23,0.4);
  --cream-80: rgba(245,230,200,0.85);
  --caramel-light: #e8c49a;
  --caramel-dark: #b8845a;
  --shadow-warm: 0 4px 24px rgba(38,33,23,0.18);
  --shadow-card: 0 2px 16px rgba(38,33,23,0.14);
  --radius-card: 18px;
  --font-body: 'Noto Sans Hebrew', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'STHeiti', sans-serif;
  --max-w: 860px;
  --max-w-wide: 1100px;
  --header-h: 110px;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--cream);
  color: var(--dark);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--caramel-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--dark); }
ul, ol { list-style: none; }

/* ===== Film Grain SVG Filter ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  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='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23grain)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ===== 站点骨架 ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-body {
  flex: 1;
  width: 100%;
}

/* ===== 顶部公告条 ===== */
.header-announce {
  background: var(--dark);
  color: var(--caramel);
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 6px 16px;
  font-weight: 500;
}

/* ===== 品牌行 ===== */
.header-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px 10px;
  background: var(--cream);
  border-bottom: 1px solid var(--caramel-light);
  flex-wrap: wrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  filter: sepia(0.3) contrast(1.1);
}

.brand-mark-fallback {
  font-size: 1.6rem;
  color: var(--caramel-dark);
  line-height: 1;
}

.brand-name {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.brand-name:hover { color: var(--caramel-dark); }

.brand-tagline {
  font-size: 0.75rem;
  color: var(--dark-40);
  margin-left: auto;
  font-weight: 300;
  letter-spacing: 0.06em;
}

/* ===== 导航行（header > nav > a×n）===== */
.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 20px;
  background: var(--dark);
  border-bottom: 2px solid var(--caramel);
  min-height: 46px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  color: var(--caramel-light);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 12px 14px;
  letter-spacing: 0.04em;
  border-radius: 3px;
  transition: background 0.18s, color 0.18s;
  min-height: 46px;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(212,165,116,0.15);
  color: var(--cream);
}

.nav-link.nav-active {
  color: var(--cream);
  background: rgba(212,165,116,0.2);
  border-bottom: 2px solid var(--caramel);
}

/* ===== Hero（超大标题左对齐斜切，约 70vh）===== */
.hero-block {
  position: relative;
  min-height: 70vh;
  background: var(--dark);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-bottom: 60px;
}

.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)' opacity='0.9'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  opacity: 0.07;
  pointer-events: none;
  z-index: 1;
}

.hero-leak {
  position: absolute;
  top: -60px;
  right: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(ellipse at 60% 30%, rgba(212,165,116,0.28) 0%, rgba(212,165,116,0.08) 50%, transparent 75%);
  pointer-events: none;
  z-index: 1;
  animation: leak-pulse 8s ease-in-out infinite alternate;
}

.hero-leak-sm {
  width: 280px;
  height: 280px;
  top: -30px;
  right: -40px;
  opacity: 0.7;
}

@keyframes leak-pulse {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.12); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  width: 100%;
  padding: 0 32px 0 40px;
}

.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--caramel);
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 14px;
  opacity: 0.9;
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: left;
  max-width: 800px;
  text-shadow: 0 2px 20px rgba(38,33,23,0.5);
}

.hero-sub {
  margin-top: 18px;
  font-size: 1rem;
  color: var(--caramel-light);
  max-width: 520px;
  line-height: 1.6;
  font-weight: 300;
}

/* 斜切色带 */
.hero-slash {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--cream);
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 3;
}

/* ===== 栏目 Hero（较小）===== */
.cat-hero {
  position: relative;
  background: var(--dark);
  padding: 52px 40px 44px;
  overflow: hidden;
}

.cat-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
}

.cat-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--cream);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-top: 10px;
}

.cat-desc {
  margin-top: 12px;
  color: var(--caramel-light);
  font-size: 0.95rem;
  max-width: 480px;
  font-weight: 300;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--dark-40);
  padding: 14px 40px;
  background: var(--cream);
  border-bottom: 1px solid var(--caramel-light);
  letter-spacing: 0.03em;
}

.breadcrumb a { color: var(--caramel-dark); }
.breadcrumb a:hover { color: var(--dark); }
.breadcrumb span { margin: 0 4px; }

/* ===== 内容主体 ===== */
.main-content {
  width: 100%;
}

.content-section,
.entry-header,
.entry-prose,
.about-header,
.about-prose,
.privacy-header,
.privacy-prose,
.entry-list-section,
.catalog-section,
.about-links-block,
.privacy-nav-block,
.related-aside {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 40px 0;
}

.entry-list-section,
.catalog-section,
.related-aside,
.about-links-block,
.privacy-nav-block {
  padding-bottom: 40px;
}

/* ===== 段落样式（prose-zone）===== */
.prose-zone {
  padding-bottom: 32px;
}

.prose-zone p {
  margin-bottom: 1.1em;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--dark);
}

.prose-zone h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2em 0 0.4em;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.prose-zone h2 + hr {
  border: none;
  border-top: 2px solid var(--caramel);
  margin: 0 0 1em;
}

.prose-zone h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.6em 0 0.4em;
  color: var(--dark);
}

.prose-zone ul,
.prose-zone ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
  list-style: disc;
}

.prose-zone ol { list-style: decimal; }

.prose-zone li {
  margin-bottom: 0.4em;
  font-size: 1rem;
  line-height: 1.7;
}

.prose-zone a {
  color: var(--caramel-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose-zone blockquote {
  border-left: 3px solid var(--caramel);
  margin: 1.5em 0;
  padding: 0.7em 1.2em;
  background: rgba(212,165,116,0.08);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--dark-80);
}

.prose-zone table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4em;
  font-size: 0.93rem;
}

.prose-zone th,
.prose-zone td {
  border: 1px solid var(--caramel-light);
  padding: 8px 12px;
  text-align: left;
  line-height: 1.5;
}

.prose-zone th {
  background: rgba(212,165,116,0.15);
  font-weight: 600;
}

/* ===== section-heading + hr ===== */
.section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--dark);
  margin-bottom: 8px;
}

.section-heading + hr {
  border: none;
  border-top: 2px solid var(--caramel);
  margin-bottom: 20px;
}

hr {
  border: none;
  border-top: 1px solid var(--caramel-light);
  margin: 16px 0;
}

/* ===== 卡片列表（首页：ol > li > a + small）===== */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 0;
}

.card-item {
  list-style: none;
}

.card-link {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--caramel-light);
  transition: transform 0.22s, box-shadow 0.22s;
  color: var(--dark);
  height: 100%;
  position: relative;
  filter: sepia(0.08) contrast(1.03);
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-warm);
  color: var(--dark);
}

.card-figure {
  margin: 0;
  overflow: hidden;
  height: 160px;
  background: var(--dark);
}

.card-figure img,
.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  filter: sepia(0.2) saturate(0.85) contrast(1.05);
  transition: transform 0.3s;
}

.card-link:hover .card-img,
.card-link:hover .card-figure img {
  transform: scale(1.04);
}

.card-body {
  padding: 16px 18px 20px;
  flex: 1;
}

.card-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 6px;
}

.card-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--dark-80);
  line-height: 1.5;
  font-weight: 300;
}

.card-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--caramel) 0%, var(--caramel-light) 100%);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

/* ===== 词条列表（ol > li > a + small）===== */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid var(--caramel-light);
  border-radius: 12px;
  overflow: hidden;
}

.entry-item {
  list-style: none;
  border-bottom: 1px solid var(--caramel-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  background: #fff;
  transition: background 0.15s;
}

.entry-item:last-child { border-bottom: none; }

.entry-item:hover { background: rgba(245,230,200,0.6); }

.entry-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 20px;
  color: var(--dark);
  min-height: 48px;
  justify-content: center;
  gap: 2px;
}

.entry-link:hover { color: var(--dark); }

.entry-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--dark);
  line-height: 1.4;
}

.entry-desc {
  font-size: 0.78rem;
  color: var(--dark-80);
  font-weight: 300;
  line-height: 1.4;
  margin-top: 2px;
}

.entry-date {
  font-size: 0.72rem;
  color: var(--dark-40);
  padding: 0 18px;
  white-space: nowrap;
  font-weight: 300;
}

/* ===== Entry 页头 ===== */
.entry-h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 12px;
}

.entry-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 4px;
}

.entry-date-large {
  font-size: 0.8rem;
  color: var(--caramel-dark);
  font-weight: 500;
  letter-spacing: 0.04em;
  background: rgba(212,165,116,0.12);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--caramel-light);
}

.entry-date-mod {
  font-size: 0.76rem;
  color: var(--dark-40);
}

/* ===== Polaroid 相框 ===== */
.polaroid-frame {
  margin: 0 auto 28px;
  background: #fff;
  padding: 10px 10px 38px;
  box-shadow: var(--shadow-warm);
  border-radius: 4px;
  max-width: 560px;
  position: relative;
  border: 1px solid var(--caramel-light);
}

.entry-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  filter: sepia(0.15) saturate(0.88) contrast(1.06);
}

/* ===== About 页面 ===== */
.about-header,
.privacy-header {
  padding-top: 48px;
  padding-bottom: 0;
}

.about-title,
.privacy-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--dark);
  margin-top: 10px;
}

.about-lead,
.privacy-lead {
  font-size: 1rem;
  color: var(--dark-80);
  margin-top: 12px;
  max-width: 540px;
  line-height: 1.7;
  font-weight: 300;
}

.about-divider {
  border: none;
  border-top: 2px solid var(--caramel);
  max-width: var(--max-w);
  margin: 24px auto 0;
}

.privacy-updated {
  font-size: 0.8rem;
  color: var(--dark-40);
  margin-top: 10px;
}

/* ===== 相关 aside ===== */
.related-aside {
  background: rgba(245,230,200,0.4);
  border-top: 2px solid var(--caramel-light);
  padding-top: 32px;
  padding-bottom: 40px;
  margin-top: 20px;
}

/* ===== 页脚（footer 三列 dl）===== */
.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 32px;
  background: var(--dark);
  border-top: 2px solid var(--caramel);
  gap: 20px;
  flex-wrap: wrap;
  margin-top: auto;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.footer-col dt {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--caramel);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.footer-col dd {
  font-size: 0.82rem;
  color: var(--caramel-light);
  line-height: 1.6;
}

.footer-col dd a {
  color: var(--caramel-light);
  transition: color 0.15s;
}

.footer-col dd a:hover { color: var(--cream); }

.footer-col small {
  font-size: 0.72rem;
  color: var(--dark-40);
  color: rgba(245,230,200,0.35);
}

.footer-col-right {
  text-align: right;
  align-items: flex-end;
  margin-left: auto;
}

/* ===== Stagger 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .stagger-list > * {
    opacity: 0;
    transform: translateY(20px);
    animation: stagger-in 0.45s ease forwards;
  }

  .stagger-list > *:nth-child(1)  { animation-delay: 0.05s; }
  .stagger-list > *:nth-child(2)  { animation-delay: 0.10s; }
  .stagger-list > *:nth-child(3)  { animation-delay: 0.15s; }
  .stagger-list > *:nth-child(4)  { animation-delay: 0.20s; }
  .stagger-list > *:nth-child(5)  { animation-delay: 0.25s; }
  .stagger-list > *:nth-child(6)  { animation-delay: 0.30s; }
  .stagger-list > *:nth-child(7)  { animation-delay: 0.35s; }
  .stagger-list > *:nth-child(8)  { animation-delay: 0.40s; }

  @keyframes stagger-in {
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .stagger-list > * { opacity: 1; transform: none; animation: none; }
  .hero-leak { animation: none; }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .card-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .hero-inner { padding: 0 24px; }
  .cat-hero { padding: 36px 24px 32px; }
}

@media (max-width: 640px) {
  :root { --header-h: auto; }

  html { font-size: 16px; }

  .header-brand-row {
    padding: 12px 16px 10px;
    gap: 10px;
  }

  .brand-tagline { display: none; }

  .site-nav {
    padding: 0 8px;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }

  .nav-link {
    font-size: 0.76rem;
    padding: 12px 10px;
    white-space: nowrap;
    min-height: 44px;
  }

  .hero-block { min-height: 70vh; }
  .hero-inner { padding: 0 18px; }
  .hero-title { font-size: clamp(1.9rem, 9vw, 3rem); }
  .hero-sub { font-size: 0.9rem; }
  .hero-slash { height: 44px; }

  .content-section,
  .entry-header,
  .entry-prose,
  .about-header,
  .about-prose,
  .privacy-header,
  .privacy-prose,
  .entry-list-section,
  .catalog-section,
  .about-links-block,
  .privacy-nav-block,
  .related-aside {
    padding-left: 18px;
    padding-right: 18px;
  }

  .breadcrumb { padding: 10px 18px; }

  .card-list {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .card-body { padding: 12px 14px 16px; }
  .card-title { font-size: 0.85rem; }

  .site-footer {
    flex-direction: column;
    gap: 16px;
    padding: 20px 18px;
  }

  .footer-col-right {
    margin-left: 0;
    text-align: left;
    align-items: flex-start;
  }

  .polaroid-frame {
    padding: 8px 8px 28px;
  }

  .about-title,
  .privacy-title { font-size: clamp(1.5rem, 7vw, 2rem); }
}

@media (max-width: 400px) {
  .card-list {
    grid-template-columns: 1fr;
  }
}
