/* ============ 1. Design Tokens & Reset ============ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-primary: #0A1F3D;
  --c-dark: #0B0E1A;
  --c-white: #FFFFFF;
  --c-orange: #FF6A00;
  --c-green: #39FF14;
  --c-gray: #8A8F98;
  --c-moon: #F5F7FA;
  --c-line: #E0E4EA;
  --c-overlay: rgba(0, 0, 0, 0.65);
  --font-headline: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --container-w: 1200px;
  --container-pad: clamp(16px, 4vw, 40px);
  --header-top: 16px;
  --header-h: 68px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 200ms ease-out;
  --t-base: 400ms var(--ease-out);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-white);
  background: var(--c-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-headline);
  line-height: 1.15;
  font-weight: 900;
  color: inherit;
}

h1 { font-size: clamp(36px, 6vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 48px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }

p { max-width: 65ch; }

a {
  color: var(--c-orange);
  text-decoration: none;
  transition: color var(--t-fast), border-color var(--t-fast);
}

a:hover { color: var(--c-green); }

ul[class], ol[class] { list-style: none; }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

::selection {
  background: var(--c-orange);
  color: var(--c-white);
}

/* ============ 2. Accessibility ============ */
:focus-visible {
  outline: 2px solid var(--c-green);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 4000;
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--c-orange);
  color: var(--c-white);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: 2px;
  transition: top var(--t-fast);
}

.skip-link:focus {
  top: 16px;
  color: var(--c-white);
}

#main-content {
  display: block;
  flex: 1 0 auto;
  width: 100%;
  scroll-margin-top: calc(var(--header-top) + var(--header-h) + 24px);
}

:target {
  scroll-margin-top: calc(var(--header-top) + var(--header-h) + 24px);
}

/* ============ 3. Header & Navigation ============ */
.site-header {
  position: fixed;
  top: var(--header-top);
  left: 0;
  right: 0;
  margin-inline: auto;
  width: min(calc(100% - 32px), 1440px);
  z-index: 1000;
  background: rgba(11, 14, 26, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.30);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
  padding: 8px 10px 8px 24px;
  position: relative;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.brand-logo:hover {
  opacity: 0.88;
}

.brand-mark {
  width: 142px;
  height: auto;
  display: block;
}

.brand-logo--footer {
  margin-bottom: 16px;
}

.brand-logo--footer .brand-mark {
  width: 128px;
}

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

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

.nav-link {
  display: inline-block;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}

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

.nav-link[aria-current="page"] {
  color: var(--c-white);
  background: var(--c-orange);
  border-color: var(--c-orange);
}

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

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--c-orange);
}

.nav-toggle-bar {
  width: 18px;
  height: 2px;
  background: var(--c-white);
  border-radius: 1px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.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);
}

/* ============ 4. Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}

.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: var(--c-white);
}

.btn-primary:hover {
  background: #e85d00;
  border-color: #e85d00;
  color: var(--c-white);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--c-white);
}

.btn-outline:hover {
  border-color: var(--c-orange);
  color: var(--c-orange);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-white);
}

.btn-dark:hover {
  background: #122b52;
  border-color: #122b52;
  color: var(--c-white);
  transform: translateY(-2px);
}

.btn-cta {
  border-radius: 2px;
  animation: ctaPulse 2.8s var(--ease-out) infinite;
}

@keyframes ctaPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 106, 0, 0.55); }
  65% { box-shadow: 0 0 0 10px rgba(255, 106, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 106, 0, 0); }
}

/* ============ 5. Scroll Progress & Back to Top ============ */
.scroll-progress {
  position: absolute;
  top: -1px;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

.scroll-progress::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-orange) 0%, var(--c-green) 100%);
  transform: scaleX(var(--scroll-p, 0));
  transform-origin: 0 50%;
  transition: transform 80ms linear;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-orange);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  color: var(--c-white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast), background var(--t-fast);
  z-index: 900;
}

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

.back-to-top.is-visible:hover {
  background: #e85d00;
  transform: translateY(-2px);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ============ 6. Footer ============ */
.site-footer {
  position: relative;
  background: var(--c-dark);
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(100deg, var(--c-primary) 0%, var(--c-primary) 45%, var(--c-orange) 45.5%, var(--c-orange) 72%, var(--c-green) 72.5%, var(--c-green) 100%);
  z-index: 1;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--container-pad) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.9fr 1.4fr;
  gap: clamp(24px, 4vw, 56px);
}

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

.footer-trust {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: 32ch;
  margin-bottom: 12px;
}

.footer-tagline {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 900;
  color: var(--c-orange);
  letter-spacing: 0.05em;
}

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

.footer-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-white);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--c-orange);
}

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

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  transition: color var(--t-fast), transform var(--t-fast);
}

.footer-links a::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--c-orange);
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity var(--t-fast);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--c-white);
  transform: translateX(4px);
}

.footer-links a:hover::before,
.footer-links a:focus-visible::before {
  opacity: 1;
}

.footer-contact {
  display: grid;
  gap: 10px;
}

.footer-contact li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-contact-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.footer-contact-value {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  word-break: break-all;
}

