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

/* ============================================================
   CSS 自定义属性
   ============================================================ */
:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --black: #000000;
  --white: #ffffff;
  --bg: #f5f5f0;
  --bg-alt: #fffef5;
  --border: 3px solid #000;
  --border-thick: 4px solid #000;
  --shadow: 5px 5px 0 #000;
  --shadow-sm: 3px 3px 0 #000;
  --shadow-blue: 5px 5px 0 #3bb1ff;
  --shadow-red: 5px 5px 0 #ff5252;
  --radius-card: 28px;
  --radius-btn: 4px;
  --nav-width: 260px;
  --aside-width: 180px;
  --font-head: 'Anton', Impact, 'Arial Black', sans-serif;
  --font-body: 'Epilogue', 'Helvetica Neue', Arial, sans-serif;
  --scroll-top: 0px;
}

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

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

body.nb-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  background-color: var(--bg);
  color: var(--black);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

/* ============================================================
   滚动偏移（固定导航补偿）
   ============================================================ */
section[id] {
  scroll-margin-top: 80px;
}

/* ============================================================
   布局骨架
   ============================================================ */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- 顶部导航 ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--white);
  border-bottom: var(--border-thick);
  height: 64px;
  padding: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-width: 64px;
  height: 64px;
  border-right: var(--border);
  background: var(--blue);
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand-logo-text {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--white);
  line-height: 1;
}

/* ---- 导航 nav > p > a ---- */
.site-nav {
  flex: 1;
  overflow-x: auto;
  padding: 0 12px;
}

.site-nav p {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
}

.site-nav p a {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--black);
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.site-nav p a:hover,
.site-nav p a:focus-visible {
  background: var(--blue);
  border-color: var(--black);
  box-shadow: var(--shadow-sm);
  color: var(--white);
  outline: none;
}

/* ---- 头部 CTA ---- */
.header-cta {
  padding: 0 16px;
  flex-shrink: 0;
  border-left: var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  border: var(--border);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  white-space: nowrap;
}

.btn-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 #000;
}

.btn-cta:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 #000;
}

/* ============================================================
   主体区：aside + main
   ============================================================ */
.layout-body {
  display: flex;
  flex-direction: row;
  margin-top: 64px;
  flex: 1;
}

/* ---- aside（内容左侧）---- */
.site-aside {
  width: var(--aside-width);
  min-width: var(--aside-width);
  flex-shrink: 0;
  border-right: var(--border);
  background: var(--bg-alt);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 0;
  align-self: flex-start;
}

.aside-inner {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aside-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--black);
  border-bottom: 2px solid var(--black);
  padding-bottom: 6px;
  margin-bottom: 4px;
}

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

.aside-nav-list li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--black);
  border: 2px solid transparent;
  border-radius: 6px;
  transition: background 0.12s, border-color 0.12s;
  line-height: 1.3;
}

.aside-nav-list li a:hover {
  background: var(--blue);
  border-color: var(--black);
  color: var(--white);
}

.aside-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 2px solid var(--black);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--white);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  border: 1px solid var(--black);
  flex-shrink: 0;
}

.badge-dot.dot-red {
  background: var(--red);
}

