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

/* ===== 变量 ===== */
:root {
  --c-primary: #99ffcc;
  --c-accent: #00ff41;
  --c-dark: #001e3c;
  --c-dark-2: #002850;
  --c-dark-3: #003366;
  --c-text: #e0f5ed;
  --c-text-muted: #7ac4a0;
  --c-card-bg: rgba(0, 51, 80, 0.7);
  --c-border: rgba(153, 255, 204, 0.18);
  --font-head: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Space Grotesk', system-ui, sans-serif;
  --radius: 10px;
  --radius-lg: 20px;
  --bottom-bar-h: 60px;
  --nav-offset: 80px;
  --max-w: 1100px;
  --transition: 0.35s 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-text);
  font-family: var(--font-body);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--c-dark);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-accent); }

/* ===== scroll-margin for anchors ===== */
div[id] {
  scroll-margin-top: calc(var(--bottom-bar-h) + 20px);
}

/* ===== 流体网格底纹（全局） ===== */
.biomimetic-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,255,65,0.04) 0%, transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(153,255,204,0.05) 0%, transparent 55%),
    linear-gradient(rgba(153,255,204,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(153,255,204,0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.site-wrap { position: relative; z-index: 1; }

/* ===== 全屏菜单 ===== */
.fullmenu {
  position: fixed;
  inset: 0;
  background: rgba(0, 10, 25, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(12px);
}

.fullmenu.is-open {
  opacity: 1;
  pointer-events: all;
}

.fullmenu__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.fullmenu__link {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.2em 0;
  transition: color var(--transition);
}

.fullmenu__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--c-accent);
  transition: width var(--transition);
}

.fullmenu__link:hover { color: var(--c-accent); }
.fullmenu__link:hover::after { width: 100%; }

.fullmenu__close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  width: 48px; height: 48px;
  background: none;
  border: 1.5px solid var(--c-border);
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}

.fullmenu__close:hover { border-color: var(--c-accent); background: rgba(0,255,65,0.08); }

.close-icon,
.close-icon::before {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--c-primary);
}
.close-icon { transform: rotate(45deg); }
.close-icon::before { content: ''; transform: rotate(90deg); }

.fullmenu__brand {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--c-text-muted);
  text-transform: uppercase;
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, #001020 0%, #001e3c 50%, #002840 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(153,255,204,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(153,255,204,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* 细胞呼吸装饰 */
.hero__cell {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: cellBreathe 6s ease-in-out infinite;
}
.hero__cell--1 {
  width: 380px; height: 380px;
  top: -100px; left: -80px;
  background: radial-gradient(circle, rgba(0,255,65,0.12), transparent 70%);
  animation-delay: 0s;
}
.hero__cell--2 {
  width: 280px; height: 280px;
  bottom: -60px; right: -60px;
  background: radial-gradient(circle, rgba(153,255,204,0.1), transparent 70%);
  animation-delay: 2s;
}
.hero__cell--3 {
  width: 200px; height: 200px;
  top: 40%; left: 60%;
  background: radial-gradient(circle, rgba(0,255,65,0.07), transparent 70%);
  animation-delay: 4s;
}
.hero__cell--4 {
  width: 160px; height: 160px;
  top: 20%; right: 20%;
  background: radial-gradient(circle, rgba(153,255,204,0.06), transparent 70%);
  animation-delay: 1s;
}

@keyframes cellBreathe {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.18); opacity: 1; }
}

.hero__svg-morph {
  position: absolute;
  top: 50%; left: 50%;
  width: 80vw; max-width: 800px;
  transform: translate(-50%, -50%);
  animation: svgPulse 8s ease-in-out infinite;
}

.morph-path {
  animation: morphShape 12s ease-in-out infinite;
}
.morph-path--2 {
  animation-delay: -4s;
  animation-duration: 10s;
}

@keyframes morphShape {
  0%, 100% { d: path("M400,100 C500,80 620,150 640,280 C660,410 580,520 440,540 C300,560 180,480 160,350 C140,220 220,120 400,100Z"); }
  33% { d: path("M380,90 C490,60 640,130 660,270 C680,410 590,530 430,545 C270,560 165,475 155,345 C145,215 230,115 380,90Z"); }
  66% { d: path("M420,110 C510,90 610,160 625,290 C640,420 565,515 415,535 C265,555 170,482 162,355 C154,228 230,125 420,110Z"); }
}

@keyframes svgPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.5rem 1.25rem;
  max-width: 820px;
}

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--c-accent);
  border: 1px solid rgba(0,255,65,0.35);
  border-radius: 100px;
  padding: 0.3em 1em;
  margin-bottom: 1.2rem;
  background: rgba(0,255,65,0.06);
}

.hero__h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1.1rem;
  text-shadow: 0 0 40px rgba(153,255,204,0.25);
}

.hero__sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--c-text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero__cta {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8em 2.2em;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--c-accent), var(--c-primary));
  color: var(--c-dark);
  letter-spacing: 0.04em;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 20px rgba(0,255,65,0.35);
  min-height: 48px;
  line-height: 1.5;
}

.hero__cta:hover {
  color: var(--c-dark);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 36px rgba(0,255,65,0.55);
}

/* ===== 内容区布局 ===== */
.content-wrap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  align-items: start;
}

