/* ==========================================================================
   F88 HOME · 共享样式表 /assets/site.css
   基调：未来竞技控制台 × 热带海岛夜色
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

body, h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

/* ---------- 2. 设计变量 ---------- */
:root {
  --deep-900: #06182E;
  --deep-800: #0C2542;
  --deep-700: #13395F;
  --deep-600: #1E5A8A;
  --sea-500: #3B87BF;
  --race: #FF6A1A;
  --race-soft: rgba(255, 106, 26, 0.12);
  --neon: #4BE0D0;
  --neon-soft: rgba(75, 224, 208, 0.10);
  --warm: #F5F1EA;
  --graphite: #9AA7B4;
  --ink: #14202B;

  --font-display: 'Archivo Narrow', 'Oswald', 'Arial Narrow', sans-serif;
  --font-heading: 'PingFang SC', 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
  --font-body: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', Consolas, 'Courier New', monospace;

  --header-h: 76px;
  --wrap: 1440px;
  --gutter: 28px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --measure: 70ch;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --line: rgba(30, 90, 138, 0.5);
  --shadow: 0 24px 60px -40px rgba(0, 0, 0, 0.95);
}

/* ---------- 3. 文档基础 ---------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--deep-900);
  color: var(--warm);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(30px, 4.4vw, 46px); }
h2 { font-size: clamp(24px, 2.6vw, 32px); }
h3 { font-size: 19px; }

a { color: inherit; text-decoration: none; transition: color 0.18s var(--ease); }
a:hover { color: var(--neon); }

strong { font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 4px;
}

#main-content { scroll-margin-top: calc(var(--header-h) + 14px); }

/* 跳至主要内容 */
.skip-link {
  position: fixed;
  left: 16px;
  top: -110px;
  z-index: 300;
  padding: 12px 22px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--race);
  color: #0B1520;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 0; color: #0B1520; outline-offset: -4px; }

/* ---------- 4. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: transparent;
  background-image: linear-gradient(
    180deg,
    rgba(6, 24, 46, 0.96) 0%,
    rgba(6, 24, 46, 0.84) 68%,
    rgba(6, 24, 46, 0) 100%
  );
  color: var(--warm);
  transition: background-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.site-header.is-scrolled {
  background-image: none;
  background-color: var(--deep-900);
  box-shadow: 0 1px 0 var(--line), 0 22px 46px -38px rgba(0, 0, 0, 1);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(154, 167, 180, 0.16);
  overflow: hidden;
}
.header-rail__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--sea-500), var(--neon));
  transition: width 0.1s linear;
}

/* 品牌 */
.brand {
  display: grid;
  gap: 3px;
  flex: 0 0 auto;
  color: var(--warm);
}
.brand:hover { color: var(--warm); }
.brand__top { display: flex; align-items: center; gap: 9px; }
.brand__mark {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.brand__version {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1;
  color: #08131F;
  background: var(--race);
  padding: 4px 7px;
  border-radius: 5px;
}
.brand__tagline {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--graphite);
}

/* 在线状态 */
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--graphite);
}
.header-status__text { white-space: nowrap; }
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon);
  flex: 0 0 auto;
  animation: dotPulse 2.4s var(--ease) infinite;
}
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(75, 224, 208, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(75, 224, 208, 0); }
  100% { box-shadow: 0 0 0 0 rgba(75, 224, 208, 0); }
}

/* 导航 */
.site-nav { margin-left: auto; }
.site-nav__list { display: flex; align-items: center; gap: 2px; }
.site-nav__link {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: rgba(245, 241, 234, 0.8);
  white-space: nowrap;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.site-nav__link:hover { color: var(--warm); background: rgba(59, 135, 191, 0.18); }
.site-nav__link[aria-current="page"] { color: var(--race); background: var(--race-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(59, 135, 191, 0.14);
  border: 1px solid rgba(154, 167, 180, 0.4);
  color: var(--warm);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.nav-toggle:hover { border-color: var(--neon); background: var(--neon-soft); }
.nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  flex: 0 0 auto;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn--primary { background: var(--race); color: #0B1520; }
.btn--primary:hover { background: #FF8342; color: #0B1520; }
.btn--ghost {
  background: rgba(245, 241, 234, 0.06);
  border-color: rgba(154, 167, 180, 0.45);
  color: var(--warm);
}
.btn--ghost:hover { border-color: var(--neon); color: var(--neon); background: var(--neon-soft); }
.btn--quiet { background: transparent; border-color: transparent; color: var(--graphite); padding-inline: 10px; }
.btn--quiet:hover { color: var(--neon); }

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  padding-bottom: 28px;
  background: linear-gradient(180deg, #040F1D 0%, #02080F 100%);
  color: var(--warm);
  border-top: 1px solid var(--line);
}

.legacy-entry {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px var(--gutter);
  border-bottom: 1px solid rgba(30, 90, 138, 0.35);
}
.legacy-entry:hover { color: var(--warm); }
.legacy-entry__label {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--warm);
  transition: color 0.16s var(--ease);
}
.legacy-entry__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--graphite);
}
.legacy-entry__arrow {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--race);
  transition: transform 0.18s var(--ease);
}
.legacy-entry:hover .legacy-entry__label { color: var(--race); }
.legacy-entry:hover .legacy-entry__arrow { transform: translateX(5px); }

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 48px var(--gutter) 36px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 2.6fr;
  gap: 44px;
}

