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

:root {
  --bg-primary: #0A0E17;
  --bg-secondary: #111827;
  --accent-cyan: #00D1FF;
  --accent-green: #39FF14;
  --accent-orange: #FF6B00;
  --text-main: #FFFFFF;
  --text-sub: #A0B0C0;
  --border-color: #1E2A38;
  --font-head: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', 'Consolas', monospace;
  --container-max: 1240px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a { color: var(--accent-cyan); }
img { max-width: 100%; height: auto; display: block; }

::selection {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

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

.container {
  width: min(var(--container-max), calc(100% - 48px));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--accent-cyan);
  color: #0A0E17;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 12px 100%);
  transition: filter 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover { filter: brightness(1.12); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-orange { background: var(--accent-orange); }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  clip-path: none;
  border-radius: 4px;
}

.btn-secondary:hover { background: rgba(0, 209, 255, 0.08); }

.panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 28px;
}

.panel-chamfer {
  clip-path: polygon(16px 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}

.panel-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.section-label::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--accent-cyan);
  flex-shrink: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 0 24px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-sub);
}

.breadcrumb a { color: var(--accent-cyan); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border-color); }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -72px;
  z-index: 9999;
  background: var(--accent-cyan);
  color: #0A0E17;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 10px 20px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
  transition: top 0.2s var(--ease);
}

.skip-link:focus-visible {
  top: 8px;
  outline: none;
}

.site-header {
  position: relative;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--accent-cyan) 0%,
    var(--accent-cyan) 12%,
    transparent 30%,
    transparent 55%,
    var(--accent-green) 78%,
    var(--accent-green) 100%);
  opacity: 0.8;
  z-index: 2;
  pointer-events: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  z-index: 500;
  pointer-events: none;
  transition: width 0.08s linear;
}

.header-inner {
  width: min(var(--container-max), calc(100% - 48px));
  margin-inline: auto;
  padding-top: 32px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-main);
  position: relative;
  z-index: 1;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 32px;
  height: 32px;
  display: block;
}

.mark-hex { fill: none; stroke: var(--accent-cyan); stroke-width: 2; }
.mark-core { fill: rgba(0, 209, 255, 0.12); stroke: var(--accent-cyan); stroke-width: 1; }
.mark-slash { stroke: var(--accent-orange); stroke-width: 2; stroke-linecap: square; }

.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-en {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-sub);
  white-space: nowrap;
}

.masthead-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-sub);
}

.masthead-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--accent-green);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.78); }
}

.masthead-edition {
  letter-spacing: 0.12em;
  font-size: 0.68rem;
}

.masthead-rule {
  height: 3px;
  background: var(--border-color);
  margin-top: 20px;
  position: relative;
}

.masthead-rule::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
}

.masthead-rule::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--accent-orange);
  transform: translate(-50%, -50%) rotate(45deg);
}

.site-nav {
  padding: 14px 0 16px;
}

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

.nav-item { margin: 0; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  color: var(--text-sub);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 4px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-secondary);
}

.nav-link[aria-current="page"] {
  color: var(--text-main);
  background: var(--bg-secondary);
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 2px;
  height: 2px;
  background: var(--accent-cyan);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--accent-cyan);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-toggle:hover { border-color: var(--accent-cyan); background: var(--bg-primary); }

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  background: var(--text-main);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(5px) 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(-5px) rotate(-45deg);
}

.site-footer {
  margin-top: 96px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.footer-rule {
  height: 4px;
  background: linear-gradient(90deg,
    var(--accent-cyan) 0%,
    var(--accent-cyan) 10%,
    transparent 28%,
    var(--accent-green) 45%,
    transparent 62%,
    var(--accent-orange) 82%,
    var(--accent-orange) 100%);
  opacity: 0.65;
}

.footer-inner {
  width: min(var(--container-max), calc(100% - 48px));
  margin-inline: auto;
  padding: 52px 0 42px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
}

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

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-mark-sm {
  width: 44px;
  height: 44px;
}

.brand-mark-sm svg {
  width: 26px;
  height: 26px;
}

.footer-logo-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.footer-trust {
  margin-top: 20px;
  max-width: 48ch;
  padding: 14px 16px;
  background: var(--bg-primary);
  border-left: 3px solid var(--accent-cyan);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  color: var(--text-sub);
  font-size: 0.82rem;
  line-height: 1.65;
}

.footer-support {
  margin-top: 14px;
  max-width: 58ch;
  color: var(--text-sub);
  font-size: 0.78rem;
  line-height: 1.6;
  border-left: 3px solid var(--accent-orange);
  padding-left: 14px;
}

.footer-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 3px 10px;
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid rgba(57, 255, 20, 0.4);
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  border-radius: 3px;
}

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

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

.footer-col a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.85rem;
  display: inline-block;
  padding: 4px 0;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--text-main);
  transform: translateX(4px);
}

.footer-contact li {
  color: var(--text-sub);
  font-size: 0.82rem;
  padding: 3px 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contact-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.1em;
  margin-right: 6px;
}

.footer-bottom {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

.footer-bottom-inner {
  width: min(var(--container-max), calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-sub);
}

@media (max-width: 1100px) {
  .nav-link {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
  .brand-en { display: none; }
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    width: calc(100% - 32px);
    padding-top: 16px;
  }

  .masthead-meta { display: none; }
  .nav-toggle { display: inline-flex; }

  .brand-name { font-size: 1.35rem; }
  .brand-mark { width: 46px; height: 46px; }
  .brand-mark svg { width: 28px; height: 28px; }

  .masthead-rule { margin-top: 14px; }

  .site-nav { padding: 0; }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 14px;
  }

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

  .nav-link {
    padding: 13px 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    border-radius: 0;
  }

  .nav-link[aria-current="page"]::after {
    left: 10px;
    right: auto;
    bottom: auto;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    transform: translateY(-50%);
  }
}

@media (max-width: 640px) {
  .footer-links {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-inner {
    padding: 36px 0 30px;
  }
}

@media (max-width: 480px) {
  .footer-links {
    grid-template-columns: 1fr;
  }
}

@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;
  }

  .status-dot { animation: none; }

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