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

/* ===== CSS 变量 ===== */
:root {
  --green: #87ff71;
  --yellow: #ffce5c;
  --dark: #192617;
  --dark2: #1e2f1b;
  --dark3: #243321;
  --text: #e8f5e3;
  --text-muted: #9db896;
  --border: rgba(135,255,113,0.18);
  --card-radius: 18px;
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --nav-h: 60px;
  --bottom-bar-h: 64px;
  --header-h: 60px;
  --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(--dark);
  color: var(--text);
}
body {
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: var(--bottom-bar-h);
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

/* ===== Memphis BG Shapes ===== */
.memphis-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.shape {
  position: absolute;
}
.shape-tri-1 {
  top: 8%;
  left: -40px;
  width: 0;
  height: 0;
  border-left: 70px solid transparent;
  border-right: 70px solid transparent;
  border-bottom: 120px solid rgba(135,255,113,0.07);
  transform: rotate(15deg);
}
.shape-tri-2 {
  top: 55%;
  right: -30px;
  width: 0;
  height: 0;
  border-left: 55px solid transparent;
  border-right: 55px solid transparent;
  border-bottom: 95px solid rgba(255,206,92,0.07);
  transform: rotate(-20deg);
}
.shape-circle-1 {
  top: 25%;
  right: 5%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px dashed rgba(135,255,113,0.1);
}
.shape-circle-2 {
  bottom: 15%;
  left: 8%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,206,92,0.05);
  border: 2px dotted rgba(255,206,92,0.12);
}
.shape-squiggle {
  top: 70%;
  right: 12%;
  width: 80px;
  height: 80px;
  border: 4px solid rgba(135,255,113,0.08);
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
  transform: rotate(10deg);
}
.shape-dot-grid {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, rgba(135,255,113,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}
.shape-rect-1 {
  top: 40%;
  left: 3%;
  width: 40px;
  height: 40px;
  background: rgba(255,206,92,0.07);
  transform: rotate(22deg);
  border-radius: 4px;
}
.shape-rect-2 {
  top: 15%;
  right: 20%;
  width: 28px;
  height: 60px;
  background: rgba(135,255,113,0.06);
  transform: rotate(-12deg);
  border-radius: 4px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(25,38,23,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
}
.logo-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-icon, .bottom-logo-img {
  display: block;
  border-radius: 6px;
}
.logo-text-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--green);
  color: var(--dark);
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
}

/* ===== Main Nav ===== */
.main-nav {
  flex: 1;
  overflow: hidden;
}
.nav-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-row::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  white-space: nowrap;
  min-height: 40px;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover {
  color: var(--green);
  background: rgba(135,255,113,0.08);
}

/* ===== CTA Button ===== */
.cta-btn {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--green);
  color: var(--dark);
  font-weight: 700;
  font-size: 14px;
  border-radius: 10px;
  padding: 0 16px;
  height: 44px;
  min-height: 44px;
  transition: background var(--transition), transform var(--transition);
}
.cta-btn:hover {
  background: var(--yellow);
  transform: translateY(-1px);
}
.cta-btn-inner { pointer-events: none; }

/* ===== Main / Article / Section ===== */
.site-main {
  position: relative;
  z-index: 1;
}
.content-article {
  width: 100%;
}

/* ===== Hero ===== */
.hero-section {
  min-height: 45vh;
  display: flex;
  align-items: center;
  padding: 40px 20px 32px;
  scroll-margin-top: calc(var(--header-h) + 8px);
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}
.hero-text {
  flex: 1;
  text-align: left;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(135,255,113,0.12);
  border: 1px solid rgba(135,255,113,0.25);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 18px;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero-h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: var(--dark);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 26px;
  border-radius: 12px;
  min-height: 44px;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover {
  background: var(--yellow);
  transform: translateY(-2px);
}
.btn-primary.btn-sm {
  font-size: 13px;
  padding: 10px 16px;
  min-height: 40px;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  min-height: 44px;
  transition: border-color var(--transition), color var(--transition);
}
.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

/* ===== Hero Deco ===== */
.hero-deco {
  position: relative;
  width: 220px;
  height: 200px;
  flex-shrink: 0;
}
.hero-shape-big {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 160px;
  height: 160px;
  background: linear-gradient(135deg, rgba(135,255,113,0.15), rgba(255,206,92,0.1));
  clip-path: polygon(50% 0%,100% 38%,82% 100%,18% 100%,0% 38%);
  animation: spin-slow 20s linear infinite;
}
.hero-shape-small {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: rgba(255,206,92,0.12);
  border-radius: 50%;
  border: 2px dashed rgba(255,206,92,0.3);
  animation: spin-slow 14s linear infinite reverse;
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero-label {
  position: absolute;
  background: var(--yellow);
  color: var(--dark);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
  transform: rotate(-6deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.hero-label-1 { top: 0; right: 10px; transform: rotate(4deg); }
.hero-label-2 { top: 55%; left: 0; transform: rotate(-8deg); background: var(--green); }
.hero-label-3 { bottom: 10px; right: 20px; transform: rotate(6deg); background: var(--dark3); color: var(--green); border: 1px solid var(--green); }

/* ===== Content with Aside ===== */
.content-with-aside {
  display: flex;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
  align-items: flex-start;
}
.content-main {
  flex: 1;
  min-width: 0;
}
.content-aside {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.aside-inner {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 24px;
}
.aside-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 16px;
}
.aside-title span { display: inline-block; }
.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.aside-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: 8px;
  min-height: 40px;
  transition: color var(--transition), background var(--transition);
}
.aside-nav-link:hover {
  color: var(--green);
  background: rgba(135,255,113,0.07);
}
.aside-nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--yellow);
  flex-shrink: 0;
}
.aside-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}
.aside-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 10px;
}
.aside-card-title span { display: inline-block; }
.aside-card-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

