@import url('https://fonts.googleapis.com/css2?family=Cormorant+Infant:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

/* ===== CSS 变量 ===== */
:root {
  --green: #87ff71;
  --blue: #01cdfe;
  --dark: #192617;
  --pink: #ff71ce;
  --purple: #b967ff;
  --dark-alt: #0d1a0c;
  --dark-mid: #1e3019;
  --text-main: #e8ffe4;
  --text-muted: #8dbf88;
  --border-glow: rgba(135, 255, 113, 0.3);
  --border-blue: rgba(1, 205, 254, 0.3);
  --card-bg: rgba(25, 38, 23, 0.85);
  --header-h: 60px;
  --nav-h: 44px;
  --font-serif: 'Cormorant Infant', 'Georgia', serif;
  --font-script: 'Great Vibes', cursive;
  --font-system: var(--font-serif);
}

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

html {
  scroll-behavior: smooth;
  font-size: 17px;
  background: var(--dark-alt);
  color: var(--text-main);
}

body.vaporwave-body {
  font-family: var(--font-system);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(160deg, #0d1a0c 0%, #192617 40%, #0a1220 100%);
  position: relative;
}

/* ===== Scanlines Effect ===== */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
  from { background-position: 0 0; }
  to { background-position: 0 100px; }
}

/* ===== Retro Grid ===== */
.retro-grid {
  pointer-events: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55vh;
  z-index: 0;
  perspective: 400px;
  overflow: hidden;
}

.retro-grid::before {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(1, 205, 254, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 205, 254, 0.18) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: rotateX(60deg) translateY(-20%);
  transform-origin: bottom center;
  animation: gridPulse 4s ease-in-out infinite alternate;
}

.retro-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--dark-alt) 0%, transparent 60%);
}

@keyframes gridPulse {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 26, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glow);
  box-shadow: 0 0 20px rgba(135, 255, 113, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  height: var(--header-h);
}

.brand-icon {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

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

.logo-text-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--green);
  text-shadow: 0 0 10px var(--green), 0 0 20px var(--green);
  border: 1px solid var(--border-glow);
  border-radius: 4px;
  background: rgba(135,255,113,0.05);
}

.header-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  transition: transform 0.3s, opacity 0.3s;
}

/* Top Nav */
.top-nav {
  background: rgba(13,26,12,0.95);
  border-top: 1px solid rgba(135,255,113,0.1);
}

.top-nav-list {
  display: flex;
  list-style: none;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.top-nav-list li { flex-shrink: 0; }

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.9rem;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.25s, text-shadow 0.25s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 0.9rem;
  right: 0.9rem;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform 0.25s;
}

.nav-link:hover {
  color: var(--green);
  text-shadow: 0 0 8px var(--green);
}

.nav-link:hover::after { transform: scaleX(1); }

/* Scroll margin for sections */
section[id] { scroll-margin-top: calc(var(--header-h) + var(--nav-h) + 8px); }

/* ===== Hero ===== */
.hero-section {
  position: relative;
  z-index: 1;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 5rem 2rem 4rem;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 40%, rgba(135,255,113,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 70%, rgba(1,205,254,0.06) 0%, transparent 60%);
  animation: hueShift 10s ease-in-out infinite alternate;
}

.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(135,255,113,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135,255,113,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: right;
  max-width: 680px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--blue);
  text-shadow: 0 0 10px var(--blue), 0 0 20px rgba(1,205,254,0.5);
  margin-bottom: 0.8rem;
}

.glitch-text {
  position: relative;
  animation: glitchAnim 6s infinite;
}

@keyframes glitchAnim {
  0%, 90%, 100% { text-shadow: 0 0 10px var(--blue), 0 0 20px rgba(1,205,254,0.5); clip-path: none; }
  92% {
    text-shadow: -2px 0 var(--pink), 2px 0 var(--blue);
    clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  }
  94% {
    text-shadow: 2px 0 var(--green), -2px 0 var(--purple);
    clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  }
  96% { clip-path: none; }
}

