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

/* ========================
   CSS 自定义属性
======================== */
:root {
  --green: #87ff71;
  --yellow: #ffce5c;
  --dark: #192617;
  --dark-2: #223320;
  --dark-3: #0f1a0e;
  --white: #fafff8;
  --gray: #e8f5e4;
  --border: 3px solid var(--dark);
  --border-bold: 4px solid var(--dark);
  --radius: 0;
  --font: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --nav-h: 64px;
  --anchor-h: 44px;
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--white);
  color: var(--dark);
}

body {
  font-family: var(--font);
  line-height: 1.65;
  overflow-x: hidden;
  background: var(--white);
  max-width: 100vw;
}

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

ul { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

/* ========================
   顶部导航
======================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  border-bottom: var(--border-bold);
  height: var(--nav-h);
  display: flex;
  align-items: stretch;
  width: 100%;
}

.main-nav {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 100%;
  gap: 0;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
}

.nav-left {
  justify-content: flex-start;
}

.nav-right {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.nav-group a {
  color: var(--gray);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0 8px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.02em;
}

.nav-group a:hover,
.nav-group a:focus-visible {
  color: var(--green);
  border-bottom-color: var(--green);
  outline: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 16px;
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-left: 2px solid var(--dark-2);
  border-right: 2px solid var(--dark-2);
  height: 100%;
  transition: background var(--transition);
  white-space: nowrap;
}

.nav-brand:hover {
  background: var(--dark-2);
}

.brand-mark {
  color: var(--green);
  font-size: 1rem;
  display: inline-block;
  transform: rotate(-8deg);
}

.brand-text {
  color: var(--white);
}

.nav-cta {
  background: var(--green) !important;
  color: var(--dark) !important;
  font-weight: 700 !important;
  border: 2px solid var(--dark) !important;
  padding: 0 12px !important;
  min-height: 44px;
  margin-left: 6px;
  flex-shrink: 0;
  border-bottom: 2px solid var(--dark) !important;
  transition: background var(--transition), transform var(--transition) !important;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--yellow) !important;
  transform: translateY(-2px);
}

/* ========================
   粘性锚点条
======================== */
.anchor-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  background: var(--yellow);
  border-bottom: var(--border);
  height: var(--anchor-h);
  overflow: hidden;
  width: 100%;
}

.anchor-nav {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
}

.anchor-nav p {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  height: 100%;
  width: 100%;
}

.anchor-nav p::-webkit-scrollbar { display: none; }

.anchor-nav a {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark);
  padding: 0 10px;
  white-space: nowrap;
  height: 100%;
  display: inline-flex;
  align-items: center;
  border-right: 1px solid var(--dark);
  transition: background var(--transition);
  letter-spacing: 0.02em;
  min-height: 44px;
}

.anchor-nav a:first-child {
  border-left: 1px solid var(--dark);
}

.anchor-nav a:hover,
.anchor-nav a:focus-visible {
  background: var(--green);
  outline: none;
}

/* ========================
   Hero
======================== */
.hero-section {
  position: relative;
  min-height: 70vh;
  background: var(--dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 4px solid var(--green);
  width: 100%;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--dark-2) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.hero-deco {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.hero-deco-1 {
  width: 100px;
  height: 100px;
  background: var(--green);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  top: -20px;
  right: 8%;
  transform: rotate(15deg);
  opacity: 0.5;
}

.hero-deco-2 {
  width: 70px;
  height: 70px;
  border: 6px dashed var(--yellow);
  border-radius: 50%;
  bottom: 10%;
  left: 4%;
  transform: rotate(-20deg);
}

.hero-deco-3 {
  width: 50px;
  height: 50px;
  background: var(--yellow);
  top: 20%;
  left: 2%;
  transform: rotate(30deg);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0.7;
}

.hero-deco-4 {
  width: 80px;
  height: 7px;
  background: var(--green);
  bottom: 18%;
  right: 4%;
  transform: rotate(-5deg);
  border-radius: 4px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--yellow);
  color: var(--dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border: 2px solid var(--dark);
  letter-spacing: 0.06em;
}

.hero-h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.01em;
  word-break: break-all;
}

.hero-desc {
  font-size: 1rem;
  color: var(--gray);
  max-width: 440px;
  line-height: 1.7;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  background: var(--green);
  color: var(--dark);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border: 3px solid var(--dark);
  box-shadow: 4px 4px 0 var(--dark);
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 48px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.hero-btn:hover,
.hero-btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--dark);
  outline: none;
}

