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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  font-size: 16px;
  background: #192617;
}

body {
  font-family: 'Epilogue', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #f0ffe8;
  background: #192617;
  overflow-x: hidden;
}

a { color: #87ff71; text-decoration: none; }
a:hover { color: #ffce5c; }
img { display: block; max-width: 100%; height: auto; }
ul, menu { list-style: none; }

/* =============================================
   MEMPHIS BACKGROUND PATTERN
   ============================================= */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 18px,
      rgba(135,255,113,0.04) 18px,
      rgba(135,255,113,0.04) 19px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 18px,
      rgba(255,206,92,0.03) 18px,
      rgba(255,206,92,0.03) 19px
    );
}

/* =============================================
   SITE SHELL (sidebar + page body)
   ============================================= */
.site-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* =============================================
   SIDENAV (details > summary + menu > li > a)
   ============================================= */
.sidenav {
  width: 220px;
  min-width: 220px;
  background: #0e1a0c;
  border-right: 3px solid #87ff71;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.sidenav summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 18px 20px;
  cursor: pointer;
  border-bottom: 2px dashed #87ff71;
  list-style: none;
  user-select: none;
  gap: 4px;
}

.sidenav summary::-webkit-details-marker { display: none; }

.brand-mark {
  font-family: 'Anton', sans-serif;
  font-size: 2.4rem;
  line-height: 1;
  color: #87ff71;
  letter-spacing: 0.04em;
  background: #87ff71;
  color: #192617;
  padding: 2px 10px;
  display: inline-block;
  transform: rotate(-1deg);
}

.brand-name {
  font-family: 'Epilogue', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: #ffce5c;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-left: 2px;
  margin-top: 6px;
}

.sidenav menu {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  font-family: 'Epilogue', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: #f0ffe8;
  letter-spacing: 0.04em;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  min-height: 44px;
}

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

.nav-icon {
  font-size: 1rem;
  color: #ffce5c;
  width: 18px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.nav-link:hover .nav-icon {
  transform: rotate(20deg) scale(1.2);
}

/* =============================================
   PAGE BODY
   ============================================= */
.page-body {
  margin-left: 220px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

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

.hero-media img,
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media--empty {
  background:
    repeating-linear-gradient(
      135deg,
      #1f3319 0px,
      #1f3319 20px,
      #192617 20px,
      #192617 40px
    );
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    160deg,
    rgba(25,38,23,0.85) 0%,
    rgba(25,38,23,0.6) 50%,
    rgba(25,38,23,0.92) 100%
  );
}

/* Memphis geometric decorations */
.hero-geo {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.hero-geo--tri1 {
  top: 8%;
  right: 6%;
  width: 0;
  height: 0;
  border-left: 70px solid transparent;
  border-right: 70px solid transparent;
  border-bottom: 120px solid #87ff71;
  opacity: 0.55;
  transform: rotate(15deg);
  mix-blend-mode: screen;
}

.hero-geo--tri2 {
  top: 55%;
  right: 18%;
  width: 0;
  height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 70px solid #ffce5c;
  opacity: 0.5;
  transform: rotate(-22deg);
  mix-blend-mode: screen;
}

.hero-geo--sq1 {
  top: 20%;
  right: 22%;
  width: 60px;
  height: 60px;
  border: 4px solid #87ff71;
  transform: rotate(30deg);
  opacity: 0.5;
  mix-blend-mode: screen;
}

.hero-geo--sq2 {
  bottom: 30%;
  right: 8%;
  width: 90px;
  height: 90px;
  background: #ffce5c;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  opacity: 0.3;
  mix-blend-mode: screen;
}

.hero-zigzag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: 32px;
  background:
    repeating-linear-gradient(
      90deg,
      #87ff71 0px,
      #87ff71 0px
    );
  clip-path: polygon(
    0% 100%, 2% 0%, 4% 100%, 6% 0%, 8% 100%, 10% 0%, 12% 100%, 14% 0%,
    16% 100%, 18% 0%, 20% 100%, 22% 0%, 24% 100%, 26% 0%, 28% 100%, 30% 0%,
    32% 100%, 34% 0%, 36% 100%, 38% 0%, 40% 100%, 42% 0%, 44% 100%, 46% 0%,
    48% 100%, 50% 0%, 52% 100%, 54% 0%, 56% 100%, 58% 0%, 60% 100%, 62% 0%,
    64% 100%, 66% 0%, 68% 100%, 70% 0%, 72% 100%, 74% 0%, 76% 100%, 78% 0%,
    80% 100%, 82% 0%, 84% 100%, 86% 0%, 88% 100%, 90% 0%, 92% 100%, 94% 0%,
    96% 100%, 98% 0%, 100% 100%
  );
  opacity: 0.9;
}

.hero-inner {
  position: relative;
  z-index: 4;
  padding: 80px 56px 80px 48px;
  max-width: 700px;
  text-align: left;
}

.hero-badge {
  display: inline-block;
  background: #ffce5c;
  color: #192617;
  font-family: 'Epilogue', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 14px;
  margin-bottom: 20px;
  border: 2px solid #192617;
  transform: rotate(-1.5deg);
  display: inline-block;
}

.hero-h1 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
  color: #87ff71;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  text-shadow: 4px 4px 0 #0e1a0c;
}

