:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --ink: #ededed;
  --muted: #9a9a9a;
  --line: #242424;
  --lime: #c6f13c;
  --lime-ink: #0a0a0a;
  --gray: #7a7a7a;
  --paper: #ededed;
  --danger: #e24a3b;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: Inter, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --step-5: 3.052rem;
  --step-6: clamp(2.25rem, 6vw, 4.5rem);
  --space: 1.25rem;
  --wide: 72rem;
  --measure: 40rem;
  --radius: 2px;
}

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

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

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

a {
  color: var(--lime);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--lime);
  color: var(--lime-ink);
  padding: 0.5rem 0.75rem;
  z-index: 20;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin-inline: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand img,
.brand svg {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--muted);
}

.nav-x:hover {
  color: var(--ink);
}

.btn-x {
  gap: 0.45rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--lime);
  letter-spacing: 0.04em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  background: var(--lime);
  color: var(--lime-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn:hover {
  color: var(--lime-ink);
  filter: brightness(1.05);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0;
}

h1 {
  font-size: var(--step-6);
}

h2 {
  font-size: var(--step-4);
}

h3 {
  font-size: var(--step-2);
  letter-spacing: -0.02em;
}

.lead {
  max-width: var(--measure);
  color: var(--muted);
  font-size: var(--step-1);
  margin: 1.1rem 0 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 1fr);
  gap: 2.25rem;
  align-items: center;
  padding: 3.5rem 0 3.25rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 -4vw auto;
  height: 100%;
  background: url("../img/hex-texture.png") center / cover no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.headline {
  min-height: 1.15em;
}

.hero-visual {
  min-height: 28rem;
  display: grid;
  place-items: center;
}

.hash-fall {
  position: absolute;
  inset: -8% -10% -12% 6%;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 78%, transparent);
  opacity: 0.28;
  z-index: 0;
}

.hash-fall span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--lime);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.12em;
  animation: nrc-fall 14s linear infinite;
}

.hash-fall span:nth-child(2) { animation-duration: 18s; animation-delay: -4s; opacity: 0.7; }
.hash-fall span:nth-child(3) { animation-duration: 11s; animation-delay: -7s; }
.hash-fall span:nth-child(4) { animation-duration: 16s; animation-delay: -2s; opacity: 0.55; }
.hash-fall span:nth-child(5) { animation-duration: 13s; animation-delay: -9s; }
.hash-fall span:nth-child(6) { animation-duration: 20s; animation-delay: -6s; opacity: 0.8; }

@keyframes nrc-fall {
  from { transform: translateY(-18%); }
  to { transform: translateY(22%); }
}

