:root {
  color-scheme: dark;
  --bg: #080a0f;
  --panel: #10151d;
  --panel-strong: #151c26;
  --text: #eef4f8;
  --muted: #9eacb7;
  --line: #28323e;
  --green: #66e1a9;
  --blue: #78a9ff;
  --amber: #f4c76f;
  --red: #f87171;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 40px;
}

/* Nav */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 10, 15, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  height: 56px;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

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

/* Hero */

.hero {
  min-height: 80vh;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(400px, 1.1fr);
  gap: 28px;
  align-items: center;
  padding: 40px 0;
}

.eyebrow,
.kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s;
}

.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #07100c;
}

.button.primary:hover {
  opacity: 0.88;
}

.button.primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.button.secondary {
  color: var(--text);
  background: #0d1118;
}

.button.secondary:hover {
  background: var(--panel-strong);
}

/* Terminal */

.terminal {
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090d12;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.terminal-bar {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
}

.terminal-bar span:nth-child(2) {
  background: var(--green);
}

.terminal-bar span:nth-child(3) {
  background: var(--blue);
}

pre {
  margin: 0;
  padding: 20px;
  color: #d8e1e8;
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre-wrap;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* Registration */

.register {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.register-intro p {
  color: var(--muted);
  line-height: 1.65;
}

.register-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
}

.wallet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

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

.wallet-status.connected {
  color: var(--green);
}

.wallet-button {
  min-height: 36px;
  font-size: 0.85rem;
  padding: 0 14px;
}

.register-form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  gap: 14px;
}

.form-row-split {
  grid-template-columns: 1fr 1fr;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
}

.field input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d1118;
  color: var(--text);
  font-size: 0.9rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus {
  border-color: var(--green);
}

.field input::placeholder {
  color: #4a5568;
}

.submit-btn {
  margin-top: 4px;
  width: 100%;
}

.form-info {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.register-result {
  text-align: center;
  padding: 24px 0;
}

.result-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.register-result h3 {
  margin-bottom: 8px;
}

.register-result p {
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
  margin-bottom: 12px;
}

.register-result a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.register-result a:hover {
  text-decoration: underline;
}

/* Contracts */

.contracts {
  margin-top: 64px;
}

.contracts-lede {
  max-width: 600px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 24px;
}

.contracts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.contract-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
  display: grid;
  gap: 8px;
}

.contract-card-wide {
  grid-column: 1 / -1;
}

.contract-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--amber);
}

.contract-card code {
  font-size: 0.82rem;
  line-height: 1.5;
  word-break: break-all;
}

.contract-card a {
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.contract-card a:hover {
  text-decoration: underline;
}

/* How it works */

.how-it-works {
  margin-top: 64px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--green);
  color: #07100c;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* Status */

.status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.6fr);
  gap: 24px;
  margin-top: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  padding: 32px;
}

.status p {
  line-height: 1.65;
  color: var(--muted);
}

.status dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.status dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.status dl div:last-child {
  border: 0;
  padding-bottom: 0;
}

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

.status dd {
  margin: 0;
  text-align: right;
  font-size: 0.92rem;
  font-weight: 500;
}

.status-online {
  color: var(--green);
}

/* Footer */

footer {
  border-top: 1px solid var(--line);
  margin-top: 64px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  height: 64px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.footer-inner a:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 900px) {
  .hero,
  .register {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding: 24px 0;
  }

  .terminal {
    min-height: 320px;
  }

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

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

  .contract-card-wide {
    grid-column: 1;
  }

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

  .form-row-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}
