:root {
  --deep-navy: #0A1B2A;
  --royal-blue: #16324F;
  --gold: #C9A24B;
  --bright-cyan: #28D1CC;
  --orange-red: #FF5C38;
  --electric-purple: #8B7CF6;
  --mist-blue: #D6E5F0;
  --soft-white: #F5F7FA;
  --ink: #0B1A2A;
  --mid-gray: #8A9BA8;

  --header-h: 72px;
  --container-w: 1280px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04), 0 6px 20px rgba(0,0,0,0.35);
  --shadow-float: 0 2px 0 rgba(255,255,255,0.06), 0 12px 32px rgba(0,0,0,0.5);
  --transition: 0.3s ease;
  --font-title: "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
}

[hidden] { display: none !important; }

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

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

body {
  background: var(--deep-navy);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(22, 50, 79, 0.65), transparent 70%),
    radial-gradient(ellipse 40% 30% at 90% 10%, rgba(40, 209, 204, 0.04), transparent 70%),
    radial-gradient(ellipse 40% 30% at 10% 30%, rgba(139, 124, 246, 0.04), transparent 70%);
  background-attachment: fixed;
  color: var(--soft-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--bright-cyan); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--gold); }

ul, ol { list-style: none; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 1000;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: var(--radius-s);
  font-weight: 700;
  font-size: 0.875rem;
  transition: top 0.3s ease;
}
.skip-link:focus-visible { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container-w) + 48px);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ============ Header ============ */
.site-header {
  position: relative;
  z-index: 100;
  background: rgba(10, 27, 42, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 162, 75, 0.22);
}
.header-inner {
  position: relative;
  max-width: calc(var(--container-w) + 48px);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}
.scroll-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--bright-cyan), var(--electric-purple));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  z-index: 3;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--soft-white);
}
.brand:hover { color: var(--soft-white); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--gold);
  background: rgba(22, 50, 79, 0.8);
  border: 1px solid rgba(201, 162, 75, 0.4);
  border-radius: 8px;
}
.brand-mark-svg { width: 22px; height: 22px; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-title); font-weight: 900; font-size: 1.125rem; letter-spacing: 0.04em; }
.brand-sub { font-size: 0.7rem; color: var(--mid-gray); letter-spacing: 0.06em; }
.brand:hover .brand-mark { border-color: var(--gold); box-shadow: 0 0 12px rgba(201, 162, 75, 0.25); }

.cat-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(22, 50, 79, 0.7);
  border: 1px solid rgba(201, 162, 75, 0.3);
  border-radius: 999px;
  flex-shrink: 0;
  line-height: 1;
}
.cat-counter-num {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.0625rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.cat-counter-label { font-size: 0.75rem; color: var(--mid-gray); }

.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-link {
  display: block;
  padding: 8px 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--mid-gray);
  border-radius: var(--radius-s);
  transition: color 0.3s ease, background-color 0.3s ease;
}
.nav-link:hover { color: var(--gold); background-color: rgba(201, 162, 75, 0.08); }
.nav-link[aria-current="page"] {
  color: var(--gold);
}
.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--bright-cyan));
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: rgba(22, 50, 79, 0.8);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: 10px;
  transition: border-color 0.3s ease;
}
.nav-toggle:hover { border-color: var(--gold); }
.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s 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); }

.top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--royal-blue);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: 10px;
  color: var(--gold);
  flex-shrink: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, border-color 0.3s ease;
}
.top-btn:hover, .top-btn:focus-visible { border-color: var(--gold); color: var(--bright-cyan); }
.top-btn.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.top-btn-icon { width: 20px; height: 20px; }

/* ============ Footer ============ */
.site-footer {
  position: relative;
  margin-top: auto;
  background: var(--royal-blue);
  border-top: 1px solid rgba(201, 162, 75, 0.2);
}
.footer-arch-svg {
  width: 100%;
  height: 40px;
  display: block;
  padding: 0 24px;
}
.footer-inner {
  max-width: calc(var(--container-w) + 48px);
  margin: 0 auto;
  padding: 0 24px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1.2fr;
  gap: 40px;
  padding: 32px 0 24px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--soft-white); }
