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

/* =============================================
   CSS 变量 & 全局重置
   ============================================= */
:root {
  --green: #00ff80;
  --blue: #0000ff;
  --black: #000000;
  --white: #ffffff;
  --gray-dark: #111111;
  --gray-mid: #222222;
  --gray-light: #333333;
  --border-w: 3px;
  --border: var(--border-w) solid var(--green);
  --font: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', ui-monospace, monospace;
  --nav-h: 72px;
  --anchor-h: 44px;
  --total-sticky: calc(var(--nav-h) + var(--anchor-h));
}

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

html {
  scroll-behavior: smooth;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

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

body {
  min-height: 100vh;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
}

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

a {
  color: var(--green);
  text-decoration: none;
  transition: none;
}

a:hover, a:focus {
  color: var(--black);
  background: var(--green);
  outline: none;
}

a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

ul, ol, menu {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

small {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
}

/* =============================================
   站点包装器
   ============================================= */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =============================================
   顶部导航
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  border-bottom: var(--border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

/* details/summary 结构导航 */
.nav-details {
  width: 100%;
}

.nav-details[open] > .nav-toggle .nav-toggle__bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.nav-details[open] > .nav-toggle .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-details[open] > .nav-toggle .nav-toggle__bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav-toggle {
  display: none;
  cursor: pointer;
  padding: 16px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  list-style: none;
  background: none;
  border: none;
  color: var(--green);
  font-family: var(--font);
  font-weight: 700;
}

.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle::marker { display: none; }

.nav-toggle__bar {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--green);
  transition: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 0;
  list-style: none;
}

.nav-menu__left,
.nav-menu__right {
  flex: 1;
}

.nav-menu__brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.nav-list li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  border: 2px solid transparent;
  white-space: nowrap;
}

.nav-list li a:hover,
.nav-list li a:focus {
  color: var(--black);
  background: var(--green);
  border-color: var(--green);
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
}

.brand-logo:hover, .brand-logo:focus {
  background: none;
}

.brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  white-space: nowrap;
  border: var(--border);
  padding: 6px 14px;
}

.logo-mark {
  max-height: 48px;
  width: auto;
}

/* 二级粘性锚点条 */
.sticky-anchor-bar {
  background: var(--blue);
  border-top: 2px solid var(--green);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--green) var(--blue);
}

.anchor-list {
  display: flex;
  align-items: center;
  min-height: var(--anchor-h);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  gap: 0;
}

.anchor-list li {
  flex: 0 0 auto;
}

.anchor-link {
  display: flex;
  align-items: center;
  min-height: var(--anchor-h);
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  border-right: 1px solid rgba(255,255,255,0.2);
  white-space: nowrap;
}

.anchor-link:hover, .anchor-link:focus {
  color: var(--black);
  background: var(--green);
}

/* =============================================
   Hero 区块
   ============================================= */
.hero-section {
  min-height: 70vh;
  background: var(--black);
  border-bottom: var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-margin-top: var(--total-sticky);
}

.hero-inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 64px 16px 48px;
  align-items: center;
  min-height: calc(70vh - 60px);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-right: 48px;
  z-index: 2;
}

.hero-h1 {
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--white);
}

.hero-h1::first-line {
  color: var(--green);
}

.hero-desc {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255,255,255,0.8);
  max-width: 480px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--green);
  border: 3px solid var(--green);
  align-self: flex-start;
}

.hero-cta:hover, .hero-cta:focus {
  color: var(--green);
  background: var(--black);
  border-color: var(--green);
}

/* 双图错位拼贴 */
.hero-collage {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collage-frame {
  position: absolute;
  overflow: hidden;
  border: var(--border);
}

.collage-frame--1 {
  width: 65%;
  height: 300px;
  top: 0;
  left: 0;
  z-index: 2;
  border-color: var(--green);
}

.collage-frame--2 {
  width: 65%;
  height: 280px;
  bottom: 0;
  right: 0;
  z-index: 1;
  border-color: var(--blue);
  border-width: 4px;
}

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

.collage-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collage-placeholder--1 {
  background: var(--blue);
}

.collage-placeholder--2 {
  background: var(--gray-mid);
}

.collage-placeholder span {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--green);
}

/* 斜切色带装饰 */
.hero-slash {
  position: absolute;
  top: 50%;
  left: -10%;
  right: -10%;
  height: 4px;
  background: var(--blue);
  transform: rotate(-8deg) translateY(-50%);
  z-index: 0;
  pointer-events: none;
}

/* 滚动文字带 */
.hero-band {
  background: var(--green);
  color: var(--black);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 0;
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  gap: 0;
}

