/* Buyer-Seller Matching Engine Styles */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --ink: #0a0f1c;
  --slate: #2d3548;
  --mid: #6b7a99;
  --light: #b8c4d8;
  --ghost: #edf1f7;
  --white: #ffffff;
  --accent: #00c27a;
  --accent-dim: #00a366;
  --warm: #ff6b4a;
  --surface: #f6f8fc;
  --border: rgba(255,255,255,0.06);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--ink);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: var(--white);
}
.nav-logo span { color: var(--accent); }
.nav-tag {
  font-size: 0.7rem;
  color: var(--mid);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--light);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 40px 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -300px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0,194,122,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,107,74,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 194, 122, 0.12);
  border: 1px solid rgba(0, 194, 122, 0.25);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
  width: fit-content;
}
.hero-label .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
  max-width: 700px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p {
  font-size: 1.15rem;
  color: var(--light);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 44px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 194, 122, 0.3);
}
.btn-secondary {
  background: rgba(255,255,255,0.07);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

/* Hub Cards */
.hub-section {
  padding: 100px 40px;
}
.hub-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.hub-section .subtitle {
  color: var(--light);
  font-size: 1rem;
  margin-bottom: 48px;
  max-width: 480px;
}
.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 900px;
}
.hub-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.hub-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(0, 194, 122, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.hub-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.hub-card.buyer-card .card-icon { background: rgba(0, 194, 122, 0.15); }
.hub-card.seller-card .card-icon { background: rgba(255, 107, 74, 0.15); }
.hub-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.hub-card p {
  color: var(--mid);
  font-size: 0.875rem;
  line-height: 1.6;
}
.hub-card .card-arrow {
  margin-top: 24px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.2s;
}
.hub-card:hover .card-arrow { opacity: 1; transform: translateX(0); }

/* Form Pages */
.form-page {
  min-height: 100vh;
  padding: 120px 40px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.form-page .form-container {
  width: 100%;
  max-width: 680px;
}
.form-page h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.form-page .form-subtitle {
  color: var(--light);
  font-size: 1rem;
  margin-bottom: 40px;
}
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 194, 122, 0.15);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7a99' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.form-group select option { background: var(--slate); }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-submit {
  margin-top: 32px;
}
.form-submit .btn { width: 100%; justify-content: center; font-size: 1rem; padding: 16px; }

/* Range display */
.range-display {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--accent);
  margin-top: 6px;
}
.range-display .preview {
  background: rgba(0, 194, 122, 0.1);
  border: 1px solid rgba(0, 194, 122, 0.2);
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: 600;
}

/* Results Page */
.results-page {
  min-height: 100vh;
  padding: 120px 40px 80px;
}
.results-container {
  max-width: 860px;
  margin: 0 auto;
}
.results-header { margin-bottom: 48px; }
.results-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.results-header p { color: var(--light); font-size: 1rem; }
.profile-summary {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 36px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.profile-summary .stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-summary .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--mid);
}
.profile-summary .stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
}
.match-count {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 24px;
}
.match-count strong { color: var(--accent); }
.match-list { display: flex; flex-direction: column; gap: 16px; }
.match-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px;
  align-items: start;
  transition: all 0.2s;
}
.match-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(0, 194, 122, 0.2);
}
.match-rank {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--mid);
  width: 56px;
  text-align: center;
  line-height: 1;
}
.match-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}
.match-tag {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  padding: 3px 10px;
  color: var(--light);
}
.match-score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 64px;
}
.score-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}
.score-high { background: rgba(0, 194, 122, 0.15); color: var(--accent); border: 1px solid rgba(0, 194, 122, 0.3); }
.score-med { background: rgba(255, 107, 74, 0.15); color: var(--warm); border: 1px solid rgba(255, 107, 74, 0.3); }
.score-low { background: rgba(107, 122, 153, 0.15); color: var(--mid); border: 1px solid rgba(107, 122, 153, 0.3); }
.score-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--mid); }
.breakdown-bars {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--mid);
}
.breakdown-bar-bg {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  max-width: 80px;
}
.breakdown-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s ease;
}
.no-matches {
  text-align: center;
  padding: 80px 40px;
  color: var(--mid);
}
.no-matches h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--light);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mid);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 32px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

/* Error page */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}
.error-page h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  margin-bottom: 12px;
}
.error-page p { color: var(--mid); }

/* Divider */
.section-divider {
  height: 1px;
  background: var(--border);
  max-width: 900px;
  margin: 0 auto;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px;
  color: var(--mid);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 640px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .hero { padding: 120px 20px 60px; }
  .hub-section { padding: 60px 20px; }
  .hub-grid { grid-template-columns: 1fr; }
  .form-page { padding: 100px 20px 60px; }
  .results-page { padding: 100px 20px 60px; }
  .form-row { grid-template-columns: 1fr; }
  .match-card { grid-template-columns: 40px 1fr; }
  .match-score-badge { grid-column: 1 / -1; flex-direction: row; gap: 10px; }
  .score-circle { width: 44px; height: 44px; font-size: 0.875rem; }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.match-card { animation: fadeInUp 0.4s ease both; }
.match-card:nth-child(1) { animation-delay: 0.05s; }
.match-card:nth-child(2) { animation-delay: 0.1s; }
.match-card:nth-child(3) { animation-delay: 0.15s; }
.match-card:nth-child(4) { animation-delay: 0.2s; }
.match-card:nth-child(5) { animation-delay: 0.25s; }