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

/* ========== CSS VARIABLES ========== */
:root {
  --bg-primary: #0A1E3C;
  --bg-secondary: #102A48;
  --bg-card: #1B3A5F;
  --bg-elev: #162E52;
  --text-primary: #E3EEF7;
  --text-muted: #B8C4D0;
  --accent: #F5B301;
  --accent-light: #FFD66B;
  --accent-green: #00FF9D;
  --accent-green-dark: #00C77E;
  --alert: #FF4D6D;
  --font-heading: 'Oswald', 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --content-max: 1280px;
  --header-h-desktop: 64px;
  --header-h-mobile: 56px;
  --transition: 0.25s ease;
  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 18px rgba(245, 179, 1, 0.18);
  --shadow-green-glow: 0 0 14px rgba(0, 255, 157, 0.22);
}

/* ========== BASE & TYPOGRAPHY ========== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { text-wrap: pretty; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--accent-light);
}

ul, ol {
  padding-left: 1.5rem;
}

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

/* ========== UTILITIES ========== */
.container {
  width: min(100% - 48px, var(--content-max));
  margin-inline: auto;
}

.site-main {
  flex: 1;
  width: 100%;
  padding-bottom: 64px;
}

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

.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 300;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: top 0.2s ease;
}

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

/* ========== SCROLL PROGRESS ========== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 300;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
}

.scroll-progress::before {
  content: '';
  display: block;
  height: 100%;
  width: var(--scroll-pct, 0%);
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 45%, var(--accent-green) 100%);
  box-shadow: 0 0 12px rgba(245, 179, 1, 0.45);
  transition: width 0.08s linear;
}

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  padding: 0;
}

.header-inner {
  width: min(100% - 32px, var(--content-max));
  margin-inline: auto;
  height: var(--header-h-desktop);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  background: rgba(16, 42, 72, 0.95);
  border: 1px solid rgba(245, 179, 1, 0.22);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  position: relative;
}

.header-inner::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 36px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-green) 100%);
  border-radius: 2px;
  opacity: 0.5;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: rgba(245, 179, 1, 0.1);
  border: 1px solid rgba(245, 179, 1, 0.25);
  padding: 3px 12px 3px 10px;
  border-radius: var(--radius-sm);
  position: relative;
}

.brand-mark::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: live-pulse 2s ease-in-out infinite;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand:hover .brand-name {
  color: var(--accent-light);
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 6px;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin-right: auto;
  padding: 0;
}

.nav-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-green));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  color: var(--accent-light);
  background: rgba(245, 179, 1, 0.06);
}

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

.nav-link[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

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

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-cta {
  flex-shrink: 0;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(245, 179, 1, 0.22);
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--bg-primary);
  box-shadow: 0 4px 18px rgba(245, 179, 1, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(245, 179, 1, 0.08);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: rgba(245, 179, 1, 0.1);
  color: var(--accent-light);
  border-color: var(--accent-light);
}

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

.btn-lg {
  padding: 14px 28px;
  font-size: 17px;
  border-radius: var(--radius-md);
}

/* ========== NAV TOGGLE ========== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px;
  transition: border-color var(--transition), background var(--transition);
}

.nav-toggle:hover {
  border-color: var(--accent);
  background: rgba(245, 179, 1, 0.08);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease, background 0.2s ease;
  transform-origin: center;
}

.nav-toggle:hover .nav-toggle-bar {
  background: var(--accent);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 24px 0 8px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin-right: 8px;
  color: var(--text-muted);
  opacity: 0.4;
}

.breadcrumb-current {
  color: var(--accent);
}

/* ========== SECTION ========== */
.section {
  padding: 56px 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.section-title {
  font-size: 26px;
  font-weight: 700;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mono-label::before {
  content: '//';
  color: var(--accent-green);
  font-weight: 700;
}

/* ========== CARDS ========== */
.card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: rgba(245, 179, 1, 0.35);
}

/* ========== TAGS & CHIPS ========== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border: 1px solid rgba(245, 179, 1, 0.4);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  background: rgba(245, 179, 1, 0.06);
  white-space: nowrap;
}

.tag-green {
  border-color: rgba(0, 255, 157, 0.4);
  color: var(--accent-green);
  background: rgba(0, 255, 157, 0.06);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
}

/* ========== GRID ========== */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(12, 1fr);
}

.grid-2 > * { grid-column: span 6; }
.grid-3 > * { grid-column: span 4; }
.grid-4 > * { grid-column: span 3; }

