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

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Jost', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: #f5efe4;
  color: #172623;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ===== CSS 变量 ===== */
:root {
  --mint: #5cc6b0;
  --sand: #d4c4a8;
  --forest: #172623;
  --earth-light: #f5efe4;
  --earth-mid: #e8dcc8;
  --earth-dark: #c4a882;
  --terracotta: #c67b5c;
  --olive: #6b7b3c;
  --text-primary: #172623;
  --text-secondary: #4a5c52;
  --text-muted: #7a8c82;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-soft: 0 4px 24px rgba(23,38,35,0.10);
  --shadow-hover: 0 8px 32px rgba(23,38,35,0.16);
  --nav-height: 110px;
  --transition-base: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== 排版 ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
  line-height: 1.25;
  color: var(--forest);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 500; }

p { margin-bottom: 1em; font-size: 1rem; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

a { color: var(--mint); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--forest); }

ul, ol { padding-left: 1.5em; margin-bottom: 1em; }
li { margin-bottom: 0.4em; }

img { max-width: 100%; height: auto; display: block; }

hr {
  border: none;
  border-top: 1.5px solid var(--sand);
  margin: 1rem 0 1.5rem;
}

/* ===== 滚动锚点偏移 ===== */
article[id] {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

/* ===== 按钮 ===== */
.btn-primary,
.btn-outline,
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: 44px;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--mint);
  color: var(--forest);
  border-color: var(--mint);
}
.btn-primary:hover {
  background: var(--forest);
  color: var(--sand);
  border-color: var(--forest);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-outline {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}
.btn-outline:hover {
  background: var(--forest);
  color: var(--sand);
  transform: translateY(-2px);
}

.btn-cta {
  background: var(--mint);
  color: var(--forest);
  border-color: var(--mint);
  font-size: 0.9rem;
  padding: 0.65rem 1.4rem;
  min-height: 44px;
}
.btn-cta:hover {
  background: var(--forest);
  color: var(--mint);
  border-color: var(--forest);
}

/* ===== 顶部导航 ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(245,239,228,0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sand);
  box-shadow: 0 2px 12px rgba(23,38,35,0.06);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid var(--earth-mid);
}

.header-brand-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
}

.brand-wordmark {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand-wordmark:hover { color: var(--mint); }

.brand-tagline {
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: none;
}

.header-nav {
  padding: 0 2rem;
}

.header-nav p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  color: inherit;
}

.header-nav p a {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-base);
  min-height: 44px;
  white-space: nowrap;
}

.header-nav p a:hover {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

/* ===== Hero 区域 ===== */
.hero-full {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(245,239,228,0.55) 0%,
    rgba(245,239,228,0.40) 40%,
    rgba(23,38,35,0.70) 100%
  );
}

/* grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.35;
}

main {
  position: relative;
  z-index: 1;
}

main .wrap {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--nav-height);
  padding-bottom: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.hero-section {
  width: 100%;
}

.hero-content {
  max-width: 640px;
  padding: 3rem 0 2rem;
}

.hero-h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(245,239,228,0.6);
}

.hero-sub {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== 内容主体 ===== */
.content-shell {
  position: relative;
  z-index: 2;
  background: var(--earth-light);
  display: flex;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== 侧边栏 ===== */
.site-aside {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  height: fit-content;
  align-self: flex-start;
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--sand);
  background: linear-gradient(160deg, var(--earth-light) 60%, rgba(212,196,168,0.25) 100%);
}

.aside-inner {
  position: sticky;
  top: 0;
}

