/* ================================================================
   Qilian Tech — Visual Enhancement Layer
   Performance-first: no fixed gradients, minimal animations,
   only CSS properties that don't trigger repaints.
   ================================================================ */

/* ---- 1. TYPOGRAPHY ---- */
body {
  font-family:
    "Inter",
    "PingFang SC",
    "Noto Sans SC",
    "Microsoft YaHei",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero-title,
.section-title,
.stat-value,
.chart-title,
.service-title {
  font-family:
    "Space Grotesk", "Inter", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-family: "Space Grotesk", "Inter", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 500;
  color: #38d5ff;
  opacity: 0.8;
}

/* ---- 2. NAVIGATION ---- */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  inset: auto 0.75rem 2px 0.75rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38d5ff, #2dd4bf);
  transform: scaleX(0);
  transition: transform 220ms ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a:focus-visible,
.hamburger:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(246, 200, 95, 0.92);
  outline-offset: 3px;
}

/* ---- 3. HERO ---- */
.stat-card {
  transition:
    transform 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 213, 255, 0.4);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(56, 213, 255, 0.1);
}

.stat-value {
  background: linear-gradient(135deg, #38d5ff, #2dd4bf, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- 4. SECTION HEADERS ---- */
.section-header {
  position: relative;
}

.section-header::before {
  content: attr(data-num);
  position: absolute;
  top: -0.1em;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Space Grotesk", monospace;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: rgba(56, 213, 255, 0.05);
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

.section-title {
  position: relative;
  z-index: 1;
}

.section-title::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38d5ff, #2dd4bf, #f6c85f);
  margin: 16px auto 0;
}

/* ---- DATA SECTION ---- */
.data-section .chart-card {
  background: rgba(18, 20, 30, 0.9) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-left: 3px solid #38d5ff !important;
  border-radius: 14px !important;
  padding: 36px;
}

.chart-title {
  font-family: "Space Grotesk", "Inter", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.9);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.data-big-number {
  font-family: "Space Grotesk", monospace;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  color: #f8fafc;
}

.data-big-number .data-unit {
  font-size: 0.4em;
  font-weight: 400;
  color: rgba(148, 163, 184, 0.6);
  margin-left: 4px;
}

.data-progress {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.data-progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.data-progress-label {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.7);
  min-width: 70px;
  text-align: right;
}

.data-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.data-progress-fill {
  height: 100%;
  border-radius: 999px;
}

.data-progress-value {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.6);
  min-width: 36px;
  font-family: "Space Grotesk", monospace;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .data-section .chart-card {
    padding: 24px !important;
  }

  .data-progress-label {
    min-width: 56px;
    font-size: 0.75rem;
  }
}

/* ---- 5. CARDS ---- */
.chart-card,
.service-card {
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.chart-card:hover,
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 213, 255, 0.4);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

.service-icon {
  background: linear-gradient(135deg, rgba(56, 213, 255, 0.18), rgba(246, 200, 95, 0.12));
  box-shadow: inset 0 0 0 1px rgba(56, 213, 255, 0.2);
  border-radius: 8px;
}

/* ---- 6. CHARTS ---- */
.chart-title {
  color: #f8fafc;
}

/* ---- 7. ABOUT VISUAL ---- */
.about-visual {
  overflow: hidden;
  border-radius: 14px;
}

/* ---- 8. LINKS ---- */
.more-link {
  color: #38d5ff;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    gap 200ms ease,
    color 200ms ease;
}

.more-link:hover {
  gap: 12px;
  color: #2dd4bf;
}

/* ---- 9. BUTTONS ---- */
.btn-primary,
.btn-large {
  overflow: hidden;
}

.btn-primary:hover,
.btn-large:hover {
  transform: translateY(-2px);
}

/* ---- 10. BACK TO TOP ---- */
.back-to-top {
  border-radius: 50%;
  border: 1px solid rgba(56, 213, 255, 0.32);
  transition: transform 200ms ease;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* ---- 11. FOOTER ---- */
.footer-qrcode {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  transition: transform 300ms ease;
}

.footer-qrcode:hover {
  transform: scale(1.05);
}

/* ---- 12. REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- DESIGN TOKENS: SPACING SYSTEM (8px baseline) ---- */
:root {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
}

/* ---- GRID SYSTEM ---- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

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

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

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

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ---- CARD SYSTEM - OPTIONAL UTILITY ---- */
.ds-card {
  background: rgba(26, 26, 36, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  padding: var(--space-8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ds-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 213, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.ds-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(56, 213, 255, 0.1);
  border-color: rgba(56, 213, 255, 0.3);
}

.ds-card:hover::before {
  opacity: 1;
}

/* ---- TYPOGRAPHY UTILITIES - ONLY WHEN EXPLICITLY USED ---- */
.ds-h1,
.ds-h2,
.ds-h3,
.ds-h4 {
  font-family: "Space Grotesk", "Inter", "PingFang SC", "Noto Sans SC", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.ds-h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.ds-h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.ds-h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.ds-h4 {
  font-size: 1.25rem;
}

.ds-text-small {
  font-size: 0.875rem;
  line-height: 1.6;
}

.ds-caption {
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.7);
}

/* ---- PERFORMANCE AND LOADING UTILITIES ---- */
img[loading="lazy"] {
  will-change: transform;
}

.ds-skeleton {
  background: linear-gradient(90deg, rgba(30, 30, 46, 0.8) 25%, rgba(45, 45, 66, 0.8) 50%, rgba(30, 30, 46, 0.8) 75%);
  background-size: 200% 100%;
  animation: ds-skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes ds-skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ---- SCROLL ANIMATIONS ---- */
.ds-fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ds-fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.ds-fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ds-fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.ds-fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ds-fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.ds-scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.ds-scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

.ds-stagger-1 {
  transition-delay: 0.1s;
}

.ds-stagger-2 {
  transition-delay: 0.2s;
}

.ds-stagger-3 {
  transition-delay: 0.3s;
}

.ds-stagger-4 {
  transition-delay: 0.4s;
}

.ds-stagger-5 {
  transition-delay: 0.5s;
}

/* ---- SECTION PADDING UTILITIES ---- */
.ds-section {
  padding: var(--space-20) 0;
}

.ds-section-sm {
  padding: var(--space-12) 0;
}

.ds-section-lg {
  padding: var(--space-24) 0;
}

/* ---- UTILITY CLASSES ---- */
.ds-text-center {
  text-align: center;
}

.ds-text-left {
  text-align: left;
}

.ds-text-right {
  text-align: right;
}

.ds-flex {
  display: flex;
}

.ds-flex-col {
  flex-direction: column;
}

.ds-items-center {
  align-items: center;
}

.ds-justify-center {
  justify-content: center;
}

.ds-justify-between {
  justify-content: space-between;
}

.ds-gap-2 {
  gap: var(--space-2);
}

.ds-gap-4 {
  gap: var(--space-4);
}

.ds-gap-6 {
  gap: var(--space-6);
}

.ds-gap-8 {
  gap: var(--space-8);
}

.ds-mb-4 {
  margin-bottom: var(--space-4);
}

.ds-mb-6 {
  margin-bottom: var(--space-6);
}

.ds-mb-8 {
  margin-bottom: var(--space-8);
}

.ds-mt-4 {
  margin-top: var(--space-4);
}

.ds-mt-6 {
  margin-top: var(--space-6);
}

.ds-mt-8 {
  margin-top: var(--space-8);
}