.hero-band span {
  display: inline-block;
  padding: 0 32px;
  border-right: 2px solid var(--black);
  animation: band-scroll 18s linear infinite;
}

@keyframes band-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-band span { animation: none; }
}

/* =============================================
   主内容区 — 约定结构: main > section > figure/aside 交错
   ============================================= */
.site-main {
  flex: 1;
  background: var(--black);
}

/* section id 的 scroll-margin-top，覆盖 page.content 里的 section */
section[id] {
  scroll-margin-top: var(--total-sticky);
}

.content-section {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: auto auto;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  border-left: var(--border);
  border-right: var(--border);
  border-bottom: var(--border);
}

/* aside 在左侧 */
.content-aside {
  grid-column: 1;
  grid-row: 1 / 3;
  background: var(--gray-dark);
  border-right: var(--border);
  padding: 40px 24px;
  position: sticky;
  top: var(--total-sticky);
  height: fit-content;
  max-height: calc(100vh - var(--total-sticky));
  overflow-y: auto;
}

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

.aside-eyebrow {
  display: block;
}

.aside-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  border-bottom: 2px solid var(--green);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

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

.aside-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  border-left: 3px solid transparent;
}

.aside-link:hover, .aside-link:focus {
  color: var(--black);
  background: var(--green);
  border-left-color: var(--green);
}

/* figure 装饰块 */
.content-figure {
  grid-column: 2;
  grid-row: 1;
  padding: 0;
  background: var(--blue);
  border-bottom: var(--border);
  overflow: hidden;
  min-height: 8px;
  display: flex;
  align-items: flex-end;
}

.figure-block {
  height: 8px;
  width: 100%;
}

.figure-block--accent {
  background: repeating-linear-gradient(
    90deg,
    var(--green) 0px,
    var(--green) 40px,
    var(--blue) 40px,
    var(--blue) 80px
  );
}

.figure-caption {
  display: none;
}

/* 正文主体 */
.content-body {
  grid-column: 2;
  grid-row: 2;
  padding: 48px 48px 64px;
  min-width: 0;
}

/* page.content 内部样式 */
.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4 {
  color: var(--white);
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.content-body h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  border-left: 6px solid var(--green);
  padding-left: 16px;
}

.content-body h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--green);
}

.content-body p {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.2em;
  color: rgba(255,255,255,0.88);
}

.content-body ul,
.content-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.content-body li {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.4em;
  color: rgba(255,255,255,0.85);
}

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

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

.content-body a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-body a:hover, .content-body a:focus {
  color: var(--black);
  background: var(--green);
  text-decoration: none;
}

.content-body blockquote {
  border-left: 4px solid var(--blue);
  padding: 12px 24px;
  margin: 1.5em 0;
  background: var(--gray-dark);
  font-style: italic;
  color: rgba(255,255,255,0.75);
}

.content-body strong {
  color: var(--green);
  font-weight: 700;
}

.content-body code {
  font-family: var(--font-mono);
  background: var(--gray-mid);
  padding: 2px 6px;
  font-size: 0.9em;
  color: var(--green);
}

.content-body pre {
  background: var(--gray-mid);
  border: 2px solid var(--green);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 1.5em;
}

.content-body section {
  border-top: 2px solid var(--gray-light);
  padding-top: 2em;
  margin-top: 2em;
}

.content-body section:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* small + h2/h3 眉题 */
.content-body small + h2,
.content-body small + h3 {
  margin-top: 0.2em;
}

/* =============================================
   页脚
   ============================================= */
.site-footer {
  background: var(--gray-dark);
  border-top: var(--border);
  margin-top: auto;
}

/* 大 CTA 块 */
.footer-cta-block {
  background: var(--blue);
  padding: 64px 32px;
  text-align: center;
  border-bottom: var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-eyebrow {
  display: block;
  color: var(--green);
}

.footer-cta-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.footer-cta-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  max-width: 520px;
  line-height: 1.65;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 40px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--green);
  border: 3px solid var(--green);
  margin-top: 8px;
}

.footer-cta-btn:hover, .footer-cta-btn:focus {
  color: var(--green);
  background: var(--black);
  border-color: var(--green);
}

/* 四栏网格 */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.footer-col {
  padding: 40px 32px;
  border-right: 2px solid var(--gray-light);
}

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

.footer-col-eyebrow {
  display: block;
  margin-bottom: 8px;
}

.footer-col-title {
  font-size: 1.05rem;
  color: var(--white);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green);
}

.footer-brand-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

.footer-brand-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
}

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

