:root {
  --bg: #070b14;
  --bg-raise: #10182a;
  --ink: #f3f7fb;
  --muted: #b7c4d6;
  --line: rgba(186, 230, 253, 0.16);
  --cyan: #7af0ff;
  --cyan-deep: #08323a;
  --purple: #c4b5fd;
  --purple-deep: #2a2158;
  --header: 4.4rem;
  --radius: 1.25rem;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.2rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: var(--bg);
}

.galaxy {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.galaxy canvas {
  display: block;
  width: 100%;
  height: 100%;
}

h1, h2, h3, p, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  padding: 0.6rem 0.9rem;
  background: var(--cyan);
  color: #071018;
  text-decoration: none;
}

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

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(7, 11, 20, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.js.at-hero .site-header {
  visibility: hidden;
  pointer-events: none;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: var(--header);
  gap: 0.4rem 0.8rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, #123f4a, #2a2158);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(122, 240, 255, 0.35);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text small {
  color: var(--cyan);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 24, 42, 0.8);
  color: var(--ink);
}

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

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-panel {
  display: block;
  flex-basis: 100%;
  padding-bottom: 0.8rem;
}

.js .nav-panel {
  display: none;
}

.js .nav-panel.is-open {
  display: block;
}

.nav-list {
  display: grid;
  gap: 0.15rem;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.nav-link.is-active {
  color: #071018;
  background: var(--cyan);
}

.kicker {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 0;
  background: transparent;
  isolation: isolate;
}

.hero-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 68vh;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}

.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 34%;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0) 0%, rgba(7, 11, 20, 0.45) 42%, #070b14 100%);
  pointer-events: none;
}

.hero-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0.2rem 1rem 1.7rem;
  background: transparent;
}

.hero-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 1.5rem;
}

.hero-nav .nav-link {
  color: #f3f7fb;
  background: transparent;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 650;
  letter-spacing: 0.18em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.hero-nav .nav-link.is-active {
  color: var(--cyan);
  background: transparent;
}

.split-section {
  padding-top: 0.4rem;
  background: transparent;
}

.split {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  display: grid;
  gap: 2rem;
}

.split-copy .section-head h2 {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
}

.split-badge {
  min-width: 0;
}

.lanyard-note {
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.lanyard {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  border-radius: 1.25rem;
  background:
    radial-gradient(420px 220px at 50% 18%, rgba(122, 240, 255, 0.16), transparent 70%),
    #070b14;
  border: 1px solid var(--line);
}

.lanyard-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero h1 {
  margin-top: 0.8rem;
  font-size: clamp(3.1rem, 10vw, 7.2rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 720;
}

.lede {
  max-width: 38rem;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.intro {
  max-width: 40rem;
  margin-top: 1.5rem;
  display: grid;
  gap: 0.7rem;
}

.intro p {
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 650;
}

.button-primary {
  background: var(--cyan);
  color: #071018;
}

.button-secondary {
  border-color: rgba(196, 181, 253, 0.7);
  color: var(--purple);
  background: transparent;
}

.button-ghost {
  border-color: var(--line);
  color: var(--ink);
}

.hero-mail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
  margin-top: 1.2rem;
  color: var(--muted);
}

.text-button {
  min-height: 44px;
  padding: 0.2rem 0;
  border: 0;
  background: none;
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.section {
  padding: 4.5rem 0;
  scroll-margin-top: 5.2rem;
}

.section.split-section {
  padding-top: 0.5rem;
}

.section-head h2,
.band h3,
.step h3,
.tool h3 {
  letter-spacing: -0.04em;
}

.section-head h2 {
  margin-top: 0.55rem;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.98;
}

.history {
  display: grid;
  gap: 0.85rem;
  max-width: 46rem;
  margin-top: 1.5rem;
  color: var(--muted);
}

.section-lead {
  max-width: 40rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.bands {
  margin-top: 2.8rem;
  border-top: 1px solid var(--line);
}

.band,
.step article,
.tool {
  border-bottom: 1px solid var(--line);
}

.band {
  display: grid;
  gap: 0.8rem;
  padding: 2rem 0;
}

.band-index {
  color: var(--cyan);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.band.is-violet .band-index,
.tool.is-violet .tool-skill {
  color: var(--purple);
}

.band h3,
.step h3 {
  margin: 0.35rem 0 0.7rem;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.05;
}

.band p:last-child,
.step p:last-child {
  max-width: 40rem;
  color: var(--muted);
}

.step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.6rem;
}

.step-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.step-link.is-active {
  color: #071018;
  background: var(--purple);
  border-color: transparent;
}

.flow {
  margin-top: 1rem;
}

.step {
  scroll-margin-top: 6rem;
}

.step article {
  display: grid;
  gap: 0.15rem;
  padding: 1.5rem 0;
}

.skill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.6rem;
}

.skill-row li {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(122, 240, 255, 0.08);
  color: var(--cyan);
  border: 1px solid rgba(122, 240, 255, 0.22);
}

.tool-grid {
  display: grid;
  gap: 0;
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.tool {
  padding: 1.35rem 0;
}

.tool h3 {
  font-size: 1.55rem;
}

.tool p {
  margin-top: 0.4rem;
  color: var(--muted);
}

.tool-skill {
  color: var(--cyan) !important;
  font-size: 0.92rem;
  font-weight: 650;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

#tools .section-head h2 {
  line-height: 1.12;
}

#tools .container {
  position: relative;
  z-index: 1;
  padding: 2rem 1.4rem 2.2rem;
  border-radius: 1.5rem;
  background: rgba(7, 11, 20, 0.82);
  box-shadow: 0 0 0 1px rgba(186, 230, 253, 0.1);
}

.js #tools .reveal {
  opacity: 1;
  transform: none;
}

.site-footer {
  padding: 2rem 0 2.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  display: grid;
  gap: 0.35rem;
}

.site-footer a {
  color: var(--cyan);
}

body.menu-open {
  overflow: hidden;
}

@media (min-width: 760px) {
  .tool-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }

  .tool:nth-child(odd) {
    padding-right: 1rem;
  }
}

@media (min-width: 980px) {
  .split {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    align-items: start;
    column-gap: 1.75rem;
  }
}

@media (min-width: 880px) {
  .js .nav-toggle {
    display: none;
  }

  .nav-panel,
  .js .nav-panel,
  .js .nav-panel.is-open {
    display: block;
    flex-basis: auto;
    padding-bottom: 0;
  }

  .nav-list {
    display: flex;
    gap: 0.15rem;
  }

  .band,
  .step article {
    grid-template-columns: 7rem minmax(0, 1fr);
    align-items: start;
    column-gap: 1.5rem;
  }
}

@media (min-width: 1040px) {
  .tool-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  .tool:nth-child(odd) {
    padding-right: 0;
  }

  .tool {
    padding-right: 1.2rem;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .button-primary:hover {
    transform: translateY(-2px);
  }

  .band:hover h3,
  .tool:hover h3 {
    color: var(--cyan);
  }

  .tool.is-violet:hover h3 {
    color: var(--purple);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise 0.7s ease both;
  }

  .hero-copy > *:nth-child(2) { animation-delay: 0.05s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.1s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.16s; }
  .hero-copy > *:nth-child(5) { animation-delay: 0.22s; }

  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
  }

  .js .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  body::before,
  .site-header,
  .hero-video,
  .galaxy,
  .hero-actions,
  .step-nav,
  .nav-toggle {
    display: none !important;
  }

  .band,
  .tool,
  .step article {
    break-inside: avoid;
  }
}
