@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #192617;
  color: #f0f0e8;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Calistoga', Georgia, serif;
  line-height: 1.2;
  color: #87ff71;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); color: #ffce5c; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); color: #87ff71; }
h4 { font-size: 1.1rem; color: #ffce5c; }

p { font-size: 1rem; line-height: 1.7; }
a { color: #87ff71; text-decoration: none; transition: color 0.2s, opacity 0.2s; }
a:hover { color: #ffce5c; }

/* ── Scroll margin for sections ─────────────────────────────── */
article[id] { scroll-margin-top: 72px; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #192617;
  border-bottom: 2px solid #87ff71;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
}

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

.logo-text {
  font-family: 'Calistoga', serif;
  font-size: 1.3rem;
  color: #87ff71;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

/* nav抽签结构: header > nav > p > a */
.main-nav {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }

.main-nav p {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.main-nav p a {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #f0f0e8;
  border-radius: 3px;
  min-height: 40px;
  transition: background 0.18s, color 0.18s;
  position: relative;
}

.main-nav p a::before {
  content: '▸';
  margin-right: 4px;
  color: #87ff71;
  font-size: 0.75rem;
}

.main-nav p a:hover {
  background: rgba(135, 255, 113, 0.12);
  color: #87ff71;
}

.header-search { flex-shrink: 0; }

.search-form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid #87ff71;
  border-radius: 3px;
  overflow: hidden;
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  padding: 0.45rem 0.75rem;
  color: #f0f0e8;
  font-size: 0.875rem;
  width: 160px;
  min-height: 40px;
}

.search-input::placeholder { color: rgba(240,240,232,0.45); }

.search-btn {
  background: #87ff71;
  border: none;
  cursor: pointer;
  padding: 0 0.65rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  color: #192617;
  transition: background 0.18s;
}

.search-btn:hover { background: #ffce5c; }

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 3px dashed #ffce5c;
}

/* dot-grid background */
.hero-dots-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(135,255,113,0.3) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  z-index: 0;
}

/* Memphis floating shapes */
.memphis-shapes { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.shape { position: absolute; }

.shape-tri-1 {
  width: 0; height: 0;
  border-left: 55px solid transparent;
  border-right: 55px solid transparent;
  border-bottom: 95px solid rgba(255,206,92,0.35);
  top: 10%; right: 8%;
  transform: rotate(18deg);
  animation: floatShape 7s ease-in-out infinite;
}

.shape-circle-1 {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 8px solid rgba(135,255,113,0.4);
  top: 55%; left: 5%;
  animation: floatShape 9s ease-in-out infinite reverse;
}

.shape-squiggle {
  width: 80px; height: 24px;
  border-top: 6px solid rgba(255,206,92,0.55);
  border-radius: 50%;
  bottom: 20%; right: 15%;
  transform: rotate(-12deg);
  animation: floatShape 6s ease-in-out infinite;
}

.shape-tri-2 {
  width: 0; height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 52px solid rgba(135,255,113,0.28);
  bottom: 15%; left: 20%;
  transform: rotate(-25deg);
  animation: floatShape 8s ease-in-out infinite 1s;
}

.shape-rect {
  width: 60px; height: 60px;
  border: 6px dashed rgba(255,206,92,0.4);
  top: 20%; left: 40%;
  transform: rotate(30deg);
  animation: spinSlow 18s linear infinite;
}

.shape-circle-2 {
  width: 40px; height: 40px;
  background: rgba(135,255,113,0.2);
  border-radius: 50%;
  top: 70%; right: 30%;
  animation: floatShape 5s ease-in-out infinite 0.5s;
}

@keyframes floatShape {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

@keyframes spinSlow {
  from { transform: rotate(30deg); }
  to { transform: rotate(390deg); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
  width: 100%;
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 4px;
  border: 3px solid #87ff71;
  box-shadow: 8px 8px 0 #ffce5c;
  display: block;
}

/* placeholder geo when no image */
.hero-placeholder {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4/3;
  background: rgba(135,255,113,0.06);
  border: 3px solid #87ff71;
  border-radius: 4px;
  box-shadow: 8px 8px 0 #ffce5c;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.placeholder-geo { position: relative; width: 240px; height: 180px; }

.pg-circle {
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(135,255,113,0.25);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.pg-tri {
  position: absolute;
  width: 0; height: 0;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 86px solid rgba(255,206,92,0.4);
  top: 10px; left: 20px;
}

.pg-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(135,255,113,0.5) 2px, transparent 2px);
  background-size: 18px 18px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.hero-eyebrow {
  display: inline-block;
  background: #ffce5c;
  color: #192617;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.9rem;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

.hero-h1 {
  color: #87ff71;
  text-shadow: 3px 3px 0 rgba(255,206,92,0.4);
}

.hero-desc {
  color: rgba(240,240,232,0.8);
  font-size: 1.05rem;
  max-width: 420px;
}

.hero-cta {
  display: inline-block;
  background: #87ff71;
  color: #192617;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  border: 2px solid #87ff71;
  box-shadow: 4px 4px 0 #ffce5c;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  min-height: 48px;
  align-items: center;
}

.hero-cta:hover {
  background: #ffce5c;
  border-color: #ffce5c;
  color: #192617;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #87ff71;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT — 抽签结构: main > section.wrap > article > div
═══════════════════════════════════════════════════════════════ */
main { background: #192617; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.wrap > article > div {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ASIDE — left side */
.page-aside {
  position: sticky;
  top: 80px;
  background: rgba(135,255,113,0.05);
  border: 2px solid rgba(135,255,113,0.3);
  border-radius: 4px;
  padding: 1.5rem;
  overflow: hidden;
}

.aside-inner { position: relative; z-index: 1; }

.aside-title {
  font-size: 1rem;
  color: #ffce5c;
  margin-bottom: 0.25rem;
}

.aside-inner .subtitle {
  font-size: 0.8rem;
  color: rgba(240,240,232,0.55);
  margin-bottom: 1rem;
}

.aside-inner nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.aside-link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: rgba(240,240,232,0.8);
  border-left: 3px solid transparent;
  border-radius: 2px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  min-height: 40px;
  align-items: center;
  display: flex;
}

.aside-link:hover {
  border-left-color: #87ff71;
  color: #87ff71;
  background: rgba(135,255,113,0.07);
}

.aside-deco {
  position: absolute;
  bottom: -10px; right: -10px;
  pointer-events: none;
}

.ad-tri {
  display: block;
  width: 0; height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 70px solid rgba(255,206,92,0.12);
  transform: rotate(20deg);
}

.ad-dot-row {
  display: block;
  width: 60px; height: 8px;
  background-image: radial-gradient(circle, rgba(135,255,113,0.4) 2px, transparent 2px);
  background-size: 10px 8px;
  margin-top: 6px;
}

/* CONTENT MAIN */
.content-main { min-width: 0; }

.page-content {
  /* styles for injected content */
}

/* Content sections from page.content */
.page-content article {
  padding: 3rem 0;
  border-bottom: 1px dashed rgba(135,255,113,0.2);
  scroll-margin-top: 80px;
}

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

.page-content h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #ffce5c;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.page-content h2::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #87ff71, transparent);
  margin-top: 6px;
  border-radius: 2px;
}

.page-content h3 {
  font-size: 1.3rem;
  color: #87ff71;
  margin: 1.75rem 0 0.75rem;
}

.page-content p {
  color: rgba(240,240,232,0.88);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.75;
}

.page-content ul, .page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: rgba(240,240,232,0.85);
  line-height: 1.7;
}

.page-content li { margin-bottom: 0.4rem; }

.page-content strong { color: #87ff71; font-weight: 600; }

.page-content a {
  color: #ffce5c;
  border-bottom: 1px solid rgba(255,206,92,0.35);
  transition: border-color 0.15s, color 0.15s;
}

.page-content a:hover {
  color: #87ff71;
  border-bottom-color: #87ff71;
}

.page-content blockquote {
  border-left: 4px solid #87ff71;
  background: rgba(135,255,113,0.06);
  padding: 1rem 1.25rem;
  border-radius: 0 4px 4px 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: rgba(240,240,232,0.8);
}

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

.page-content th {
  background: rgba(135,255,113,0.15);
  color: #87ff71;
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 2px solid #87ff71;
}

.page-content td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(135,255,113,0.1);
  color: rgba(240,240,232,0.85);
}

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

/* ═══════════════════════════════════════════════════════════════
   FOOTER — 抽签结构: footer 内有 nav，直接子层有分区容器
═══════════════════════════════════════════════════════════════ */
.site-footer {
  background: #0e1a0c;
  border-top: 3px solid #87ff71;
}

/* CTA block */
.footer-cta-block {
  background: linear-gradient(135deg, #1f3318 0%, #162614 100%);
  border-bottom: 2px dashed #ffce5c;
  padding: 3.5rem 2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-cta-inner {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.footer-cta-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #ffce5c;
  background: rgba(255,206,92,0.12);
  padding: 0.25rem 0.85rem;
  border-radius: 2px;
  margin-bottom: 1rem;
}

.footer-cta-text {
  font-size: 1.25rem;
  color: rgba(240,240,232,0.9);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-cta-btn {
  display: inline-block;
  background: #87ff71;
  color: #192617;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 2.25rem;
  border-radius: 4px;
  border: 2px solid #87ff71;
  box-shadow: 4px 4px 0 #ffce5c;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.footer-cta-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #ffce5c;
  background: #9eff87;
  color: #192617;
}

.footer-cta-shapes { position: absolute; inset: 0; pointer-events: none; }

.fcs-tri {
  display: block;
  position: absolute;
  width: 0; height: 0;
  border-left: 70px solid transparent;
  border-right: 70px solid transparent;
  border-bottom: 120px solid rgba(135,255,113,0.08);
  right: 5%; top: -10px;
  transform: rotate(10deg);
}

.fcs-circle {
  display: block;
  position: absolute;
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 8px solid rgba(255,206,92,0.12);
  left: 3%; bottom: -20px;
}

/* Footer grid */
.footer-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.footer-col-title {
  font-size: 1rem;
  color: #87ff71;
  margin-bottom: 0.25rem;
}

.footer-col .subtitle {
  font-size: 0.78rem;
  color: rgba(240,240,232,0.45);
  margin-bottom: 0.85rem;
}

.footer-col nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-nav-link {
  color: rgba(240,240,232,0.7);
  font-size: 0.875rem;
  padding: 0.35rem 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.footer-nav-link:hover {
  color: #ffce5c;
  border-bottom-color: rgba(255,206,92,0.3);
}

.footer-brand { display: flex; flex-direction: column; gap: 0.75rem; }

.footer-logo-link { display: inline-flex; align-items: center; }

.footer-brand-desc {
  font-size: 0.875rem;
  color: rgba(240,240,232,0.6);
  line-height: 1.6;
}

.footer-col-text {
  font-size: 0.875rem;
  color: rgba(240,240,232,0.6);
  line-height: 1.6;
}

.footer-keywords {
  font-size: 0.78rem;
  color: rgba(135,255,113,0.5);
  margin-top: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(135,255,113,0.18);
  background: rgba(0,0,0,0.2);
}

.footer-bottom-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(240,240,232,0.45);
}

.footer-bottom-nav { display: flex; gap: 1rem; }

.footer-bottom-nav a {
  font-size: 0.8rem;
  color: rgba(240,240,232,0.5);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.25rem;
}

.footer-bottom-nav a:hover { color: #87ff71; }

/* ═══════════════════════════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .wrap > article > div { grid-template-columns: 1fr; }
  .page-aside { position: static; }
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.25rem;
    gap: 2rem;
  }

  .hero-section { min-height: auto; }
  .hero-media { order: -1; }

  .hero-text { align-items: flex-start; text-align: left; }

  .header-inner { padding: 0 1rem; gap: 0.75rem; }
  .search-input { width: 110px; }

  .main-nav p a { padding: 0.5rem 0.5rem; font-size: 0.8rem; }
  .main-nav p a::before { display: none; }

  .footer-cols { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-cta-block { padding: 2.5rem 1.25rem; }
  .footer-main { padding: 2rem 1rem 1.5rem; }

  .wrap { padding: 2rem 1rem 3rem; }
}

@media (max-width: 480px) {
  .logo-text { font-size: 1.1rem; }
  .search-form { display: none; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════════
   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; }
  .reveal { opacity: 1; transform: none; }
}
