/* ==========================================================
   星空竞界 /assets/site.css
   全站共享样式：Reset、变量、中文排版、头部、页脚、
   通用按钮、面包屑、正文容器、网格与基础组件
   ========================================================== */

/* ---------- 1. CSS Variables ---------- */
:root {
  --color-bg: #0B1026;
  --color-nebula: #131B3C;
  --color-accent: #FF7A3D;
  --color-accent-soft: rgba(255, 122, 61, 0.12);
  --color-silver: #C0C7D9;
  --color-text: #F5F7FF;
  --color-glacier: #7FD1FF;
  --color-success: #37D399;
  --color-danger: #FF5A5F;
  --color-ink: #050814;

  --font-display: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', STSong, serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --font-mono: 'Roboto Mono', 'SF Mono', 'Cascadia Mono', Consolas, 'Courier New', monospace;

  --container-max: 1280px;
  --header-top-h: 2rem;
  --header-main-h: 3.75rem;
  --header-total: calc(var(--header-top-h) + var(--header-main-h));
  --section-pad: clamp(3rem, 6vw, 5.5rem);
}

/* ---------- 2. Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: var(--header-total);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background-color: var(--color-bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(127, 209, 255, 0.08), transparent 70%),
    radial-gradient(700px 420px at 5% 110%, rgba(255, 122, 61, 0.05), transparent 70%),
    radial-gradient(1px 1px at 12% 28%, rgba(245, 247, 255, 0.5), transparent),
    radial-gradient(1px 1px at 68% 12%, rgba(245, 247, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 38% 58%, rgba(245, 247, 255, 0.4), transparent),
    radial-gradient(1px 1px at 88% 65%, rgba(245, 247, 255, 0.3), transparent),
    radial-gradient(1px 1px at 22% 78%, rgba(245, 247, 255, 0.45), transparent),
    radial-gradient(1px 1px at 82% 90%, rgba(245, 247, 255, 0.3), transparent);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1vw, 1.1rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--color-glacier);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

p {
  margin-bottom: 1rem;
}

::selection {
  background: var(--color-accent);
  color: var(--color-ink);
}

#main-content {
  scroll-margin-top: calc(var(--header-total) + 1rem);
  outline: none;
}

/* ---------- 3. Layout Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: var(--section-pad);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
}

.section-lead {
  color: var(--color-silver);
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  max-width: 62ch;
  margin-bottom: 2rem;
}

.orbit-divider {
  position: relative;
  height: 1.5rem;
  pointer-events: none;
}

.orbit-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 209, 255, 0.3) 30%, rgba(255, 122, 61, 0.45) 70%, transparent);
}

.orbit-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 10px rgba(255, 122, 61, 0.6);
}

.page-hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid rgba(192, 199, 217, 0.08);
  background:
    radial-gradient(640px 280px at 85% 15%, rgba(127, 209, 255, 0.08), transparent 70%),
    radial-gradient(400px 240px at 10% 90%, rgba(255, 122, 61, 0.06), transparent 70%);
}

.page-hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.page-hero__lead {
  color: var(--color-silver);
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  max-width: 62ch;
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--color-accent);
  color: var(--color-ink);
  box-shadow: 0 4px 14px rgba(255, 122, 61, 0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: #ff8f58;
  color: var(--color-ink);
  box-shadow: 0 4px 20px rgba(255, 122, 61, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(192, 199, 217, 0.3);
  box-shadow: none;
}

.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 0 14px var(--color-accent-soft);
}

.btn-lg {
  padding: 0.85rem 2.2rem;
  font-size: 1rem;
}

/* ---------- 5. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding-block: 1rem 0;
  font-size: 0.9rem;
  color: var(--color-silver);
}

.breadcrumb a {
  color: var(--color-glacier);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb__sep {
  margin-inline: 0.25rem;
  opacity: 0.5;
}

.breadcrumb span[aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}

/* ---------- 6. Common Components ---------- */
.panel {
  background: var(--color-nebula);
  border: 1px solid rgba(192, 199, 217, 0.1);
  padding: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.bento-card {
  background:
    radial-gradient(300px 180px at 90% 0%, rgba(127, 209, 255, 0.06), transparent 70%),
    var(--color-nebula);
  border: 1px solid rgba(192, 199, 217, 0.1);
  border-radius: 0;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.bento-card:hover,
.bento-card:focus-within {
  border-color: rgba(255, 122, 61, 0.35);
  box-shadow: 0 0 24px rgba(255, 122, 61, 0.1);
}

.bento-card--span-4 { grid-column: span 4; }
.bento-card--span-6 { grid-column: span 6; }
.bento-card--span-8 { grid-column: span 8; }
.bento-card--span-12 { grid-column: span 12; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-glacier);
  background: rgba(127, 209, 255, 0.08);
  border: 1px solid rgba(127, 209, 255, 0.2);
  border-radius: 2px;
  white-space: nowrap;
}

.tag--accent {
  color: var(--color-accent);
  background: rgba(255, 122, 61, 0.1);
  border-color: rgba(255, 122, 61, 0.25);
}

.tag--success {
  color: var(--color-success);
  background: rgba(55, 211, 153, 0.1);
  border-color: rgba(55, 211, 153, 0.25);
}

.data-text {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.data-text--lg {
  font-size: 1.4rem;
  font-weight: 600;
}

.data-text--accent {
  color: var(--color-accent);
}

/* ---------- 7. Image Frame ---------- */
.image-frame {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(240px 160px at 70% 15%, rgba(127, 209, 255, 0.12), transparent 70%),
    linear-gradient(150deg, var(--color-nebula), var(--color-bg));
  border: 1px solid rgba(192, 199, 217, 0.12);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 65%, rgba(255, 122, 61, 0.06));
  pointer-events: none;
}

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

.image-frame--wide { aspect-ratio: 21 / 9; }
.image-frame--portrait { aspect-ratio: 3 / 4; }
.image-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 8. Header ---------- */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 999;
  background: var(--color-accent);
  color: var(--color-ink);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(255, 122, 61, 0.4);
  transform: translateY(-300%);
  transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 16, 38, 0.95);
  border-bottom: 1px solid rgba(192, 199, 217, 0.08);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 300;
  background: linear-gradient(90deg, var(--color-accent), var(--color-glacier));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(255, 122, 61, 0.3);
}

