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

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

:root {
  --c-bg: #000000;
  --c-bg2: #121212;
  --c-bg3: #1a1a2e;
  --c-surface: #0d0d0d;
  --c-border: #2a2a3e;
  --c-border-bright: #3d3d6b;
  --c-text: #e0e0e0;
  --c-text-sub: #a0a0b8;
  --c-text-dim: #666680;
  --c-accent: #4f6ef7;
  --c-accent-glow: rgba(79,110,247,0.25);
  --c-neon-blue: #00bfff;
  --c-neon-gold: #ffd700;
  --c-neon-purple: #b06af3;
  --c-neon-green: #39ff14;
  --c-cta: #4f6ef7;
  --c-cta-hover: #6b84ff;
  --radius-card: 18px;
  --radius-sm: 8px;
  --font-head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --header-h: 110px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  font-size: 17px;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--c-cta-hover); }
a:focus-visible {
  outline: 2px solid var(--c-neon-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

ul { list-style: none; }

/* ===== 站点包裹 ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== 页头：两行结构 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,0.92);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem 0.4rem;
  border-bottom: 1px solid var(--c-border);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--c-text);
  text-decoration: none;
}
.brand-link:hover { color: var(--c-text); }

.brand-logo { height: 32px; width: auto; }
.brand-mark { height: 28px; width: auto; }
.brand-text {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 10px var(--c-accent-glow);
}

/* CTA 按钮（全局） */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  background: var(--c-cta);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--c-accent);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform 0.15s;
  text-shadow: none;
  min-height: 44px;
  white-space: nowrap;
}
.cta-btn:hover {
  background: var(--c-cta-hover);
  box-shadow: 0 0 16px var(--c-accent-glow);
  transform: translateY(-1px);
  color: #fff;
}
.cta-btn:active { transform: translateY(0); }

.header-cta {
  font-size: 0.88rem;
  padding: 0.55rem 1.1rem;
  min-height: 44px;
}

/* 导航菜单行 */
.header-nav-row {
  padding: 0 1.5rem;
}

.nav-links-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  margin: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--c-text-sub);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  min-height: 44px;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  border-bottom-color: var(--c-accent);
}

/* scroll-margin for sticky header */
div[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

/* ===== MAIN ===== */
.site-main {
  flex: 1;
}

.home-article {
  width: 100%;
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  overflow: hidden;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  padding: 3rem 1.5rem 2.5rem;
  gap: 2rem;
}

/* 超大背景文字 */
.hero-bg-text {
  position: absolute;
  top: -0.1em;
  left: -0.05em;
  font-family: var(--font-head);
  font-size: clamp(8rem, 22vw, 18rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(79,110,247,0.12);
  text-stroke: 1px rgba(79,110,247,0.12);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -0.04em;
}

.hero-seq-num {
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--c-border-bright);
  text-stroke: 1px var(--c-border-bright);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* 错位图片拼贴 */
.hero-collage {
  position: relative;
  z-index: 1;
  grid-column: 1;
  height: clamp(260px, 50vh, 460px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-collage__frame {
  position: absolute;
  border-radius: var(--radius-card);
  border: 1.5px solid var(--c-border-bright);
  overflow: hidden;
  background: var(--c-bg2);
}

.hero-collage__frame--a {
  width: 68%;
  aspect-ratio: 3/4;
  top: 0;
  left: 0;
  transform: rotate(-3deg) translateY(10px);
  z-index: 2;
  box-shadow: 0 0 30px rgba(79,110,247,0.15);
}

.hero-collage__frame--b {
  width: 58%;
  aspect-ratio: 3/4;
  bottom: 0;
  right: 0;
  transform: rotate(4deg) translateY(-8px);
  z-index: 3;
  border-color: var(--c-neon-purple);
  box-shadow: 0 0 24px rgba(176,106,243,0.18);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--c-bg2) 0%, var(--c-bg3) 100%);
}

/* Hero 文案：右对齐 */
.hero-copy {
  position: relative;
  z-index: 2;
  grid-column: 2;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--c-neon-blue);
  text-shadow: 0 0 10px rgba(0,191,255,0.4);
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 0 10px var(--c-accent-glow);
  letter-spacing: 0.01em;
}

.hero-lead {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--c-text-sub);
  max-width: 34ch;
  line-height: 1.65;
}

