/* =========================================================
   /assets/site.css — 星空平台 共享外壳
   深空墨蓝底 / 星芒青轨道 / 电光紫栏目 / 暖橙比分
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
ul, ol, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

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

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; }

/* ---------- tokens ---------- */
:root {
  /* 色板 */
  --ink: #050A18;
  --night: #0C1630;
  --nebula: #16244C;
  --paper: #F3E7D0;
  --cyan: #7BF2E4;
  --violet: #7B5CFF;
  --orange: #FF7A2F;
  --yellow: #FFD166;
  --haze: #A9B6D6;
  --moon: #E9EEF9;
  --ember: #8A3B12;
  --paper-ink: #211608;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-display: "Arial Narrow", "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono",
    Consolas, "Liberation Mono", monospace;

  /* 尺寸 */
  --shell: 1180px;
  --gutter: clamp(18px, 4vw, 48px);
  --cut: 18px;
  --line: 1.5px solid var(--nebula);
}

/* ---------- page base ---------- */
html { background: var(--ink); }

body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image: radial-gradient(rgba(233, 238, 249, 0.045) 1px, transparent 1px);
  background-size: 5px 5px;
  color: var(--moon);
  font-family: var(--font-sans);
  font-size: clamp(16px, 0.55vw + 14.4px, 18px);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--moon);
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 5.2vw, 68px); line-height: 1.05; }
h2 { font-size: clamp(24px, 2.8vw, 38px); }
h3 { font-size: clamp(18px, 1.6vw, 22px); }

p { text-wrap: pretty; }

strong, b { font-weight: 700; color: var(--paper); }

::selection { background: var(--violet); color: var(--moon); }

/* ---------- focus ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 1px;
}

#main-content:focus { outline: none; }

/* ---------- layout ---------- */
.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.page-main {
  display: block;
  padding-top: clamp(10px, 2vw, 26px);
}

.stack > * + * { margin-top: clamp(14px, 1.8vw, 22px); }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--cyan);
  color: #04101A;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.18s ease-out;
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(5, 10, 24, 0.93);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: var(--line);
}

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2.4vw, 34px);
  min-height: 68px;
  padding-block: 12px;
}

/* --- brand --- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  text-decoration: none;
  color: var(--moon);
}

.brand__mark {
  width: 22px;
  height: 22px;
  flex: none;
  background: linear-gradient(140deg, var(--cyan) 8%, var(--violet) 82%);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
  transition: transform 0.18s ease-out;
}

.brand:hover .brand__mark,
.brand:focus-visible .brand__mark { transform: translateY(-2px); }

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

.brand__name {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--moon);
}

.brand__tag {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--haze);
}

/* --- focus sliver --- */
.focus-sliver {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: clamp(12px, 2vw, 26px);
  border-left: var(--line);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--haze);
}

.focus-sliver__tag {
  flex: none;
  padding: 2px 7px 3px;
  background: var(--yellow);
  color: #2A1503;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}

.focus-sliver__text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

/* --- nav group --- */
.masthead__end {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 24px);
  justify-self: end;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 20px);
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--haze);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease-out;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease-out, background-color 0.18s ease-out;
}

.nav__link:hover { color: var(--paper); }
.nav__link:hover::after { transform: scaleX(1); }

.nav__link[aria-current="page"] { color: var(--cyan); }
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--orange);
}

.nav__cta { flex: none; }

/* --- toggle --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: var(--line);
  border-radius: 2px;
  color: var(--moon);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.18s ease-out, color 0.18s ease-out;
}

.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease-out, opacity 0.18s ease-out;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5px) rotate(9deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-9deg);
}

/* --- scroll progress --- */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.5px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet) 60%, var(--orange));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* =========================================================
   BUTTONS / TAGS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1.5px solid transparent;
  border-radius: 2px;
  background: var(--cyan);
  color: #04101A;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease-out, color 0.18s ease-out,
    border-color 0.18s ease-out, transform 0.18s ease-out;
}

.btn:hover { background: var(--paper); color: var(--paper-ink); }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--cyan); }
.btn--primary:hover { background: var(--paper); }

.btn--ghost {
  background: transparent;
  border-color: var(--nebula);
  color: var(--moon);
}
.btn--ghost:hover {
  background: transparent;
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--sm { padding: 8px 14px; font-size: 13px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--haze);
}

.tag--cyan { color: var(--cyan); }
.tag--violet { color: var(--violet); }
.tag--orange { color: var(--orange); }

/* =========================================================
   TEXT BLOCKS
   ========================================================= */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.lead {
  max-width: 34ch;
  font-size: clamp(16px, 1.2vw + 13px, 19px);
  line-height: 1.7;
  color: var(--paper);
}

.prose {
  max-width: 66ch;
  color: var(--moon);
}

.prose > * + * { margin-top: 1.2em; }
.prose h2, .prose h3 { margin-top: 1.8em; }

.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(123, 242, 228, 0.45);
  transition: color 0.18s ease-out, border-color 0.18s ease-out;
}
.prose a:hover { color: var(--paper); border-bottom-color: var(--orange); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--nebula);
}

.section-head > p { color: var(--haze); font-size: 13.5px; }