h1.hero-title {
  font-family: var(--font-script);
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--green);
  text-shadow:
    0 0 20px var(--green),
    0 0 40px rgba(135,255,113,0.5),
    0 0 80px rgba(135,255,113,0.2);
  margin-bottom: 1.2rem;
  letter-spacing: 0.02em;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-left: auto;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-cta-row {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  min-height: 48px;
  background: var(--green);
  color: var(--dark-alt);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  letter-spacing: 0.06em;
  transition: box-shadow 0.3s, transform 0.2s;
  box-shadow: 0 0 20px rgba(135,255,113,0.4);
}

.btn-primary:hover {
  box-shadow: 0 0 35px rgba(135,255,113,0.7);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  min-height: 48px;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  letter-spacing: 0.06em;
  transition: box-shadow 0.3s, background 0.3s, transform 0.2s;
}

.btn-ghost:hover {
  background: rgba(1,205,254,0.08);
  box-shadow: 0 0 20px rgba(1,205,254,0.35);
  transform: translateY(-2px);
}

/* ===== Content Wrapper ===== */
.content-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ===== Aside / Sidebar ===== */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  order: -1;
  margin-right: 2rem;
}

.sidebar-inner {
  position: sticky;
  top: calc(var(--header-h) + var(--nav-h) + 1rem);
  background: var(--card-bg);
  border: 1px solid var(--border-glow);
  border-radius: 4px;
  padding: 1.2rem;
  backdrop-filter: blur(8px);
}

.aside-eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  text-shadow: 0 0 6px var(--blue);
  margin-bottom: 0.3rem;
}

.aside-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 1rem;
  text-shadow: 0 0 8px rgba(135,255,113,0.4);
}

.aside-nav-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.aside-nav-list li { border-bottom: 1px solid rgba(135,255,113,0.08); }
.aside-nav-list li:last-child { border-bottom: none; }

.aside-link {
  display: flex;
  align-items: center;
  padding: 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
  min-height: 44px;
}

.aside-link:hover {
  color: var(--green);
  padding-left: 0.4rem;
}

.aside-notice {
  border-top: 1px solid var(--border-glow);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.aside-notice p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.4rem;
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  min-width: 0;
}

.page-article {
  width: 100%;
}

.content-section {
  min-height: 10px;
}

/* ===== Injected page.content styles ===== */
.content-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--green);
  text-shadow: 0 0 12px rgba(135,255,113,0.4);
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-glow);
  position: relative;
}

.content-section h2::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.content-section h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--blue);
  text-shadow: 0 0 8px rgba(1,205,254,0.4);
  margin: 2rem 0 0.8rem;
}

.content-section p {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.8;
  max-width: 72ch;
}

.content-section ul, .content-section ol {
  margin: 0 0 1.2rem 1.5rem;
  color: var(--text-main);
}

.content-section li { margin-bottom: 0.4rem; line-height: 1.7; }

.content-section a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s, text-shadow 0.2s;
}

.content-section a:hover {
  color: var(--green);
  text-shadow: 0 0 6px var(--green);
}

.content-section strong { color: var(--green); font-weight: 600; }
.content-section em { color: var(--pink); font-style: italic; }

.content-section section {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(135,255,113,0.08);
  animation: fadeInUp 0.6s ease both;
}

.content-section section:last-child { border-bottom: none; }

.content-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.content-section th {
  background: rgba(135,255,113,0.1);
  color: var(--green);
  padding: 0.6rem 0.8rem;
  text-align: left;
  border: 1px solid var(--border-glow);
}

.content-section td {
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(135,255,113,0.1);
  color: var(--text-main);
}

.content-section tr:hover td { background: rgba(135,255,113,0.03); }

.content-section small {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pink);
  text-shadow: 0 0 6px rgba(255,113,206,0.5);
  margin-bottom: 0.3rem;
}

/* ===== Fade In Stagger ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-section > section:nth-child(1) { animation-delay: 0.05s; }
.content-section > section:nth-child(2) { animation-delay: 0.1s; }
.content-section > section:nth-child(3) { animation-delay: 0.15s; }
.content-section > section:nth-child(4) { animation-delay: 0.2s; }
.content-section > section:nth-child(5) { animation-delay: 0.25s; }
.content-section > section:nth-child(6) { animation-delay: 0.3s; }
.content-section > section:nth-child(7) { animation-delay: 0.35s; }

/* ===== hue-rotate ambient ===== */
@keyframes hueShift {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(30deg); }
}

