/* BSport Site Kit · /assets/site.css */

/* ---------- Reset & Variables ---------- */
:root {
  --c-bg: #0D1117;
  --c-bg-card: #161C24;
  --c-bg-steel: #1C2A3A;
  --c-line: #2D3748;
  --c-text: #F5F7FA;
  --c-muted: #A0AEC0;
  --c-green: #39FF14;
  --c-blue: #00D9FF;
  --c-orange: #FF5C00;
  --font-body: "PingFang SC", "Microsoft YaHei", "HarmonyOS Sans SC", "Segoe UI", sans-serif;
  --font-display: "HarmonyOS Sans SC", "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "Roboto Mono", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  --radius-pill: 999px;
  --radius-sharp: 3px;
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.42);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--c-line) var(--c-bg);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
img, svg, video { display: block; max-width: 100%; }

::selection { background: var(--c-green); color: #0D1117; }
:focus-visible { outline: 2px solid var(--c-green); outline-offset: 3px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-line); border-radius: 5px; border: 2px solid var(--c-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--c-bg-steel); }

/* ---------- Container & Layout Base ---------- */
.container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 28px;
}

.shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  max-width: 1560px;
  margin: 0 auto;
  padding: 36px 28px 0;
  align-items: start;
  gap: 0;
}

.shell-side {
  position: sticky;
  top: 96px;
  height: calc(100vh - 112px);
  overflow-y: auto;
  border-right: 1px solid var(--c-line);
  padding-right: 28px;
}

.shell-main {
  min-width: 0;
  padding-left: 28px;
}

.section-block { padding: 40px 0; }
.section-carbon {
  background: var(--c-bg-card);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.section-dark { background: var(--c-bg); }

/* ---------- Accessibility & Scroll Progress ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1500;
  padding: 10px 18px;
  background: var(--c-green);
  color: #0D1117;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 4px;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease-out);
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1300;
  background: linear-gradient(90deg, var(--c-green), var(--c-blue));
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 14px;
  z-index: 1200;
  padding: 0 20px;
}

.header-inner {
  position: relative;
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px 8px 18px;
  background: rgba(22, 28, 36, 0.82);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--c-green) 0%, var(--c-blue) 100%);
  color: #0D1117;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  clip-path: polygon(0 0, 80% 0, 100% 20%, 100% 100%, 0 100%);
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.35);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--c-text);
  white-space: nowrap;
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-item { line-height: 1; }

.nav-link {
  display: inline-block;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-muted);
  white-space: nowrap;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nav-link:hover { color: var(--c-green); background: rgba(57, 255, 20, 0.08); }

.nav-link[aria-current="page"] {
  color: #0D1117;
  background: var(--c-green);
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.35);
  font-weight: 800;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--c-orange);
  color: #0D1117;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(255, 92, 0, 0.35);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255, 92, 0, 0.5); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid var(--c-line);
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--c-green);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s ease;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sharp);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: var(--c-green);
  color: #0D1117;
  box-shadow: 0 6px 20px rgba(57, 255, 20, 0.25);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(57, 255, 20, 0.4); }

.btn-ghost {
  border: 1px solid var(--c-line);
  color: var(--c-text);
  background: transparent;
}

.btn-ghost:hover { border-color: var(--c-blue); color: var(--c-blue); box-shadow: 0 0 16px rgba(0, 217, 255, 0.15); }

.btn-accent {
  background: var(--c-orange);
  color: #0D1117;
  box-shadow: 0 6px 20px rgba(255, 92, 0, 0.3);
}

.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255, 92, 0, 0.45); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 0 4px;
  font-size: 13px;
  color: var(--c-muted);
}

.breadcrumb-link { color: var(--c-blue); font-weight: 500; transition: color 0.2s ease; }
.breadcrumb-link:hover { color: var(--c-green); }
.breadcrumb-sep { color: var(--c-line); user-select: none; margin: 0 4px; }
.breadcrumb-current { color: var(--c-text); font-weight: 700; }

/* ---------- Typography & Prose ---------- */
.prose {
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.9;
  color: var(--c-text);
}

.prose h2, .prose h3, .prose h4 { font-family: var(--font-display); margin: 36px 0 14px; }
.prose h2 { font-size: 26px; }
.prose h3 { font-size: 22px; }
.prose p { margin-bottom: 18px; }
.prose strong { color: var(--c-green); font-weight: 700; }
.prose a { color: var(--c-blue); border-bottom: 1px solid rgba(0, 217, 255, 0.3); transition: border-color 0.2s ease, color 0.2s ease; }
.prose a:hover { color: var(--c-green); border-bottom-color: var(--c-green); }
.prose ul { margin-bottom: 18px; padding-left: 4px; }
.prose ul li { position: relative; padding-left: 18px; margin-bottom: 6px; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; background: var(--c-blue); }

.display-hero {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--c-text);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--c-text);
}

.t-lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--c-muted);
  max-width: 60ch;
}

.t-num {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 700;
}

