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

/* ===== 变量 ===== */
:root {
  --clr-green: #87ff71;
  --clr-yellow: #ffce5c;
  --clr-dark: #192617;
  --clr-dark2: #1e2f1b;
  --clr-white: #f5f5f0;
  --clr-green-dim: #5ec44a;
  --ff-mono: 'Space Mono', 'Courier New', monospace;
  --radius-pill: 999px;
  --radius-card: 28px;
  --nav-h: 48px;
  --announce-h: 36px;
  --brand-row-h: 64px;
  --header-total: calc(var(--announce-h) + var(--brand-row-h) + var(--nav-h) + 4px);
  --scroll-offset: var(--header-total);
  --transition-fast: 0.2s ease;
  --transition-med: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--clr-dark);
  color: var(--clr-white);
}
body {
  font-family: var(--ff-mono);
  line-height: 1.65;
  overflow-x: hidden;
  background: var(--clr-dark);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, menu { list-style: none; }
button { cursor: pointer; font: inherit; }

/* ===== scroll-margin ===== */
section[id] { scroll-margin-top: var(--scroll-offset); }

/* ===== 公告条 ===== */
.site-announce {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--clr-green);
  color: var(--clr-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: var(--announce-h);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  overflow: hidden;
}
.announce-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--clr-dark);
  flex-shrink: 0;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: var(--announce-h);
  z-index: 190;
  background: var(--clr-dark);
  border-bottom: 3px solid var(--clr-green);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--brand-row-h);
  border-bottom: 1px dashed rgba(135,255,113,0.25);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-img { width: 40px; height: 40px; border-radius: 8px; }
.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clr-green);
  letter-spacing: -0.02em;
}
.brand-tagline {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
  display: none;
}
@media (min-width: 640px) { .brand-tagline { display: block; } }

/* ===== Nav (details + menu) ===== */
.nav-row {
  padding: 0 16px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.nav-details { width: 100%; }
.nav-details[open] > summary .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-details[open] > summary .hamburger-bar:nth-child(2) { opacity: 0; }
.nav-details[open] > summary .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  list-style: none;
  padding: 4px;
}
.nav-toggle::-webkit-details-marker { display: none; }

.hamburger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-green);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-menu {
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--announce-h) + var(--brand-row-h) + var(--nav-h));
  background: var(--clr-dark2);
  border-bottom: 3px solid var(--clr-yellow);
  padding: 12px 16px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 180;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 2px solid var(--clr-green);
  color: var(--clr-green);
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}
.nav-pill:hover, .nav-pill:focus-visible {
  background: var(--clr-green);
  color: var(--clr-dark);
  transform: translateY(-2px);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-details { position: static; }
  .nav-menu {
    position: static;
    border: none;
    background: transparent;
    padding: 0;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
  }
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--clr-dark2);
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 48px 24px 80px;
  flex: 1;
  position: relative;
  z-index: 2;
}
@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 48px;
    padding: 56px 48px 96px;
  }
}
.hero-media {
  flex: 1 1 45%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-img {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-card);
  border: 3px solid var(--clr-green);
  object-fit: cover;
}
.hero-placeholder {
  width: 340px;
  height: 320px;
  background: linear-gradient(135deg, var(--clr-dark) 0%, #0f1e0d 100%);
  border-radius: var(--radius-card);
  border: 3px solid var(--clr-green);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.geo-triangle {
  position: absolute;
  top: 20px; left: 20px;
  width: 0; height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 70px solid var(--clr-yellow);
  opacity: 0.7;
}
.geo-circle {
  position: absolute;
  bottom: 30px; right: 30px;
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 6px solid var(--clr-green);
  opacity: 0.8;
}
.geo-squiggle {
  font-size: 2rem;
  color: var(--clr-green);
  letter-spacing: -4px;
  position: absolute;
  bottom: 20px; left: 20px;
  transform: rotate(-15deg);
}

.hero-content {
  flex: 1 1 50%;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}
.hero-eyebrow {
  display: inline-block;
  background: var(--clr-yellow);
  color: var(--clr-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  transform: rotate(1deg);
}
.hero-h1 {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-white);
  letter-spacing: -0.02em;
}
.hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 400px;
  line-height: 1.7;
}
.hero-cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* slash divider */
.hero-slash {
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: var(--clr-dark);
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 3;
}

/* ===== Buttons ===== */
.btn-capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  font-family: var(--ff-mono);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--clr-green);
  color: var(--clr-dark);
  box-shadow: 4px 4px 0 var(--clr-yellow);
}
.btn-primary:hover, .btn-primary:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--clr-yellow);
}
.btn-outline {
  background: transparent;
  color: var(--clr-green);
  border: 2px solid var(--clr-green);
  box-shadow: 4px 4px 0 rgba(135,255,113,0.25);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--clr-green);
  color: var(--clr-dark);
  transform: translate(-2px, -2px);
}
.btn-dark {
  background: var(--clr-dark);
  color: var(--clr-green);
  border: 2px solid var(--clr-green);
  box-shadow: 4px 4px 0 var(--clr-green);
}
.btn-dark:hover, .btn-dark:focus-visible {
  background: var(--clr-green);
  color: var(--clr-dark);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--clr-yellow);
}

