/* NEX Desktop download page + landing banner. Matches the desktop app UI */

:root {
  --nda-bg: #07080b;
  --nda-bg-2: #0d0f14;
  --nda-bg-3: #14171f;
  --nda-bg-4: #1b1f2a;
  --nda-text: #f3f4f7;
  --nda-muted: #8b90a0;
  --nda-faint: #5c6272;
  --nda-line: rgba(255, 255, 255, 0.07);
  --nda-accent: #00d4aa;
  --nda-accent-dim: rgba(0, 212, 170, 0.14);
  --nda-accent-glow: rgba(0, 212, 170, 0.35);
  --nda-radius: 14px;
  --nda-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.nda-page {
  --bg-primary: var(--nda-bg);
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 80px;
  background:
    radial-gradient(1200px 500px at 12% -10%, var(--nda-accent-dim), transparent 55%),
    var(--nda-bg);
  color: var(--nda-text);
  overflow-x: clip;
}

.nda-page .hidden {
  display: none !important;
}

.nda-fade {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.nda-fade.is-visible {
  opacity: 1;
  transform: none;
}

.nda-fade-delay-1 { transition-delay: 0.08s; }
.nda-fade-delay-2 { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  .nda-fade {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Download buttons ---------- */

.nda-dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nda-dl {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 12px 16px 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--nda-text);
  background: var(--nda-bg-2);
  border: 1px solid var(--nda-line);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nda-dl:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--nda-accent) 40%, var(--nda-line));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.nda-dl.is-detected-platform {
  border-color: color-mix(in srgb, var(--nda-accent) 48%, transparent);
  background: linear-gradient(180deg, var(--nda-accent-dim), var(--nda-bg-2));
}

.nda-dl[aria-disabled='true'] {
  opacity: 0.55;
  pointer-events: none;
}

.nda-dl-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
}

.nda-dl-icon img,
.nda-dl-icon svg {
  display: block;
  width: 32px;
  height: 32px;
}

.nda-dl-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.nda-dl-copy strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.nda-dl.is-detected-platform .nda-dl-copy strong::after {
  content: 'Recommended';
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #041410;
  background: var(--nda-accent);
}

.nda-dl-copy small {
  margin-top: 3px;
  font-size: 0.75rem;
  color: var(--nda-muted);
}

.nda-version {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--nda-faint);
}

/* ---------- App chrome mock ---------- */

.nda-shell {
  --rail: 72px;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 430px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--nda-line);
  background:
    radial-gradient(900px 380px at 12% -20%, var(--nda-accent-dim), transparent 55%),
    var(--nda-bg);
  box-shadow: var(--nda-shadow);
  color: var(--nda-text);
  font-family: Outfit, system-ui, sans-serif;
  font-size: 13px;
  pointer-events: none;
  user-select: none;
}

.nda-shell-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 6px 12px;
  border-right: 1px solid var(--nda-line);
  background: rgba(7, 8, 11, 0.92);
}

.nda-shell-logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  margin-bottom: 8px;
  object-fit: cover;
}

.nda-shell-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  border-radius: 50%;
  border: 1px solid var(--nda-line);
  background: var(--nda-bg-3);
  color: var(--nda-accent);
  font-weight: 700;
  font-size: 12px;
}

.nda-shell-rail-btn {
  width: 60px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 12px;
  color: var(--nda-muted);
}

.nda-shell-rail-btn svg {
  width: 18px;
  height: 18px;
}

.nda-shell-rail-btn span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nda-shell-rail-btn.is-on {
  background: var(--nda-accent-dim);
  color: var(--nda-accent);
}

.nda-shell-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.nda-shell-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}

.nda-shell-search,
.nda-shell-place,
.nda-shell-user {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--nda-bg-2);
  border: 1px solid var(--nda-line);
  color: var(--nda-faint);
  white-space: nowrap;
}

.nda-shell-search {
  flex: 1;
  min-width: 0;
}

.nda-shell-search svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nda-shell-search span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nda-shell-place {
  min-width: 0;
  max-width: 240px;
  flex: 0.7;
}

.nda-shell-load {
  margin-left: auto;
  height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--nda-accent);
  color: #041410;
  font-size: 11px;
  font-weight: 700;
}

.nda-shell-user {
  flex-shrink: 0;
  min-width: 0;
  max-width: 148px;
  gap: 8px;
  padding-left: 6px;
}

.nda-shell-user .nda-shell-avatar {
  width: 24px;
  height: 24px;
  margin: 0;
  font-size: 10px;
}

.nda-shell-user strong {
  display: block;
  color: var(--nda-text);
  font-size: 12px;
  line-height: 1.15;
}

.nda-shell-user small {
  color: var(--nda-muted);
  font-size: 10px;
}

.nda-shell-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 12px;
  overflow: hidden;
}

.nda-chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--nda-line);
  background: var(--nda-bg-2);
  color: var(--nda-muted);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nda-chip.is-on {
  color: var(--nda-accent);
  border-color: color-mix(in srgb, var(--nda-accent) 40%, transparent);
  background: var(--nda-accent-dim);
}

