.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.button:hover {
  transform: translateY(-1px);
}

.button--fill {
  flex: 1;
  text-align: center;
}

.nx-layout {
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
  position: relative;
}

.nx-layout--overlay {
  pointer-events: none;
}

.nx-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(var(--nx-bg-rgb), 0.8);
  border-bottom: 1px solid var(--nx-card-border);
}

.nx-header-inner {
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
}

.nx-header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nx-header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nx-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nx-header .mock-brand {
  color: var(--nx-text);
  font-size: 0.9rem;
  font-weight: 500;
}

.nx-header .brand-mark {
  border-color: var(--nx-cyan);
  color: var(--nx-cyan);
  display: none;
}

.nx-header .nav-link {
  color: var(--nx-muted);
  font-size: 0.85rem;
  margin: 0 16px;
  text-decoration: none;
  transition: color 0.2s;
}

.nx-header .nav-link:hover {
  color: var(--nx-text);
}

.nx-header .button-primary {
  background: transparent;
  color: var(--nx-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  font-size: 0.85rem;
}

.nx-header .button-secondary {
  border-color: transparent;
  color: var(--nx-muted);
  padding: 8px 16px;
  font-size: 0.85rem;
}

.nx-hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--nx-bg);
}

.nx-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 52%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(var(--nx-bg-rgb), 0.98) 0%,
    rgba(var(--nx-bg-rgb), 0.9) 55%,
    rgba(var(--nx-bg-rgb), 0.3) 85%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

.nx-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  min-height: 100vh;
  padding: 120px 0 80px;
}

.nx-hero-inner--single {
  grid-template-columns: 1fr;
  position: relative;
  z-index: 10;
}

.nx-hero-copy {
  pointer-events: auto;
  position: relative;
  z-index: 3;
  max-width: 560px;
  display: grid;
  gap: 28px;
}

.nx-hero-copy--wide {
  max-width: 1000px;
  margin-top: 100px;
}

.nx-label {
  font-family: var(--theme-ui-font);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  color: var(--nx-cyan);
  display: none;
}

.nx-label::before {
  content: '';
  width: 42px;
  height: 1px;
  background: var(--nx-cyan);
}

@keyframes fadeSlideUpSlow {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.nx-hero h1 {
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 0.94;
  margin: 0;
  background: linear-gradient(135deg, var(--nx-text) 0%, var(--nx-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--theme-display-font);
  font-weight: 500;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeSlideUpSlow 0.8s 0.1s ease forwards;
}

.nx-hero-sub {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--nx-muted);
  max-width: 440px;
  opacity: 0;
  animation: fadeSlideUpSlow 0.8s 0.25s ease forwards;
}

.nx-hero-sub--spaced {
  margin-top: 40px;
}

.nx-hero-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUpSlow 0.8s 0.4s ease forwards;
}

.nx-hero-actions--offset {
  margin-top: 20px;
  pointer-events: auto;
}

.nx-hero-actions .button-primary {
  background: var(--nx-bright);
  color: var(--nx-bg);
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 40px;
  border: none;
}

.nx-hero-actions .button-secondary {
  border: none;
  color: var(--nx-text);
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 40px;
  background: transparent;
}

.nx-hero-art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  pointer-events: none;
}

#sphere-canvas {
  display: none;
}

.sphere-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

.sphere-word {
  position: absolute;
  font-family: var(--theme-ui-font);
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform, opacity;
  transform-origin: center center;
}

.sphere-word.large {
  font-size: 1.4rem;
  font-weight: 700;
}

.sphere-word.medium {
  font-size: 1rem;
}

.sphere-word.small {
  font-size: 0.85rem;
}

.sphere-word.tiny {
  font-size: 0.7rem;
}

.sphere-inner {
  width: 100%;
  height: 100%;
  position: absolute;
  /* transform-style: preserve-3d; */
}

.nx-scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nx-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  z-index: 3;
  animation: hintPulse 2.5s ease-in-out infinite;
  opacity: 0.2;
}

.nx-scroll-hint::after {
  content: '';
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, var(--nx-cyan), transparent);
  animation: hintLine 2.5s ease-in-out infinite;
}

@keyframes hintPulse {
  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes hintLine {
  0%,
  100% {
    transform: scaleY(0.5);
    opacity: 0.3;
  }

  50% {
    transform: scaleY(1);
    opacity: 0.6;
  }
}

.nx-content {
  position: relative;
  z-index: 10;
  background: var(--nx-bg);
}

.nx-content::before {
  content: '';
  position: absolute;
  top: -300px;
  left: 0;
  right: 0;
  height: 300px;
  background: linear-gradient(180deg, transparent, var(--nx-bg));
  pointer-events: none;
}

.nx-content::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(var(--nx-cyan-rgb), 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.nx-content > .nx-layout {
  position: relative;
  z-index: 1;
}

.nx-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--nx-cyan-rgb), 0.15), transparent);
  margin: 0;
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.nx-divider.visible {
  transform: scaleX(1);
}

