/* mpps.io — Protocol-grade attestation layer */
/* Dark, industrial, trustworthy */

:root {
  --bg: #09090b;
  --bg-raised: #111113;
  --bg-card: #18181b;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --green: #22c55e;
  --green-dim: #16a34a;
  --red: #ef4444;
  --border: #27272a;
  --border-light: #3f3f46;
  --mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --serif: 'Georgia', 'Times New Roman', serif;
  --max-w: 800px;
  --max-w-cert: 700px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

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

code, pre, .mono {
  font-family: var(--mono);
}

/* ── Nav ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

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

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

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

/* ── Main Content ── */

.content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px 60px;
}

/* ── Hero ── */

.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-title {
  font-family: var(--mono);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 8px;
}

.hero-tagline {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--bg-raised);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 10px 12px;
}

.btn-ghost:hover {
  color: var(--accent-hover);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ── Sections ── */

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

.section:first-child {
  border-top: none;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.section h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.section p {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.7;
}

.section p:last-child {
  margin-bottom: 0;
}

/* ── Steps ── */

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

.step {
  text-align: center;
  padding: 24px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-raised);
}

.step-num {
  font-family: var(--mono);
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 8px;
}

.step-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Principles ── */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 24px 0;
}

.principle {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-raised);
}

.principle-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.principle p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Trust Chain ── */

.trust-chain {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.trust-layer {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-raised);
}

.trust-layer-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  min-width: 120px;
  flex-shrink: 0;
}

.trust-layer-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Code Block ── */

.code-block {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 16px 0;
}

.code-block pre {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre;
}

.code-block .cmd {
  color: var(--green);
}

.code-block .flag {
  color: var(--accent);
}

.code-block .string {
  color: #fbbf24;
}

.code-block .url {
  color: var(--text);
}

/* ── Genesis ── */

.genesis-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  background: var(--bg-raised);
  text-align: center;
  margin: 16px 0;
}

.genesis-block .uuid {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--accent);
  margin: 12px 0;
}

.genesis-block .quote {
  font-style: italic;
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 16px;
}

/* ── Pricing ── */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

.pricing-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-raised);
}

.pricing-card.featured {
  border-color: var(--accent);
}

.pricing-tier {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.pricing-price {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.pricing-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
}

.pricing-features {
  list-style: none;
  padding: 0;
}

.pricing-features li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 4px 0;
}

.pricing-features li::before {
  content: '\2192\00a0';
  color: var(--text-dim);
}

.badge-soon {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  vertical-align: middle;
  margin-left: 6px;
}

/* ── Agents ── */

.agent-features {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.agent-features li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.agent-features li::before {
  content: '\00B7';
  position: absolute;
  left: 4px;
  color: var(--text-dim);
}

/* ── Verify Page ── */

.verify-search {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
}

.verify-search input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.verify-search input::placeholder {
  color: var(--text-dim);
}

.verify-search input:focus {
  border-color: var(--accent);
}

.verify-search button {
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.verify-search button:hover {
  background: var(--accent-hover);
}

.verify-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

.verify-status.verified {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.verify-status.unverified {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── Data Table ── */

.data-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0;
}

.data-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.data-row:last-child {
  border-bottom: none;
}

.data-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 12px 20px;
  min-width: 160px;
  background: var(--bg-raised);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.data-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  padding: 12px 20px;
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

.data-value.expandable {
  cursor: pointer;
  position: relative;
}

.data-value.expandable::after {
  content: ' [expand]';
  color: var(--accent);
  font-size: 11px;
}

.data-value .green {
  color: var(--green);
}

/* ── Certificate Page ── */

.cert-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 24px 60px;
}

.cert-card {
  background: #fafaf9;
  color: #1a1a1a;
  max-width: var(--max-w-cert);
  width: 100%;
  border: 1px solid #d4d4d8;
  border-radius: 2px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
  padding: 56px 48px;
  position: relative;
}

.cert-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid #e4e4e7;
  pointer-events: none;
}

.cert-header {
  text-align: center;
  margin-bottom: 32px;
}

.cert-header h1 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.cert-header .cert-issuer {
  font-family: var(--mono);
  font-size: 13px;
  color: #71717a;
  letter-spacing: 0.04em;
}

.cert-divider {
  height: 1px;
  background: #d4d4d8;
  margin: 24px 0;
}

.cert-body {
  text-align: center;
  margin-bottom: 24px;
}

.cert-body p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
  color: #3f3f46;
}

.cert-field {
  margin: 20px 0;
  text-align: left;
}

.cert-field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #71717a;
  margin-bottom: 4px;
}

.cert-field-value {
  font-family: var(--mono);
  font-size: 13px;
  color: #1a1a1a;
  word-break: break-all;
  line-height: 1.5;
}

.cert-technical {
  font-size: 13px;
  color: #52525b;
  line-height: 1.8;
  text-align: left;
}

.cert-technical .label {
  color: #71717a;
  display: inline;
}

.cert-qr-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0;
}

.cert-qr {
  width: 100px;
  height: 100px;
  border: 1px solid #d4d4d8;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.cert-qr-text {
  font-size: 13px;
  color: #52525b;
  line-height: 1.6;
}

.cert-qr-text .url {
  font-family: var(--mono);
  font-size: 12px;
  color: #3f3f46;
  word-break: break-all;
}

.cert-genesis {
  text-align: center;
  margin-top: 8px;
}

.cert-genesis p {
  font-family: var(--serif);
  font-size: 14px;
  color: #52525b;
  line-height: 1.7;
}

.cert-genesis .quote {
  font-style: italic;
  color: #71717a;
  margin-top: 12px;
}

.cert-genesis .issuer {
  font-size: 13px;
  color: #71717a;
  margin-top: 16px;
}

.cert-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.cert-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 16px;
  max-width: var(--max-w-cert);
}

/* ── Legal Pages ── */

.legal-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px 60px;
}

.legal-content h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.legal-content .effective {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-content p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.7;
}

.legal-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 12px;
}

.legal-content ul li {
  font-size: 15px;
  color: var(--text-muted);
  padding: 4px 0 4px 20px;
  position: relative;
  line-height: 1.7;
}

.legal-content ul li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 4px;
}

.footer-links {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-dim);
}

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

.footer-links .sep {
  color: var(--border);
}

.footer .copyright {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ── Responsive ── */

@media (max-width: 680px) {
  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

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

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

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

  .data-row {
    flex-direction: column;
  }

  .data-label {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-width: unset;
  }

  .cert-card {
    padding: 32px 24px;
  }

  .cert-card::before {
    inset: 4px;
  }

  .cert-qr-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .trust-layer {
    flex-direction: column;
    gap: 4px;
  }

  .trust-layer-name {
    min-width: unset;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 12px;
  }

  .verify-search {
    flex-direction: column;
  }
}

/* ── Print (Certificate) ── */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .nav, .footer, .cert-actions, .cert-note {
    display: none;
  }

  .cert-page {
    padding: 0;
    min-height: auto;
  }

  .cert-card {
    box-shadow: none;
    border: 2px solid #000;
    max-width: 100%;
    background: #fff;
  }
}