/* ========== DATA DISPLAY ========== */
.stat-number {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.divider-angled {
  height: 24px;
  position: relative;
  overflow: hidden;
}

.divider-angled::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 179, 1, 0.5), rgba(0, 255, 157, 0.5), transparent);
  transform: rotate(-1.5deg);
}

/* ========== IMAGE PLACEHOLDER ========== */
.img-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 40%, rgba(245, 179, 1, 0.12) 100%),
    repeating-linear-gradient(-45deg, transparent 0 8px, rgba(255, 255, 255, 0.03) 8px 9px);
}

.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--radius-md) - 4px);
}

.img-placeholder--4-3 { aspect-ratio: 4 / 3; }
.img-placeholder--1-1 { aspect-ratio: 1 / 1; }

/* ========== REVEAL ========== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid rgba(245, 179, 1, 0.12);
  margin-top: auto;
}

/* Footer CTA */
.footer-cta {
  background: linear-gradient(135deg, rgba(27, 58, 95, 0.55) 0%, rgba(16, 42, 72, 0.92) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 48px 0;
  position: relative;
  overflow: hidden;
}

.footer-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-green) 100%);
}

.footer-cta::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(245, 179, 1, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.footer-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.footer-cta-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-cta-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.footer-cta-desc {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.03em;
}

.footer-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

/* Footer links grid */
.footer-links {
  padding: 48px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
}

.footer-brand {
  grid-column: span 4;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.footer-trust {
  font-size: 13px;
  color: rgba(184, 196, 208, 0.75);
  line-height: 1.65;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid rgba(245, 179, 1, 0.5);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.footer-col {
  grid-column: span 2;
}

.footer-contact {
  grid-column: span 4;
}

.footer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}

.footer-nav-list a {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition), padding-left var(--transition);
  display: inline-block;
}

.footer-nav-list a:hover {
  color: var(--accent);
  padding-left: 6px;
}

.contact-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.9;
  word-break: break-all;
}

.contact-line::before {
  content: '>';
  color: var(--accent-green);
  margin-right: 6px;
  font-weight: 700;
}

.contact-note {
  font-size: 13px;
  color: rgba(184, 196, 208, 0.7);
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(0, 255, 157, 0.035);
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

/* Footer bottom bar */
.footer-bottom {
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== ANIMATIONS ========== */
@keyframes live-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.7);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1280.98px) {
  .nav-link {
    padding: 8px 10px;
    font-size: 14px;
  }

  .header-inner {
    gap: 6px;
    padding: 0 16px;
  }

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

@media (max-width: 1023.98px) {
  .site-header {
    top: 10px;
  }

  .header-inner {
    width: calc(100% - 20px);
    height: var(--header-h-mobile);
    padding: 0 12px;
    gap: 8px;
  }

  .header-inner::before {
    display: none;
  }

  .brand {
    padding-left: 4px;
  }

  .brand-mark {
    font-size: 18px;
    padding: 2px 10px 2px 8px;
  }

  .brand-mark::after {
    top: 5px;
    right: 5px;
  }

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

  .site-nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(16, 42, 72, 0.98);
    border: 1px solid rgba(245, 179, 1, 0.28);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(245, 179, 1, 0.08);
    min-width: 0;
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-right: 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 12px 14px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link[aria-current="page"] {
    background: rgba(245, 179, 1, 0.08);
    border-left: 3px solid var(--accent);
    padding-left: 11px;
  }

  .header-actions {
    flex-direction: row;
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 1;
  }

  .header-actions .btn {
    flex: 1;
    text-align: center;
  }

  .header-cta {
    display: none;
  }

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

@media (max-width: 767.98px) {
  .footer-cta {
    padding: 36px 0;
  }

  .footer-cta-title {
    font-size: 22px;
  }

  .footer-cta-desc {
    font-size: 13px;
    line-height: 1.6;
  }

  .footer-links {
    padding: 36px 0 28px;
  }

  .footer-grid {
    row-gap: 24px;
  }

  .footer-brand {
    grid-column: span 12;
  }

  .footer-col {
    grid-column: span 6;
  }

  .footer-contact {
    grid-column: span 12;
  }

  .footer-bottom-inner {
    justify-content: center;
    text-align: center;
  }

  .section {
    padding: 36px 0;
  }

  .grid-2 > *,
  .grid-3 > *,
  .grid-4 > * {
    grid-column: span 12;
  }
}

@media (max-width: 480.98px) {
  .brand-name {
    font-size: 15px;
  }

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

  .header-inner {
    padding: 0 10px;
  }

  .footer-col {
    grid-column: span 12;
  }

  .footer-cta-actions .btn-lg {
    width: 100%;
  }
}

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

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

  .brand-mark::after {
    animation: none;
  }
}