/* ===== Page Content (injected HTML) ===== */
.content-main article {
  scroll-margin-top: calc(var(--header-h) + 16px);
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.content-main article:last-child {
  border-bottom: none;
}
.content-main h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.content-main h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green);
  margin: 24px 0 12px;
}
.content-main p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 16px;
  max-width: 72ch;
}
.content-main ul, .content-main ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.content-main li {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}
.content-main a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-main a:hover {
  color: var(--yellow);
}
.content-main strong {
  color: var(--text);
  font-weight: 700;
}
.content-main table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
}
.content-main th {
  background: rgba(135,255,113,0.1);
  color: var(--green);
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--border);
}
.content-main td {
  padding: 9px 14px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.content-main blockquote {
  border-left: 3px solid var(--green);
  padding-left: 16px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 16px;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  z-index: 2;
  background: var(--dark);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
}
.footer-row {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  flex-shrink: 0;
}
.footer-brand-text {
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
}
.footer-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}
.footer-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: 6px;
  min-height: 40px;
  transition: color var(--transition);
}
.footer-nav-link:hover {
  color: var(--green);
}
.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ===== Bottom Fixed Bar ===== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(25,38,23,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  height: var(--bottom-bar-h);
}
.bottom-bar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.bottom-bar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.bottom-logo-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--green);
  color: var(--dark);
  font-weight: 700;
  font-size: 16px;
  border-radius: 8px;
}
.bottom-bar-links {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.bottom-bar-links::-webkit-scrollbar { display: none; }
.bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 10px;
  border-radius: 8px;
  min-height: 48px;
  min-width: 52px;
  transition: background var(--transition);
}
.bottom-link:hover {
  background: rgba(135,255,113,0.08);
}
.bottom-link-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--green);
  opacity: 0.5;
  transform: rotate(calc(var(--i, 0) * 15deg));
  transition: opacity var(--transition), transform var(--transition);
}
.bottom-link:hover .bottom-link-dot {
  opacity: 1;
  transform: rotate(calc(var(--i, 0) * 15deg + 45deg));
}
.bottom-link-name {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--transition);
}
.bottom-link:hover .bottom-link-name {
  color: var(--green);
}
.bottom-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: var(--dark);
  font-weight: 700;
  font-size: 14px;
  padding: 0 18px;
  height: 44px;
  min-height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}
.bottom-cta:hover {
  background: var(--yellow);
  transform: scale(1.04);
}

/* ===== Section scroll margin ===== */
article[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

/* ===== Stagger animation ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero-text {
    animation: fadeUp 0.55s ease both;
  }
  .hero-deco {
    animation: fadeUp 0.55s 0.12s ease both;
  }
  .aside-inner {
    animation: fadeUp 0.55s 0.2s ease both;
  }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .bottom-link {
    animation: fadeUp 0.4s calc(var(--i, 0) * 0.06s) ease both;
  }
  .content-main article {
    animation: fadeUp 0.5s ease both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .content-with-aside {
    flex-direction: column;
    gap: 24px;
  }
  .content-aside {
    width: 100%;
    position: static;
  }
  .aside-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }
  .aside-title { grid-column: 1 / -1; margin-bottom: 0; }
  .aside-divider { display: none; }
  .hero-deco { display: none; }
}

@media (max-width: 600px) {
  :root {
    --header-h: 56px;
    --bottom-bar-h: 58px;
  }
  .hero-section {
    min-height: 40vh;
    padding: 32px 16px 24px;
  }
  .hero-h1 { font-size: 1.8rem; }
  .hero-actions { gap: 10px; }
  .btn-primary, .btn-ghost { font-size: 14px; padding: 10px 18px; }
  .content-with-aside { padding: 0 16px 48px; }
  .nav-link { font-size: 13px; padding: 6px 8px; }
  .cta-btn { padding: 0 12px; font-size: 13px; height: 44px; min-height: 44px; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-copy { font-size: 11px; }
  .aside-inner { grid-template-columns: 1fr; }
  .bottom-link-name { font-size: 10px; }
  .bottom-link { min-width: 44px; padding: 4px 8px; }
  .main-nav { display: none; }
}

@media (max-width: 375px) {
  .hero-h1 { font-size: 1.5rem; }
  .content-main h2 { font-size: 1.3rem; }
  .bottom-bar-inner { padding: 0 10px; gap: 4px; }
}

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