/* ---- main ---- */
.site-main {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.main-article {
  width: 100%;
}

/* ============================================================
   Hero 区块
   ============================================================ */
.hero-section {
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
  padding: 48px 48px 40px;
  border-bottom: var(--border-thick);
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 280px;
  height: 280px;
  background: var(--blue);
  border: var(--border-thick);
  transform: rotate(45deg);
  z-index: 0;
  opacity: 0.12;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  border: 2px solid var(--red);
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 1.05;
  color: var(--black);
  letter-spacing: 0.01em;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.subtitle.hero-desc {
  font-size: 1.05rem;
  font-weight: 500;
  color: #333;
  max-width: 560px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

/* ============================================================
   按钮
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  border: var(--border);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn-primary:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 #000;
}

.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  border: var(--border);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}

.btn-outline:hover {
  background: var(--red);
  color: var(--white);
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 #000;
}

/* ============================================================
   正文内容区
   ============================================================ */
.content-section {
  padding: 0;
}

/* 正文内 section 样式 */
.content-section section,
.main-article > section:not(.hero-section):not(.content-section) {
  padding: 56px 48px;
  border-bottom: var(--border);
}

.content-section section:nth-child(even) {
  background: var(--bg-alt);
}

.content-section section:nth-child(odd) {
  background: var(--white);
}

/* ---- 正文排版 ---- */
.content-section h2,
.main-article h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
  position: relative;
  display: inline-block;
}

.content-section h2::after,
.main-article h2::after {
  content: '';
  display: block;
  width: 60%;
  height: 4px;
  background: var(--blue);
  margin-top: 6px;
}

.content-section h3,
.main-article h3 {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.2;
  color: var(--black);
  margin: 28px 0 10px;
}

.content-section p,
.main-article p {
  font-size: 1rem;
  line-height: 1.75;
  color: #1a1a1a;
  margin-bottom: 16px;
  max-width: 760px;
}

.content-section p.subtitle,
.content-section p.subhead,
.content-section p.desc,
.content-section p.lead,
.main-article p.subtitle,
.main-article p.subhead,
.main-article p.desc,
.main-article p.lead {
  font-size: 1.08rem;
  font-weight: 500;
  color: #444;
  border-left: 4px solid var(--blue);
  padding-left: 14px;
  margin-bottom: 24px;
}

.content-section ul,
.main-article ul {
  margin: 16px 0 20px 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-section ul li,
.main-article ul li {
  padding: 10px 14px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: var(--white);
  font-size: 0.96rem;
  position: relative;
  padding-left: 20px;
}

.content-section ul li::before,
.main-article ul li::before {
  content: '▶';
  color: var(--red);
  position: absolute;
  left: 6px;
  font-size: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
}

.content-section ol,
.main-article ol {
  counter-reset: nb-counter;
  margin: 16px 0 20px 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-section ol li,
.main-article ol li {
  counter-increment: nb-counter;
  padding: 12px 14px 12px 52px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: var(--white);
  font-size: 0.96rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.content-section ol li::before,
.main-article ol li::before {
  content: counter(nb-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1rem;
  border-right: 2px solid var(--black);
  border-radius: 6px 0 0 6px;
}

.content-section strong,
.main-article strong {
  font-weight: 700;
  color: var(--black);
}

.content-section a,
.main-article a {
  color: var(--black);
  font-weight: 600;
  border-bottom: 2px solid var(--blue);
  transition: color 0.12s, border-color 0.12s;
}

.content-section a:hover,
.main-article a:hover {
  color: var(--red);
  border-color: var(--red);
}

/* ---- 卡片（正文内若有）---- */
.content-section .card,
.main-article .card {
  border: var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
  padding: 24px 28px;
  box-shadow: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.content-section .card:hover,
.main-article .card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow);
}

/* 正文内 section 标题装饰（h2 + p.subtitle） */
.content-section section > h2 + p,
.content-section section > h2 + p.subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 24px;
  max-width: 700px;
  line-height: 1.7;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  border-top: var(--border-thick);
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.site-footer > section {
  border-right: 2px solid #333;
  padding: 40px 36px;
  flex: 1;
  min-width: 220px;
}

.site-footer > section:last-of-type {
  border-right: none;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 2.2rem;
  color: var(--blue);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  line-height: 1;
}

.footer-brand-desc {
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.65;
  max-width: 260px;
}

.footer-section-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 8px;
}

.subtitle.footer-contact-desc,
.subtitle.footer-info-desc {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 16px;
  border-left: 3px solid var(--red);
  padding-left: 10px;
  line-height: 1.5;
}

.footer-contact-item {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 8px;
  line-height: 1.5;
}

.footer-contact-item a {
  color: var(--blue);
  border-bottom: 1px solid #3bb1ff66;
  transition: color 0.12s;
}

.footer-contact-item a:hover {
  color: var(--white);
}

.footer-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.footer-tag-list li {
  background: #1a1a1a;
  border: 2px solid #444;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
  color: #ddd;
  font-weight: 600;
}

.footer-bar {
  width: 100%;
  border-top: 2px solid #222;
  padding: 16px 36px;
  font-size: 0.82rem;
  color: #666;
  line-height: 1.5;
}

/* ============================================================
   Scroll Reveal 动画
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s cubic-bezier(.4,0,.2,1), transform 0.55s cubic-bezier(.4,0,.2,1);
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-left {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
  }

  /* Hover micro-interactions */
  .aside-nav-list li a,
  .btn-primary,
  .btn-outline,
  .btn-cta,
  .content-section .card,
  .main-article .card {
    will-change: transform;
  }
}

/* ============================================================
   响应式
   ============================================================ */

/* 平板 */
@media (max-width: 1024px) {
  :root {
    --aside-width: 160px;
  }

  .site-nav p a {
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .hero-section {
    padding: 40px 32px 36px;
  }

  .content-section section {
    padding: 48px 32px;
  }
}

/* 移动端 */
@media (max-width: 768px) {
  :root {
    --aside-width: 100%;
  }

  html {
    scroll-behavior: smooth;
  }

  .site-header {
    flex-wrap: wrap;
    height: auto;
    position: fixed;
    top: 0;
  }

  .header-brand {
    width: 56px;
    min-width: 56px;
    height: 56px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    border-top: 2px solid var(--black);
    padding: 0 8px;
    background: var(--white);
  }

  .site-nav p {
    overflow-x: auto;
    padding: 8px 0;
    gap: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav p a {
    height: 40px;
    padding: 0 12px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .header-cta {
    height: 56px;
    padding: 0 12px;
  }

  .btn-cta {
    height: 40px;
    padding: 0 16px;
    font-size: 0.85rem;
  }

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

  .layout-body {
    flex-direction: column;
    margin-top: 112px;
  }

  .site-aside {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: var(--border);
  }

  .aside-inner {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 16px;
    gap: 8px;
    align-items: center;
  }

  .aside-label {
    width: 100%;
    margin-bottom: 0;
  }

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

  .aside-nav-list li a {
    min-height: 40px;
    padding: 4px 10px;
    font-size: 0.78rem;
  }

  .hero-section {
    min-height: 40vh;
    padding: 36px 20px 32px;
    align-items: flex-start;
    text-align: left;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .subtitle.hero-desc {
    font-size: 0.96rem;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .content-section section {
    padding: 40px 20px;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer > section {
    border-right: none;
    border-bottom: 2px solid #222;
    padding: 32px 20px;
    min-width: 100%;
  }

  .footer-bar {
    padding: 16px 20px;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 2rem;
  }

  .content-section section,
  .main-article > section {
    padding: 32px 16px;
  }

  .btn-primary,
  .btn-outline {
    height: 44px;
    font-size: 0.92rem;
    padding: 0 20px;
  }
}
