@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-acid: #80ff00;
  --c-green: #00ff00;
  --c-dark: #1f2617;
  --c-dark2: #171e10;
  --c-dark3: #2b3620;
  --c-mid: #3a4a28;
  --c-text: #e8f5c8;
  --c-muted: #9ab870;
  --c-white: #ffffff;
  --nav-w: 240px;
  --radius-card: 28px;
  --radius-sm: 12px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
}

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

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

.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;
}

a { color: var(--c-acid); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* ===== SITE WRAPPER ===== */
.site-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDENAV ===== */
.sidenav {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--c-dark2);
  border-right: 2px solid var(--c-acid);
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 100;
  overflow: hidden;
  padding-bottom: 16px;
}

.sidenav-brand {
  padding: 28px 20px 20px;
  border-bottom: 1px solid var(--c-mid);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-height: 44px;
}

.brand-logo-img {
  width: 36px; height: 36px;
  object-fit: contain;
}

.brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-acid);
  letter-spacing: -0.03em;
  line-height: 1.1;
  padding: 8px 0;
}

.sidenav-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--c-acid) var(--c-dark2);
}

/* 契约要求：nav > p > a */
.nav-links-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 44px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  text-decoration: none;
  position: relative;
}

.nav-link::before {
  content: '›';
  color: var(--c-acid);
  font-size: 1.1rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--transition), transform var(--transition);
}

.nav-link:hover {
  background: var(--c-mid);
  color: var(--c-acid);
  transform: translateX(4px);
  text-decoration: none;
}

.nav-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* 搜索框 */
.sidenav-search {
  padding: 12px 14px;
  border-top: 1px solid var(--c-mid);
  display: flex;
  gap: 6px;
  align-items: center;
}

.search-input {
  flex: 1;
  background: var(--c-dark3);
  border: 1px solid var(--c-mid);
  border-radius: 8px;
  color: var(--c-text);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 8px 10px;
  min-height: 36px;
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus {
  border-color: var(--c-acid);
}

.search-input::placeholder {
  color: var(--c-muted);
}

.search-btn {
  background: var(--c-acid);
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), background var(--transition);
  min-height: 40px;
  flex-shrink: 0;
}

.search-btn:hover {
  background: var(--c-green);
  transform: scale(1.1);
}

/* 装饰点 */
.sidenav-deco {
  padding: 8px 20px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.deco-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-acid);
  animation: pulse-dot 2s ease-in-out infinite;
}

.deco-dot--2 {
  background: var(--c-green);
  animation-delay: 0.5s;
  width: 6px; height: 6px;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ===== MAIN SCROLL ===== */
.main-scroll {
  margin-left: var(--nav-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ===== MARQUEE ===== */
.marquee-bar {
  background: var(--c-acid);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  overflow: hidden;
  padding: 6px 0;
  position: relative;
  z-index: 10;
}

.marquee-track {
  display: flex;
  width: 100%;
  overflow: hidden;
}

.marquee-content {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-scroll 22s linear infinite;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(130%) brightness(0.55);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(31,38,23,0.88) 0%, rgba(31,38,23,0.4) 60%, rgba(0,0,0,0.2) 100%);
}

/* 斜切底边 */
.hero-skew-bottom {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 90px;
  background: var(--c-dark);
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: right;
  padding: 0 5% 100px 0;
  max-width: 680px;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--c-acid);
  color: var(--c-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero-h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--c-white);
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

.hero-h1 em {
  color: var(--c-acid);
  font-style: normal;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--c-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-acid);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  min-height: 50px;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(128,255,0,0.3);
}

.hero-cta:hover {
  background: var(--c-green);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 36px rgba(0,255,0,0.4);
  text-decoration: none;
}

/* 浮动贴纸 */
.hero-stickers {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.sticker {
  position: absolute;
  background: var(--c-acid);
  color: var(--c-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 40px;
  transform: rotate(var(--rot, -4deg));
  box-shadow: 3px 3px 0 var(--c-dark2), 0 0 0 2px var(--c-dark);
  white-space: nowrap;
  animation: sticker-float 4s ease-in-out infinite;
}

.sticker:nth-child(2) { animation-delay: 1.2s; }
.sticker:nth-child(3) { animation-delay: 2.4s; }

@keyframes sticker-float {
  0%, 100% { transform: rotate(var(--rot, -4deg)) translateY(0); }
  50% { transform: rotate(var(--rot, -4deg)) translateY(-8px); }
}

/* scroll-margin-top for sections */
section[id] {
  scroll-margin-top: 24px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  padding: 60px 40px 60px 48px;
  max-width: 1100px;
  width: 100%;
}

/* 契约：main > section > figure/aside 交错 */
.content-section {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto 1fr;
  gap: 32px 40px;
  position: relative;
}

.content-section--primary {
  align-items: start;
}

/* figure 装饰块 */
.content-figure {
  grid-column: 1;
  grid-row: 1;
  margin: 0 0 32px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fig-block {
  height: 6px;
  border-radius: 3px;
  width: 80px;
}

.fig-block--accent {
  background: linear-gradient(90deg, var(--c-acid), var(--c-green));
  animation: width-pulse 3s ease-in-out infinite;
}

@keyframes width-pulse {
  0%, 100% { width: 80px; }
  50% { width: 140px; }
}

.fig-label {
  font-size: 0.7rem;
  color: var(--c-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* 正文内容体 */
.page-content-body {
  grid-column: 1;
  grid-row: 2;
}

/* page.content 内的 section 样式 */
.page-content-body section {
  margin-bottom: 64px;
  padding-top: 16px;
}

.page-content-body h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--c-acid);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-content-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 24px 0 10px;
}

.page-content-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  margin-bottom: 16px;
}

.page-content-body ul,
.page-content-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-content-body li {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
}

.page-content-body a {
  color: var(--c-acid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page-content-body a:hover {
  color: var(--c-green);
}

.page-content-body strong { color: var(--c-acid); }

.page-content-body blockquote {
  border-left: 3px solid var(--c-acid);
  padding: 12px 20px;
  background: var(--c-dark3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
}

/* aside 侧边栏 */
.content-aside {
  grid-column: 2;
  grid-row: 1 / 3;
  background: var(--c-dark2);
  border: 1px solid var(--c-mid);
  border-radius: var(--radius-card);
  padding: 28px 22px;
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.content-aside::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-acid), var(--c-green));
}

.aside-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--c-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
}

.aside-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-acid);
  margin: 0 0 8px;
}

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

.aside-link {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--c-text);
  transition: background var(--transition), color var(--transition), transform var(--transition);
  min-height: 40px;
}

