/* ==========================================
   栖木序 — 样式表
   配色：木色系 / 森林绿 / 米白
   ========================================== */

/* ---------- CSS 变量 ---------- */
:root {
  --brown-900: #3E2723;
  --brown-800: #4E342E;
  --brown-700: #5D4037;
  --brown-600: #6D4C41;
  --brown-500: #795548;
  --brown-400: #8D6E63;
  --brown-300: #A1887F;
  --brown-200: #BCAAA4;
  --brown-100: #D7CCC8;

  --green-800: #1B5E20;
  --green-700: #2E7D32;
  --green-600: #388E3C;

  --gold: #C9A96E;
  --orange: #E65100;

  --bg: #FAF3EB;
  --bg-white: #FFFFFF;
  --text-primary: #3E2723;
  --text-secondary: #795548;
  --text-muted: #A1887F;

  --font-serif: "Noto Serif SC", "Source Han Serif CN", Georgia, serif;
  --font-sans: "Noto Sans SC", "Source Han Sans CN", sans-serif;
  --font-latin: Georgia, "Times New Roman", serif;

  --max-width: 1200px;
  --section-gap: 96px;
  --base-font-size: 16px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: var(--base-font-size);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-serif);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
}

a { color: var(--green-700); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brown-700); }
img { max-width: 100%; height: auto; display: block; }

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

/* ---------- 字号切换 ---------- */
body.font-large { --base-font-size: 18px; }
body.font-xlarge { --base-font-size: 20px; }

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 243, 235, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(93, 64, 55, 0.08);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(62, 39, 35, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo { display: flex; align-items: center; gap: 8px; }
.logo-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brown-700);
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--brown-700); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.font-toggle {
  background: none;
  border: 1px solid var(--brown-200);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-latin);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.font-toggle:hover { border-color: var(--brown-400); color: var(--brown-700); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brown-700);
  border-radius: 1px;
  transition: all 0.3s;
}

/* ---------- 主视觉区 ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(135deg, 
      #3E2723 0%, 
      #5D4037 25%, 
      #6D4C41 50%, 
      #8D6E63 75%, 
      #5D4037 100%);
  background-size: 400% 400%;
  animation: woodGrain 20s ease infinite;
}

@keyframes woodGrain {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 15, 10, 0.35);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #FAF3EB;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  text-shadow: 0 2px 40px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  opacity: 0.9;
  margin-bottom: 40px;
}

.hero-btn {
  display: inline-block;
  padding: 14px 40px;
  border: 1px solid rgba(250, 243, 235, 0.6);
  border-radius: 40px;
  color: #FAF3EB;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  transition: all 0.3s;
}

.hero-btn:hover {
  background: rgba(250, 243, 235, 0.15);
  color: #FAF3EB;
  border-color: rgba(250, 243, 235, 0.9);
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(250, 243, 235, 0.6);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.scroll-arrow {
  width: 1px;
  height: 32px;
  background: rgba(250, 243, 235, 0.4);
  margin: 8px auto 0;
  position: relative;
  animation: scrollBounce 2s ease infinite;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -3px;
  width: 7px;
  height: 7px;
  border-right: 1px solid rgba(250, 243, 235, 0.6);
  border-bottom: 1px solid rgba(250, 243, 235, 0.6);
  transform: rotate(45deg);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.5; }
}

/* ---------- 通用区块样式 ---------- */
section {
  padding: var(--section-gap) 0;
}

.section-header {
  margin-bottom: 48px;
}

.section-header.center {
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green-700);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.section-header.center .section-desc {
  margin: 0 auto;
}

.section-footer {
  text-align: center;
  margin-top: 48px;
}

/* ---------- 按钮 ---------- */
.btn-outline {
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid var(--brown-400);
  border-radius: 30px;
  color: var(--brown-700);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-outline:hover {
  background: var(--brown-700);
  color: var(--bg);
  border-color: var(--brown-700);
}

.btn-kids {
  display: inline-block;
  padding: 10px 28px;
  background: var(--green-700);
  color: #fff;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-kids:hover {
  background: var(--green-800);
  color: #fff;
}

/* ---------- 冷知识 ---------- */
.fun-fact {
  padding: 0;
  margin-top: -48px;
  position: relative;
  z-index: 10;
}

.fact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-white);
  border-radius: 16px;
  padding: 20px 28px;
  box-shadow: 0 4px 24px rgba(62, 39, 35, 0.08);
}

.fact-icon { font-size: 1.5rem; flex-shrink: 0; }

.fact-content { flex: 1; }

.fact-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fact-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-top: 4px;
}

.fact-link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--green-700);
  white-space: nowrap;
}

/* ---------- 本周一木 ---------- */
.weekly-wood {
  background: var(--bg-white);
  border-radius: 24px;
  margin: 0 24px;
  padding: var(--section-gap) 48px;
}

