/* 亚博官网 — static/css/style.css */

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #10141a;
  --bg-alt: #161b22;
  --bg-elevated: #1c2229;
  --bg-card: #191f26;
  --border: #2a323c;
  --border-soft: #232a32;
  --text: #eef2f1;
  --text-dim: #aab4bd;
  --text-mute: #7c8894;
  --green: #1f6b42;
  --green-bright: #2f9e5c;
  --green-soft: rgba(47, 158, 92, 0.14);
  --teal: #2dd4bf;
  --teal-dim: #1f8f81;
  --teal-soft: rgba(45, 212, 191, 0.12);
  --amber: #e8a33d;
  --amber-soft: rgba(232, 163, 61, 0.14);
  --danger: #e2574c;
  --radius: 10px;
  --radius-sm: 6px;
  --container-max: 1180px;
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Roboto, Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--green-bright); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.4; font-weight: 700; color: var(--text); margin: 0 0 14px; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.15rem); }
h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 16px; color: var(--text-dim); }
ul, ol { color: var(--text-dim); padding-left: 1.3em; margin: 0 0 16px; }
li { margin-bottom: 6px; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #0e1116;
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  flex: 0 0 auto;
  white-space: nowrap;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand .brand-mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand .brand-sub { color: var(--text-mute); font-weight: 400; font-size: 0.72rem; display: block; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 9px; right: 9px;
  height: 2px;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}
.main-nav a {
  display: block;
  color: var(--text-dim);
  font-size: 13.5px;
  white-space: nowrap;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
}
.main-nav a:hover { color: var(--text); background: var(--bg-elevated); text-decoration: none; }
.main-nav a.is-active { color: var(--teal); background: var(--teal-soft); }

@media (max-width: 1239px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(320px, 84vw);
    background: #0e1116;
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
    padding: 18px;
    z-index: 490;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { font-size: 15px; padding: 12px 14px; }
  .nav-scrim {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(4, 6, 9, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 480;
  }
  .nav-scrim.is-open { opacity: 1; pointer-events: auto; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 48px 0 40px;
  background: linear-gradient(180deg, #121820 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border-soft);
}
.hero .container { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.hero-text { flex: 1 1 420px; min-width: 280px; }
.hero-figure { flex: 1 1 380px; min-width: 260px; }
.hero .kicker {
  display: inline-block;
  color: var(--teal);
  font-size: 13px;
  letter-spacing: .04em;
  background: var(--teal-soft);
  border: 1px solid var(--teal-dim);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 { margin-bottom: 16px; }
.hero .lede { font-size: 1.02rem; color: var(--text-dim); max-width: 60ch; }
.hero .tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero .tag-row span {
  font-size: 12.5px; color: var(--text-mute);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 10px;
}

/* page hero (secondary pages, no image) */
.page-hero {
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, #121820 0%, var(--bg) 100%);
}
.page-hero .breadcrumb { font-size: 13px; color: var(--text-mute); margin-bottom: 14px; }
.page-hero .breadcrumb a { color: var(--text-mute); }
.page-hero .breadcrumb a:hover { color: var(--teal); }
.page-hero .lede { max-width: 74ch; color: var(--text-dim); }

/* ---------- Sections ---------- */

.section { padding: 44px 0; }
.section + .section { border-top: 1px solid var(--border-soft); }
.section-head { margin-bottom: 24px; max-width: 76ch; }
.section-head .eyebrow {
  color: var(--green-bright); font-size: 13px; font-weight: 700;
  letter-spacing: .03em; margin-bottom: 8px; display: block;
}
.section-alt { background: var(--bg-alt); }

/* ---------- Article blocks (homepage flagship / observe) ---------- */

.article-block {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 26px 26px 8px;
  margin-bottom: 28px;
}
.article-block .article-meta {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 10px;
}
.article-block .cat-tag {
  font-size: 12px; color: var(--amber); background: var(--amber-soft);
  border: 1px solid rgba(232,163,61,.35); padding: 3px 9px; border-radius: 999px;
}
.article-block .article-num {
  font-size: 12px; color: var(--text-mute);
}
.article-block h3 { font-size: 1.2rem; margin-bottom: 14px; }
.article-date {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -5px 0 16px;
  color: var(--text-mute);
  font-size: 13px;
}
.article-date::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-dim);
  flex: 0 0 auto;
}
.article-date time { color: inherit; }
.article-body :last-child { margin-bottom: 0; }
.article-figure { margin: 18px 0 20px; }
.article-figure img { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elevated); }
.article-figure figcaption { font-size: 13px; color: var(--text-mute); margin-top: 8px; }

.observe-block {
  border-left: 3px solid var(--teal-dim);
  padding: 4px 0 4px 18px;
  margin-bottom: 26px;
}
.observe-block h3 { font-size: 1.08rem; }

/* ---------- Cross-link cards (rollup to secondary pages) ---------- */

.rollup-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
}
.rollup-head h2 { margin: 0; }
.rollup-head .more-link { font-size: 14px; white-space: nowrap; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .card-grid, .card-grid.cols-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .card-grid, .card-grid.cols-4 { grid-template-columns: 1fr; } }

.preview-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
}
.preview-card h3 { font-size: 1.02rem; margin-bottom: 10px; }
.preview-card p { font-size: 14.5px; flex: 1; }
.preview-card .read-more { font-size: 13.5px; margin-top: 4px; }

/* ---------- Secondary page full articles ---------- */

.full-article {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px 30px 10px;
  margin-bottom: 32px;
}
.full-article > h2 { font-size: 1.35rem; }
.full-article .article-body h3 { color: var(--teal); font-size: 1.05rem; margin-top: 22px; }
.full-article .article-body p { font-size: 15.5px; }

/* ---------- Diagram figures (full width) ---------- */

.diagram-wrap {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 10px;
  overflow-x: auto;
}
.diagram-wrap svg, .diagram-wrap img {
  display: block;
  margin: 0 auto;
  max-width: none;
  width: auto;
  height: 340px;
}
.diagram-wrap.is-tall img, .diagram-wrap.is-tall svg { height: 420px; }
figure.diagram { margin: 0 0 30px; }
figure.diagram figcaption {
  font-size: 13.5px; color: var(--text-mute); margin-top: 10px; text-align: center;
}

/* ---------- FAQ ---------- */

.faq-list { border-top: 1px solid var(--border-soft); }
.faq-item {
  border-bottom: 1px solid var(--border-soft);
  padding: 16px 0;
}
.faq-item h3 {
  font-size: 15.5px;
  margin: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.faq-item h3::after {
  content: "+";
  color: var(--teal);
  font-size: 20px;
  flex: 0 0 auto;
  transition: transform .2s ease;
}
.faq-item.is-open h3::after { transform: rotate(45deg); }
.faq-item p {
  margin: 10px 0 0;
  font-size: 14.5px;
  display: none;
}
.faq-item.is-open p { display: block; }

/* ---------- About / Statement blocks ---------- */

.about-block, .statement-block {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 20px;
}
.statement-block p { font-size: 13.5px; color: var(--text-mute); margin-bottom: 10px; }
.statement-block h3 { font-size: 14px; color: var(--text-dim); }

/* ---------- App feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 10px;
}
@media (max-width: 920px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-item {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.feature-item .fi-num { color: var(--teal); font-weight: 700; font-size: 12px; display: block; margin-bottom: 6px; }

.notice-box {
  border: 1px solid var(--amber-soft);
  background: var(--amber-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  color: #d9b877;
  margin-bottom: 24px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: #0d1015;
  padding: 36px 0 26px;
  margin-top: 20px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.footer-brand { max-width: 340px; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-brand p { font-size: 13px; color: var(--text-mute); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { font-size: 13.5px; color: var(--text-dim); }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  font-size: 12.5px;
  color: var(--text-mute);
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
}

/* ---------- Utility ---------- */

.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.small-note { font-size: 13px; color: var(--text-mute); }

@media (max-width: 640px) {
  .full-article, .article-block { padding: 20px 18px 6px; }
  .hero { padding: 34px 0 30px; }
  .section { padding: 32px 0; }
}