.hero-cta { margin-top: 0.5rem; }

/* ===== 内容区 + 侧边栏 ===== */
.content-sections {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-areas: "body aside";
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  align-items: start;
}

.content-body {
  grid-area: body;
  min-width: 0;
}

.content-aside {
  grid-area: aside;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.25rem;
  background: var(--c-bg2);
}

.aside-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
}

p.subtitle {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  line-height: 1.5;
  margin-bottom: 1rem;
}

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

.aside-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--c-text-sub);
  transition: background var(--transition), color var(--transition);
  min-height: 40px;
}
.aside-link:hover {
  background: rgba(79,110,247,0.12);
  color: #fff;
}

.aside-num {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-accent);
  min-width: 22px;
}

/* ===== page.content 内部 div 样式 ===== */
.content-body div {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--c-border);
  position: relative;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.content-body div.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.content-body div:last-child {
  border-bottom: none;
}

.content-body div::before {
  content: attr(data-seq);
  position: absolute;
  top: 1.5rem;
  right: 0;
  font-family: var(--font-head);
  font-size: 5rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(79,110,247,0.1);
  text-stroke: 1px rgba(79,110,247,0.1);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.content-body h2 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

.content-body h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--c-neon-blue);
  margin: 1.5rem 0 0.5rem;
  text-shadow: 0 0 10px rgba(0,191,255,0.2);
}

.content-body p {
  margin-bottom: 1rem;
  color: var(--c-text);
  line-height: 1.75;
  max-width: 70ch;
}

.content-body ul, .content-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}
.content-body ul { list-style: disc; }
.content-body ol { list-style: decimal; }
.content-body li {
  margin-bottom: 0.45rem;
  line-height: 1.65;
  color: var(--c-text);
}

.content-body a {
  color: var(--c-neon-blue);
  text-decoration: underline;
  text-decoration-color: rgba(0,191,255,0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition), color var(--transition);
}
.content-body a:hover {
  color: #fff;
  text-decoration-color: var(--c-neon-blue);
}

.content-body strong, .content-body b {
  color: #fff;
  font-weight: 600;
}

.content-body blockquote {
  border-left: 3px solid var(--c-accent);
  padding: 0.75rem 1.25rem;
  background: var(--c-bg2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.25rem 0;
  color: var(--c-text-sub);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}
.content-body th, .content-body td {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--c-border);
  text-align: left;
}
.content-body th {
  background: var(--c-bg2);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
}
.content-body td { color: var(--c-text-sub); }
.content-body tr:hover td { background: rgba(79,110,247,0.06); }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-bg2);
  border-top: 1px solid var(--c-border);
}

/* 大 CTA 块 */
.footer-cta-block {
  text-align: center;
  padding: 3.5rem 1.5rem 2.5rem;
  border-bottom: 1px solid var(--c-border);
  position: relative;
  overflow: hidden;
}
.footer-cta-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(79,110,247,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.footer-cta-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 10px var(--c-accent-glow);
}

.footer-cta-sub {
  color: var(--c-text-sub);
  max-width: 48ch;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
}

.footer-cta-btn {
  font-size: 1rem;
  padding: 0.75rem 2rem;
  min-height: 48px;
}

/* 三栏 */
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.footer-brand-icon { font-size: 1.4rem; }
.footer-brand-name {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--c-text-dim);
  line-height: 1.6;
  max-width: 30ch;
}