.wood-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.wood-placeholder {
  border-radius: 16px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

.wood-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 12px;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-bar {
  height: 6px;
  background: var(--brown-100);
  border-radius: 3px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brown-400), var(--brown-700));
  border-radius: 3px;
}

.stat-value {
  font-family: var(--font-latin);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stat-value.plain {
  font-family: var(--font-sans);
}

.wood-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.wood-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--bg);
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--brown-700);
}

/* ---------- 树木图鉴网格 ---------- */
.wood-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.wood-card {
  background: var(--bg-white);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
}

.wood-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(62, 39, 35, 0.1);
  color: inherit;
}

.wood-card-img {
  aspect-ratio: 16/10;
}

.wood-card-body { padding: 20px; }

.wood-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.wood-card-latin {
  font-family: var(--font-latin);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.wood-card-tags {
  display: flex;
  gap: 8px;
}

.wood-card-tags span {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  padding: 3px 10px;
  background: var(--bg);
  border-radius: 12px;
  color: var(--text-secondary);
}

/* ---------- 作品赏析 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  grid-auto-rows: 220px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }

.gallery-placeholder {
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
}

.gallery-item:hover .gallery-placeholder {
  transform: scale(1.05);
}

.gallery-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(30, 15, 10, 0.7));
  color: #FAF3EB;
}

.gallery-info h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.gallery-info p {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* ---------- 灵感墙 ---------- */
.inspiration-section {
  background: var(--brown-900);
  color: #FAF3EB;
}

.inspiration-section .section-tag { color: var(--gold); }
.inspiration-section .section-title { color: #FAF3EB; }
.inspiration-section .section-desc { color: rgba(250, 243, 235, 0.6); }

.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.inspiration-card {
  background: rgba(250, 243, 235, 0.05);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(250, 243, 235, 0.1);
}

.inspiration-img {
  aspect-ratio: 4/3;
}

.inspiration-quote {
  padding: 20px;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.05em;
}

/* ---------- 工艺探秘 ---------- */
.craft-list { display: flex; flex-direction: column; gap: 24px; }

.craft-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-white);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s, box-shadow 0.3s;
}

.craft-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(62, 39, 35, 0.1);
  color: inherit;
}

.craft-card.small {
  grid-template-columns: 1fr;
}

.craft-card-img {
  aspect-ratio: 16/10;
  min-height: 200px;
}

.craft-card-body { padding: 28px; }

.craft-card-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--green-700);
  margin-bottom: 8px;
}

.craft-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.craft-card-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.craft-link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--green-700);
}

.craft-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---------- 小树林（儿童入口） ---------- */
.kids-section {
  padding: 64px 0;
}

.kids-banner {
  display: flex;
  align-items: center;
  gap: 40px;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9, #A5D6A7);
  border-radius: 24px;
  padding: 48px;
}

.kids-illustration {
  font-size: 4rem;
  flex-shrink: 0;
}

.kids-text h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--green-800);
  margin-bottom: 12px;
}

.kids-text p {
  color: var(--green-800);
  margin-bottom: 20px;
  line-height: 1.7;
}

/* ---------- 专题入口 ---------- */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.topic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-white);
  border-radius: 16px;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(62, 39, 35, 0.1);
  color: inherit;
}

.topic-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.topic-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.topic-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- 关于 ---------- */
.about-section {
  background: var(--bg-white);
}

.about-text {
  max-width: 640px;
}

.about-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 24px;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--brown-900);
  color: rgba(250, 243, 235, 0.7);
  padding: 64px 0 32px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  margin-bottom: 48px;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: #FAF3EB;
  letter-spacing: 0.1em;
}

.footer-brand p {
  margin-top: 8px;
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #FAF3EB;
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: rgba(250, 243, 235, 0.5);
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: #FAF3EB;
}

.footer-bottom {
  border-top: 1px solid rgba(250, 243, 235, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.4;
}

.footer-bottom a {
  color: rgba(250, 243, 235, 0.6);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .wood-grid { grid-template-columns: repeat(2, 1fr); }
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .craft-cards-row { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-gap: 64px; }

  .nav-links { display: none; }
  .menu-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 243, 235, 0.98);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(93, 64, 55, 0.08);
    box-shadow: 0 8px 24px rgba(62, 39, 35, 0.08);
  }

  .fact-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .weekly-wood {
    margin: 0 12px;
    padding: 48px 24px;
  }

  .wood-showcase {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .wood-grid { grid-template-columns: 1fr; }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }

  .gallery-item.tall { grid-row: span 1; }
  .gallery-item.wide { grid-column: span 1; }

  .inspiration-grid { grid-template-columns: 1fr; }

  .craft-card { grid-template-columns: 1fr; }
  .craft-cards-row { grid-template-columns: 1fr; }

  .kids-banner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .topics-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links { gap: 32px; }
}

@media (max-width: 480px) {
  .topics-grid { grid-template-columns: 1fr; }
  .stat-item { grid-template-columns: 1fr; gap: 4px; }
  .stat-value { text-align: left; }
}
