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

/* =====================
   CSS 变量与基础重置
   ===================== */
:root {
  --c-green: #87ff71;
  --c-yellow: #ffce5c;
  --c-dark: #192617;
  --c-dark-2: #1f3019;
  --c-dark-3: #253b22;
  --c-green-dim: rgba(135,255,113,0.12);
  --c-yellow-dim: rgba(255,206,92,0.12);
  --c-white: #f4f4f0;
  --c-muted: #a8c4a0;
  --radius-card: 18px;
  --nav-h: 64px;
  --anchor-h: 48px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1200px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
  line-height: 1.65;
  background: var(--c-dark);
  color: var(--c-white);
}

body {
  font-family: var(--font);
  overflow-x: hidden;
  min-height: 100vh;
}

article[id] {
  scroll-margin-top: calc(var(--nav-h) + var(--anchor-h) + 8px);
}

a {
  color: var(--c-green);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}
a:hover { color: var(--c-yellow); }

ul, menu { list-style: none; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =====================
   顶部主导航
   ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-dark);
  border-bottom: 2px solid var(--c-green);
  height: var(--nav-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.header-brand {
  grid-column: 2;
  text-align: center;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-green);
  letter-spacing: 0.04em;
}
.brand-logo {
  height: 40px;
  width: auto;
}

.desktop-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
.desktop-nav--left { grid-column: 1; justify-self: end; }
.desktop-nav--right { grid-column: 3; justify-self: start; }

.desktop-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  height: 44px;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-muted);
  border-radius: 6px;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.desktop-nav a:hover {
  background: var(--c-green-dim);
  color: var(--c-green);
}

/* 搜索框 */
.header-search {
  grid-column: 4;
}
.search-form {
  display: flex;
  align-items: center;
  background: var(--c-dark-3);
  border: 1.5px solid var(--c-green-dim);
  border-radius: 8px;
  overflow: hidden;
  height: 44px;
}
.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--c-white);
  font-family: var(--font);
  font-size: 0.875rem;
  padding: 0 12px;
  width: 160px;
  height: 100%;
}
.search-input::placeholder { color: var(--c-muted); }
.search-btn {
  background: transparent;
  border: none;
  border-left: 1.5px solid var(--c-green-dim);
  color: var(--c-muted);
  cursor: pointer;
  padding: 0 12px;
  height: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color var(--transition), background var(--transition);
}
.search-btn:hover {
  background: var(--c-green-dim);
  color: var(--c-green);
}

/* 移动端汉堡 */
.mobile-nav-details {
  display: none;
  grid-column: 1;
}
.mobile-nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  cursor: pointer;
  list-style: none;
  background: none;
  border: none;
}
.mobile-nav-toggle::-webkit-details-marker { display: none; }
.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-green);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.mobile-nav-details[open] .mobile-nav-toggle {
  background: var(--c-green-dim);
  border-radius: 6px;
}

.mobile-nav-menu {
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--c-dark-2);
  border-bottom: 2px solid var(--c-green);
  z-index: 200;
  padding: 8px 0;
}
.mobile-nav-menu li a {
  display: flex;
  align-items: center;
  padding: 0 24px;
  color: var(--c-white);
  font-size: 1rem;
  font-weight: 500;
  min-height: 52px;
  border-bottom: 1px solid var(--c-green-dim);
  transition: background var(--transition), color var(--transition);
}
.mobile-nav-menu li:last-child a { border-bottom: none; }
.mobile-nav-menu li a:hover {
  background: var(--c-green-dim);
  color: var(--c-green);
}

/* =====================
   二级粘性锚点导航
   ===================== */
.anchor-nav {
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  background: var(--c-dark-2);
  border-bottom: 1.5px solid var(--c-dark-3);
  height: var(--anchor-h);
  overflow-x: auto;
  scrollbar-width: none;
}
.anchor-nav::-webkit-scrollbar { display: none; }

.anchor-nav-list {
  display: flex;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  gap: 0;
  white-space: nowrap;
}