.footer-bottom {
  margin-top: clamp(40px, 6vw, 64px);
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
}

.footer-bottom p {
  margin: 0;
  max-width: none;
}

.footer-icp {
  letter-spacing: 0.05em;
}

/* ============ 7. Layout Components ============ */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container-wide {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.panel-section {
  position: relative;
  padding-block: clamp(64px, 10vw, 128px);
  border-top: 1px solid var(--c-line);
}

.panel-section--dark {
  background: var(--c-primary);
  color: var(--c-white);
  border-top-color: rgba(255, 255, 255, 0.06);
}

.panel-section--moon {
  background: var(--c-moon);
  color: var(--c-primary);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 5vw, 48px);
}

.section-head--center {
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: 8px;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--c-green);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--c-gray);
  line-height: 1.6;
  max-width: 60ch;
}

.panel-section--dark .section-subtitle {
  color: rgba(255, 255, 255, 0.65);
}

/* ============ 8. Grid ============ */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2.5vw, 32px);
}

.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-9 { grid-column: span 9; }
.col-span-12 { grid-column: span 12; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 32px);
}

/* ============ 9. Content Components ============ */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: 2px;
  padding: clamp(20px, 3vw, 32px);
  position: relative;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(10, 31, 61, 0.10);
  border-color: var(--c-orange);
}

.card--dark {
  background: var(--c-primary);
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--c-white);
}

.card--dark:hover {
  border-color: var(--c-green);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.30);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-gray);
}

.card--dark p {
  color: rgba(255, 255, 255, 0.62);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--c-line);
  border-radius: 2px;
  background: var(--c-moon);
  color: var(--c-primary);
}

.tag--orange {
  background: rgba(255, 106, 0, 0.10);
  border-color: rgba(255, 106, 0, 0.35);
  color: var(--c-orange);
}

.tag--green {
  background: rgba(57, 255, 20, 0.08);
  border-color: rgba(57, 255, 20, 0.40);
  color: #177a06;
}

.tag--dark {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
  color: var(--c-white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--c-gray);
  padding: 16px 0;
  list-style: none;
}

.breadcrumb a {
  color: var(--c-gray);
}

.breadcrumb a:hover {
  color: var(--c-orange);
}

.breadcrumb-sep {
  color: var(--c-line);
}

.breadcrumb [aria-current="page"] {
  color: var(--c-primary);
  font-weight: 700;
}

.data-number {
  font-family: var(--font-mono);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--c-primary);
}

.data-number--orange { color: var(--c-orange); }
.data-number--green { color: #17A80A; }
.data-number--light { color: var(--c-white); }

.data-label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-gray);
  margin-top: 8px;
}

.img-frame {
  position: relative;
  overflow: hidden;
  background: var(--c-primary);
  border: 1px solid var(--c-line);
  border-radius: 2px;
  aspect-ratio: 4 / 3;
}

.img-frame--wide { aspect-ratio: 16 / 9; }
.img-frame--square { aspect-ratio: 1 / 1; }
.img-frame--tall { aspect-ratio: 3 / 4; }

.img-frame img,
.img-frame svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame .img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: var(--c-white);
}

.strip-diagonal {
  height: 8px;
  border: none;
  background: linear-gradient(100deg, var(--c-primary) 0%, var(--c-primary) 55%, var(--c-orange) 55.5%, var(--c-orange) 72%, var(--c-green) 72.5%, var(--c-green) 100%);
}

.scan-lines {
  position: relative;
}

.scan-lines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(57, 255, 20, 0.05) 3px,
    rgba(57, 255, 20, 0.05) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--c-primary);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: 2px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.input::placeholder {
  color: var(--c-gray);
}

.input:focus {
  border-color: var(--c-orange);
  box-shadow: 0 2px 0 var(--c-orange);
}

/* ============ 10. Motion & Reveal ============ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 11. Responsive ============ */
@media (max-width: 1024px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: block;
    background: rgba(11, 14, 26, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.40);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
    pointer-events: none;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

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

  .nav-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    border-radius: 999px;
  }

  .brand-mark {
    width: 128px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    top: 12px;
    width: min(calc(100% - 20px), 1440px);
  }

  .header-inner {
    gap: 10px;
    padding-left: 16px;
    padding-right: 8px;
    min-height: 60px;
  }

  .brand-mark {
    width: 110px;
  }

  .btn-cta {
    padding: 10px 16px;
    font-size: 13px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .brand-logo--footer .brand-mark {
    width: 112px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }

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

@media (max-width: 768px) {
  .grid-12 {
    grid-template-columns: repeat(2, 1fr);
  }
  .col-span-3, .col-span-4, .col-span-5, .col-span-6,
  .col-span-7, .col-span-8, .col-span-9, .col-span-12 {
    grid-column: span 2;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid-12 {
    grid-template-columns: 1fr;
  }
  .col-span-3, .col-span-4, .col-span-5, .col-span-6,
  .col-span-7, .col-span-8, .col-span-9, .col-span-12 {
    grid-column: span 1;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ 12. 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;
  }

  .btn-cta {
    animation: none;
  }

  .scroll-progress::before {
    transition: none;
  }

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