/* ===== aside ===== */
.site-aside {
  position: sticky;
  top: calc(var(--bottom-bar-h) + 24px);
  padding: 1.5rem 1rem 1.5rem 0;
  border-right: 1px solid var(--c-border);
  min-width: 0;
}

.aside__label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}

.aside__link {
  display: block;
  font-size: 0.88rem;
  color: var(--c-text-muted);
  padding: 0.45em 0.6em;
  border-radius: 6px;
  margin-bottom: 0.25rem;
  transition: color var(--transition), background var(--transition);
  line-height: 1.5;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside__link:hover {
  color: var(--c-primary);
  background: rgba(153,255,204,0.07);
}

/* ===== 正文内容 ===== */
.content-main {
  padding: 2rem 0 2rem 2.5rem;
  min-width: 0;
}

/* 正文内 div 样式 */
.content-main div,
.site-article div {
  margin-bottom: 5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--c-border);
}

.content-main div:last-child,
.site-article div:last-child {
  border-bottom: none;
}

/* 正文排版 */
.content-main h2 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 0.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.content-main h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 1.8rem 0 0.6rem;
}

.content-main p {
  color: var(--c-text);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.content-main ul,
.content-main ol {
  padding-left: 1.4em;
  margin-bottom: 1rem;
  color: var(--c-text);
  line-height: 1.75;
}

.content-main li { margin-bottom: 0.4em; }

.content-main a {
  color: var(--c-primary);
  border-bottom: 1px solid rgba(153,255,204,0.3);
  transition: border-color var(--transition);
}
.content-main a:hover { border-color: var(--c-accent); }

/* subtitle 副标题契约 */
.content-main .subtitle,
.content-main .subhead,
.content-main .desc,
.content-main .lead,
p.subtitle, p.subhead, p.desc, p.lead {
  color: var(--c-text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* 卡片（正文内）*/
.content-main .card,
.card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25), 0 0 0 1px rgba(153,255,204,0.04);
  transition: transform var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(4px);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 20px rgba(0,255,65,0.08);
}

/* ===== 页脚 ===== */
.site-footer {
  background: rgba(0, 10, 20, 0.95);
  border-top: 1px solid var(--c-border);
  padding: 2rem 1.5rem;
  text-align: center;
  padding-bottom: calc(var(--bottom-bar-h) + 2rem);
}

.footer__brand {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.footer__copy {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  display: block;
}

/* nav-footer（契约：footer > nav > dl > dt > a） */
.nav-footer {
  background: rgba(0, 10, 20, 0.98);
  border-top: 1px solid var(--c-border);
  padding: 1.5rem 1.5rem calc(var(--bottom-bar-h) + 1rem);
}

.nav-footer nav {
  max-width: var(--max-w);
  margin: 0 auto;
}

.nav-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  justify-content: center;
  list-style: none;
}

.nav-dl dt { margin: 0; }

.nav-dl dt a,
.nav-dl dd a,
.bottom-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3em 0.8em;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.nav-dl dt a:hover,
.nav-dl dd a:hover {
  color: var(--c-primary);
  background: rgba(153,255,204,0.06);
}

/* ===== 底部固定导航条 ===== */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-bar-h);
  background: rgba(0, 15, 30, 0.97);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 8000;
  backdrop-filter: blur(12px);
}

.bottom-bar__brand { display: flex; align-items: center; }

.bottom-bar__logo-link {
  display: flex;
  align-items: center;
  color: var(--c-primary);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  min-height: 44px;
}

.brand__logo { height: 32px; width: auto; }
.brand__text { color: var(--c-primary); }

.bottom-bar__hamburger {
  width: 48px; height: 48px;
  background: none;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color var(--transition), background var(--transition);
  padding: 0;
}

.bottom-bar__hamburger:hover {
  border-color: var(--c-accent);
  background: rgba(0,255,65,0.07);
}

.hamburger__line {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--c-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.bottom-bar__hamburger.is-active .hamburger__line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.bottom-bar__hamburger.is-active .hamburger__line:nth-child(2) {
  opacity: 0;
}
.bottom-bar__hamburger.is-active .hamburger__line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ===== Reveal 动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal--delay1 { transition-delay: 0.12s; }
.reveal--delay2 { transition-delay: 0.24s; }
.reveal--delay3 { transition-delay: 0.36s; }

/* ===== Parallax ===== */
.hero__bg { will-change: transform; }

/* ===== h2 + p.subtitle 契约保护 ===== */
.content-main h2 + p {
  margin-top: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .content-wrap {
    grid-template-columns: 1fr;
    padding: 2rem 1rem 5rem;
  }

  .site-aside {
    display: none;
  }

  .content-main {
    padding: 1.5rem 0;
  }

  .hero__h1 {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .hero__sub {
    font-size: 0.97rem;
  }

  .nav-dl {
    flex-direction: column;
    align-items: center;
  }

  .site-footer {
    padding-bottom: calc(var(--bottom-bar-h) + 1.5rem);
  }
}

@media (max-width: 480px) {
  .content-main h2 {
    font-size: 1.35rem;
  }

  .hero__cta {
    font-size: 0.92rem;
    padding: 0.75em 1.8em;
  }
}

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