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

/* ===========================
   CSS 变量 & 基础重置
=========================== */
:root {
  --c-primary: #99ffcc;
  --c-accent: #00ff41;
  --c-dark: #001e3c;
  --c-dark-2: #002a55;
  --c-dark-3: #00356a;
  --c-light: #f0fff8;
  --c-text: #e8f5ee;
  --c-text-muted: #8ecfad;
  --c-border: rgba(153, 255, 204, 0.2);
  --c-card-bg: rgba(0, 46, 85, 0.6);
  --radius-card: 18px;
  --radius-btn: 50px;
  --shadow-card: 0 8px 32px rgba(0, 255, 65, 0.08), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 16px 48px rgba(153, 255, 204, 0.15), 0 4px 16px rgba(0, 0, 0, 0.4);
  --font-main: 'Nunito Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-round: 'Varela Round', 'Nunito Sans', sans-serif;
  --nav-h: 68px;
  --bar-h: 44px;
  --announce-h: 36px;
  --scroll-mt: calc(var(--nav-h) + var(--bar-h) + var(--announce-h) + 16px);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--c-dark);
  color: var(--c-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--c-accent);
}

ul {
  list-style: none;
}

/* ===========================
   公告条
=========================== */
.announcement-bar {
  background: linear-gradient(90deg, var(--c-dark-2) 0%, var(--c-dark-3) 50%, var(--c-dark-2) 100%);
  border-bottom: 1px solid var(--c-border);
  height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.announcement-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-primary);
  letter-spacing: 0.04em;
  white-space: nowrap;
  animation: marquee-slide 18s linear infinite;
}

@keyframes marquee-slide {
  0%   { transform: translateX(30%); }
  100% { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .announcement-text { animation: none; }
}

/* ===========================
   主导航 Header
=========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 30, 60, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  height: var(--nav-h);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

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

.brand-text {
  font-family: var(--font-round);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

/* 结构抽签：nav > p > a */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  align-items: center;
  justify-content: flex-end;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-text);
  border-radius: 8px;
  min-height: 44px;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--c-primary);
  background: rgba(153, 255, 204, 0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  background: rgba(0, 30, 60, 0.98);
  border-top: 1px solid var(--c-border);
  padding: 12px 24px 20px;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-text);
  border-radius: 8px;
  min-height: 44px;
  transition: color 0.2s, background 0.2s;
}

.mobile-nav-links a:hover {
  color: var(--c-primary);
  background: rgba(153, 255, 204, 0.08);
}

/* ===========================
   二级粘性锚点条
=========================== */
.sticky-anchor-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  background: rgba(0, 26, 53, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
  height: var(--bar-h);
  overflow: hidden;
}

.anchor-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchor-bar-inner::-webkit-scrollbar {
  display: none;
}

.anchor-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  min-height: 44px;
  transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.03em;
}

.anchor-link:hover,
.anchor-link.is-active {
  color: var(--c-primary);
  border-bottom-color: var(--c-accent);
}

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

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.cellular-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dot-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(153, 255, 204, 0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-images {
  position: relative;
  height: 380px;
}

.hero-img-wrap {
  position: absolute;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--c-border);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-img-wrap:hover {
  box-shadow: var(--shadow-hover);
}

.hero-img-wrap-1 {
  width: 62%;
  top: 0;
  left: 0;
  z-index: 2;
}

.hero-img-wrap-2 {
  width: 58%;
  bottom: 0;
  right: 0;
  z-index: 3;
  transform: translateY(20px);
}

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

.hero-img-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, rgba(153,255,204,0.1), rgba(0,255,65,0.05));
  border-radius: var(--radius-card);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-accent);
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border: 1px solid rgba(0, 255, 65, 0.4);
  border-radius: 50px;
  width: fit-content;
  min-height: 32px;
  line-height: 20px;
}

.hero-h1 {
  font-family: var(--font-round);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 30, 60, 0.8);
}