.hero-sub {
  font-size: 1.1rem;
  line-height: 1.65;
  color: #d8f5cc;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-cta {
  display: inline-block;
  background: #87ff71;
  color: #192617;
  font-family: 'Anton', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  padding: 14px 36px;
  border: 3px solid #192617;
  box-shadow: 5px 5px 0 #ffce5c;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
  min-height: 48px;
}

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

/* =============================================
   CONTENT WITH ASIDE
   ============================================= */
.content-with-aside {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  flex: 1;
}

/* aside 在内容左侧 */
.side-aside {
  width: 200px;
  min-width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: 100px;
  border-right: 2px dashed rgba(135,255,113,0.3);
  background: rgba(14,26,12,0.6);
  overflow: hidden;
}

.aside-inner {
  padding: 28px 16px;
  position: relative;
  overflow: hidden;
}

.aside-title {
  font-family: 'Anton', sans-serif;
  font-size: 1rem;
  color: #ffce5c;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  border-bottom: 2px solid #87ff71;
  padding-bottom: 8px;
}

.aside-title span {
  display: block;
}

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

.aside-link {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c8f0be;
  padding: 8px 10px;
  border: 1px solid transparent;
  letter-spacing: 0.03em;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

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

.aside-deco {
  position: absolute;
  pointer-events: none;
}

.aside-deco--dot {
  bottom: 20px;
  right: 10px;
  width: 40px;
  height: 40px;
  background-image: radial-gradient(circle, #87ff71 1.5px, transparent 1.5px);
  background-size: 8px 8px;
  opacity: 0.4;
}

.aside-deco--stripe {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    #ffce5c 0px, #ffce5c 10px,
    transparent 10px, transparent 20px
  );
  opacity: 0.5;
}

/* =============================================
   MAIN AREA (main > div.wrap > section > article)
   ============================================= */
.main-area {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.wrap {
  max-width: 900px;
  padding: 48px 40px;
}

.content-section {
  /* direct child of .wrap */
}

.content-article {
  /* direct child of content-section */
  font-size: 1.05rem;
  line-height: 1.8;
  color: #e8f5e0;
}

/* =============================================
   PAGE CONTENT (page.content injected HTML)
   ============================================= */
.content-article section[id] {
  padding-top: 32px;
  padding-bottom: 40px;
  border-bottom: 2px solid rgba(135,255,113,0.15);
  scroll-margin-top: 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.content-article section[id].section-visible {
  opacity: 1;
  transform: translateY(0);
}

/* sections visible immediately if no JS / reduced motion */
@media (prefers-reduced-motion: reduce) {
  .content-article section[id] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.content-article h2 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: #87ff71;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  margin-top: 36px;
  text-shadow: 2px 2px 0 #0e1a0c;
  border-left: 5px solid #ffce5c;
  padding-left: 14px;
}

.content-article h3 {
  font-family: 'Anton', sans-serif;
  font-size: 1.3rem;
  color: #ffce5c;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  margin-top: 28px;
}

.content-article h2 > span,
.content-article h3 > span {
  display: inline;
}

.content-article p {
  margin-bottom: 1.2em;
}

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

.content-article li {
  margin-bottom: 0.5em;
}

.content-article a {
  color: #87ff71;
  border-bottom: 1px dotted #87ff71;
  transition: color 0.15s, border-color 0.15s;
}

.content-article a:hover {
  color: #ffce5c;
  border-bottom-color: #ffce5c;
}

.content-article strong {
  color: #ffce5c;
  font-weight: 700;
}

.content-article blockquote {
  border-left: 4px solid #87ff71;
  padding: 12px 20px;
  background: rgba(135,255,113,0.07);
  margin: 1.5em 0;
  font-style: italic;
  color: #c8f0be;
}

.content-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95rem;
}

.content-article th {
  background: #87ff71;
  color: #192617;
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  font-family: 'Epilogue', sans-serif;
}

.content-article td {
  border: 1px solid rgba(135,255,113,0.2);
  padding: 8px 14px;
  color: #d8f5cc;
}

.content-article tr:nth-child(even) td {
  background: rgba(135,255,113,0.04);
}

/* =============================================
   FOOTER (极简：仅 p + small)
   ============================================= */
.site-footer {
  background: #0e1a0c;
  border-top: 3px solid #87ff71;
  padding: 24px 40px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #ffce5c 0px, #ffce5c 20px,
    transparent 20px, transparent 40px
  );
}

.footer-brand {
  font-family: 'Epilogue', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #87ff71;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.footer-copy {
  display: block;
  font-size: 0.82rem;
  color: rgba(200,240,190,0.6);
  letter-spacing: 0.03em;
}

/* =============================================
   STAGGER ANIMATION
   ============================================= */
.stagger-in {
  animation: fadeSlideIn 0.35s ease both;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .stagger-in { animation: none !important; }
  .hero-cta { transition: none !important; }
  .nav-link { transition: none !important; }
  .aside-link { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* =============================================
   SCROLL MARGIN FOR SECTIONS
   ============================================= */
section[id] {
  scroll-margin-top: 24px;
}

/* =============================================
   RESPONSIVE — TABLET
   ============================================= */
@media (max-width: 1100px) {
  .sidenav { width: 180px; min-width: 180px; }
  .page-body { margin-left: 180px; }
  .side-aside { width: 160px; min-width: 160px; }
  .wrap { padding: 36px 28px; }
}

/* =============================================
   RESPONSIVE — MOBILE
   ============================================= */
@media (max-width: 899px) {
  html { scroll-padding-top: 56px; }

  .sidenav {
    width: 100%;
    min-width: 0;
    height: auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    flex-direction: row;
    overflow: visible;
    z-index: 300;
    border-right: none;
    border-bottom: 3px solid #87ff71;
  }

  .sidenav[open] {
    height: auto;
    max-height: 100vh;
    overflow-y: auto;
    flex-direction: column;
  }

  .sidenav summary {
    flex-direction: row;
    align-items: center;
    padding: 0 16px;
    height: 52px;
    border-bottom: none;
    gap: 12px;
    min-height: 52px;
  }

  .sidenav[open] summary {
    border-bottom: 2px dashed #87ff71;
  }

  .brand-mark { font-size: 1.6rem; padding: 1px 7px; }
  .brand-name { margin-top: 0; font-size: 0.72rem; }

  .sidenav menu {
    padding: 8px 0 16px;
    gap: 0;
  }

  .nav-link {
    padding: 13px 20px;
    font-size: 1rem;
    min-height: 48px;
  }

  .page-body { margin-left: 0; margin-top: 52px; }

  .hero { min-height: 100svh; }

  .hero-inner {
    padding: 48px 24px 64px;
    max-width: 100%;
  }

  .hero-h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-sub { font-size: 1rem; }

  .content-with-aside {
    flex-direction: column;
  }

  .side-aside {
    width: 100%;
    min-width: 0;
    position: static;
    border-right: none;
    border-bottom: 2px dashed rgba(135,255,113,0.3);
  }

  .aside-inner { padding: 20px 20px 16px; }

  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .aside-link {
    font-size: 0.8rem;
    padding: 8px 12px;
    border: 1px solid rgba(135,255,113,0.3);
    min-height: 40px;
  }

  .wrap { padding: 28px 18px; max-width: 100%; }

  .content-article h2 { font-size: 1.4rem; }
  .content-article { font-size: 1rem; }

  .site-footer { padding: 20px 18px; }

  section[id] { scroll-margin-top: 60px; }
}

@media (max-width: 480px) {
  .hero-geo--tri1 { border-left-width: 40px; border-right-width: 40px; border-bottom-width: 70px; }
  .hero-geo--sq1 { width: 40px; height: 40px; }
  .hero-cta { font-size: 1rem; padding: 12px 24px; }
}
