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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: Inter, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--c-space-900);
  color: var(--c-field);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
ul[class], ol[class] { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:root {
  --c-space-950: #050E1F;
  --c-space-900: #0A1F44;
  --c-field: #F5F7FA;
  --c-night: #A0A8B8;
  --c-orange: #FF6C00;
  --c-yellow: #E8FF00;
  --c-orange-soft: #FF9B54;
  --c-yellow-soft: #F4FF99;
  --c-line: #1E3A6F;
  --font-head: "Archivo Black", "Arial Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: Inter, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-num: "Roboto Mono", "SF Mono", "Cascadia Mono", Consolas, monospace;
  --container: 1200px;
  --gap: clamp(16px, 3vw, 32px);
  --header-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

h1, h2, h3 {
  font-family: var(--font-head);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 6vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.125rem; }

/* ============ Layout & Utilities ============ */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gap);
}

#main-content {
  outline: none;
  scroll-margin-top: 120px;
  position: relative;
  z-index: 1;
}

.content-shell { max-width: 760px; }
.content-shell > * + * { margin-top: 1.1em; }
.content-shell h1, .content-shell h2, .content-shell h3 { margin-top: 1.5em; }
.content-shell h1:first-child, .content-shell h2:first-child { margin-top: 0; }
.content-shell ul, .content-shell ol { padding-left: 1.3em; }
.content-shell ul { list-style: square; color: var(--c-field); }
.content-shell a { color: var(--c-orange); border-bottom: 1px solid rgba(255, 108, 0, 0.4); transition: border-color .2s; }
.content-shell a:hover { border-color: var(--c-orange); }

/* ============ Skip Link ============ */
.skip-link {
  position: fixed;
  top: -72px;
  left: 16px;
  z-index: 400;
  background: var(--c-orange);
  color: var(--c-space-950);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  transition: top 0.24s var(--ease-out);
}
.skip-link:focus { top: 0; }

/* ============ Scroll Progress ============ */
.progress-track {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 300;
  background: linear-gradient(90deg, var(--c-orange) 0%, var(--c-yellow) 100%);
  pointer-events: none;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--c-space-950);
  border-top: 3px solid var(--c-orange);
  box-shadow: 0 1px 0 var(--c-line), 0 18px 40px rgba(2, 8, 20, 0.5);
}

.header-frame {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap);
  min-height: var(--header-h);
  border-bottom: 1px solid var(--c-line);
}

.masthead-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.masthead-mark {
  font-family: var(--font-head);
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 900;
  background: var(--c-orange);
  color: var(--c-space-950);
  padding: 5px 10px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background 0.24s var(--ease-out);
}
.masthead-link:hover .masthead-mark { background: var(--c-yellow); }

.masthead-text { display: flex; flex-direction: column; line-height: 1.15; }
.masthead-name { font-family: var(--font-head); font-size: 1.02rem; letter-spacing: 0.02em; white-space: nowrap; }
.masthead-sub { font-family: var(--font-num); font-size: 0.62rem; letter-spacing: 0.26em; color: var(--c-night); white-space: nowrap; }

.site-nav { margin-left: auto; }

.nav-list { display: flex; gap: clamp(4px, 1.2vw, 22px); }

.nav-item { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 12px 4px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-field);
  position: relative;
  white-space: nowrap;
  transition: color 0.24s var(--ease-out);
}

.nav-index {
  font-family: var(--font-num);
  font-size: 0.68rem;
  color: var(--c-night);
  transition: color 0.24s var(--ease-out);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 4px;
  height: 2px;
  background: var(--c-yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s var(--ease-out);
}

.nav-link:hover { color: var(--c-orange); }
.nav-link:hover .nav-index { color: var(--c-yellow); }
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

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

.dash-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-orange);
  color: var(--c-space-950);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px 14px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: background 0.24s var(--ease-out);
  flex-shrink: 0;
}
.dash-link:hover { background: var(--c-yellow); }