/* =========================================================
   GRID / PANELS / STATS
   ========================================================= */
.grid {
  display: grid;
  gap: clamp(12px, 2vw, 20px);
}

.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.grid--bento {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.panel {
  position: relative;
  padding: clamp(16px, 2.2vw, 26px);
  background: var(--night);
  border: var(--line);
  border-radius: 1px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: border-color 0.18s ease-out;
}

.panel--focus {
  border-color: rgba(123, 242, 228, 0.45);
  background: linear-gradient(160deg, rgba(22, 36, 76, 0.9), var(--night) 62%);
}

.panel--paper {
  background-color: var(--paper);
  background-image: radial-gradient(rgba(138, 59, 18, 0.08) 1px, transparent 1px);
  background-size: 3px 3px;
  border-color: var(--ember);
  color: var(--paper-ink);
}

.panel--paper h2,
.panel--paper h3,
.panel--paper strong { color: var(--ember); }

.panel--paper .panel__label { color: var(--ember); }

.panel__label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--yellow);
}

.panel--paper .stat__num { color: var(--ember); }

.stat__unit {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--haze);
}

.panel--paper .stat__unit { color: var(--ember); opacity: 0.85; }

/* =========================================================
   MEDIA CONTAINERS（页面阶段放入图片占位）
   ========================================================= */
.media {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--nebula);
  border: var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

.media > img,
.media > video,
.media > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(198deg, rgba(123, 242, 228, 0.12), transparent 42%,
      rgba(5, 10, 24, 0.42));
  pointer-events: none;
}

.media--wide { aspect-ratio: 16 / 9; }
.media--card { aspect-ratio: 4 / 3; }
.media--tall { aspect-ratio: 3 / 4; }
.media--band { aspect-ratio: 21 / 9; }

.media__badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 3px 8px;
  background: var(--orange);
  color: #1B0C02;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.media__caption {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--moon);
  text-shadow: 0 1px 6px rgba(5, 10, 24, 0.85);
}

/* =========================================================
   BREADCRUMB
   ========================================================= */
.breadcrumb { padding-top: clamp(16px, 2.4vw, 26px); }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--haze);
}

.breadcrumb li { display: inline-flex; align-items: center; }

.breadcrumb li + li::before {
  content: "⁄";
  margin: 0 8px;
  color: var(--violet);
}

.breadcrumb a {
  color: var(--haze);
  text-decoration: none;
  transition: color 0.18s ease-out;
}

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

.breadcrumb [aria-current="page"] { color: var(--paper); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 110px);
  background: var(--night);
  border-top: var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1.5px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--violet) 52%, var(--orange));
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 2.4fr);
  gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(34px, 5.5vw, 66px);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.footer-brand__note {
  max-width: 32ch;
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--haze);
}

.footer-brand__cta { margin-top: 20px; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
}

.footer-col h3 {
  margin-bottom: 14px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.footer-col li + li { margin-top: 9px; }

.footer-col a {
  font-size: 14px;
  color: var(--moon);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: color 0.18s ease-out, border-color 0.18s ease-out;
}

.footer-col a:hover {
  color: var(--paper);
  border-bottom-color: var(--orange);
}

.footer-contact {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--haze);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 26px;
  padding-block: 18px 26px;
  border-top: var(--line);
  font-size: 12px;
  line-height: 1.7;
  color: var(--haze);
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   REVEAL（页面阶段可选使用）
   ========================================================= */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

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

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .focus-sliver__text { font-size: 12px; }
  .nav__link { font-size: 13px; }
}

@media (max-width: 880px) {
  html { scroll-padding-top: 24px; }

  body { padding-bottom: 78px; }

  .site-header {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-bottom: 0;
    border-top: var(--line);
    background: rgba(5, 10, 24, 0.97);
  }

  .scroll-progress { bottom: auto; top: -1.5px; }

  .masthead {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 62px;
    padding-block: 9px;
  }

  .focus-sliver { display: none; }

  .brand__tag { font-size: 10.5px; }

  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 10px);
    display: block;
    padding: 14px;
    background: var(--night);
    border: var(--line);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.18s ease-out, transform 0.18s ease-out, visibility 0.18s;
  }

  .site-header[data-open="true"] .nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
  }

  .nav__link {
    display: block;
    padding: 12px 10px;
    font-size: 15px;
    border-bottom: 1.5px solid rgba(22, 36, 76, 0.95);
  }

  .nav__link::after { display: none; }

  .nav__link[aria-current="page"] {
    background: rgba(123, 242, 228, 0.1);
    color: var(--cyan);
  }

  .nav__cta {
    width: 100%;
    margin-top: 14px;
    padding: 12px 16px;
    font-size: 14px;
  }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand__note { max-width: 42ch; }
  .footer-meta { flex-direction: column; }
}

@media (max-width: 560px) {
  .grid--12,
  .grid--bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .brand__tag { display: none; }

  .lead { max-width: none; }
}

/* =========================================================
   MOTION PREFERENCES
   ========================================================= */
@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;
    scroll-behavior: auto !important;
  }

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

  .brand:hover .brand__mark { transform: none; }
}