.nx-section {
  padding: 100px 0 80px;
  contain: layout style paint;
}

.nx-section:first-child {
  padding-top: 120px;
}

.nx-section-header {
  display: grid;
  gap: 16px;
  margin-bottom: 48px;
}

.nx-section h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  margin: 0;
  line-height: 1.15;
  max-width: 16ch;
}

.nx-section-desc {
  color: var(--nx-muted);
  line-height: 1.85;
  max-width: 44rem;
  font-size: 1.02rem;
}

.nx-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 10px 0;
}

.nx-flow {
  display: grid;
  grid-template-columns: 1fr 56px 1fr 56px 1fr;
  gap: 0;
  align-items: start;
  padding: 20px 0;
}

.nx-flow-step {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.nx-flow-step h3 {
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.2;
}

.nx-flow-step > p {
  color: var(--nx-muted);
  line-height: 1.78;
  margin: 0;
  font-size: 0.88rem;
  max-width: 260px;
}

.nx-flow-connector {
  display: flex;
  align-items: center;
  height: 64px;
  position: relative;
}

.nx-artifact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.nx-trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.nx-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.nx-cta {
  text-align: center;
  padding: 80px 0 40px;
  position: relative;
}

.nx-cta > p {
  color: var(--nx-muted);
  font-size: 1rem;
  line-height: 1.85;
  margin: 0 0 32px;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.nx-cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.nx-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 34px 0 42px;
  border-top: 1px solid var(--nx-card-border);
  color: var(--nx-muted);
}

.nx-footer p {
  margin: 0;
  line-height: 1.7;
}

.nx-footer-links {
  display: flex;
  gap: 12px;
}

.nx-menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--nx-text);
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.3rem;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.nx-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nx-mobile-menu {
  display: none;
}

.mobile-actions {
  display: flex;
  flex-wrap: wrap;
}

.theme-switcher--mobile {
  margin-right: 0;
  width: 100%;
  justify-content: center;
  margin-bottom: 12px;
  background: rgba(var(--nx-cyan-rgb), 0.08);
}

@media (max-width: 1080px) {
  .nx-header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
  }

  .nx-header-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nx-header-right {
    order: 2;
    width: auto;
    justify-content: flex-end;
  }

  .nx-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
    padding: 132px 0 72px;
  }

  .nx-hero-art {
    height: 400px;
    order: -1;
  }

  #sphere-canvas {
    width: 100%;
    height: 100%;
    opacity: 0.8;
  }

  .nx-flow {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .nx-flow-connector {
    width: 1px;
    height: 40px;
    flex-direction: column;
    margin: 0 auto;
  }

  .nx-flow-line {
    width: 1px;
    height: 100%;
  }

  .nx-flow-line::before {
    top: -12px;
    left: -2px;
    width: 5px;
    height: 12px;
    animation-name: flowParticleV;
  }

  .nx-flow-line::after {
    right: auto;
    bottom: -2px;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 6px solid rgba(var(--nx-cyan-rgb), 0.3);
    border-bottom: none;
  }

  @keyframes flowParticleV {
    0% {
      top: -12px;
      opacity: 0;
    }

    10% {
      opacity: 1;
    }

    90% {
      opacity: 1;
    }

    100% {
      top: calc(100% + 12px);
      opacity: 0;
    }
  }

  .nx-trust-grid {
    grid-template-columns: 1fr;
  }

  .nx-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .nx-artifact-grid,
  .nx-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nx-header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 14px 24px;
    gap: 0;
  }

  .nx-header-center,
  .nx-header-right {
    display: none;
  }

  .nx-menu-toggle {
    display: flex;
  }

  .nx-mobile-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 16px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 14px;
  }

  .nx-mobile-menu.is-open {
    display: flex;
  }

  .nx-mobile-menu a {
    display: block;
    padding: 12px 0;
    color: var(--nx-muted);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .nx-mobile-menu a:last-child {
    border-bottom: none;
  }

  .mobile-actions {
    gap: 12px;
    padding-top: 16px;
    margin-top: 4px;
  }

  .nx-mobile-menu .button {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  .nx-hero-inner {
    padding: 120px 0 72px;
  }

  .nx-metrics,
  .nx-artifact-grid,
  .nx-news-grid {
    grid-template-columns: 1fr;
  }

  .nx-hero-shell {
    border-radius: 28px;
  }

  .nx-hero-badge {
    max-width: 150px;
    padding: 10px 12px;
  }

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

  .nx-hero::before {
    width: 100%;
    background: rgba(var(--nx-bg-rgb), 0.7);
  }

  .nx-trust-grid {
    grid-template-columns: 1fr;
  }

  .nx-cta-actions {
    flex-direction: column;
    align-items: center;
  }
}
