:root {
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "Roboto Mono", "SF Mono", "Cascadia Mono", "Consolas", monospace;
  --bg-deep: #0A0E27;
  --bg-steel: #111740;
  --neon: #00FF88;
  --amber: #FFB020;
  --data-blue: #33A9FF;
  --alert: #FF4C60;
  --white: #FFFFFF;
  --muted: #A0A8C0;
  --line: rgba(255,255,255,0.15);
  --overlay: rgba(10,14,39,0.8);
  --header-solid: rgba(10,14,39,0.94);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 100vh;
  z-index: 3000;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--neon) 0 25%,
    var(--amber) 25% 50%,
    var(--data-blue) 50% 75%,
    transparent 75%
  );
  opacity: 0.85;
}

h1,
h2,
h3,
h4 {
  font-weight: 900;
  line-height: 1.15;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

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

::selection {
  background: var(--neon);
  color: #060a1d;
}

:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2.5rem, 1400px);
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-label::before {
  content: "";
  width: 2.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--amber));
}

.mono {
  font-family: var(--font-mono);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-cta {
  background: var(--neon);
  color: #060a1d;
}

.btn-cta:hover {
  background: var(--amber);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--neon);
  color: var(--neon);
}

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

.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 2100;
  background: var(--neon);
  color: #060a1d;
  padding: 0.8rem 1.5rem;
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: var(--header-solid);
  border-bottom-color: var(--line);
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, var(--neon), var(--amber));
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem max(calc((100% - 1440px) / 2), 1.5rem);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.brand-mark {
  color: var(--neon);
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  list-style: none;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.125rem;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.nav-link:hover {
  color: var(--white);
}

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

.nav-link[aria-current="page"] {
  color: var(--neon);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quick-support {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--neon);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.quick-support:hover {
  background: var(--neon);
  color: #060a1d;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--overlay);
  border: 1px solid var(--line);
  color: var(--white);
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--neon), var(--amber));
  z-index: 1;
}

.site-footer {
  position: relative;
  background: var(--bg-steel);
  color: var(--white);
  overflow: hidden;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: clamp(2rem, 6vw, 4rem);
  padding: clamp(3rem, 6vw, 5rem) max(calc((100% - 1440px) / 2), 1.5rem) 2rem;
}

.footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  color: var(--white);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.footer-tagline {
  max-width: 30rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.footer-link-title {
  margin-bottom: 1rem;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer-list {
  display: grid;
  gap: 0.65rem;
  list-style: none;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-link::before {
  content: "";
  width: 0;
  height: 2px;
  background: var(--neon);
  transition: width 0.2s ease;
}

.footer-link:hover {
  color: var(--neon);
}

.footer-link:hover::before {
  width: 12px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem max(calc((100% - 1440px) / 2), 1.5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-contact {
  display: grid;
  gap: 0.3rem;
}

.footer-copy p {
  margin: 0.1rem 0;
}

.footer-icp {
  color: var(--muted);
}

.back-to-match {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  padding: 0.8rem 1.2rem;
  background: var(--neon);
  color: #060a1d;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  box-shadow: 0 6px 30px rgba(0, 255, 136, 0.25);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.back-to-match:hover {
  background: var(--amber);
  transform: translateY(-3px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--muted);
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
}

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

.image-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-steel);
  border-left: 3px solid var(--neon);
  clip-path: polygon(0 0, 100% 0, calc(100% - 8%) 100%, 0 100%);
}

.image-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-frame--slant {
  clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
}

.image-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  background: var(--overlay);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--amber);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

#main-content {
  scroll-margin-top: 5rem;
}

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

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

@media (min-width: 768px) {
  .image-frame {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 900px) {
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(78vw, 22rem);
    height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5rem 2rem 2rem;
    background: var(--overlay);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
    z-index: 1300;
    overflow-y: auto;
  }

  .site-nav[data-open="true"] {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

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

  .header-actions {
    margin-left: auto;
  }

  html:not(.js) .site-nav {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    height: auto;
    transform: none;
    visibility: visible;
    background: var(--overlay);
    padding: 1rem;
    z-index: 1;
    overflow-x: auto;
  }

  html:not(.js) .nav-list {
    flex-direction: row;
    gap: 1rem;
    white-space: nowrap;
  }

  html:not(.js) .nav-list li {
    flex: 0 0 auto;
  }

  html:not(.js) .nav-toggle {
    display: none;
  }
}

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

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

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

  .back-to-match {
    right: 0.9rem;
    bottom: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

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