/**
 * Dynamic Mark showcase — standalone brand/demo route.
 *
 * Full-screen dark surface recreating the Claude Design "Dynamic Mark" page.
 * Uses Slava type tokens (--sr-ui / --sr-mono) but sets its own near-black
 * ground and the crab-true accent colors, because this is a brand surface
 * rather than product chrome.
 */

.nn-bs {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  font-family: var(--sr-ui, Inter, system-ui, sans-serif);
}

/* ── Top bar ──────────────────────────────────────────────────────── */
.nn-bs__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(20px);
}

.nn-bs__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sr-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.nn-bs__brand-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgb(240, 150, 90);
  box-shadow: 0 0 6px rgb(240, 150, 90);
}

.nn-bs__brand-meta {
  color: rgba(255, 255, 255, 0.3);
}

.nn-bs__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.nn-bs__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── Scroll body ──────────────────────────────────────────────────── */
.nn-bs__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 48px 40px 0;
}

.nn-bs__section {
  max-width: 1180px;
  margin: 0 auto 72px;
}

.nn-bs__section-head {
  margin-bottom: 24px;
}

.nn-bs__section-title {
  margin: 0 0 6px;
  font-weight: 300;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #fff;
}

.nn-bs__section-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  max-width: 620px;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.nn-bs__hero-wrap {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
}

.nn-bs-hero {
  position: relative;
  height: 700px;
  background: #000;
  font-family: var(--sr-mono, 'JetBrains Mono', monospace);
  color: #fff;
}

.nn-bs-hero__field {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(201, 202, 200, 0.1) 1px,
    transparent 1px
  );
  background-size: 18px 18px;
  opacity: 0.7;
  pointer-events: none;
}

.nn-bs-hero__telemetry {
  position: absolute;
  left: 32px;
  right: 32px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.nn-bs-hero__telemetry--top {
  top: 24px;
}
.nn-bs-hero__telemetry--bottom {
  bottom: 24px;
  color: rgba(255, 255, 255, 0.35);
}

.nn-bs-hero__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.nn-bs-hero__label {
  text-align: center;
}

.nn-bs-hero__title {
  font-family: var(--sr-ui, Inter, sans-serif);
  font-weight: 200;
  font-size: 52px;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 10px;
}

.nn-bs-hero__desc {
  font-family: var(--sr-ui, Inter, sans-serif);
  font-weight: 300;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
  padding: 0 24px;
}

.nn-bs-hero__state {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgb(240, 150, 90);
  margin-top: 16px;
}

/* ── Hero mode switcher ───────────────────────────────────────────── */
.nn-bs__switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.nn-bs__chip {
  font-family: var(--sr-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.nn-bs__chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nn-bs__chip--active {
  color: #0a0a0b;
  background: rgb(240, 150, 90);
  border-color: rgb(240, 150, 90);
}

/* ── Mode grid ────────────────────────────────────────────────────── */
.nn-bs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.nn-bs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 420px;
  padding: 22px;
  overflow: hidden;
  background: #020203;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  font-family: var(--sr-mono, 'JetBrains Mono', monospace);
}

.nn-bs-card__field {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(201, 202, 200, 0.08) 1px,
    transparent 1px
  );
  background-size: 14px 14px;
  opacity: 0.5;
  pointer-events: none;
}

.nn-bs-card__telemetry {
  position: relative;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
}

.nn-bs-card__live {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgb(240, 150, 90);
}

.nn-bs-card__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(240, 150, 90);
  box-shadow: 0 0 8px rgb(240, 150, 90);
}

.nn-bs-card__mark {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nn-bs-card__caption {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
}

.nn-bs-card__caption-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.nn-bs-card__label {
  font-family: var(--sr-ui, Inter, sans-serif);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: -0.005em;
  color: #fff;
}

.nn-bs-card__state {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgb(180, 240, 250);
}

.nn-bs-card__desc {
  margin: 0;
  font-family: var(--sr-ui, Inter, sans-serif);
  font-size: 11px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

/* ── State map ────────────────────────────────────────────────────── */
.nn-bs__statemap {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 24px 28px;
}

.nn-bs__statemap-head {
  font-family: var(--sr-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 16px;
}

.nn-bs__staterow {
  display: grid;
  grid-template-columns: 60px 180px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nn-bs__staterow-mark {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nn-bs__staterow-state {
  font-family: var(--sr-ui, Inter, sans-serif);
  font-size: 15px;
  color: #fff;
}

.nn-bs__staterow-use {
  font-family: var(--sr-ui, Inter, sans-serif);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Nebula variants (Crab vs Helix) ─────────────────────────────── */
.nn-bs__variants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.nn-bs__variant {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 32px 32px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.nn-bs__variant-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  border-radius: 12px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nn-bs__variant-code {
  font-family: var(--sr-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.nn-bs__variant-id {
  margin-top: 6px;
  font-family: var(--sr-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.4);
}

.nn-bs__variant-desc {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
}

.nn-bs__variant-palette {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.nn-bs__swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.nn-bs__variant-palette-label {
  margin-left: 4px;
  font-family: var(--sr-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 900px) {
  .nn-bs__variants {
    grid-template-columns: 1fr;
  }
}

/* ── Footer ───────────────────────────────────────────────────────── */
.nn-bs__foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 0 56px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--sr-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 640px) {
  .nn-bs__scroll {
    padding: 32px 20px 0;
  }
  .nn-bs-hero {
    height: 480px;
  }
  .nn-bs-hero__title {
    font-size: 38px;
  }
  .nn-bs__staterow {
    grid-template-columns: 48px 1fr;
    grid-template-areas:
      'mark state'
      'mark use';
    row-gap: 4px;
  }
  .nn-bs__staterow-mark {
    grid-area: mark;
  }
  .nn-bs__staterow-state {
    grid-area: state;
  }
  .nn-bs__staterow-use {
    grid-area: use;
  }
}

/* Reduced motion: the marks already fall back to static via
 * CrabMarkAnimated; keep the LIVE telemetry dots calm too. */
@media (prefers-reduced-motion: reduce) {
  .nn-bs-card__live-dot,
  .nn-bs__brand-dot {
    box-shadow: none;
  }
}
