/* ==========================================
   天博TB官方品牌站·China · 共享样式表
   File: /assets/site.css
   ========================================== */

/* ---------- 01 · Reset & Tokens ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy-950);
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

:root {
  --navy-950: #0B1626;
  --navy-900: #10203A;
  --navy-700: #1C3153;
  --blue-400: #3B7DD8;
  --gold-500: #D4AF37;
  --gold-300: #F0CE6C;
  --orange-500: #FF7A00;
  --off-white: #F2F1EC;
  --slate-300: #A8B3C7;
  --ink-800: #1A1A1A;
  --font-display: "Oswald", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-numeric: "DIN Alternate", "Roboto Mono", "Courier New", monospace;
  --border-dim: rgba(168, 179, 199, 0.12);
  --border-gold: rgba(212, 175, 55, 0.35);
  --content-w: 1200px;
  --gutter: 24px;
}

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

p {
  margin: 0;
}

a {
  color: var(--blue-400);
  text-decoration: none;
}

a:hover {
  color: var(--gold-300);
}

ul,
ol {
  list-style: none;
}

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

::selection {
  background: var(--gold-500);
  color: var(--navy-950);
}

/* ---------- 02 · Layout ---------- */
.container {
  width: min(var(--content-w), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

#main-content {
  display: block;
  flex: 1 0 auto;
  min-height: 50vh;
  outline: none;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

@media (max-width: 991px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 03 · Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn-gold {
  background: var(--gold-500);
  color: var(--navy-950);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.btn-gold:hover {
  background: var(--gold-300);
  color: var(--navy-950);
}

.btn-ghost {
  background: transparent;
  border-color: var(--blue-400);
  color: var(--off-white);
}

.btn-ghost:hover {
  background: rgba(59, 125, 216, 0.12);
  color: var(--off-white);
}

/* ---------- 04 · Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 24px 0 0;
  font-size: 13px;
  color: var(--slate-300);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  color: var(--slate-300);
  text-decoration: none;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 8px;
  font-family: var(--font-numeric);
  color: var(--navy-700);
}

.breadcrumb-item:hover {
  color: var(--gold-300);
}

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

/* ---------- 05 · Section Label ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 8px;
  border: 1px solid var(--border-gold);
  background: rgba(212, 175, 55, 0.06);
  font-family: var(--font-numeric);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold-300);
  -webkit-clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
}

/* ---------- 06 · Panel ---------- */
.panel {
  background: var(--navy-900);
  border: 1px solid var(--border-dim);
  padding: clamp(18px, 3vw, 32px);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  transition: border-color 0.2s;
}

.panel:hover {
  border-color: var(--border-gold);
}

.panel-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--off-white);
}

.panel-body {
  font-size: 15px;
  color: var(--slate-300);
}

/* ---------- 07 · Data Table ---------- */
.data-table {
  border-top: 2px solid var(--gold-500);
}

.data-table-head,
.data-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: baseline;
}

.data-table-head {
  padding: 8px 0;
  border-bottom: 1px solid var(--gold-500);
  font-family: var(--font-numeric);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--slate-300);
}

.data-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-dim);
  text-decoration: none;
  transition: background-color 0.2s;
}

.data-row:hover {
  background: rgba(59, 125, 216, 0.08);
}

.data-rank {
  font-family: var(--font-numeric);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-500);
}

.data-name {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--off-white);
}

.data-value {
  font-family: var(--font-numeric);
  font-size: 14px;
  color: var(--orange-500);
}

.data-value.is-up {
  color: var(--orange-500);
}

.data-value.is-down {
  color: var(--blue-400);
}

/* ---------- 08 · Note & Divider ---------- */
.note {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--gold-500);
  font-size: 13px;
  line-height: 1.6;
  color: var(--slate-300);
}

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--gold-500), transparent);
  margin: 32px 0;
}

/* ---------- 09 · Tabs ---------- */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--navy-700);
}

.tab-btn {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  cursor: pointer;
  color: var(--slate-300);
  transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
  color: var(--off-white);
}

.tab-btn[data-tab-active="true"],
.tab-btn[aria-selected="true"] {
  border-bottom-color: var(--gold-500);
  color: var(--gold-300);
}

/* ---------- 10 · Media Container ---------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--navy-700);
  background-image:
    linear-gradient(rgba(59, 125, 216, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 125, 216, 0.14) 1px, transparent 1px);
  background-size: 20px 20px;
}

.media-wide {
  aspect-ratio: 21 / 9;
}

.media-tall {
  aspect-ratio: 4 / 5;
}

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

.media-label {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  padding: 4px 8px;
  border-top: 1px solid var(--gold-500);
  border-right: 1px solid var(--gold-500);
  background: rgba(11, 22, 38, 0.82);
  font-family: var(--font-numeric);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--off-white);
}

/* ---------- 11 · Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--gold-500);
  color: var(--navy-950);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 8px;
}

/* ---------- 12 · Header ---------- */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--navy-950);
}

.header-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 110;
  width: 100%;
  height: 3px;
  pointer-events: none;
}