.footer-nav-list li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.footer-nav-list li a:hover, .footer-nav-list li a:focus {
  color: var(--black);
  background: var(--green);
  padding-left: 8px;
}

.footer-info-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
}

.footer-address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.contact-item a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
}

.contact-item span:last-child {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--gray-light);
  padding-top: 12px;
}

.footer-links li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.footer-links li a:hover, .footer-links li a:focus {
  color: var(--black);
  background: var(--green);
  padding-left: 8px;
}

/* 版权栏 */
.footer-bottom {
  background: var(--black);
  border-top: 2px solid var(--gray-light);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* =============================================
   动效 — Stagger + Hover Micro-interaction
   ============================================= */
@media (prefers-reduced-motion: no-preference) {
  .stagger-item {
    opacity: 0;
    transform: translateY(24px);
    animation: stagger-in 0.5s forwards;
  }

  .stagger-item:nth-child(1) { animation-delay: 0.05s; }
  .stagger-item:nth-child(2) { animation-delay: 0.12s; }
  .stagger-item:nth-child(3) { animation-delay: 0.19s; }
  .stagger-item:nth-child(4) { animation-delay: 0.26s; }
  .stagger-item:nth-child(5) { animation-delay: 0.33s; }
  .stagger-item:nth-child(6) { animation-delay: 0.40s; }
  .stagger-item:nth-child(7) { animation-delay: 0.47s; }

  @keyframes stagger-in {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hero-h1 {
    animation: stagger-in 0.6s 0.1s both;
    opacity: 0;
    transform: translateY(32px);
  }

  .hero-desc {
    animation: stagger-in 0.6s 0.25s both;
    opacity: 0;
    transform: translateY(24px);
  }

  .hero-cta {
    animation: stagger-in 0.5s 0.4s both;
    opacity: 0;
    transform: translateY(16px);
  }

  .collage-frame--1 {
    animation: stagger-in 0.6s 0.2s both;
    opacity: 0;
    transform: translateY(20px);
  }

  .collage-frame--2 {
    animation: stagger-in 0.6s 0.35s both;
    opacity: 0;
    transform: translateY(20px);
  }

  /* Hover micro-interaction on nav items */
  .nav-list li a,
  .anchor-link,
  .aside-link,
  .footer-nav-list li a,
  .footer-links li a {
    position: relative;
    overflow: hidden;
  }

  .nav-list li a::after,
  .anchor-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green);
    transition: width 0.15s;
  }

  .nav-list li a:hover::after,
  .anchor-link:hover::after {
    width: 100%;
  }
}

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

  .footer-col:nth-child(2) {
    border-right: none;
  }

  .footer-col:nth-child(1),
  .footer-col:nth-child(2) {
    border-bottom: 2px solid var(--gray-light);
  }
}

@media (max-width: 900px) {
  .content-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .content-aside {
    grid-column: 1;
    grid-row: 2;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: var(--border);
  }

  .content-figure {
    grid-column: 1;
    grid-row: 1;
  }

  .content-body {
    grid-column: 1;
    grid-row: 3;
    padding: 32px 24px 48px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 40px 16px 32px;
    gap: 40px;
  }

  .hero-content {
    padding-right: 0;
  }

  .hero-collage {
    height: 280px;
  }

  .nav-list li a {
    padding: 8px 8px;
    font-size: 0.75rem;
  }
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .nav-details:not([open]) .nav-menu {
    display: none;
  }

  .nav-menu {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
    background: var(--gray-dark);
    border-top: var(--border);
  }

  .nav-menu__left,
  .nav-menu__right,
  .nav-menu__brand {
    width: 100%;
    flex: none;
    padding: 0;
  }

  .nav-menu__brand {
    order: -1;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-light);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

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

  .nav-list li a {
    padding: 12px 20px;
    font-size: 0.9rem;
    min-height: 48px;
    border-bottom: 1px solid var(--gray-light);
  }

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

  .footer-col {
    border-right: none;
    border-bottom: 2px solid var(--gray-light);
    padding: 32px 24px;
  }

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

  .footer-cta-block {
    padding: 40px 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
  }

  .hero-h1 {
    font-size: 2.2rem;
  }

  .hero-collage {
    height: 220px;
  }

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

  .anchor-link {
    padding: 4px 10px;
    font-size: 0.72rem;
  }
}

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

  .content-body {
    padding: 24px 16px 40px;
  }
}

/* =============================================
   辅助工具类
   ============================================= */
.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;
}

/* footer-logo */
.footer-logo {
  max-height: 40px;
  width: auto;
  margin-bottom: 12px;
}