/* ===== Main Content Section ===== */
.site-main { position: relative; }

.content-section {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "deco"
    "content"
    "aside";
  gap: 32px;
  padding: 64px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .content-section {
    grid-template-columns: 1fr 260px;
    grid-template-areas:
      "deco deco"
      "content aside";
    gap: 48px;
    padding: 80px 48px;
  }
}

.content-deco {
  grid-area: deco;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 0 16px;
  border-bottom: 2px dashed rgba(135,255,113,0.3);
}
.deco-diamond {
  display: inline-block;
  width: 20px; height: 20px;
  background: var(--clr-yellow);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.deco-dots {
  flex: 1;
  height: 6px;
  background-image: radial-gradient(circle, var(--clr-green) 1.5px, transparent 1.5px);
  background-size: 12px 6px;
  opacity: 0.5;
}

/* ===== Page Content ===== */
.page-content {
  grid-area: content;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.88);
}

/* Content sections from page.content */
.page-content section {
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(135,255,113,0.15);
  position: relative;
}
.page-content section:last-child { border-bottom: none; }

.page-content h2 {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--clr-green);
  margin-bottom: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.page-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-yellow);
  margin-bottom: 14px;
  margin-top: 28px;
}
.page-content p {
  margin-bottom: 16px;
  max-width: 72ch;
}
.page-content ul, .page-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.page-content ul { list-style: none; padding-left: 0; }
.page-content ul li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
}
.page-content ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 10px; height: 10px;
  background: var(--clr-green);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}
.page-content ol li { margin-bottom: 8px; padding-left: 4px; }
.page-content strong { color: var(--clr-yellow); font-weight: 700; }
.page-content em { color: var(--clr-green); font-style: normal; }
.page-content a {
  color: var(--clr-green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}
.page-content a:hover { color: var(--clr-yellow); }
.page-content blockquote {
  border-left: 4px solid var(--clr-yellow);
  padding: 12px 20px;
  background: rgba(255,206,92,0.07);
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
  font-style: normal;
}
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.page-content th {
  background: var(--clr-green);
  color: var(--clr-dark);
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
}
.page-content td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(135,255,113,0.15);
}
.page-content tr:hover td { background: rgba(135,255,113,0.05); }

/* ===== Aside ===== */
.content-aside {
  grid-area: aside;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.aside-block {
  background: var(--clr-dark2);
  border: 2px solid var(--clr-green);
  border-radius: var(--radius-card);
  padding: 24px;
  border-bottom: 5px solid var(--clr-green);
  position: relative;
  overflow: hidden;
}
.aside-block::before {
  content: '';
  position: absolute;
  top: -10px; right: -10px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--clr-yellow);
  opacity: 0.3;
}
.aside-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-yellow);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.aside-nav-list { display: flex; flex-direction: column; gap: 6px; }
.aside-link {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  line-height: 1.4;
}
.aside-link:hover, .aside-link:focus-visible {
  background: rgba(135,255,113,0.08);
  border-color: var(--clr-green);
  color: var(--clr-green);
  padding-left: 16px;
}

.aside-badge {
  background: var(--clr-yellow);
  color: var(--clr-dark);
  border-radius: var(--radius-card);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 5px solid var(--clr-dark);
}
.aside-badge::after {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 6px dashed var(--clr-dark);
  opacity: 0.25;
}
.badge-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.badge-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

/* ===== Footer CTA ===== */
.footer-cta-block {
  position: relative;
  background: var(--clr-green);
  color: var(--clr-dark);
  padding: 64px 24px;
  text-align: center;
  overflow: hidden;
  clip-path: polygon(0 8%, 100% 0%, 100% 92%, 0% 100%);
  margin: 0;
}
.footer-cta-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-cta-heading {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.footer-cta-sub {
  font-size: 1rem;
  opacity: 0.8;
  max-width: 500px;
  line-height: 1.6;
}
.footer-cta-geo {
  position: absolute;
  z-index: 1;
}
.geo-tri-lg {
  top: 10px; left: 20px;
  width: 0; height: 0;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 86px solid var(--clr-yellow);
  opacity: 0.4;
  transform: rotate(-12deg);
}
.geo-circ-lg {
  bottom: 10px; right: 30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 8px solid var(--clr-dark);
  opacity: 0.2;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--clr-dark2);
  border-top: 3px solid var(--clr-green);
  padding: 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 24px;
}
.footer-logo-wrap { flex-shrink: 0; }
.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-green);
}
.footer-nav { flex: 1 1 auto; }
.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  justify-content: center;
}
.footer-link {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  padding: 6px 10px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}
.footer-link:hover, .footer-link:focus-visible {
  color: var(--clr-green);
  background: rgba(135,255,113,0.08);
}
.footer-copy {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Scroll Reveal ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ===== Focus ===== */
:focus-visible {
  outline: 3px solid var(--clr-green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Responsive fine-tune ===== */
@media (max-width: 480px) {
  .hero-content { text-align: left; align-items: flex-start; }
  .hero-cta-group { justify-content: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-nav-list { justify-content: flex-start; }
}