.machine-frame {
  margin: 0;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.machine {
  width: min(100%, 26rem);
  filter: drop-shadow(0 18px 40px rgba(198, 241, 60, 0.08));
}

.machine.is-process {
  animation: nrc-shake 0.16s linear infinite;
}

@keyframes nrc-shake {
  0%,
  100% { transform: translate(0, 0); }
  30% { transform: translate(0.35px, -0.25px); }
  70% { transform: translate(-0.3px, 0.3px); }
}

.confirm {
  width: min(24rem, calc(100% - 2rem));
  margin: auto;
  border: 1px solid var(--lime);
  background: var(--bg-2);
  color: var(--ink);
  padding: 1.5rem 1.35rem 1.25rem;
  border-radius: var(--radius);
}

.confirm::backdrop {
  background: rgba(10, 10, 10, 0.78);
}

.confirm p {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: -0.02em;
}

.confirm .btn-row {
  margin-top: 1.15rem;
  justify-content: flex-end;
}

.machine svg {
  width: 100%;
  height: auto;
  display: block;
}

.nrc-paper {
  transform: translateY(0);
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.machine.is-feed .nrc-paper,
.machine.is-process .nrc-paper,
.machine.is-eject .nrc-paper,
.machine.is-done .nrc-paper {
  transform: translateY(118px);
}

.nrc-light-on {
  opacity: 0.28;
  transform-origin: 228px 196px;
}

.machine.is-process .nrc-light-on {
  animation: nrc-pulse 0.7s ease-in-out infinite;
}

.machine.is-done .nrc-light-on,
.machine.is-eject .nrc-light-on {
  opacity: 1;
  animation: none;
}

.nrc-strip {
  opacity: 0;
  transform: translateY(-42px);
}

.machine.is-eject .nrc-strip,
.machine.is-done .nrc-strip {
  opacity: 1;
  transform: translateY(0);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 280ms linear;
}

.machine.is-eject .nrc-strips > g:nth-child(1) .nrc-strip,
.machine.is-done .nrc-strips > g:nth-child(1) .nrc-strip { transition-delay: 0ms; }
.machine.is-eject .nrc-strips > g:nth-child(2) .nrc-strip,
.machine.is-done .nrc-strips > g:nth-child(2) .nrc-strip { transition-delay: 40ms; }
.machine.is-eject .nrc-strips > g:nth-child(3) .nrc-strip,
.machine.is-done .nrc-strips > g:nth-child(3) .nrc-strip { transition-delay: 80ms; }
.machine.is-eject .nrc-strips > g:nth-child(4) .nrc-strip,
.machine.is-done .nrc-strips > g:nth-child(4) .nrc-strip { transition-delay: 120ms; }
.machine.is-eject .nrc-strips > g:nth-child(5) .nrc-strip,
.machine.is-done .nrc-strips > g:nth-child(5) .nrc-strip { transition-delay: 160ms; }
.machine.is-eject .nrc-strips > g:nth-child(6) .nrc-strip,
.machine.is-done .nrc-strips > g:nth-child(6) .nrc-strip { transition-delay: 200ms; }
.machine.is-eject .nrc-strips > g:nth-child(7) .nrc-strip,
.machine.is-done .nrc-strips > g:nth-child(7) .nrc-strip { transition-delay: 240ms; }
.machine.is-eject .nrc-strips > g:nth-child(8) .nrc-strip,
.machine.is-done .nrc-strips > g:nth-child(8) .nrc-strip { transition-delay: 280ms; }

.nrc-strip-hash {
  opacity: 0;
  fill: #0a0a0a;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 8px;
}

.nrc-strip-fill {
  opacity: 1;
}

.machine.is-eject .nrc-strip-fill,
.machine.is-done .nrc-strip-fill {
  opacity: 0;
  transition: opacity 420ms linear 180ms;
}

.machine.is-eject .nrc-strip-hash,
.machine.is-done .nrc-strip-hash {
  opacity: 1;
  transition: opacity 420ms linear 180ms;
}

@keyframes nrc-pulse {
  0%,
  100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
}

.section-flush {
  border-top: 0;
  padding-top: 0;
}

.section-copy {
  max-width: var(--measure);
  margin-bottom: 2rem;
}

.section-copy p {
  color: var(--muted);
}

.tracks {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.track {
  background: var(--bg);
  padding: 1.75rem 1.5rem;
}

.track h3 {
  margin: 0.35rem 0 0.7rem;
}

.track p {
  color: var(--muted);
  margin: 0 0 1.15rem;
}

.track .btn,
.track .btn-ghost {
  margin-top: 0.25rem;
}

.track-live {
  background: var(--bg-2);
}

.track code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--lime);
}

.term {
  border: 1px solid #2a2a2a;
  background: #070707;
  margin: 0 0 0.9rem;
}

.term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #2a2a2a;
}

.term-tabs {
  display: flex;
  gap: 0.25rem;
}

.term-tabs button,
.term-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  min-height: 1.85rem;
  padding: 0 0.55rem;
}

.term-tabs button.is-on {
  color: var(--lime-ink);
  background: var(--lime);
}

.term-copy:hover {
  color: var(--ink);
}

.term pre {
  margin: 0;
  padding: 0.95rem 1rem 1.1rem;
  overflow-x: auto;
}

.term code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--lime);
  white-space: pre;
}

#install-cmd::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 1em;
  margin-left: 0.2em;
  background: var(--lime);
  vertical-align: -0.1em;
  animation: nrc-caret 1.1s steps(1) infinite;
}

@keyframes nrc-caret {
  50% { opacity: 0; }
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.step {
  display: grid;
  gap: 0.65rem;
  padding-top: 1rem;
  border-top: 1px solid var(--lime);
}

.step-n {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--lime);
  padding-top: 0.2rem;
}

.step p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--bg);
  padding: 1.5rem 1.35rem;
  border-left: 2px solid transparent;
  transition: border-color 180ms linear, background 180ms linear;
}

.card:hover {
  border-left-color: var(--lime);
  background: var(--bg-2);
}

.card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.proof-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

.cert-preview {
  border: 1px solid var(--lime);
  padding: 1.5rem;
  background: var(--bg-2);
  transform: rotate(-0.8deg);
  box-shadow: 10px 14px 0 0 rgba(198, 241, 60, 0.12);
}

.cert-preview p {
  margin: 0.35rem 0;
}

.k {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.v {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--lime);
  overflow-wrap: anywhere;
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--line);
}