.hero-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-text-muted);
  max-width: 400px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  min-height: 48px;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-btn);
  width: fit-content;
  box-shadow: 0 4px 20px rgba(0, 255, 65, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
  color: var(--c-dark);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px rgba(0, 255, 65, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .hero-cta { transition: none; }
  .hero-img-wrap { transition: none; }
}

/* ===========================
   呼吸动效
=========================== */
@keyframes breathing {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.06); opacity: 1; }
}

@keyframes breathing-slow {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%       { transform: scale(1.04) rotate(3deg); }
}

.cell-dot {
  animation: breathing 6s ease-in-out infinite;
}

.cell-dot:nth-child(2) { animation-delay: -1.5s; animation-duration: 7s; }
.cell-dot:nth-child(3) { animation-delay: -3s; animation-duration: 8s; }
.cell-dot:nth-child(4) { animation-delay: -0.8s; animation-duration: 6.5s; }
.cell-dot:nth-child(5) { animation-delay: -2.2s; animation-duration: 9s; }
.cell-dot:nth-child(6) { animation-delay: -4s; animation-duration: 7.5s; }
.cell-dot:nth-child(7) { animation-delay: -1s; animation-duration: 8.5s; }

.cell-morph {
  animation: breathing-slow 10s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .cell-dot, .cell-morph { animation: none; }
}

/* ===========================
   主内容区
=========================== */
.site-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

/* 结构抽签：main > div > figure/aside */
.content-section {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto auto;
  gap: 48px 40px;
  align-items: start;
  position: relative;
}

.content-deco-figure {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  justify-content: flex-end;
  padding-right: 32px;
  pointer-events: none;
  position: absolute;
  top: -60px;
  right: 320px;
  z-index: 0;
  opacity: 0.6;
}

.deco-blob {
  width: 200px;
  height: 200px;
  animation: breathing-slow 12s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .deco-blob { animation: none; }
}

.blob-path {
  transition: d 1s ease;
}

/* aside：结构抽签要求在内容右侧 */
.content-aside {
  grid-column: 2;
  grid-row: 1 / 3;
  position: sticky;
  top: calc(var(--nav-h) + var(--bar-h) + 24px);
  align-self: start;
}

.aside-inner {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}

.aside-title {
  font-family: var(--font-round);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 12px;
}

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

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-nav-link {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.88rem;
  color: var(--c-text-muted);
  border-radius: 8px;
  min-height: 40px;
  transition: color 0.2s, background 0.2s;
}

.aside-nav-link:hover {
  color: var(--c-primary);
  background: rgba(153, 255, 204, 0.08);
}

.content-body {
  grid-column: 1;
  grid-row: 1 / 3;
  position: relative;
  z-index: 1;
}

/* ===========================
   正文内容样式 (page.content 内部)
=========================== */
.content-body h2,
.content-body h3 {
  font-family: var(--font-round);
  color: var(--c-primary);
  line-height: 1.35;
  margin-top: 2.5em;
  margin-bottom: 0.6em;
}

.content-body h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
}

.content-body h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: #c8ffe8;
}

.content-body hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 1.2em 0 1.6em;
}

.content-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
  margin-bottom: 1em;
}

.content-body ul,
.content-body ol {
  margin: 0.8em 0 1.2em 1.6em;
}

.content-body ul {
  list-style: disc;
}

.content-body ol {
  list-style: decimal;
}

.content-body li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-text);
  margin-bottom: 0.4em;
}

.content-body strong {
  color: var(--c-primary);
  font-weight: 600;
}

.content-body em {
  color: var(--c-text-muted);
}

.content-body a {
  color: var(--c-accent);
  border-bottom: 1px solid rgba(0, 255, 65, 0.3);
  transition: border-color 0.2s, color 0.2s;
}

.content-body a:hover {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}

.content-body blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border-left: 3px solid var(--c-accent);
  background: rgba(0, 255, 65, 0.05);
  border-radius: 0 12px 12px 0;
  color: var(--c-text-muted);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95rem;
}