.footer-col-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text-sub);
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-nav-link {
  font-size: 0.875rem;
  color: var(--c-text-dim);
  padding: 0.2rem 0;
  display: inline-block;
  transition: color var(--transition);
  min-height: 28px;
  line-height: 28px;
}
.footer-nav-link:hover { color: var(--c-neon-blue); }

/* 底栏横排 */
.footer-bottom {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-bottom-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
}
.footer-bottom-link {
  font-size: 0.8rem;
  color: var(--c-text-dim);
  padding: 0.4rem 0.6rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition);
}
.footer-bottom-link:hover { color: var(--c-accent); }

.footer-copyright {
  font-size: 0.78rem;
  color: var(--c-text-dim);
  text-align: center;
  line-height: 1.6;
}

/* ===== 动效：Stagger List + Scroll Reveal ===== */
@media (prefers-reduced-motion: no-preference) {
  .nav-link {
    opacity: 0;
    animation: fadeSlideIn 0.4s ease forwards;
    animation-delay: calc(var(--ni, 0) * 0.06s + 0.1s);
  }

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

  .hero-copy { animation: heroReveal 0.7s ease 0.25s both; }
  .hero-collage { animation: heroReveal 0.7s ease 0.1s both; }
  @keyframes heroReveal {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .footer-cta-block { animation: heroReveal 0.5s ease both; }
}

@media (prefers-reduced-motion: reduce) {
  .content-body div {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .nav-link {
    opacity: 1 !important;
    animation: none !important;
  }
  .hero-copy, .hero-collage, .footer-cta-block {
    animation: none !important;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .content-sections {
    grid-template-columns: 1fr;
    grid-template-areas:
      "aside"
      "body";
    padding: 2rem 1rem 3rem;
  }
  .content-aside {
    position: static;
    margin-bottom: 2rem;
  }
  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
  .footer-col--brand {
    grid-column: 1 / -1;
  }
  .hero-section {
    grid-template-columns: 1fr;
    grid-template-areas:
      "collage"
      "copy";
    min-height: auto;
    padding: 2rem 1rem 2rem;
  }
  .hero-collage { grid-area: collage; height: 320px; width: 100%; }
  .hero-copy {
    grid-area: copy;
    text-align: left;
    align-items: flex-start;
  }
  .hero-bg-text { font-size: clamp(5rem, 20vw, 8rem); }
}

@media (max-width: 600px) {
  :root { --header-h: 120px; }
  .header-brand-row { padding: 0.5rem 1rem; }
  .header-nav-row { padding: 0 0.75rem; }
  .nav-links-line {
    gap: 0;
    flex-wrap: wrap;
  }
  .nav-link {
    padding: 0.75rem 0.6rem;
    font-size: 0.82rem;
    min-height: 44px;
  }
  .brand-text { font-size: 1.25rem; }

  .hero-section { padding: 1.5rem 1rem 1.5rem; gap: 1.5rem; }
  .hero-h1 { font-size: 1.9rem; }
  .hero-collage { height: 260px; }

  .content-sections { padding: 1.5rem 1rem 2.5rem; }

  .footer-cols { grid-template-columns: 1fr; }
  .footer-cta-block { padding: 2.5rem 1rem 2rem; }
  .footer-bottom { padding: 1rem; }
  .footer-bottom-nav { gap: 0.1rem 0.25rem; }

  .aside-nav-list { flex-direction: row; flex-wrap: wrap; gap: 0.3rem; }
  .aside-link {
    padding: 0.5rem 0.6rem;
    font-size: 0.82rem;
    min-height: 40px;
  }
}

/* ===== 卡片风格（内容中 .card 类） ===== */
.content-body .card,
.card {
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.4rem;
  background: var(--c-surface);
  margin-bottom: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.content-body .card:hover,
.card:hover {
  border-color: var(--c-accent);
  box-shadow: 0 0 16px var(--c-accent-glow);
}

/* ===== 工具类 ===== */
.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;
}

button[aria-expanded]{min-width:44px;min-height:44px}
