@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

/* ===== 重置与基础 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Public Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f5f5f5;
  color: #1f1f1f;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 链接 ===== */
a {
  color: #1f1f1f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== 容器 ===== */
.site-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 导航 ===== */
.site-header {
  background: #ffffff;
  border-bottom: 2px solid #1f1f1f;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand-logo {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: #1f1f1f;
  text-decoration: none;
  letter-spacing: -0.02em;
  max-width: 200px;
  line-height: 1.2;
}

.brand-logo:hover {
  text-decoration: none;
  opacity: 0.8;
}

/* details/summary 导航结构 */
.nav-details {
  position: relative;
}

.nav-toggle {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  list-style: none;
  padding: 10px 18px;
  background: #1f1f1f;
  color: #ffffff;
  border-radius: 8px;
  user-select: none;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.nav-toggle::-webkit-details-marker {
  display: none;
}

.nav-toggle::marker {
  display: none;
}

.nav-details[open] .nav-toggle {
  background: #1f1f1f;
}

.nav-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #ffffff;
  border: 2px solid #1f1f1f;
  border-radius: 16px;
  padding: 8px;
  min-width: 280px;
  list-style: none;
  z-index: 200;
  box-shadow: 4px 4px 0 #1f1f1f;
}

.nav-menu li {
  list-style: none;
}

.nav-menu li a {
  display: block;
  padding: 10px 14px;
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: #1f1f1f;
  border-radius: 10px;
  transition: background 0.15s ease;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.nav-menu li a:hover {
  background: #f5f5f5;
  text-decoration: none;
}

/* ===== Hero (首页) ===== */
.hero--home {
  background: #1f1f1f;
  color: #ffffff;
  min-height: 45vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 48px 20px;
}

.hero--home::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 30px,
    rgba(255,255,255,0.02) 30px,
    rgba(255,255,255,0.02) 31px
  );
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  background: #ffffff;
  color: #1f1f1f;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #ffffff;
  max-width: 700px;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin-bottom: 28px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  background: #ffffff;
  color: #1f1f1f;
  padding: 12px 24px;
  border-radius: 10px;
  min-height: 44px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  text-decoration: none;
}

/* ===== 首页正文区块 ===== */
.home-content-section {
  padding: 48px 0;
}

.home-article {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 36px;
  border-bottom: 4px solid #1f1f1f;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* ===== Bento Grid 区块 ===== */
.bento-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.bento-header {
  margin-bottom: 24px;
}

.bento-title {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 16px;
}

.bento-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-bottom: 4px solid #1f1f1f;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  text-decoration: none;
  color: #1f1f1f;
  position: relative;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #1f1f1f;
  border-radius: 24px 24px 0 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.bento-card:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
  text-decoration: none;
}

.bento-card:hover::before {
  transform: scaleX(1);
}

.bento-card strong {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: block;
  margin-bottom: 8px;
}

.bento-card .card-desc {
  font-size: 0.8rem;
  color: rgba(31,31,31,0.65);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-card .card-date {
  font-size: 0.75rem;
  color: rgba(31,31,31,0.5);
  margin-top: 8px;
  display: block;
}

.bento-card.bento-wide {
  grid-column: span 2;
}

.bento-card.bento-tall {
  grid-row: span 2;
}

/* ===== 文章页布局 ===== */
.article-main,
.about-main,
.privacy-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-areas: "content aside";
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  gap: 32px;
  width: 100%;
  align-items: start;
}

/* aside 在左侧 */
.article-main {
  grid-template-columns: 300px 1fr;
  grid-template-areas: "aside content";
}

.about-main,
.privacy-main {
  grid-template-columns: 300px 1fr;
  grid-template-areas: "aside content";
}

.article-main > .wrap,
.about-main > .wrap,
.privacy-main > .wrap {
  grid-area: content;
  padding: 0;
  max-width: none;
}

.article-aside,
.about-aside,
.privacy-aside,
.default-aside {
  grid-area: aside;
}

/* ===== section article 内容容器契约 main>div.wrap>article>section ===== */
.article-section,
.about-section,
.privacy-section,
.home-content-section,
.default-section {
  width: 100%;
}

/* ===== 文章 ===== */
.article-body,
.about-body,
.privacy-body,
.default-body {
  background: #ffffff;
  border-radius: 24px;
  padding: 36px 40px;
  border-bottom: 4px solid #1f1f1f;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.breadcrumb {
  font-size: 0.8rem;
  color: rgba(31,31,31,0.55);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb a {
  color: rgba(31,31,31,0.55);
  text-decoration: underline;
}

.breadcrumb a:hover {
  color: #1f1f1f;
}

.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.article-date,
.article-mod {
  font-size: 0.8rem;
  color: rgba(31,31,31,0.55);
  font-family: 'Public Sans', sans-serif;
}

.article-title,
.about-title,
.privacy-title {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #1f1f1f;
}

.article-lead,
.about-lead {
  font-size: 1.05rem;
  color: rgba(31,31,31,0.7);
  line-height: 1.65;
  margin-bottom: 32px;
  border-left: 4px solid #1f1f1f;
  padding-left: 16px;
}

.article-header,
.about-header,
.privacy-header {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(31,31,31,0.1);
}

.article-content,
.about-content,
.privacy-content {
  margin-top: 24px;
}

.about-badge,
.privacy-badge {
  display: inline-block;
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  background: #1f1f1f;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.privacy-date {
  display: block;
  font-size: 0.8rem;
  color: rgba(31,31,31,0.55);
  margin-top: 12px;
}

/* ===== aside 侧边栏 ===== */
.aside-inner {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px;
  border-bottom: 4px solid #1f1f1f;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  position: sticky;
  top: 80px;
}

.aside-title {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  margin-top: 4px;
}

.aside-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.aside-links li a {
  display: block;
  font-size: 0.875rem;
  color: #1f1f1f;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 10px;
  line-height: 1.4;
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
}

.aside-links li a:hover {
  background: #1f1f1f;
  color: #ffffff;
  text-decoration: none;
  border-left-color: transparent;
}

.aside-cta-block {
  background: #1f1f1f;
  color: #ffffff;
  border-radius: 16px;
  padding: 20px;
  margin-top: 8px;
}

.aside-cta-block small.eyebrow {
  color: rgba(255,255,255,0.6);
}

.aside-cta-block h3 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 6px 0 14px;
  color: #ffffff;
}