.aside-link:hover {
  background: var(--c-mid);
  color: var(--c-acid);
  transform: translateX(4px);
  text-decoration: none;
}

.aside-badge {
  align-self: flex-end;
  background: var(--c-acid);
  color: var(--c-dark);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 10px;
  border-radius: 20px;
  animation: badge-jitter 0.8s ease-in-out infinite;
}

@keyframes badge-jitter {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(3deg) scale(1.05); }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--c-dark2);
  border-top: 2px solid var(--c-acid);
  margin-top: auto;
}

/* CTA 大块 */
.footer-cta-section {
  background: linear-gradient(135deg, var(--c-dark3) 0%, var(--c-dark2) 100%);
  padding: 64px 48px;
  text-align: center;
  border-bottom: 1px solid var(--c-mid);
  position: relative;
  overflow: hidden;
}

.footer-cta-section::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(128,255,0,0.08) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.footer-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.footer-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--c-acid);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-cta-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 14px;
  letter-spacing: -0.03em;
}

.footer-cta-desc {
  font-size: 1rem;
  color: var(--c-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  background: var(--c-acid);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  min-height: 50px;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.footer-cta-btn:hover {
  background: var(--c-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,255,0,0.35);
  text-decoration: none;
}

/* 四栏 */
.footer-cols-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 48px;
  border-bottom: 1px solid var(--c-mid);
}

.footer-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-acid);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.footer-col-text {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.65;
}

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

.footer-nav-link {
  font-size: 0.875rem;
  color: var(--c-muted);
  transition: color var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.footer-nav-link:hover {
  color: var(--c-acid);
  text-decoration: none;
}

.footer-contact-link {
  color: var(--c-acid);
  font-size: 0.875rem;
}

/* 底栏 */
.footer-bottom-section {
  padding: 20px 48px;
  text-align: center;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--c-muted);
}

/* ===== SMALL eyebrow 契约 ===== */
small.aside-eyebrow,
small.footer-eyebrow {
  display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .content-section {
    grid-template-columns: 1fr;
  }
  .content-aside {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
  .footer-cols-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    padding: 36px 28px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-w: 0px;
  }

  .sidenav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    border-right: none;
    border-top: 2px solid var(--c-acid);
    z-index: 200;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    align-items: stretch;
  }

  .sidenav-brand {
    padding: 8px 12px;
    border-bottom: none;
    border-right: 1px solid var(--c-mid);
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .brand-link {
    min-height: 44px;
    padding: 4px 0;
  }

  .brand-text {
    font-size: 0.95rem;
    padding: 0;
  }

  .sidenav-nav {
    flex: 1;
    padding: 6px 8px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .nav-links-row {
    flex-direction: row;
    gap: 4px;
    flex-wrap: nowrap;
    height: 100%;
    align-items: center;
  }

  .nav-link {
    padding: 10px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    min-height: 44px;
  }

  .nav-link::before { display: none; }
  .nav-link:hover { transform: none; }

  .sidenav-search {
    padding: 8px;
    border-top: none;
    border-left: 1px solid var(--c-mid);
    flex-shrink: 0;
    align-items: center;
  }

  .search-input { width: 90px; min-height: 36px; }

  .sidenav-deco { display: none; }

  .main-scroll {
    margin-left: 0;
    padding-bottom: 80px;
  }

  .hero-content {
    text-align: left;
    padding: 0 5% 120px 5%;
    max-width: 100%;
  }

  .hero-h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }

  .hero-stickers .sticker:nth-child(3) { display: none; }

  .sticker:nth-child(1) { top: 12% !important; right: 5%; left: auto !important; }
  .sticker:nth-child(2) { top: 28% !important; right: 5%; left: auto !important; }

  .main-content {
    padding: 40px 20px;
  }

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

  .footer-cta-section { padding: 48px 20px; }

  .footer-cols-section {
    grid-template-columns: 1fr 1fr;
    padding: 28px 20px;
    gap: 20px;
  }

  .footer-bottom-section { padding: 16px 20px; }
}

@media (max-width: 480px) {
  .footer-cols-section {
    grid-template-columns: 1fr;
  }

  .hero-section { height: 100svh; }
}

/* ===== 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; }
}