.header-progress::before {
  content: "";
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--orange-500));
}

.header-utility {
  background: var(--navy-900);
  border-bottom: 1px solid rgba(168, 179, 199, 0.08);
}

.header-utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 6px;
  font-family: var(--font-numeric);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.header-coord {
  color: var(--gold-500);
}

.header-update {
  color: var(--slate-300);
}

.header-masthead {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding-block: 18px;
}

.header-cta {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 9px 20px;
  font-size: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  padding: 4px 10px;
  background: var(--gold-500);
  color: var(--navy-950);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}

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

.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--off-white);
}

.brand-china {
  color: var(--gold-500);
}

.brand-tagline {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--slate-300);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--navy-700);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  color: var(--off-white);
}

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

.nav-toggle-label {
  letter-spacing: 0.1em;
}

.nav-toggle-bar {
  position: relative;
  width: 18px;
  height: 2px;
  background: var(--gold-500);
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--gold-500);
  transition: transform 0.25s, top 0.25s, background 0.25s;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  background: var(--navy-900);
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--navy-700);
}

.nav-container {
  position: relative;
}

.nav-list {
  counter-reset: nav;
  display: flex;
  justify-content: center;
}

.nav-list li {
  counter-increment: nav;
}

.nav-link {
  display: block;
  position: relative;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--off-white);
  text-decoration: none;
}

.nav-link::before {
  content: "0" counter(nav) " / ";
  margin-right: 8px;
  font-family: var(--font-numeric);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold-500);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--orange-500));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s;
}

.nav-link:hover {
  color: var(--gold-300);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--gold-300);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-mobile-cta {
  display: none;
}

@media (max-width: 991px) and (min-width: 768px) {
  .nav-link {
    padding: 12px 14px;
    font-size: 14px;
  }

  .nav-link::after {
    left: 14px;
    right: 14px;
  }
}

@media (max-width: 767px) {
  .header-utility {
    display: none;
  }

  .header-masthead {
    justify-content: space-between;
    gap: 10px;
    padding-block: 12px;
  }

  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    position: static;
    transform: none;
  }

  .brand-mark {
    font-size: 22px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-tagline {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 55;
    background: var(--navy-900);
    border-bottom: 1px solid var(--navy-700);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  }

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

  .nav-list {
    flex-direction: column;
    padding-block: 4px;
  }

  .nav-link {
    padding: 14px 24px;
    border-bottom: 1px solid rgba(168, 179, 199, 0.08);
  }

  .nav-link::before {
    content: "0" counter(nav) " / ";
  }

  .nav-link::after {
    left: 0;
    right: auto;
    bottom: 0;
    width: 3px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: top;
  }

  .nav-link:hover::after,
  .nav-link[aria-current="page"]::after {
    transform: scaleY(1);
  }

  .nav-mobile-cta {
    display: inline-flex;
    margin: 4px 20px 18px;
  }
}

/* ---------- 13 · Footer ---------- */
.site-footer {
  position: relative;
  padding-top: 56px;
  background: var(--navy-950);
  border-top: 1px solid var(--navy-700);
}

.site-footer > .container {
  position: relative;
  z-index: 1;
}

.footer-grid {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(168, 179, 199, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 179, 199, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(168, 179, 199, 0.1);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand-link {
  text-decoration: none;
}

.site-footer .brand-mark {
  font-size: 22px;
}

.site-footer .brand-name {
  font-size: 20px;
}

.site-footer .brand-tagline {
  font-size: 11px;
}

.footer-about {
  font-size: 14px;
  line-height: 1.8;
  color: var(--slate-300);
}

.footer-trust {
  padding: 10px 14px 10px 12px;
  border: 1px solid var(--border-gold);
  border-left: 3px solid var(--gold-500);
  background: rgba(212, 175, 55, 0.05);
  font-size: 13px;
  line-height: 1.7;
  color: var(--gold-300);
}

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

.footer-heading {
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--navy-700);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--off-white);
}

.footer-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 30px;
  height: 2px;
  background: var(--gold-500);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-link {
  font-size: 14px;
  color: var(--slate-300);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}

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

.footer-contact {
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--slate-300);
}

.contact-label {
  color: var(--gold-300);
}

.contact-note {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(168, 179, 199, 0.18);
  font-size: 12px;
  color: var(--slate-300);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 18px;
  font-family: var(--font-numeric);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate-300);
}

.footer-copy {
  color: var(--slate-300);
}

.footer-icp {
  color: var(--slate-300);
}

@media (max-width: 991px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 575px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 14 · Back to Top ---------- */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  border: 1px solid var(--gold-500);
  background: var(--navy-900);
  font-family: var(--font-numeric);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--gold-300);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.2s;
}

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

.back-top:hover {
  background: var(--gold-500);
  color: var(--navy-950);
}

@media (max-width: 767px) {
  .back-top {
    right: 16px;
    bottom: 16px;
    min-width: 42px;
    height: 42px;
  }
}

/* ---------- 15 · Focus & Reduced Motion ---------- */
:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

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

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