.hero-media {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.hero-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border: 4px solid var(--green);
  box-shadow: 8px 8px 0 var(--yellow);
}

.hero-placeholder {
  width: 100%;
  min-height: 260px;
  background: var(--dark-2);
  border: 3px dashed var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-placeholder::before {
  content: '▶';
  font-size: 3.5rem;
  color: var(--green);
  opacity: 0.3;
}

/* ========================
   主体布局
======================== */
.site-main {
  background: var(--white);
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* main > article > section 三层嵌套 */
.main-article {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.main-content-section {
  flex: 1;
  min-width: 0;
}

/* ========================
   Aside 侧边栏（左侧）
======================== */
.content-aside {
  width: 220px;
  min-width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-h) + var(--anchor-h) + 24px);
  align-self: flex-start;
  padding: 28px 16px;
  border-right: 4px solid var(--dark);
  background: var(--dark);
  min-height: 400px;
}

.aside-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aside-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.08em;
}

.aside-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
  line-height: 1.3;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-links li a {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--gray);
  padding: 8px 10px;
  border-left: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  line-height: 1.4;
  min-height: 44px;
}

.aside-links li a:hover,
.aside-links li a:focus-visible {
  color: var(--green);
  border-left-color: var(--green);
  background: rgba(135,255,113,0.07);
  outline: none;
}

.aside-deco {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}

.deco-circle {
  width: 20px;
  height: 20px;
  border: 3px solid var(--yellow);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.deco-triangle {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 16px solid var(--green);
  display: inline-block;
  transform: rotate(10deg);
  flex-shrink: 0;
}

.deco-square {
  width: 16px;
  height: 16px;
  background: var(--yellow);
  display: inline-block;
  transform: rotate(22deg);
  flex-shrink: 0;
}

/* ========================
   主内容区
======================== */
.main-content {
  padding: 48px 40px 48px 36px;
  overflow: hidden;
}

.page-content {
  width: 100%;
  overflow: hidden;
}

/* ========================
   page.content 内部样式
======================== */
.page-content section {
  scroll-margin-top: calc(var(--nav-h) + var(--anchor-h) + 16px);
  padding: 48px 0;
  border-bottom: 3px solid var(--dark);
  position: relative;
}

.page-content section:last-child {
  border-bottom: none;
}

.page-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
  line-height: 1.25;
  position: relative;
  display: inline-block;
}

.page-content h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 4px;
  background: var(--green);
}

.page-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 24px 0 10px;
}

.page-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--dark);
  margin-bottom: 16px;
  max-width: 65ch;
  word-break: break-word;
}

.page-content ul,
.page-content ol {
  padding-left: 22px;
  margin-bottom: 16px;
}

.page-content li {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 8px;
  color: var(--dark);
}

.page-content strong {
  font-weight: 700;
}

.page-content em {
  font-style: normal;
  background: var(--yellow);
  padding: 0 3px;
}

.page-content blockquote {
  border-left: 5px solid var(--green);
  background: var(--gray);
  padding: 16px 20px;
  margin: 24px 0;
}

.page-content a {
  color: var(--dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.page-content a:hover {
  color: #3a8a28;
}

.page-content img {
  max-width: 100%;
  height: auto;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
}

.page-content td,
.page-content th {
  padding: 8px 12px;
  border: 1px solid var(--dark);
  word-break: break-word;
}

/* ========================
   页脚
======================== */
.site-footer {
  background: var(--dark-3);
  border-top: 4px solid var(--green);
  color: var(--gray);
  width: 100%;
}

.footer-cta {
  background: var(--green);
  border-bottom: 4px solid var(--dark);
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}

.footer-cta::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  right: -30px;
  top: -30px;
  opacity: 0.3;
  transform: rotate(20deg);
}

.footer-cta-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark);
  background: var(--yellow);
  padding: 4px 12px;
  border: 2px solid var(--dark);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-cta-title {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.2;
}

.footer-cta-desc {
  font-size: 1rem;
  color: var(--dark-2);
  margin-bottom: 28px;
  line-height: 1.6;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  background: var(--dark);
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border: 3px solid var(--dark);
  box-shadow: 4px 4px 0 var(--dark-2);
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 48px;
  letter-spacing: 0.03em;
}