.aside-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #ffffff;
  color: #1f1f1f;
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 10px 16px;
  border-radius: 10px;
  min-height: 40px;
  text-align: center;
  transition: opacity 0.15s ease;
  text-decoration: none;
}

.aside-cta-btn:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* ===== eyebrow / small ===== */
.eyebrow,
small.eyebrow {
  display: block;
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(31,31,31,0.5);
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ===== prose 正文排版 ===== */
.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: #1f1f1f;
}

.prose h2 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 2em 0 0.75em;
  line-height: 1.25;
}

.prose h3 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 1.6em 0 0.6em;
  line-height: 1.3;
}

.prose p {
  margin-bottom: 1.25em;
}

.prose ul, .prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose strong {
  font-weight: 700;
}

.prose a {
  color: #1f1f1f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  opacity: 0.7;
}

.prose blockquote {
  border-left: 4px solid #1f1f1f;
  margin: 1.5em 0;
  padding: 12px 20px;
  background: #f5f5f5;
  border-radius: 0 10px 10px 0;
  font-style: italic;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 0.9rem;
}

.prose th, .prose td {
  padding: 10px 14px;
  border: 1px solid rgba(31,31,31,0.15);
  text-align: left;
}

.prose th {
  background: #f5f5f5;
  font-weight: 700;
}

.prose code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
}

.prose pre {
  background: #1f1f1f;
  color: #f5f5f5;
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 1.5em;
}

.prose img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1em 0;
}

/* ===== 子页卡片列表 (a块结构) ===== */
.child-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.child-cards a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  border-bottom: 4px solid #1f1f1f;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
  text-decoration: none;
  color: #1f1f1f;
}

.child-cards a:hover {
  transform: scale(1.02);
  text-decoration: none;
}

.child-cards a strong {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.35;
  display: block;
}

.child-cards a span {
  font-size: 0.8rem;
  color: rgba(31,31,31,0.6);
  line-height: 1.5;
}

/* ===== 页脚 ===== */
.site-footer {
  background: #ffffff;
  border-top: 2px solid #1f1f1f;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: #1f1f1f;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.footer-brand:hover {
  text-decoration: none;
  opacity: 0.7;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-nav ul li a {
  font-size: 0.8rem;
  color: rgba(31,31,31,0.65);
  padding: 8px 10px;
  border-radius: 6px;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.footer-nav ul li a:hover {
  color: #1f1f1f;
  text-decoration: none;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(31,31,31,0.45);
  white-space: nowrap;
}

/* ===== default 布局 ===== */
.default-aside {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 20px;
  width: 100%;
}

.default-body {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== 动效：Stagger + Scroll Reveal ===== */
@media (prefers-reduced-motion: no-preference) {
  .bento-card {
    opacity: 0;
    transform: translateY(24px);
    animation: revealUp 0.5s ease forwards;
  }

  .bento-card:nth-child(1) { animation-delay: 0.05s; }
  .bento-card:nth-child(2) { animation-delay: 0.1s; }
  .bento-card:nth-child(3) { animation-delay: 0.15s; }
  .bento-card:nth-child(4) { animation-delay: 0.2s; }
  .bento-card:nth-child(5) { animation-delay: 0.25s; }
  .bento-card:nth-child(6) { animation-delay: 0.3s; }
  .bento-card:nth-child(7) { animation-delay: 0.35s; }
  .bento-card:nth-child(8) { animation-delay: 0.4s; }

  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

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

  @keyframes revealUp {
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .bento-card,
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .bento-card.bento-wide {
    grid-column: span 2;
  }

  .article-main,
  .about-main,
  .privacy-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "aside";
  }

  .aside-inner {
    position: static;
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .bento-card.bento-wide,
  .bento-card.bento-tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .header-inner {
    height: 56px;
  }

  .brand-logo {
    font-size: 0.85rem;
    max-width: 160px;
  }

  .article-body,
  .about-body,
  .privacy-body {
    padding: 24px 20px;
  }

  .home-article {
    padding: 24px 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-copy {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 160px;
  }

  .hero--home {
    min-height: 45vh;
    padding: 36px 16px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .nav-menu {
    min-width: 240px;
    right: -8px;
  }

  .article-main,
  .about-main,
  .privacy-main {
    padding: 24px 16px 48px;
  }

  .bento-section {
    padding: 0 16px 48px;
  }

  .wrap {
    padding: 0 16px;
  }
}