.dash-arrow {
  font-family: var(--font-num);
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.24s var(--ease-out);
}
.dash-link:hover .dash-arrow { transform: translate(2px, -2px); }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: live-pulse 1.8s ease-out infinite;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 255, 0, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(232, 255, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 255, 0, 0); }
}

.nav-trigger { display: none; }

/* ============ Ticker ============ */
.ticker {
  max-width: var(--container);
  margin: 0 auto;
  padding: 6px var(--gap) 7px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(255, 108, 0, 0.06), transparent 40%);
}

.ticker-mark {
  font-family: var(--font-num);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--c-space-950);
  background: var(--c-yellow);
  padding: 2px 6px;
  line-height: 1.4;
  flex-shrink: 0;
}

.ticker-text {
  font-size: 0.78rem;
  color: var(--c-night);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============ To Top ============ */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 46px;
  height: 46px;
  background: var(--c-orange);
  color: var(--c-space-950);
  font-family: var(--font-num);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), visibility 0.25s, background 0.24s var(--ease-out);
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--c-yellow); }

/* ============ Footer ============ */
.site-footer {
  background: var(--c-space-950);
  border-top: 3px solid var(--c-orange);
  position: relative;
  z-index: 2;
  margin-top: clamp(48px, 8vw, 96px);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -3px;
  right: 0;
  width: clamp(60px, 12vw, 160px);
  height: 3px;
  background: var(--c-yellow);
  z-index: 1;
}

.footer-core {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) var(--gap) 28px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: clamp(24px, 4vw, 48px);
}

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; }
.footer-title { font-family: var(--font-head); font-size: 1.45rem; letter-spacing: 0.02em; }
.footer-sub { font-family: var(--font-num); font-size: 0.68rem; letter-spacing: 0.32em; color: var(--c-night); margin-top: 2px; }

.footer-slogan {
  margin-top: 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-orange-soft);
  border-left: 3px solid var(--c-yellow);
  padding-left: 12px;
  line-height: 1.5;
}

.footer-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--c-night);
  max-width: 30em;
}

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul { display: grid; gap: 8px; }
.footer-heading {
  font-family: var(--font-num);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--c-night);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.footer-col a {
  color: var(--c-night);
  font-size: 0.9rem;
  transition: color 0.2s var(--ease-out), padding-left 0.2s var(--ease-out);
}
.footer-col a:hover { color: var(--c-yellow); padding-left: 6px; }

.footer-contact p { font-size: 0.84rem; color: var(--c-night); line-height: 1.65; word-break: break-word; }
.footer-contact p strong { color: var(--c-field); font-weight: 600; }
.footer-sla {
  font-size: 0.74rem !important;
  color: var(--c-orange-soft) !important;
  border-top: 1px solid var(--c-line);
  padding-top: 8px;
  margin-top: 2px;
}

.footer-base {
  border-top: 1px solid var(--c-line);
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gap) 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--c-night);
  font-family: var(--font-num);
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--c-orange);
  color: var(--c-space-950);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 13px 22px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: background 0.24s var(--ease-out), color 0.24s var(--ease-out);
}
.btn:hover { background: var(--c-yellow); }

.btn--ghost {
  background: transparent;
  color: var(--c-field);
  clip-path: none;
  border: 1px solid var(--c-line);
  transition: border-color 0.24s var(--ease-out), color 0.24s var(--ease-out), background 0.24s;
}
.btn--ghost:hover {
  border-color: var(--c-orange);
  color: var(--c-orange);
  background: rgba(255, 108, 0, 0.07);
}

.btn--dark {
  background: var(--c-space-950);
  color: var(--c-field);
}
.btn--dark:hover { background: var(--c-orange); color: var(--c-space-950); }

/* ============ Shared Components ============ */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-num);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--c-yellow);
  text-transform: uppercase;
}
.section-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--c-orange);
  flex-shrink: 0;
}

.panel-cut {
  background: var(--c-space-900);
  border: 1px solid var(--c-line);
  padding: clamp(20px, 3vw, 32px);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  position: relative;
}