.footer-brand:hover { color: var(--soft-white); }
.footer-brand .brand-mark { width: 32px; height: 32px; border-radius: 6px; }
.footer-brand .brand-mark-svg { width: 19px; height: 19px; }
.footer-brand .brand-name { font-size: 1.0625rem; }
.footer-brand .brand-sub { font-size: 0.675rem; }

.footer-desc {
  margin-top: 12px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--soft-white);
  letter-spacing: 0.02em;
}
.footer-trust {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--mid-gray);
  line-height: 1.65;
  max-width: 34em;
}

.footer-heading {
  font-family: var(--font-title);
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.heading-cable {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--bright-cyan));
  border-radius: 2px;
}

.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: var(--mid-gray);
  font-size: 0.875rem;
  transition: color 0.3s ease, padding-left 0.3s ease;
}
.footer-links a:hover {
  color: var(--bright-cyan);
  padding-left: 4px;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.875rem;
  color: var(--mid-gray);
}
.contact-label { flex-shrink: 0; color: var(--gold); font-size: 0.8125rem; }
.contact-value { word-break: break-all; }

.footer-note {
  margin-top: 12px;
  font-size: 0.781rem;
  color: var(--mid-gray);
  line-height: 1.6;
  border-left: 2px solid rgba(201, 162, 75, 0.4);
  padding-left: 10px;
}

.footer-legal {
  border-top: 1px solid rgba(201, 162, 75, 0.18);
  padding: 16px 0 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.footer-copyright { font-size: 0.8125rem; color: var(--mid-gray); }
.footer-copyright span[data-year] { color: var(--gold); }
.footer-statement { font-size: 0.75rem; color: var(--mid-gray); }

/* ============ Base Components ============ */
.section { padding: 48px 0; }
.section-head { margin-bottom: 24px; }
.section-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--soft-white);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.2;
}
.section-title::before {
  content: '';
  width: 42px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--bright-cyan));
  border-radius: 3px;
  flex-shrink: 0;
}
.section-meta { margin-top: 8px; color: var(--mid-gray); font-size: 0.9375rem; margin-left: 54px; }

.page-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  color: var(--soft-white);
  line-height: 1.15;
}
.page-excerpt { margin-top: 12px; color: var(--mid-gray); font-size: 1.0625rem; max-width: 42em; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(201, 162, 75, 0.1);
}
.breadcrumb li { display: flex; align-items: center; gap: 6px; color: var(--mid-gray); font-size: 0.875rem; }
.breadcrumb li::after { content: '→'; color: var(--gold); opacity: 0.55; font-size: 0.8rem; }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a { color: var(--mid-gray); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb [aria-current] { color: var(--gold); font-weight: 600; }

.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--royal-blue);
  border: 1px solid rgba(201, 162, 75, 0.16);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.card::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 30px;
  height: 30px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  border-radius: 0 var(--radius-m) 0 0;
  transition: width 0.3s ease, height 0.3s ease;
}
.card:hover {
  border-color: rgba(201, 162, 75, 0.45);
  box-shadow: var(--shadow-float);
}
.card:hover::after { width: 36px; height: 36px; }

.card--light { background: var(--mist-blue); color: var(--ink); border-color: rgba(11, 26, 42, 0.12); box-shadow: 0 1px 0 rgba(255,255,255,0.5), 0 6px 20px rgba(0,0,0,0.18); }
.card--light::after { border-color: rgba(201, 162, 75, 0.85); }
.card--light .section-title { color: var(--ink); }
.card--light .section-meta { color: rgba(11, 26, 42, 0.6); }

.card--accent { border-color: var(--gold); border-width: 1.5px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-body { font-size: 0.9375rem; color: var(--mid-gray); }
.card--light .card-body { color: rgba(11, 26, 42, 0.72); }
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(201, 162, 75, 0.14);
}