.site-header-top {
  background: var(--color-ink);
  border-bottom: 1px solid rgba(192, 199, 217, 0.06);
}

.site-header-top__inner {
  min-height: var(--header-top-h);
  display: flex;
  align-items: center;
}

.site-header-note {
  color: var(--color-silver);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header-main__inner {
  min-height: var(--header-main-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.brand-block__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--color-accent), #ff9a5f);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(255, 122, 61, 0.4);
}

.brand-block__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-block__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
}

.brand-block__tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--color-silver);
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-silver);
  border-radius: 4px;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav__link:hover {
  color: var(--color-text);
  background: var(--color-accent-soft);
}

.site-nav__link[aria-current="page"] {
  color: var(--color-accent);
}

.site-nav__link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.85rem;
  right: 0.85rem;
  height: 2px;
  background: var(--color-accent);
  box-shadow: 0 0 8px rgba(255, 122, 61, 0.5);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--color-nebula);
  border: 1px solid rgba(192, 199, 217, 0.15);
  border-radius: 4px;
  position: relative;
  z-index: 95;
}

.nav-toggle__line {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.no-scroll {
  overflow: hidden;
}

/* ---------- 9. Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-ink) 100%);
  border-top: 1px solid rgba(192, 199, 217, 0.08);
  padding-top: 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-block: 2.5rem 2rem;
}

.site-footer__brand {
  grid-column: span 1;
}

.site-footer__note {
  color: var(--color-silver);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.site-footer__trust {
  color: var(--color-silver);
  font-size: 0.8rem;
  line-height: 1.7;
  opacity: 0.8;
  max-width: 38ch;
}

.brand-block--footer .brand-block__mark {
  width: 2rem;
  height: 2rem;
  font-size: 0.95rem;
}

.brand-block--footer .brand-block__name {
  font-size: 1.1rem;
}

.site-footer__heading {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-glacier);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  position: relative;
}

.site-footer__heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1.5rem;
  height: 2px;
  background: var(--color-accent);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.site-footer__links a {
  color: var(--color-silver);
  font-size: 0.9rem;
  line-height: 1.4;
  padding-block: 0.25rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer__links a:hover {
  color: var(--color-accent);
  padding-left: 4px;
}

.site-footer__contact-item {
  color: var(--color-silver);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.site-footer__bottom {
  display: flex;
  justify-content: center;
  padding-block: 1.25rem;
  border-top: 1px solid rgba(192, 199, 217, 0.08);
  font-size: 0.8rem;
  color: var(--color-silver);
  text-align: center;
}

.site-footer__bottom p {
  margin-bottom: 0;
}

/* ---------- 10. Scroll Reveal ---------- */
.js-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.js-enabled [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ---------- 11. Focus & Reduced Motion ---------- */
:focus {
  outline: 2px solid var(--color-glacier);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-glacier);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  .js-enabled [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav-toggle__line {
    transition: none;
  }
}

/* ---------- 12. Responsive ---------- */
@media (max-width: 899px) {
  :root {
    --header-top-h: 1.75rem;
    --header-main-h: 3.5rem;
  }

  .site-header-note {
    font-size: 0.65rem;
  }

  .site-header-main__inner {
    gap: 0.75rem;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    margin-left: 0;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    background:
      radial-gradient(600px 320px at 25% 20%, rgba(127, 209, 255, 0.12), transparent 70%),
      radial-gradient(400px 300px at 82% 75%, rgba(255, 122, 61, 0.1), transparent 70%),
      rgba(5, 8, 20, 0.97);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
  }

  .site-nav__link {
    font-size: 1.1rem;
    color: var(--color-text);
    padding: 0.75rem 2rem;
  }

  .site-nav__link:hover {
    color: var(--color-accent);
    background: var(--color-accent-soft);
  }

  .site-nav__link[aria-current="page"] {
    color: var(--color-accent);
    background: rgba(255, 122, 61, 0.06);
  }

  .site-nav__link[aria-current="page"]::after {
    display: none;
  }

  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .bento-card--span-4,
  .bento-card--span-6,
  .bento-card--span-8,
  .bento-card--span-12 {
    grid-column: span 6;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .site-footer__brand {
    grid-column: span 2;
  }
}

@media (max-width: 599px) {
  .container {
    padding-inline: 1rem;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-card--span-4,
  .bento-card--span-6,
  .bento-card--span-8,
  .bento-card--span-12 {
    grid-column: 1;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-block: 2rem 1.5rem;
  }

  .site-footer__brand {
    grid-column: span 1;
  }

  .site-footer__bottom {
    flex-direction: column;
    gap: 0.5rem;
  }
}
