/* ============================================================
   /assets/site.css
   Site Kit: 天博赛事
   设计语言：深空蓝数据指挥中心 / 展览画册网格
   ============================================================ */

/* ----- Reset & Variables ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--orange-race);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

:root {
  --space-blue: #0A1B3D;
  --space-blue-light: #1E3A6E;
  --orange-race: #FF6B1A;
  --green-neon: #39FF14;
  --cream-text: #F2E8D5;
  --mist-blue: #A3B8D6;
  --line-blue: #2E4A7A;
  --dark-void: #050A18;

  --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", Consolas, monospace;

  --header-height: 72px;
  --container-width: 1200px;
  --space-unit: 8px;

  --shadow-card: 0 12px 24px rgba(5, 10, 24, 0.4);
}

/* ----- Base Body & Data Grid Background ----- */
body {
  background-color: var(--space-blue);
  background-image:
    linear-gradient(var(--line-blue) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-blue) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--cream-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* ----- Typography Helpers ----- */
.overline {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mist-blue);
}

.data-mono {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: -0.2px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-blue);
}

.section-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--orange-race);
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.section-body {
  color: var(--mist-blue);
  font-size: 16px;
  line-height: 1.6;
}

/* ----- Layout Primitives ----- */
.container,
.container-fluid {
  width: 100%;
  margin-inline: auto;
  padding-inline: 24px;
}

.container {
  max-width: var(--container-width);
}

.grid {
  display: grid;
  gap: var(--space-unit);
}

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

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

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

.gap-4 {
  gap: calc(var(--space-unit) * 2);
}

.gap-8 {
  gap: calc(var(--space-unit) * 4);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
  border: 1px solid transparent;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-primary {
  background: var(--orange-race);
  color: var(--dark-void);
  border-color: var(--orange-race);
}

.btn-primary:hover {
  background: #e85a0c;
  border-color: #e85a0c;
  color: var(--dark-void);
}

.btn-outline {
  background: transparent;
  color: var(--cream-text);
  border-color: var(--line-blue);
}

.btn-outline:hover {
  border-color: var(--orange-race);
  color: var(--orange-race);
}

/* ----- Breadcrumb ----- */
.breadcrumb {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 32px;
}

.breadcrumb-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--mist-blue);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--line-blue);
}

.breadcrumb-link {
  color: var(--cream-text);
}

.breadcrumb-link:hover {
  color: var(--orange-race);
}

.breadcrumb-current {
  color: var(--mist-blue);
  pointer-events: none;
}

/* ----- Header / Command Bar ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: var(--header-height);
  background: rgba(5, 10, 24, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-blue);
}

.header-shell {
  max-width: var(--container-width);
  height: 100%;
  margin-inline: auto;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 3px solid var(--orange-race);
  padding-left: 12px;
  line-height: 1.2;
  flex-shrink: 0;
}

.brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--cream-text);
}

.brand-slogan {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--mist-blue);
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
  color: var(--cream-text);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--mist-blue);
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link:hover .nav-index {
  color: var(--orange-race);
}

.nav-link[aria-current="page"] {
  color: var(--green-neon);
  border-bottom-color: var(--green-neon);
}

.nav-link[aria-current="page"] .nav-index {
  color: var(--green-neon);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 10px;
  background: var(--line-blue);
  border: 1px solid var(--line-blue);
}

.toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--cream-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-active .toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----- Footer ----- */
.site-footer {
  background: var(--dark-void);
  border-top: 1px solid var(--line-blue);
  position: relative;
  z-index: 1;
}

.footer-shell {
  max-width: var(--container-width);
  margin-inline: auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand .brand-name {
  font-size: 28px;
  border-left: 3px solid var(--orange-race);
  padding-left: 12px;
}

.trust-statement {
  font-size: 14px;
  line-height: 1.7;
  color: var(--mist-blue);
  max-width: 340px;
}

.footer-title {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green-neon);
  margin-bottom: 16px;
}

.footer-link,
.footer-address {
  display: block;
  font-size: 14px;
  color: var(--cream-text);
  margin-bottom: 8px;
  font-style: normal;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--orange-race);
}

.footer-meta {
  border-top: 1px solid var(--line-blue);
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist-blue);
}

/* ----- Card Components ----- */
.card {
  background: rgba(30, 58, 110, 0.7);
  border: 1px solid var(--line-blue);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  border-color: var(--space-blue-light);
  transform: translateY(-4px);
}

.card--slant {
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-blue);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--orange-race);
  flex-shrink: 0;
}

.card-body {
  padding: 20px;
  flex: 1;
}

.card-footer {
  padding: 12px 20px;
  background: rgba(5, 10, 24, 0.4);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist-blue);
}

/* ----- Legend / Map Legend ----- */
.legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-blue);
  background: rgba(5, 10, 24, 0.3);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.legend-marker {
  width: 8px;
  height: 8px;
  background: var(--cream-text);
  flex-shrink: 0;
}

.legend-item--orange .legend-marker {
  background: var(--orange-race);
}

.legend-item--green .legend-marker {
  background: var(--green-neon);
}

.legend-item--blue .legend-marker {
  background: var(--mist-blue);
}

/* ----- Hero Split (Home) ----- */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - var(--header-height));
  padding: 64px 0;
  position: relative;
  z-index: 1;
}

.hero-narrative {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
}

.data-canvas {
  width: 100%;
  height: 100%;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(57, 255, 20, 0.12) 0%, transparent 70%),
    linear-gradient(var(--line-blue) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-blue) 1px, transparent 1px),
    var(--space-blue-light);
  background-size: auto, 32px 32px, 32px 32px, auto;
  border: 1px solid var(--line-blue);
}

.data-canvas::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  border: 1px solid var(--green-neon);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.08) 0%, transparent 70%);
  box-shadow: 0 0 48px rgba(57, 255, 20, 0.25);
}

.data-canvas::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--orange-race);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(255, 107, 26, 0.8);
  animation: data-pulse 1.8s ease-in-out infinite alternate;
}

@keyframes data-pulse {
  from {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.25);
  }
}

/* ----- Scroll Progress & Back to Top ----- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--orange-race), var(--green-neon));
  z-index: 1000;
  pointer-events: none;
  transition: width 0.1s linear;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  background: var(--orange-race);
  color: var(--dark-void);
  border: 1px solid var(--orange-race);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  box-shadow: 0 0 24px rgba(255, 107, 26, 0.4);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ----- Scroll Reveal Base ----- */
.js-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Utilities ----- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: fixed;
  top: 0;
  left: -999px;
  z-index: 1001;
  padding: 12px 24px;
  background: var(--orange-race);
  color: var(--dark-void);
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--cream-text);
  transition: left 0.2s ease;
}

.skip-link:focus {
  left: 0;
}

/* ----- Focus Visibility ----- */
:focus-visible {
  outline: 2px solid var(--orange-race);
  outline-offset: 3px;
}

/* ----- Responsive: Tablet & Mobile ----- */
@media (max-width: 1024px) {
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-shell {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .grid,
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 32px 0 48px;
  }

  .hero-visual {
    min-height: 240px;
  }

  .data-canvas {
    min-height: 280px;
  }

  .brand-slogan {
    display: none;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-height));
    background: rgba(5, 10, 24, 0.98);
    padding: 24px;
    z-index: 101;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .site-nav[data-open] {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nav-link {
    font-size: 20px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--line-blue);
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  .footer-shell {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 40px;
  }

  .footer-meta {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

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

  html {
    scroll-behavior: auto;
  }

  .js-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .data-canvas::after {
    animation: none;
  }
}