.trust-list li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.trust-list strong {
  font-family: var(--font-display);
  font-weight: 600;
}

.trust-list span {
  color: var(--muted);
}

.cta-band {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
}

.cta-band p {
  color: var(--muted);
  max-width: var(--measure);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--ink);
}

.page-head {
  padding: 3.5rem 0 1.5rem;
}

.page-head p {
  color: var(--muted);
  max-width: var(--measure);
}

.prose {
  max-width: var(--measure);
  padding-bottom: 4rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose h2 {
  margin: 2.4rem 0 0.8rem;
  font-size: var(--step-3);
}

.prose ul {
  padding-left: 1.2rem;
}

.sample-banner {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--lime-ink);
  background: var(--lime);
  display: inline-block;
  padding: 0.2rem 0.5rem;
  margin-bottom: 1rem;
}

.cert-page {
  border: 1px solid var(--lime);
  padding: 1.75rem;
  background: #0c0c0c;
  max-width: 40rem;
}

.hash-block {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--lime);
  overflow-wrap: anywhere;
  margin: 0.75rem 0 1.25rem;
}

/* App */
.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(16rem, 0.95fr);
  gap: 2rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

.app-col {
  min-width: 0;
}

.app-in {
  display: grid;
  gap: 1rem;
}

.app-action {
  display: grid;
  gap: 0.4rem;
}

.app-action .btn {
  justify-self: start;
  margin-top: 0.35rem;
}

.app-action .meta-line,
.app-action .status {
  margin: 0;
  min-height: 0;
}

.app-action .meta-line:empty,
.app-action .status:empty {
  display: none;
}

.app-out {
  display: none;
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--lime);
  gap: 1rem;
}

.app-out.is-on {
  display: grid;
}

.app-side {
  position: sticky;
  top: 1.25rem;
  align-self: start;
}

.app-shell.is-queued .drop,
.app-shell.is-busy .drop,
.app-shell.is-done .drop {
  min-height: 0;
}

.drop {
  border: 1px dashed #3a3a3a;
  background: var(--bg-2);
  min-height: 16rem;
  padding: 1.5rem;
  display: grid;
  align-content: center;
  gap: 0.75rem;
}

.drop.is-over {
  border-color: var(--lime);
}

.drop p,
.drop label {
  margin: 0;
  color: var(--muted);
}

.drop label[for="paste"] {
  margin-top: 0.5rem;
}

.drop strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-2);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.paste {
  width: 100%;
  min-height: 7.5rem;
  resize: vertical;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.85rem;
  font-family: var(--font-body);
  font-size: 1rem;
}

.paste:focus {
  border-color: var(--lime);
}

.meta-line {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.status {
  color: var(--muted);
  font-size: 0.95rem;
}

.status.is-error {
  color: var(--danger);
}

.preview-canvas {
  width: 100%;
  max-height: 16rem;
  object-fit: contain;
  background: #050505;
  display: none;
}

.preview-canvas.is-on {
  display: block;
}

.wall {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--lime);
  overflow-wrap: anywhere;
  max-height: 10rem;
  overflow: auto;
  margin: 0;
}

.wall.is-on {
  display: block;
}

.cert {
  display: none;
  border: 1px solid var(--lime);
  padding: 1.25rem;
  margin: 0;
  background: var(--bg-2);
}

.cert.is-on {
  display: block;
}

.cert h2 {
  font-size: var(--step-2);
  margin-bottom: 0.8rem;
}

.err-pic {
  height: min(42vh, 22rem);
  overflow: hidden;
  background: #050505;
}

.err-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.err-body {
  padding: 2.5rem 0 4rem;
}

@media (max-width: 860px) {
  .hero,
  .app-shell,
  .proof-panel,
  .tracks,
  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero {
    padding-top: 2.5rem;
    overflow: visible;
  }

  .hero-visual {
    min-height: 0;
  }

  .hash-fall {
    display: none;
  }

  .nav-links a:not(.btn):not(.nav-x) {
    display: none;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .trust-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .machine {
    width: min(100%, 18rem);
    margin-inline: auto;
  }

  .cert-preview {
    transform: none;
    box-shadow: none;
  }

  .term-bar {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nrc-paper,
  .nrc-strip,
  .nrc-strip-fill,
  .nrc-strip-hash {
    transition: none !important;
  }

  .machine.is-process .nrc-light-on,
  .machine.is-process,
  .hash-fall span,
  #install-cmd::after {
    animation: none;
  }

  .machine.is-process .nrc-light-on {
    opacity: 1;
  }

  .hash-fall {
    display: none;
  }

  .card {
    transition: none;
  }
}