.nda-shell-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 16px 18px;
}

.nda-shell-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: var(--nda-bg-2);
  border: 1px solid var(--nda-line);
}

.nda-shell-card.is-on {
  border-color: color-mix(in srgb, var(--nda-accent) 40%, var(--nda-line));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.nda-shell-thumb {
  height: 78px;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55)),
    linear-gradient(135deg, #1b1f2a, #14171f 55%, rgba(0, 212, 170, 0.18));
}

.nda-shell-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nda-shell-card-body {
  padding: 9px 10px 11px;
}

.nda-shell-card-body strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nda-shell-card-body span {
  display: block;
  margin-top: 4px;
  color: var(--nda-muted);
  font-size: 10px;
}

.nda-shell--compact {
  --rail: 64px;
  min-height: 280px;
  transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
  transform-origin: left center;
}

.nda-shell--compact .nda-shell-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nda-shell--compact .nda-shell-card:nth-child(n + 4),
.nda-shell--compact .nda-shell-place,
.nda-shell--compact .nda-shell-user small,
.nda-shell--compact .nda-chip:nth-child(n + 5) {
  display: none;
}

.nda-shell--studio {
  min-height: 320px;
}

.nda-shell-studio {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 12px;
  padding: 4px 16px 16px;
  min-height: 0;
  flex: 1;
}

.nda-shell-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: var(--nda-bg-2);
  border: 1px solid var(--nda-line);
}

.nda-shell-panel h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.nda-shell-code {
  flex: 1;
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #0b0c10;
  border: 1px solid var(--nda-line);
  color: #d4d4d4;
  font: 11px/1.65 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  overflow: hidden;
}

.nda-shell-code .cm { color: #6a9955; }
.nda-shell-code .kw { color: #569cd6; }
.nda-shell-code .fn { color: #dcdcaa; }
.nda-shell-code .st { color: #ce9178; }

.nda-shell-ai {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--nda-bg-3);
  color: var(--nda-muted);
  font-size: 12px;
}

.nda-shell-ai.is-user {
  background: var(--nda-accent-dim);
  color: var(--nda-text);
}

.nda-shell-btn {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--nda-accent);
  color: #041410;
  font-size: 11px;
  font-weight: 700;
}

/* ---------- Hero ---------- */

.nda-hero {
  position: relative;
  padding: 36px 0 64px;
}

.nda-hero-inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.18fr);
  gap: 36px;
  align-items: center;
}

.nda-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nda-accent);
  background: var(--nda-accent-dim);
  border: 1px solid color-mix(in srgb, var(--nda-accent) 30%, transparent);
}

.nda-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nda-accent);
  box-shadow: 0 0 10px var(--nda-accent-glow);
  font-style: normal;
}

.nda-title {
  margin: 0 0 14px;
  font-size: clamp(2.15rem, 5vw, 3.4rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nda-title span {
  color: var(--nda-accent);
}

.nda-lead {
  margin: 0 0 24px;
  max-width: 46ch;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--nda-muted);
}

.nda-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.nda-hero-links a {
  color: var(--nda-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.nda-hero-links a:hover {
  color: var(--nda-text);
}

.nda-hero-visual {
  position: relative;
}

.nda-hero-visual::before {
  content: '';
  position: absolute;
  inset: 18% -8% auto;
  height: 70%;
  background: radial-gradient(ellipse at center, var(--nda-accent-glow), transparent 70%);
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- Sections ---------- */

.nda-section {
  padding: 72px 0;
}

.nda-section--alt {
  background: rgba(255, 255, 255, 0.015);
  border-block: 1px solid var(--nda-line);
}

.nda-section-head {
  max-width: 680px;
  margin: 0 auto 40px;
  text-align: center;
}

.nda-section-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nda-accent);
}

.nda-section-title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nda-section-sub {
  margin: 0;
  color: var(--nda-muted);
  line-height: 1.65;
}

.nda-feature {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 72px;
}

.nda-feature:last-child {
  margin-bottom: 0;
}

.nda-feature--flip .nda-feature-copy {
  order: 2;
}

.nda-feature h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  font-weight: 700;
}

.nda-feature p {
  margin: 0 0 16px;
  color: var(--nda-muted);
  line-height: 1.65;
}

.nda-feature ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.nda-feature li {
  position: relative;
  padding-left: 18px;
  color: var(--nda-muted);
  font-size: 0.94rem;
}

.nda-feature li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nda-accent);
}

.nda-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.nda-tag {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--nda-muted);
  background: var(--nda-bg-2);
  border: 1px solid var(--nda-line);
}

.nda-replace {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.nda-replace-card,
.nda-security-card {
  padding: 20px 18px;
  border-radius: var(--nda-radius);
  background: var(--nda-bg-2);
  border: 1px solid var(--nda-line);
}

.nda-replace-from {
  display: block;
  margin-bottom: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nda-faint);
}

