/* ─── OpenBazaar.ai — Design System ─── */

:root {
  /* Brand Colors */
  --brand: #2563eb;
  --brand-light: #60a5fa;
  --brand-dark: #1d4ed8;
  --green: #059669;
  --green-dark: #047857;
  --purple: #7c3aed;
  --yellow: #d97706;
  --red: #dc2626;

  /* Surfaces */
  --bg: #ffffff;
  --bg-elevated: #fafafa;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --surface: #f1f5f9;

  /* Text */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Borders */
  --border: rgba(15, 23, 42, 0.08);
  --border-subtle: rgba(15, 23, 42, 0.04);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Spacing */
  --section-px: clamp(1.5rem, 5vw, 6rem);
  --section-py: clamp(4rem, 10vw, 8rem);

  /* Transitions */
  --ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ─── Accessibility ─── */
.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 1000;
  transform: translateY(-220%);
  background: var(--brand); color: white; font-weight: 700;
  padding: 0.5rem 1rem; border-radius: 9999px;
  transition: transform 160ms ease;
}
.skip-link:focus-visible { transform: translateY(0); }
:where(a, button, input):focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
}

/* ─── Utilities ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--section-px); }
.animate-up {
  animation: fade-in-up 0.6s var(--ease-spring) both;
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Tags ─── */
.tag {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-dark);
  border: 1px solid var(--border);
}
.tag-glow {
  box-shadow: 0 0 40px rgba(37, 99, 235, 0.1);
}
.tag-accent {
  background: rgba(251, 191, 36, 0.15);
  color: #b45309;
  border-color: rgba(251, 191, 36, 0.2);
}
.tag-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-dark);
  border-color: rgba(16, 185, 129, 0.2);
}
.tag-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #6d28d9;
  border-color: rgba(139, 92, 246, 0.2);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: 9999px;
  transition: all 300ms var(--ease-spring);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-xl { padding: 1rem 2.5rem; font-size: 1.125rem; }

.btn-primary {
  background: var(--brand); color: white;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--brand-dark);
  background: rgba(99, 102, 241, 0.08);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text); }
.btn-green {
  background: var(--green);
  color: white;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
}
.btn-green:hover {
  background: var(--green-dark);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

/* ─── Navigation ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem var(--section-px);
  gap: 2rem;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.25rem;
}
.logo-icon {
  color: var(--brand-dark);
  font-size: 1.5rem;
}
.logo-dot { color: var(--brand-dark); }
.nav-links {
  display: flex; gap: 1.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 0.75rem; align-items: center; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 0.5rem; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all 200ms ease;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 8rem var(--section-px) 4rem;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.1;
}
.hero-glow-1 {
  width: 600px; height: 600px;
  top: -10%; left: 20%;
  background: var(--brand);
  animation: float 12s ease-in-out infinite;
}
.hero-glow-2 {
  width: 500px; height: 500px;
  bottom: -10%; right: 15%;
  background: var(--purple);
  animation: float 15s ease-in-out infinite reverse;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 800px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 1.5rem 0;
  background: linear-gradient(135deg, var(--text) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-subtitle strong { color: var(--text); }
.hero-ctas {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}
.hero-stat { text-align: center; }
.hero-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-stat-divider {
  width: 1px; height: 2.5rem;
  background: var(--border-subtle);
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* ─── Trust Bar ─── */
.trust-bar {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
}
.trust-bar .container {
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; flex-wrap: wrap;
}
.trust-label {
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
}
.trust-logos {
  display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center;
}
.trust-logo {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── Sections ─── */
.section { padding: var(--section-py) 0; }
.section-dark { background: var(--bg-elevated); }
.section-gradient {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
}
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 1rem 0;
  color: var(--text);
}
.section-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-desc.left-align { margin: 0; }

/* ─── Steps Grid ─── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.step-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  transition: all 300ms var(--ease-spring);
  overflow: hidden;
}
.step-card:hover {
  transform: translateY(-4px);
  border-color: var(--border);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.04);
}
.step-number {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-family: var(--font-display);
  font-size: 3rem; font-weight: 700;
  color: rgba(37, 99, 235, 0.05);
  line-height: 1;
}
.step-icon {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
}
.step-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  margin-bottom: 0.75rem;
}
.step-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ─── Features Grid ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: all 300ms var(--ease-spring);
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border);
  background: var(--bg-card-hover);
}
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem; line-height: 1.6;
}

/* ─── Split Layout ─── */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}
.split-layout.reverse .split-content { order: 2; }
.split-layout.reverse .split-visual { order: 1; }

/* ─── Check List ─── */
.check-list {
  display: flex; flex-direction: column; gap: 1rem;
  margin: 2rem 0;
}
.check-list li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-size: 0.95rem; line-height: 1.6;
}
.check-list li span { color: var(--text-secondary); }
.check-list li strong { color: var(--text); }
.check-icon {
  width: 20px; height: 20px; flex-shrink: 0;
  margin-top: 2px;
  color: var(--green-dark);
}