.content-body th,
.content-body td {
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  text-align: left;
}

.content-body th {
  background: rgba(153, 255, 204, 0.08);
  color: var(--c-primary);
  font-weight: 600;
}

.content-body td {
  color: var(--c-text);
}

/* div 内容块 */
.content-body div {
  scroll-margin-top: var(--scroll-mt);
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--c-border);
}

.content-body div:last-of-type {
  border-bottom: none;
}

/* ===========================
   页脚
=========================== */
.site-footer {
  background: linear-gradient(180deg, var(--c-dark-2) 0%, #000f1e 100%);
  border-top: 1px solid var(--c-border);
  padding: 64px 24px 32px;
}

.footer-brand-block {
  text-align: center;
  margin-bottom: 48px;
  overflow: hidden;
}

.footer-brand-big {
  font-family: var(--font-round);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  color: transparent;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 50%, var(--c-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.1;
  opacity: 0.85;
}

/* 结构抽签：footer 三列 dl */
.footer-cols {
  max-width: 1100px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-dl {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-dl dt {
  font-family: var(--font-round);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border);
}

.footer-dl dd {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.5;
}

.footer-dl dd a {
  color: var(--c-text-muted);
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
  min-height: 40px;
  line-height: 1.4;
  transition: color 0.2s;
}

.footer-dl dd a:hover {
  color: var(--c-primary);
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: rgba(142, 207, 173, 0.5);
  margin-top: 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}

.footer-copy {
  font-size: 0.85rem;
  color: rgba(142, 207, 173, 0.6);
}

/* ===========================
   通用细胞纹底纹（全站背景）
=========================== */
.page-wrapper {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(153, 255, 204, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 255, 65, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
}

/* ===========================
   滚动锚点偏移
=========================== */
div[id] {
  scroll-margin-top: var(--scroll-mt);
}

/* ===========================
   响应式
=========================== */
@media (max-width: 1024px) {
  .content-section {
    grid-template-columns: 1fr 240px;
    gap: 32px;
  }

  .content-deco-figure {
    right: 260px;
  }
}

@media (max-width: 860px) {
  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-header {
    height: auto;
    min-height: var(--nav-h);
  }

  .header-inner {
    height: var(--nav-h);
  }

  .mobile-menu {
    position: relative;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 24px;
    text-align: center;
  }

  .hero-images {
    height: 260px;
    order: 2;
  }

  .hero-text {
    order: 1;
    align-items: center;
  }

  .hero-sub {
    max-width: 100%;
  }

  .content-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .content-body {
    grid-column: 1;
    grid-row: 2;
  }

  .content-deco-figure {
    display: none;
  }

  .content-aside {
    grid-column: 1;
    grid-row: 1;
    position: static;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  :root {
    --nav-h: 60px;
    --bar-h: 40px;
  }

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

  .hero-images {
    height: 200px;
  }

  .hero-img-wrap-1 {
    width: 58%;
  }

  .hero-img-wrap-2 {
    width: 55%;
  }

  .site-main {
    padding: 40px 16px;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .anchor-bar-inner {
    padding: 0 12px;
    gap: 0;
  }

  .anchor-link {
    padding: 6px 10px;
    font-size: 0.75rem;
    min-height: 40px;
  }

  .site-footer {
    padding: 48px 16px 24px;
  }
}

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

  .header-inner {
    padding: 0 16px;
  }

  .content-section {
    gap: 24px;
  }
}

/* ===========================
   卡片通用（正文内 page.content 里的卡片）
=========================== */
.content-body .card,
.content-body [class*="card"] {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.content-body .card:hover,
.content-body [class*="card"]:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

@media (prefers-reduced-motion: reduce) {
  .content-body .card,
  .content-body [class*="card"] {
    transition: none;
  }
}

/* ===========================
   无障碍：焦点可见
=========================== */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}