.anchor-link {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  height: 100%;
  min-height: 48px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-muted);
  position: relative;
  transition: color var(--transition);
}
.anchor-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--c-green);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.anchor-link:hover { color: var(--c-green); }
.anchor-link:hover::after { transform: scaleX(1); }

/* =====================
   Hero 区域
   ===================== */
.hero-wrapper {
  position: relative;
  min-height: 70vh;
  background: linear-gradient(145deg, var(--c-dark) 0%, #0e2b0b 50%, var(--c-dark) 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  mix-blend-mode: luminosity;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 720px;
}

.hero-eyebrow {
  margin-bottom: 20px;
}
.eyebrow-tag {
  display: inline-block;
  background: var(--c-yellow);
  color: var(--c-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 5px 14px;
  border-radius: 4px;
}

.hero-h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--c-green);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 0 40px rgba(135,255,113,0.3);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--c-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-green);
  color: var(--c-dark);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 40px;
  border-radius: 8px;
  min-height: 52px;
  border: 3px solid var(--c-dark);
  box-shadow: 4px 4px 0 var(--c-yellow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.hero-cta:hover {
  color: var(--c-dark);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--c-yellow);
}

.hero-clip-decoration {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 4;
  line-height: 0;
}
.deco-wave {
  width: 100%;
  height: 80px;
}

/* Memphis 几何装饰 */
.memphis-deco {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.deco-triangle--1 {
  position: absolute;
  top: 10%;
  left: 4%;
  width: 0;
  height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 70px solid var(--c-yellow);
  opacity: 0.35;
  transform: rotate(-15deg);
}
.deco-triangle--2 {
  position: absolute;
  bottom: 20%;
  right: 6%;
  width: 0;
  height: 0;
  border-left: 28px solid transparent;
  border-right: 28px solid transparent;
  border-bottom: 48px solid var(--c-green);
  opacity: 0.25;
  transform: rotate(20deg);
}
.deco-circle--1 {
  position: absolute;
  top: 15%;
  right: 12%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 5px dashed var(--c-yellow);
  opacity: 0.25;
  animation: spin-slow 20s linear infinite;
}
.deco-squiggle {
  position: absolute;
  bottom: 25%;
  left: 8%;
  width: 80px;
  height: 30px;
  background: none;
  border-bottom: 4px solid var(--c-green);
  border-radius: 0 0 50% 50%;
  opacity: 0.3;
  transform: rotate(5deg);
}
.deco-dot-grid {
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  height: 220px;
  background-image: radial-gradient(circle, var(--c-green) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.1;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

/* =====================
   正文主区域
   ===================== */
.site-main {
  padding: 60px 0 80px;
}

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

.content-section {
  width: 100%;
}

.content-article {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

/* =====================
   侧边栏
   ===================== */
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + var(--anchor-h) + 20px);
  background: var(--c-dark-2);
  border-radius: var(--radius-card);
  border: 2px solid var(--c-dark-3);
  overflow: hidden;
}

.aside-inner {
  padding: 20px;
}

.aside-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-yellow);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.content-aside hr {
  border: none;
  border-top: 2px solid var(--c-green);
  margin-bottom: 16px;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.aside-nav-list li a {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  font-size: 0.875rem;
  color: var(--c-muted);
  border-radius: 6px;
  min-height: 44px;
  line-height: 1.4;
  transition: background var(--transition), color var(--transition);
}
.aside-nav-list li a:hover {
  background: var(--c-green-dim);
  color: var(--c-green);
}

.aside-badge {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--c-muted);
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 8px var(--c-green);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* =====================
   正文内容样式
   ===================== */
.article-body {
  min-width: 0;
}

.article-body h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--c-green);
  margin: 48px 0 12px;
  line-height: 1.25;
}
.article-body h2:first-child { margin-top: 0; }

.article-body h2 + hr {
  border: none;
  border-top: 2px solid var(--c-yellow);
  margin-bottom: 24px;
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--c-yellow);
  margin: 32px 0 10px;
}
.article-body h3 + hr {
  border: none;
  border-top: 1px dashed var(--c-green-dim);
  margin-bottom: 18px;
}