/* ─── Gig Preview Cards ─── */
.gig-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: all 300ms var(--ease-spring);
}
.gig-preview:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.04);
}
.gig-preview-offset {
  margin-top: 1rem;
  margin-left: 2rem;
}
.gig-preview-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.75rem;
}
.gig-status {
  font-size: 0.75rem; font-weight: 600;
  color: var(--green-dark);
}
.gig-status-agent { color: #6d28d9; }
.gig-price {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  color: var(--brand-dark);
}
.gig-price small {
  font-size: 0.75rem; color: var(--text-muted);
}
.gig-title {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 0.375rem;
}
.gig-seller {
  font-size: 0.8rem; color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.gig-seller strong { color: var(--text-secondary); }
.gig-tags {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.gig-tags span {
  font-size: 0.7rem; font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-dark);
}
.gig-meta {
  display: flex; gap: 1rem;
  font-size: 0.8rem; color: var(--text-muted);
}

/* ─── Agent Cards ─── */
.agent-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2rem;
  text-align: center;
  transition: all 300ms var(--ease-spring);
}
.agent-card:hover {
  transform: translateY(-4px);
  border-color: var(--border);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.04);
}
.agent-avatar {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.agent-card h4 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  margin-bottom: 0.5rem;
}
.agent-card p {
  font-size: 0.85rem; color: var(--text-secondary);
  margin-bottom: 1rem; line-height: 1.5;
}
.agent-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #6d28d9;
}

/* ─── Comparison Table ─── */
.compare-table-wrap {
  overflow-x: auto;
  border-radius: 1.25rem;
  border: 1px solid var(--border-subtle);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.compare-table th, .compare-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.compare-table thead th {
  background: var(--bg-card);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.compare-table tbody td { color: var(--text-secondary); }
.compare-table tbody td:first-child {
  font-weight: 600; color: var(--text);
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-highlight {
  background: rgba(99, 102, 241, 0.06) !important;
  color: var(--brand-dark) !important;
}

/* ─── Network Visual ─── */
.network-visual {
  position: relative;
  width: 100%; aspect-ratio: 1;
  max-width: 400px; margin: 0 auto;
}
.network-lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.node {
  position: absolute;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  animation: float 6s ease-in-out infinite;
}
.node-center {
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  background: var(--brand); color: white;
  border-color: var(--brand-dark);
  font-size: 0.8rem;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
  animation: none;
}
.node-1 { left: 15%; top: 15%; animation-delay: 0s; }
.node-2 { right: 15%; top: 20%; animation-delay: 1s; }
.node-3 { right: 10%; bottom: 25%; animation-delay: 2s; }
.node-4 { left: 10%; bottom: 22%; animation-delay: 1.5s; }
.node-5 { left: 45%; top: 5%; animation-delay: 0.5s; }

.network-stats {
  display: flex; gap: 2rem; margin: 2rem 0;
}
.network-stat { text-align: center; }
.network-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  color: var(--brand-dark);
}
.network-stat-label {
  font-size: 0.8rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ─── CTA Section ─── */
.section-cta {
  padding: var(--section-py) 0;
}
.cta-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: clamp(3rem, 6vw, 5rem);
  text-align: center;
  box-shadow: 0 20px 80px rgba(15, 23, 42, 0.04);
}
.cta-actions {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}
.cta-sub {
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.cta-self-host {
  display: inline-flex; align-items: center; gap: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
}
.cta-self-host code {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: 'SFMono-Regular', Consolas, monospace;
}
.copy-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  transition: all 200ms ease;
}
.copy-btn:hover { background: rgba(37, 99, 235, 0.1); }

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 280px;
}
.footer-col { display: flex; flex-direction: column; gap: 0.625rem; }
.footer-col h4 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 200ms;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-social {
  display: flex; gap: 1rem;
}
.footer-social a {
  color: var(--text-muted);
  transition: color 200ms;
}
.footer-social a:hover { color: var(--text); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 280px;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border-subtle);
    padding: 5rem 2rem 2rem;
    gap: 1.25rem;
    z-index: 99;
  }
  .nav-actions.open {
    display: flex;
    position: fixed;
    bottom: 2rem; left: 0; right: 0;
    justify-content: center;
    z-index: 99;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }
  .split-layout.reverse .split-content,
  .split-layout.reverse .split-visual { order: unset; }

  .gig-preview-offset { margin-left: 0; }

  .hero-stats {
    flex-direction: column; gap: 1rem;
  }
  .hero-stat-divider {
    width: 3rem; height: 1px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }

  .compare-table { font-size: 0.8rem; }
  .compare-table th, .compare-table td { padding: 0.75rem; }

  .cta-self-host { flex-direction: column; }
  .cta-self-host code { font-size: 0.75rem; }

  .network-stats { flex-direction: column; gap: 1rem; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