.nda-replace-card h3,
.nda-security-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.nda-replace-card p,
.nda-security-card p {
  margin: 0;
  color: var(--nda-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.nda-replace-to {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--nda-accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.nda-security-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.nda-security-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.nda-security-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--nda-accent);
  background: var(--nda-accent-dim);
}

.nda-security-icon svg {
  width: 20px;
  height: 20px;
}

.nda-cta {
  padding: 72px 0 96px;
  text-align: center;
}

.nda-cta .nda-dl-row {
  justify-content: center;
  margin: 24px 0 12px;
}

.nda-cta-note {
  margin: 0;
  color: var(--nda-faint);
  font-size: 0.85rem;
}

.nda-cta-note a {
  color: var(--nda-muted);
}

/* ---------- Landing side card ---------- */

.hub-desk-card {
  --hub-desk-w: min(360px, calc(100vw - 28px));
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 1100;
  width: var(--hub-desk-w);
  max-height: calc(100vh - 120px);
  display: flex;
  align-items: stretch;
  transform: translateY(-50%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.hub-desk-card.is-collapsed {
  transform: translateY(-50%) translateX(calc(100% - 36px));
}

.hub-desk-card-toggle {
  pointer-events: auto;
  flex: 0 0 36px;
  width: 36px;
  align-self: center;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid var(--nda-line);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: #0d0f14;
  color: var(--nda-text);
  box-shadow: -8px 8px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.hub-desk-card-toggle:hover {
  color: var(--nda-accent);
  background: #14171f;
}

.hub-desk-card-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.28s ease;
}

.hub-desk-card.is-collapsed .hub-desk-card-toggle svg {
  transform: rotate(180deg);
}

.hub-desk-card-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hub-desk-card-panel {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  width: calc(100% - 36px);
  max-height: calc(100vh - 120px);
  overflow: auto;
  border: 1px solid var(--nda-line);
  border-right: 0;
  border-radius: 18px 0 0 18px;
  background:
    radial-gradient(420px 180px at 100% 0%, var(--nda-accent-dim), transparent 70%),
    #07080b;
  box-shadow: var(--nda-shadow);
  scrollbar-width: thin;
}

.hub-desk-card-visual {
  max-height: 148px;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 62%, transparent);
}

.hub-desk-card .nda-shell {
  min-height: 200px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: translateY(10px) scale(0.92);
  transform-origin: top center;
}

.hub-desk-card .nda-shell-rail-btn:nth-child(n + 4),
.hub-desk-card .nda-chip:nth-child(n + 4) {
  display: none;
}

.hub-desk-card-copy {
  padding: 4px 16px 16px;
}

.hub-desk-card-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nda-accent);
}

.hub-desk-card h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hub-desk-card p {
  margin: 0 0 12px;
  color: var(--nda-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.hub-desk-card .nda-dl-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: none;
}

.hub-desk-card .nda-dl {
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
}

.hub-desk-card .nda-dl-copy strong::after {
  display: none;
}

.hub-desk-card-more {
  display: inline-flex;
  margin-top: 12px;
  color: var(--nda-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.hub-desk-card-more:hover {
  color: var(--nda-text);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .nda-shell-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nda-shell-card:nth-child(n + 7) {
    display: none;
  }

  .nda-security-grid,
  .nda-replace {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .nda-hero-inner,
  .nda-feature,
  .nda-feature--flip {
    grid-template-columns: 1fr;
  }

  .nda-feature--flip .nda-feature-copy {
    order: unset;
  }

  .nda-shell,
  .nda-shell--compact {
    transform: none;
  }

  .hub-desk-card {
    top: auto;
    bottom: max(84px, calc(env(safe-area-inset-bottom, 0px) + 72px));
    transform: none;
    max-height: min(70vh, 520px);
  }

  .hub-desk-card.is-collapsed {
    transform: translateX(calc(100% - 36px));
  }

  .hub-desk-card .nda-shell {
    transform: none;
  }
}

@media (max-width: 720px) {
  .nda-shell {
    --rail: 0px;
    grid-template-columns: 1fr;
  }

  .nda-shell-rail,
  .nda-shell-place,
  .nda-shell-user,
  .nda-shell-studio {
    display: none;
  }

  .nda-shell-grid,
  .nda-shell--compact .nda-shell-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nda-dl,
  .nda-dl-row {
    width: 100%;
  }

  .nda-replace,
  .nda-security-grid {
    grid-template-columns: 1fr;
  }

  .nda-security-card {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nda-shell--compact,
  .hub-desk-card,
  .hub-desk-card .nda-shell,
  .hub-desk-card-toggle svg {
    transition: none;
  }
}

@media (min-width: 721px) {
  .hub-desk-card .nda-dl[data-nda-download="android"],
  .hub-desk-card .nda-dl[data-nda-download="ios"] {
    display: none;
  }
}

@media (max-width: 720px) {
  .hub-desk-card .nda-dl[data-nda-download="win32"],
  .hub-desk-card .nda-dl[data-nda-download="linux"] {
    display: none;
  }
}