.card-num {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 2.25rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.card--light .card-num { color: var(--gold); }

.card-tag {
  position: absolute;
  top: -9px;
  left: 18px;
  z-index: 2;
  padding: 2px 12px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 4px;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.781rem;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
}
.tag--gold { background: rgba(201, 162, 75, 0.14); color: var(--gold); border-color: rgba(201, 162, 75, 0.35); }
.tag--cyan { background: rgba(40, 209, 204, 0.12); color: var(--bright-cyan); border-color: rgba(40, 209, 204, 0.3); }
.tag--purple { background: rgba(139, 124, 246, 0.14); color: var(--electric-purple); border-color: rgba(139, 124, 246, 0.35); }
.tag--orange { background: rgba(255, 92, 56, 0.12); color: var(--orange-red); border-color: rgba(255, 92, 56, 0.3); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-s);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--orange-red), #E04420);
  color: var(--soft-white);
  box-shadow: 0 4px 14px rgba(255, 92, 56, 0.3);
}
.btn--primary:hover { background: linear-gradient(135deg, #FF704E, #E04420); color: var(--soft-white); box-shadow: 0 6px 20px rgba(255, 92, 56, 0.4); }
.btn--gold {
  background: rgba(201, 162, 75, 0.08);
  color: var(--gold);
  border-color: rgba(201, 162, 75, 0.5);
}
.btn--gold:hover { background: rgba(201, 162, 75, 0.16); color: var(--gold); }
.btn--ghost {
  background: transparent;
  color: var(--mid-gray);
  border-color: rgba(138, 155, 168, 0.4);
}
.btn--ghost:hover { color: var(--bright-cyan); border-color: var(--bright-cyan); }
.btn--block { display: flex; width: 100%; }

.tag-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 16px; }
.tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 75, 0.25);
  background: rgba(22, 50, 79, 0.4);
  color: var(--mid-gray);
  font-size: 0.8125rem;
  font-weight: 700;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.tag-btn:hover { border-color: var(--gold); color: var(--gold); }
.tag-btn.is-active { background: var(--royal-blue); border-color: var(--gold); color: var(--gold); }

[data-tag-panel] { transition: opacity 0.3s ease; }
[data-tag-panel][hidden] { display: none !important; }

.text-muted { color: var(--mid-gray); }
.divider { height: 1px; background: linear-gradient(90deg, var(--gold), var(--bright-cyan), transparent); border: 0; margin: 24px 0; }

.img-shell {
  position: relative;
  background: var(--royal-blue);
  border: 1px dashed rgba(201, 162, 75, 0.3);
  border-radius: var(--radius-s);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-shell .img-caption {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.6875rem;
  color: var(--mid-gray);
  background: rgba(10, 27, 42, 0.7);
  padding: 2px 8px;
  border-radius: 3px;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 899px) {
  .cat-counter { display: none; }
  .brand-sub { display: none; }
  .brand-name { font-size: 1rem; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-mark-svg { width: 19px; height: 19px; }

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

  .site-nav {
    position: fixed;
    bottom: 18px;
    left: 18px;
    right: 18px;
    z-index: 300;
    max-width: 520px;
    margin: 0 auto;
    background: rgba(10, 27, 42, 0.96);
    border: 1px solid rgba(201, 162, 75, 0.4);
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  }
  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
    text-align: center;
    border-radius: 10px;
  }
  .nav-link[aria-current="page"] {
    background: rgba(201, 162, 75, 0.12);
  }
  .nav-link[aria-current="page"]::after { display: none; }

  .top-btn {
    width: 40px;
    height: 40px;
  }
  .top-btn.is-visible {
    position: fixed;
    right: 18px;
    bottom: 96px;
    z-index: 250;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
}

@media (min-width: 900px) {
  .top-btn.is-visible { display: inline-flex; }
}

@media (max-width: 767px) {
  .section { padding: 32px 0; }
  .section-title { font-size: 1.5rem; }
  .section-meta { margin-left: 0; font-size: 0.875rem; }
  .page-title { font-size: 1.75rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-inner { padding: 0 16px 20px; }
  .container { padding-left: 16px; padding-right: 16px; }
  .header-inner { padding: 0 16px; }
  .footer-arch-svg { padding: 0 16px; }
  .card { padding: 18px; }
  .btn--block-mobile { display: flex; width: 100%; }
}

@media (max-width: 479px) {
  .brand-sub { display: none; }
  .nav-toggle { width: 40px; height: 40px; }
  .top-btn { width: 38px; height: 38px; }
}

/* ============ Accessibility & Motion ============ */
@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;
  }
}