.aside-title {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.site-aside nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.aside-link {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  border-left: 2px solid transparent;
  line-height: 1.4;
  min-height: 40px;
}

.aside-link:hover {
  color: var(--mint);
  background: rgba(92,198,176,0.08);
  border-left-color: var(--mint);
  transform: translateX(3px);
}

/* ===== 正文区 ===== */
.page-body {
  flex: 1;
  min-width: 0;
  padding: 3rem 3rem 4rem;
}

/* ===== 注入的 section 样式 ===== */
.page-body section {
  margin-bottom: 4rem;
  padding: 2.5rem;
  background: rgba(255,255,255,0.55);
  border-radius: var(--radius-md);
  border: 1px solid rgba(212,196,168,0.4);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.page-body section:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.page-body section h2 {
  margin-bottom: 0.5rem;
}

.page-body section h2 + hr {
  margin-bottom: 1.5rem;
}

.page-body section h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.page-body section p {
  line-height: 1.85;
  color: var(--text-secondary);
}

.page-body section ul,
.page-body section ol {
  color: var(--text-secondary);
  line-height: 1.8;
}

.page-body section strong {
  color: var(--forest);
  font-weight: 600;
}

/* 玻璃拟态卡片 */
.page-body .card,
.page-body .item-card {
  background: rgba(255,255,255,0.60);
  border: 1px solid rgba(212,196,168,0.35);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 12px rgba(23,38,35,0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1.5rem;
  transition: all var(--transition-base);
}
.page-body .card:hover,
.page-body .item-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  z-index: 2;
  background: var(--forest);
  color: var(--sand);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2rem 3rem;
  padding: 3.5rem 3rem 0;
}

.site-footer section {
  padding-bottom: 2rem;
}

.footer-brand-section {
  grid-column: 1;
}

.footer-brand-name {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--mint);
  margin-bottom: 0.75rem;
}

.footer-brand-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(212,196,168,0.75);
}

.footer-col-title {
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 0.5rem;
}

.site-footer hr {
  border-top-color: rgba(212,196,168,0.25);
  margin-bottom: 1rem;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav-list li { margin-bottom: 0.5rem; }
.footer-nav-list a {
  font-size: 0.875rem;
  color: rgba(212,196,168,0.8);
  transition: color var(--transition-base);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.25rem 0;
  line-height: 1.6;
}
.footer-nav-list a:hover { color: var(--mint); }

.footer-topic-text,
.footer-keywords {
  font-size: 0.85rem;
  color: rgba(212,196,168,0.7);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-contact-item {
  font-size: 0.85rem;
  color: rgba(212,196,168,0.75);
  line-height: 1.6;
}
.footer-contact-item a {
  color: var(--mint);
}
.footer-contact-item a:hover {
  color: var(--sand);
}

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(212,196,168,0.15);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(212,196,168,0.5);
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.04em;
}

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .site-footer {
    grid-template-columns: 1fr 1fr;
    padding: 3rem 2rem 0;
  }
  .footer-brand-section {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    grid-column: 1 / -1;
  }
  .content-shell {
    flex-direction: column;
  }
  .site-aside {
    width: 100%;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--sand);
    padding: 1.5rem 2rem;
  }
  .site-aside nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .aside-link {
    min-height: 40px;
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.4rem 0.75rem;
  }
  .aside-link:hover {
    transform: translateY(-2px);
    border-bottom-color: var(--mint);
    border-left-color: transparent;
  }
  .page-body {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 100px;
  }

  .header-brand-row {
    padding: 0.75rem 1.25rem;
  }

  .brand-wordmark {
    font-size: 1.25rem;
  }

  .header-cta {
    min-height: 44px;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }

  .header-nav {
    padding: 0 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .header-nav::-webkit-scrollbar { display: none; }

  .header-nav p {
    flex-wrap: nowrap;
    gap: 0;
    min-width: max-content;
  }

  .header-nav p a {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    min-height: 44px;
  }

  .hero-content {
    padding: 2rem 0 1.5rem;
  }

  .hero-h1 {
    font-size: 2rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .hero-actions {
    gap: 0.75rem;
  }

  .btn-primary,
  .btn-outline {
    padding: 0.7rem 1.25rem;
    font-size: 0.9rem;
    min-height: 44px;
  }

  main .wrap {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .page-body {
    padding: 1.5rem 1.25rem 3rem;
  }

  .page-body article {
    padding: 1.75rem 1.25rem;
    margin-bottom: 2.5rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 1.5rem 0;
    padding: 2.5rem 1.25rem 0;
  }

  .footer-brand-section,
  .footer-bottom {
    grid-column: 1;
  }
}

@media (max-width: 480px) {
  .hero-h1 {
    font-size: 1.75rem;
  }

  .header-cta {
    display: none;
  }
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