.footer-brand { display: grid; gap: 10px; align-content: start; justify-items: start; }
.footer-brand__mark {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--warm);
}
.footer-brand__mark:hover { color: var(--neon); }
.footer-brand__version {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1;
  color: var(--neon);
  border: 1px solid rgba(75, 224, 208, 0.4);
  border-radius: 5px;
  padding: 3px 7px;
}
.footer-brand__tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--graphite);
}

.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-col__title {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--graphite);
}
.footer-col__list { display: grid; gap: 9px; }
.footer-col__list a { font-size: 15px; color: rgba(245, 241, 234, 0.86); }
.footer-col__list a:hover { color: var(--neon); }

.footer-legal {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px var(--gutter) 0;
  border-top: 1px solid rgba(30, 90, 138, 0.35);
  display: grid;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--graphite);
}
.footer-contact { margin: 0; color: rgba(245, 241, 234, 0.78); }
.footer-address,
.footer-icp,
.footer-copy { margin: 0; }

/* ---------- 7. 布局与内容容器 ---------- */
.content-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.page-main { display: block; }

.section { padding: 76px 0; }
.section--tight { padding: 48px 0; }
.section--deep { background: var(--deep-900); color: var(--warm); }
.section--panel { background: var(--deep-800); color: var(--warm); }
.section--warm { background: var(--warm); color: var(--ink); }
.section--warm h1,
.section--warm h2,
.section--warm h3,
.section--warm h4 { color: var(--ink); }
.section--warm a {
  color: var(--deep-700);
  text-decoration: underline;
  text-decoration-color: rgba(19, 57, 95, 0.28);
  text-underline-offset: 3px;
}
.section--warm a:hover { color: var(--race); }
.section--warm .mono-index { color: var(--deep-600); }

.shell-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.stack { display: grid; gap: 16px; }

/* ---------- 8. 文案排版 ---------- */
.prose { max-width: var(--measure); font-size: 17px; line-height: 1.85; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 26px; line-height: 1.3; margin-top: 1.9em; }
.prose h3 { font-size: 20px; line-height: 1.35; margin-top: 1.6em; }
.prose ul,
.prose ol { padding-left: 1.35em; margin-top: 0.9em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 0.4em 0; }
.prose li::marker { color: var(--graphite); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* 等宽索引标签 */
.mono-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 10px;
}

/* 状态胶囊 */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(75, 224, 208, 0.4);
  background: var(--neon-soft);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.6;
}
.status-pill--alert {
  border-color: rgba(255, 106, 26, 0.45);
  background: var(--race-soft);
  color: var(--race);
}

/* 面包屑 */
.breadcrumbs { padding: 18px 0 0; }
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--graphite);
}
.breadcrumbs__item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: rgba(154, 167, 180, 0.5);
}
.breadcrumbs__item a { color: var(--graphite); }
.breadcrumbs__item a:hover { color: var(--neon); }
.breadcrumbs__item [aria-current="page"] { color: var(--warm); }

/* ---------- 9. 面板与卡片 ---------- */
.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(12, 37, 66, 0.78);
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.panel:hover {
  border-color: rgba(59, 135, 191, 0.85);
  background: rgba(19, 57, 95, 0.7);
}
.panel--raised {
  background: rgba(19, 57, 95, 0.55);
  box-shadow: var(--shadow);
}

/* ---------- 10. 图形与图片容器 ---------- */
.figure { display: grid; gap: 12px; }
.figure__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(59, 135, 191, 0.35), transparent 62%),
    linear-gradient(140deg, var(--deep-800), var(--deep-900) 58%, #030B15);
}
.figure__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(90deg, rgba(75, 224, 208, 0.14) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(75, 224, 208, 0.09) 0 1px, transparent 1px 72px);
}
.figure__frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure__caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--graphite);
}
.figure--wide .figure__frame { aspect-ratio: 21 / 9; }
.figure--portrait .figure__frame { aspect-ratio: 4 / 5; }

/* ---------- 11. 标签页 / 分段切换 ---------- */
.tabs { display: grid; gap: 22px; }
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 37, 66, 0.75);
}
.tabs__tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 9px 18px;
  border-radius: 999px;
  color: var(--graphite);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}
.tabs__tab:hover { color: var(--warm); }
.tabs__tab[aria-selected="true"] { background: var(--race); color: #0B1520; }
.tabs__panel { animation: panelIn 0.16s var(--ease); }
.tabs__panel[hidden] { display: none; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 12. 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1400px) {
  .header-status { display: none; }
}

@media (max-width: 1024px) {
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    padding: 12px var(--gutter) 22px;
    background: var(--deep-900);
    border-top: 1px solid var(--line);
    box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 1);
    display: none;
  }
  .site-nav[data-open] { display: block; animation: navDrop 0.18s var(--ease); }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav__link { display: block; padding: 13px 14px; border-radius: var(--radius-sm); font-size: 16px; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .header-actions .btn--ghost { display: none; }
}

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

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr; gap: 34px; padding-top: 38px; }
  .footer-nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 26px; }
  .section { padding: 58px 0; }
  .section--tight { padding: 38px 0; }
}

@media (max-width: 620px) {
  :root { --gutter: 18px; --header-h: 68px; }
  .header-actions { display: none; }
  .brand__mark { font-size: 20px; }
  .brand__tagline { font-size: 10.5px; }
  .legacy-entry { gap: 10px; }
  .legacy-entry__arrow { margin-left: 0; }
  .tabs__list { border-radius: var(--radius-md); }
}

@media (min-width: 1080px) {
  .shell-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
}

/* ---------- 14. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