.stat-row { display: flex; flex-wrap: wrap; gap: 24px; }
.stat-item { flex: 1 1 160px; border-left: 2px solid var(--c-green); padding-left: 14px; }
.stat-num { font-family: var(--font-mono); font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--c-text); }
.stat-label { font-size: 12px; color: var(--c-muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Cards, Tags, Tabs ---------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.data-card {
  position: relative;
  overflow: hidden;
  background: var(--c-bg-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sharp);
  padding: 22px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
}

.data-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  border-top: 2px solid var(--c-green);
  border-right: 2px solid var(--c-green);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.data-card:hover { transform: translateY(-4px); border-color: rgba(0, 217, 255, 0.5); box-shadow: 0 12px 30px rgba(0, 217, 255, 0.12); }
.data-card:hover::after { opacity: 1; }

.data-num { font-family: var(--font-mono); font-size: 34px; font-weight: 800; line-height: 1.08; color: var(--c-text); }
.data-label { font-size: 13px; color: var(--c-muted); letter-spacing: 0.05em; margin-top: 6px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid;
  line-height: 1.5;
}

.tag-green { color: var(--c-green); border-color: rgba(57, 255, 20, 0.45); background: rgba(57, 255, 20, 0.07); }
.tag-blue { color: var(--c-blue); border-color: rgba(0, 217, 255, 0.45); background: rgba(0, 217, 255, 0.07); }
.tag-orange { color: var(--c-orange); border-color: rgba(255, 92, 0, 0.5); background: rgba(255, 92, 0, 0.08); }
.tag-muted { color: var(--c-muted); border-color: var(--c-line); background: var(--c-bg-card); }

.tabs { margin: 24px 0; }

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-line);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-line);
  background: var(--c-bg-card);
  color: var(--c-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
}

.tab-btn:hover { border-color: var(--c-blue); color: var(--c-blue); }

.tab-btn[aria-selected="true"] {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: #0D1117;
  box-shadow: 0 0 16px rgba(0, 217, 255, 0.35);
}

.tab-panel { padding-top: 20px; }
.tab-panel[hidden] { display: none; }
.tab-panel[data-active="true"] { animation: fadeUp 0.3s var(--ease-out); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Image Frame ---------- */
.image-frame {
  position: relative;
  overflow: hidden;
  background: var(--c-bg-steel);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sharp);
}

.image-frame::before { content: ""; display: block; aspect-ratio: 16 / 9; }
.image-frame[data-ratio="4:3"]::before { aspect-ratio: 4 / 3; }
.image-frame[data-ratio="1:1"]::before { aspect-ratio: 1 / 1; }
.image-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.image-frame-placeholder::after {
  content: "IMAGE";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--c-muted);
  background-image:
    linear-gradient(rgba(45, 55, 72, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 55, 72, 0.4) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ---------- Decorative & Utilities ---------- */
.grid-bg {
  background-image:
    linear-gradient(rgba(45, 55, 72, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 55, 72, 0.5) 1px, transparent 1px);
  background-size: 32px 32px;
}

.speed-lines { position: relative; overflow: hidden; }

.speed-lines::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-55deg, rgba(0, 217, 255, 0.05) 0px, rgba(0, 217, 255, 0.05) 1px, transparent 2px, transparent 16px);
  pointer-events: none;
}

.cut-edge { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%); }

.text-muted { color: var(--c-muted); }
.text-green { color: var(--c-green); }
.text-blue { color: var(--c-blue); }
.text-orange { color: var(--c-orange); }
.bg-carbon { background: var(--c-bg-card); }
.bg-steel { background: var(--c-bg-steel); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  margin-top: 80px;
  background: #0A0E13;
  border-top: 1px solid var(--c-line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--c-green), var(--c-blue), var(--c-orange));
  opacity: 0.8;
}

.footer-grid {
  max-width: 1480px;
  margin: 0 auto;
  padding: 56px 28px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 40px;
}

.footer-brand { min-width: 0; }
.footer-col { min-width: 0; }

.footer-brand-logo {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--c-green), var(--c-blue));
  color: #0D1117;
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 16px;
  line-height: 1;
  clip-path: polygon(0 0, 80% 0, 100% 20%, 100% 100%, 0 100%);
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.7;
  max-width: 34ch;
  border-left: 2px solid var(--c-green);
  padding-left: 12px;
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text);
  margin-bottom: 16px;
}

.footer-heading::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--c-green);
  box-shadow: 0 0 8px var(--c-green);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list li { font-size: 14px; color: var(--c-muted); line-height: 1.5; }

.footer-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  line-height: 1.5;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-link:hover { color: var(--c-green); padding-left: 4px; }

.footer-link-contact {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  color: var(--c-blue);
  transition: color 0.2s ease;
}

.footer-link-contact:hover { color: var(--c-green); padding-left: 4px; }

.footer-icp {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.footer-bottom {
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 28px 28px;
  border-top: 1px solid rgba(45, 55, 72, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.footer-bottom p { font-size: 13px; color: var(--c-muted); }
.footer-trust { font-size: 12px; opacity: 0.75; max-width: 74ch; line-height: 1.6; }

/* ---------- Back to Top ---------- */
.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1100;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c-bg-card);
  border: 1px solid var(--c-line);
  color: var(--c-green);
  font-size: 20px;
  line-height: 1;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out), visibility 0.3s, box-shadow 0.3s ease, border-color 0.3s ease;
}

.back-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { border-color: var(--c-green); box-shadow: 0 0 24px rgba(57, 255, 20, 0.35); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 20px 20px 0;
  }

  .shell-side {
    position: static;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--c-line);
    padding: 0 0 20px;
    margin-bottom: 24px;
  }

  .shell-main { padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 920px) {
  .site-header { top: 10px; padding: 0 14px; }
  .header-inner { border-radius: 18px; padding: 8px 10px 8px 14px; }
  .brand-text { font-size: 15px; }
  .brand-logo { width: 34px; height: 34px; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: rgba(22, 28, 36, 0.98);
    border: 1px solid var(--c-line);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  }

  .site-nav[data-open] { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link {
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
  }

  .nav-cta { margin-top: 4px; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .shell { padding: 16px 14px 0; }
  .section-block { padding: 28px 0; }
  .grid-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; padding: 40px 20px 24px; }
  .footer-bottom { padding: 18px 20px 24px; }

  .tab-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
  }

  .tab-list::-webkit-scrollbar { display: none; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .tab-panel[data-active="true"] { animation: none; }
}