.panel-cut--alt {
  clip-path: polygon(0 22px, 22px 0, 100% 0, 100% 100%, 0 100%);
  border-left: 3px solid var(--c-orange);
}

.panel-cut--flag {
  background: var(--c-orange);
  color: var(--c-space-950);
  border-color: var(--c-orange);
  font-weight: 700;
}
.panel-cut--flag .num { color: var(--c-space-950); }

.data-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-num);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--c-night);
  border: 1px solid var(--c-line);
  background: rgba(30, 58, 111, 0.25);
  padding: 4px 9px;
  white-space: nowrap;
}
.data-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--c-yellow);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  flex-shrink: 0;
}

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

.media-frame {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(232, 255, 0, 0.08) 0%, rgba(255, 108, 0, 0.14) 55%, rgba(5, 14, 31, 0.5) 100%),
    var(--c-space-900);
  border: 1px solid var(--c-line);
  aspect-ratio: 4 / 3;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 58, 111, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 111, 0.55) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 26%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 26%);
  pointer-events: none;
  z-index: 1;
}

.media-frame::after {
  content: attr(data-label);
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-family: var(--font-num);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  color: var(--c-yellow);
  z-index: 2;
}

.media-frame img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
  transition: transform 0.4s var(--ease-out), filter 0.4s var(--ease-out);
}

.media-frame:hover img { transform: scale(1.04); filter: saturate(1) contrast(1.08); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-num);
  font-size: 0.76rem;
  color: var(--c-night);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before {
  content: "/";
  color: var(--c-line);
}
.breadcrumb a { color: var(--c-night); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--c-orange); }
.breadcrumb [aria-current="page"] { color: var(--c-field); }

/* ============ Reveal ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1023.98px) {
  :root { --header-h: 60px; }

  .nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 8px 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--c-field);
    letter-spacing: 0.08em;
  }

  .trigger-bar {
    width: 18px;
    height: 2px;
    background: var(--c-orange);
    position: relative;
    transition: background 0.2s;
  }
  .trigger-bar::before,
  .trigger-bar::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--c-field);
    transition: transform 0.24s var(--ease-out), top 0.24s var(--ease-out), background 0.2s;
  }
  .trigger-bar::before { top: -6px; }
  .trigger-bar::after { top: 6px; }

  [data-nav-toggle][aria-expanded="true"] .trigger-bar { background: transparent; }
  [data-nav-toggle][aria-expanded="true"] .trigger-bar::before {
    top: 0;
    transform: rotate(45deg);
    background: var(--c-orange);
  }
  [data-nav-toggle][aria-expanded="true"] .trigger-bar::after {
    top: 0;
    transform: rotate(-45deg);
    background: var(--c-orange);
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-space-950);
    border-top: 1px solid var(--c-line);
    border-bottom: 3px solid var(--c-orange);
    display: none;
    padding: 10px 0 16px;
    box-shadow: 0 24px 48px rgba(2, 8, 20, 0.65);
    margin-left: 0;
  }

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

  .nav-list {
    flex-direction: column;
    gap: 0;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gap);
  }

  .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 4px;
    font-size: 1rem;
    border-bottom: 1px solid var(--c-line);
  }
  .nav-link::after { display: none; }
  .nav-link[aria-current="page"] { color: var(--c-orange); }
}

@media (max-width: 767.98px) {
  .dash-link { padding: 9px 11px; font-size: 0.78rem; }
  .dash-arrow { display: none; }
  .ticker { display: none; }
}

@media (max-width: 899px) {
  .footer-core {
    grid-template-columns: 1fr 1fr;
    gap: 32px 28px;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 559.98px) {
  .footer-core { grid-template-columns: 1fr; gap: 28px; }
  .masthead-name { font-size: 0.9rem; }
  .masthead-sub { font-size: 0.54rem; letter-spacing: 0.18em; }
  .masthead-mark { font-size: 0.9rem; padding: 4px 8px; }
  .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

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

  .progress-track { display: none; }

  [data-reveal] { opacity: 1; transform: none; }
  .media-frame img { transform: none; }
}