/* ===== Footer Contact Block ===== */
.footer-contact-block {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(135,255,113,0.06) 0%, rgba(1,205,254,0.06) 100%);
  border-top: 1px solid var(--border-glow);
  border-bottom: 1px solid var(--border-blue);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-contact-inner { max-width: 560px; margin: 0 auto; }

.footer-contact-title {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--green);
  text-shadow: 0 0 15px var(--green);
  margin: 0.4rem 0 0.8rem;
}

.footer-contact-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.footer-email-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.8rem;
  min-height: 44px;
  border: 1px solid var(--green);
  color: var(--green);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  transition: background 0.3s, box-shadow 0.3s;
}

.footer-email-btn:hover {
  background: rgba(135,255,113,0.08);
  box-shadow: 0 0 16px rgba(135,255,113,0.3);
}

/* ===== Footer Main ===== */
.site-footer {
  position: relative;
  z-index: 1;
  background: rgba(10, 18, 9, 0.97);
  border-top: 2px solid rgba(135,255,113,0.15);
}

.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.footer-dl { margin: 0; }

.footer-dl-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  text-shadow: 0 0 6px rgba(135,255,113,0.5);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-glow);
}

.footer-brand-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-logo { height: 32px; width: auto; }

.footer-logo-text {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--green);
  text-shadow: 0 0 8px var(--green);
}

.footer-dl--links dd,
.footer-dl--more dd {
  margin: 0;
  border-bottom: 1px solid rgba(135,255,113,0.06);
}

.footer-dl--links dd:last-child,
.footer-dl--more dd:last-child { border-bottom: none; }

.footer-dl--links a,
.footer-dl--more a {
  display: flex;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  min-height: 44px;
  transition: color 0.2s, padding-left 0.2s;
}

.footer-dl--links a:hover,
.footer-dl--more a:hover {
  color: var(--blue);
  padding-left: 0.4rem;
}

/* ===== Footer Bottom ===== */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-top: 1px solid rgba(135,255,113,0.1);
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-copy { opacity: 0.7; }
.footer-disclaimer { color: var(--pink); opacity: 0.8; }

/* ===== Footer Sub Nav (dl/dt/dd structure for contract) ===== */
.footer-sub-nav {
  border-top: 1px solid rgba(1,205,254,0.1);
  padding: 0.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-sub-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
}

.footer-sub-dl dt {
  margin: 0;
}

.footer-sub-dl dt a {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.8rem;
  min-height: 44px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.footer-sub-dl dt a:hover { color: var(--blue); }

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

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .content-wrapper {
    flex-direction: column;
    padding: 1.5rem 1rem;
  }

  .sidebar {
    width: 100%;
    margin-right: 0;
    margin-bottom: 1.5rem;
    order: 0;
  }

  .sidebar-inner {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }

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

  .footer-dl--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root { --header-h: 56px; --nav-h: 40px; }

  .header-tagline { display: none; }

  .nav-toggle { display: flex; }

  .top-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
  }

  .top-nav.is-open { display: block; }

  .top-nav-list {
    flex-direction: column;
    padding: 0.5rem 0;
  }

  .nav-link {
    padding: 0.7rem 1.5rem;
    width: 100%;
    justify-content: flex-start;
  }

  .hero-section {
    min-height: 70vh;
    padding: 4rem 1.2rem 3rem;
    justify-content: center;
  }

  .hero-inner { text-align: center; }

  h1.hero-title { font-size: clamp(2.5rem, 13vw, 4rem); }

  .hero-sub { margin-left: 0; text-align: left; }

  .hero-cta-row {
    justify-content: center;
  }

  .sidebar-inner {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-sub-dl {
    flex-direction: column;
  }

  .footer-sub-dl dt a {
    padding: 0.6rem 0.4rem;
  }
}

@media (max-width: 375px) {
  h1.hero-title { font-size: 2.2rem; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  .hero-cta-row { flex-direction: column; }
}