.article-body p {
  margin-bottom: 18px;
  color: var(--c-white);
  font-size: 1rem;
  line-height: 1.75;
}

.article-body ul, .article-body ol {
  margin: 0 0 20px 20px;
  color: var(--c-white);
}
.article-body li {
  margin-bottom: 8px;
  line-height: 1.65;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body a {
  color: var(--c-green);
  text-decoration: underline;
  text-decoration-color: rgba(135,255,113,0.4);
  text-underline-offset: 3px;
}
.article-body a:hover {
  color: var(--c-yellow);
  text-decoration-color: rgba(255,206,92,0.6);
}

.article-body strong { color: var(--c-yellow); font-weight: 600; }
.article-body em { color: var(--c-green); font-style: italic; }

.article-body blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--c-dark-2);
  border-left: 4px solid var(--c-green);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  color: var(--c-muted);
  font-style: italic;
}

.article-body article {
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--c-dark-3);
}
.article-body article:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.article-body article::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: var(--c-yellow);
  border-radius: 2px;
  margin-bottom: 24px;
  clip-path: polygon(0 0, 90% 0, 100% 100%, 10% 100%);
}

/* =====================
   页脚
   ===================== */
.site-footer {
  background: var(--c-dark-2);
  border-top: 2px solid var(--c-green);
}

.footer-cta-block {
  background: var(--c-green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 40px;
  flex-wrap: wrap;
}
.footer-cta-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-dark);
}
.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-dark);
  color: var(--c-green);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 32px;
  border-radius: 8px;
  min-height: 48px;
  border: 2px solid var(--c-dark);
  box-shadow: 3px 3px 0 var(--c-yellow);
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition);
}
.footer-cta-btn:hover {
  color: var(--c-green);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--c-yellow);
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer-brand-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-green);
}
.footer-logomark {
  height: 32px;
  width: auto;
}

.footer-nav ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.82rem;
  color: var(--c-muted);
  min-height: 44px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.footer-nav a:hover {
  color: var(--c-green);
  background: var(--c-green-dim);
}

.footer-copy {
  margin-left: auto;
}
.footer-copy p {
  font-size: 0.8rem;
  color: var(--c-muted);
}

/* =====================
   Scroll Reveal 动画
   ===================== */
@media (prefers-reduced-motion: no-preference) {
  .article-body article {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .article-body article.is-visible {
    opacity: 1;
    transform: none;
  }

  .aside-nav-list li {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  .aside-nav-list li.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* =====================
   响应式断点
   ===================== */
@media (max-width: 960px) {
  .content-article {
    grid-template-columns: 1fr;
  }
  .content-aside {
    position: static;
    order: -1;
  }
  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .aside-nav-list li a {
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 0 10px;
    min-height: 44px;
  }
}

@media (max-width: 768px) {
  .mobile-nav-details {
    display: block;
  }
  .desktop-nav,
  .header-search {
    display: none;
  }
  .header-inner {
    grid-template-columns: 44px 1fr;
    gap: 8px;
  }
  .header-brand {
    grid-column: 2;
    text-align: left;
  }
  .hero-inner {
    padding: 60px 20px 100px;
  }
  .hero-h1 {
    font-size: 2rem;
  }
  .hero-desc {
    font-size: 1rem;
  }
  .footer-cta-block {
    padding: 24px 20px;
    flex-direction: column;
    text-align: center;
  }
  .footer-cta-text {
    font-size: 1rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-copy {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-h: 56px;
    --anchor-h: 48px;
  }
  .wrap {
    padding: 0 16px;
  }
  .hero-wrapper {
    min-height: 65vh;
  }
  .hero-h1 {
    font-size: 1.75rem;
  }
  .article-body h2 {
    font-size: 1.35rem;
  }
  .deco-circle--1,
  .deco-dot-grid {
    display: none;
  }
  .anchor-link {
    font-size: 0.78rem;
    padding: 0 10px;
  }
}
