/* ==========================================================================
   components.css —— 跨页面复用组件
   导航 / 按钮 / 卡片 / 标签 / 时间线 / FAQ / CTA / 页脚
   ========================================================================== */

/* ==========================================================================
   1. 顶部导航
   注意：导航与页脚的 HTML 在 5 个页面中完全一致，修改时需同步全部页面。
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
  border-bottom: 1px solid transparent;
}

/* 滚动超过 40px 后加毛玻璃底 */
.nav.is-stuck {
  background: rgba(7, 11, 20, .82);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-nav);
}

.nav__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__mark { width: 32px; height: 32px; }
.brand__name { font-size: 1.12rem; font-weight: 800; letter-spacing: .02em; }
.brand__sub {
  font-size: var(--fs-xs);
  color: var(--fg-dim);
  letter-spacing: .18em;
  text-transform: uppercase;
  display: block;
  line-height: 1.1;
  margin-top: 1px;
}

.nav__links { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }

.nav__link {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  white-space: nowrap;
}
.nav__link:hover { color: var(--fg); background: rgba(255, 255, 255, .05); }

/* 当前页高亮 */
.nav__link.is-active { color: var(--fg); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
}

.nav__cta { margin-left: var(--sp-4); }

/* 汉堡按钮 —— 仅移动端显示 */
.nav__toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--fg);
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-1);
    padding: var(--sp-5);
    background: rgba(7, 11, 20, .97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-nav);
    /* 默认收起 */
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease),
                visibility var(--t-base);
  }
  .nav__links.is-open { transform: none; opacity: 1; visibility: visible; }

  .nav__link { padding: 12px 14px; font-size: 1rem; }
  .nav__link.is-active::after { left: 14px; right: auto; width: 20px; bottom: 8px; }
  .nav__cta { margin-left: 0; margin-top: var(--sp-3); text-align: center; }
}

/* ==========================================================================
   2. 按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 24px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--grad-brand);
  color: #06111C;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(56, 189, 248, .22);
}
.btn--primary:hover { box-shadow: 0 16px 34px rgba(56, 189, 248, .32); }

.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--fg);
  background: rgba(255, 255, 255, .02);
}
.btn--ghost:hover { border-color: var(--line-ice); background: var(--ice-soft); }

.btn--sm { padding: 8px 16px; font-size: var(--fs-xs); }

/* 文字箭头链接 */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ice-bright);
  transition: gap var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.link-arrow::after { content: "→"; transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover { gap: 10px; color: var(--ice); }

/* ==========================================================================
   3. 卡片
   ========================================================================== */
.card {
  position: relative;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--line);
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  height: 100%;
}
.card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--line-ice);
  box-shadow: var(--glow-ice);
}
.card--flame:hover { border-color: var(--line-flame); box-shadow: var(--glow-flame); }

.card__title { margin-bottom: var(--sp-3); }
.card__desc { font-size: var(--fs-sm); line-height: 1.8; }

/* 卡片内的图标方块 */
.icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-5);
  background: var(--ice-soft);
  border: 1px solid var(--line-ice);
  color: var(--ice-bright);
}
.icon-box svg { width: 22px; height: 22px; }
.icon-box--flame {
  background: var(--flame-soft);
  border-color: var(--line-flame);
  color: var(--flame-bright);
}

/* 卡片内要点列表 */
.tick-list { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.tick-list li {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  line-height: 1.7;
}
.tick-list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 11px;
  border-radius: 50%;
  background: var(--grad-ice);
}
.tick-list--flame li::before { background: var(--grad-flame); }

/* ==========================================================================
   4. 标签 / 技术栈
   ========================================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.tag:hover { color: var(--ice-bright); border-color: var(--line-ice); background: var(--ice-soft); }

.tag-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ==========================================================================
   5. 时间线（横向：流程；竖向：历程）
   ========================================================================== */
.flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-4); }
.flow__step { position: relative; padding-top: var(--sp-6); }
.flow__step::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--line-strong), var(--line));
}
.flow__step:last-child::before { background: var(--line-strong); }
.flow__step::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 2px solid var(--ice);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .12);
}
.flow__num {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ice-bright);
  margin-bottom: var(--sp-2);
}
.flow__title { font-size: var(--fs-sm); font-weight: 700; margin-bottom: var(--sp-2); }
.flow__desc { font-size: var(--fs-xs); color: var(--fg-dim); line-height: 1.7; }

@media (max-width: 992px) { .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 竖向时间线 */
.timeline { position: relative; padding-left: 34px; display: grid; gap: var(--sp-7); }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--flame), var(--ice), transparent);
}
.timeline__item { position: relative; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 2px solid var(--ice);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .12);
}
.timeline__date {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ice-bright);
}
.timeline__title { font-size: var(--fs-h3); margin: var(--sp-2) 0; }

/* ==========================================================================
   6. FAQ —— 用原生 details，零 JS
   ========================================================================== */
.faq { display: grid; gap: var(--sp-3); max-width: 860px; }

.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease);
}
.faq__item[open] { border-color: var(--line-ice); }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: background var(--t-fast) var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { background: rgba(255, 255, 255, .04); }
.faq__q::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ice);
  transition: transform var(--t-fast) var(--ease);
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }

.faq__a {
  padding: 0 var(--sp-5) var(--sp-5);
  font-size: var(--fs-sm);
  line-height: 1.85;
  color: var(--fg-muted);
}
.faq__a p + p { margin-top: var(--sp-3); }

/* ==========================================================================
   7. 底部 CTA 区
   ========================================================================== */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(255, 107, 53, .16), transparent 60%),
    radial-gradient(700px 340px at 80% 100%, rgba(56, 189, 248, .18), transparent 62%),
    var(--bg-1);
}
.cta h2 { margin-bottom: var(--sp-4); }
.cta p { max-width: 620px; margin: 0 auto var(--sp-7); font-size: var(--fs-lead); }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: center; }

/* ==========================================================================
   8. 页脚
   ========================================================================== */
.footer {
  margin-top: var(--section-y);
  border-top: 1px solid var(--line);
  background: rgba(7, 11, 20, .6);
  padding-block: var(--sp-8) var(--sp-6);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--sp-7);
  padding-bottom: var(--sp-7);
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; gap: var(--sp-6); } }

.footer__intro { font-size: var(--fs-sm); line-height: 1.85; margin-top: var(--sp-4); max-width: 320px; }

.footer__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: var(--sp-4);
  color: var(--fg);
}
.footer__list { display: grid; gap: var(--sp-3); }
.footer__list a, .footer__list span {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  transition: color var(--t-fast) var(--ease);
}
.footer__list a:hover { color: var(--ice-bright); }

.footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--fg-dim);
}
.footer__bottom a { transition: color var(--t-fast) var(--ease); }
.footer__bottom a:hover { color: var(--ice-bright); }