.footer-cta-btn:hover,
.footer-cta-btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--dark-2);
  outline: none;
}

.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0;
  border-bottom: 3px solid var(--dark-2);
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.footer-col {
  padding: 36px 28px;
  border-right: 1px solid var(--dark-2);
  min-width: 0;
}

.footer-col:last-child {
  border-right: none;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-brand-mark {
  color: var(--green);
  font-size: 1.1rem;
}

.footer-brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
}

.footer-brand-desc {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.65;
  max-width: 240px;
  word-break: break-word;
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-nav-list a {
  font-size: 0.88rem;
  color: var(--gray);
  transition: color var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 2px 0;
}

.footer-nav-list a:hover,
.footer-nav-list a:focus-visible {
  color: var(--green);
  outline: none;
}

.footer-info-text {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 14px;
  word-break: break-word;
}

.footer-colors {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.color-chip {
  width: 22px;
  height: 22px;
  border: 2px solid var(--dark-2);
  display: inline-block;
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 40px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 16px;
  width: 100%;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--gray);
  opacity: 0.7;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--green);
  opacity: 0.8;
  transition: opacity var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
}

.footer-links a:hover {
  opacity: 1;
}

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

/* ========================
   Scroll Reveal 动效
======================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }

  .reveal.visible {
    opacity: 1;
    transform: none;
  }

  .hero-deco-1 {
    animation: float1 4s ease-in-out infinite alternate;
  }

  .hero-deco-2 {
    animation: float2 5s ease-in-out infinite alternate;
  }

  @keyframes float1 {
    from { transform: rotate(15deg) translateY(0); }
    to   { transform: rotate(22deg) translateY(-12px); }
  }

  @keyframes float2 {
    from { transform: rotate(-20deg) scale(1); }
    to   { transform: rotate(-14deg) scale(1.08); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ========================
   响应式 — 1024px
======================== */
@media (max-width: 1024px) {
  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col {
    border-right: none;
    border-bottom: 1px solid var(--dark-2);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 48px 24px;
  }

  .hero-media {
    display: none;
  }

  .main-article {
    flex-direction: column;
  }

  .content-aside {
    width: 100%;
    min-width: 0;
    position: static;
    border-right: none;
    border-bottom: 4px solid var(--green);
    min-height: auto;
  }

  .aside-links {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .aside-links li a {
    border-left: none;
    border-bottom: 2px solid transparent;
    min-height: 44px;
    padding: 6px 12px;
  }

  .aside-links li a:hover {
    border-bottom-color: var(--green);
    border-left: none;
    background: none;
  }

  .main-content {
    padding: 32px 24px;
  }
}

/* ========================
   响应式 — 768px
======================== */
@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
    --anchor-h: 40px;
  }

  .main-nav {
    padding: 0 10px;
  }

  .nav-group a {
    font-size: 0.72rem;
    padding: 0 5px;
    min-height: 44px;
  }

  .nav-brand {
    padding: 0 10px;
    font-size: 0.85rem;
  }

  .nav-cta {
    padding: 0 8px !important;
    font-size: 0.72rem !important;
    min-height: 44px;
    margin-left: 4px;
  }

  .anchor-nav {
    padding: 0 8px;
  }

  .anchor-nav a {
    font-size: 0.72rem;
    padding: 0 8px;
    min-height: 44px;
  }

  .hero-section {
    min-height: 60vh;
  }

  .hero-inner {
    padding: 36px 16px;
  }

  .hero-h1 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  .footer-cta {
    padding: 40px 20px;
  }

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

  .footer-col {
    padding: 24px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    padding: 14px 20px;
    text-align: center;
    gap: 8px;
  }

  .main-content {
    padding: 24px 16px;
  }

  .page-content section {
    padding: 32px 0;
  }

  .page-content p {
    max-width: 100%;
  }
}

/* ========================
   响应式 — 480px
======================== */
@media (max-width: 480px) {
  .nav-group.nav-left {
    display: none;
  }

  .nav-right {
    justify-content: flex-end;
  }

  .nav-brand {
    border-left: none;
  }

  .hero-inner {
    padding: 28px 14px;
  }

  .footer-cta {
    padding: 32px 16px;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
