/* ═══════════════════════════════════════════════════════════════
   PitchScore.AI — Design System
   Dark, premium, VC-aesthetic
═══════════════════════════════════════════════════════════════ */

:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161e;
  --bg-card-hover: #1e1e28;
  --border: #2a2a38;
  --border-light: #333345;

  --text-primary: #f0f0f8;
  --text-secondary: #9090b0;
  --text-muted: #5a5a78;

  --accent: #6c63ff;
  --accent-hover: #7d75ff;
  --accent-glow: rgba(108, 99, 255, 0.25);

  --green: #22d3a3;
  --green-bg: rgba(34, 211, 163, 0.08);
  --yellow: #f5c542;
  --yellow-bg: rgba(245, 197, 66, 0.08);
  --orange: #f5843c;
  --orange-bg: rgba(245, 132, 60, 0.08);
  --red: #f54a4a;
  --red-bg: rgba(245, 74, 74, 0.08);

  --score-seed: #22d3a3;
  --score-early: #6c63ff;
  --score-needs: #f5c542;
  --score-back: #f54a4a;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(108, 99, 255, 0.15);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ── Typography ─────────────────────────────────────────────────────────── */

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { color: var(--text-secondary); line-height: 1.7; }

.text-gradient {
  background: linear-gradient(135deg, #f0f0f8 0%, var(--accent) 60%, #22d3a3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 720px;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  backdrop-filter: blur(0);
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.92);
  border-color: var(--border);
  backdrop-filter: blur(20px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav__logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), #22d3a3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  font-weight: 900;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav__link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: var(--font-sans);
  line-height: 1;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #8b7fff);
  color: white;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.5);
  color: white;
}

.btn--primary:active { transform: translateY(0); }

.btn--secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn--outline:hover {
  background: var(--accent-glow);
  color: var(--accent);
}

.btn--large { padding: 18px 36px; font-size: 1.1rem; border-radius: var(--radius-lg); }

.btn--loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn--loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.card--glow {
  box-shadow: var(--shadow-card), var(--shadow-glow);
  border-color: rgba(108, 99, 255, 0.3);
}

/* ── Score ring ──────────────────────────────────────────────────────────── */

.score-ring-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.score-ring-svg { transform: rotate(-90deg); }

.score-ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.score-ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              stroke 0.5s ease;
}

.score-ring-text {
  position: absolute;
  text-align: center;
  line-height: 1;
}

.score-ring-number {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  display: block;
}

.score-ring-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Tier badge ──────────────────────────────────────────────────────────── */

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tier-badge--seed_ready    { background: rgba(34,211,163,0.15); color: var(--green); border: 1px solid rgba(34,211,163,0.3); }
.tier-badge--early_stage   { background: rgba(108,99,255,0.15); color: var(--accent); border: 1px solid rgba(108,99,255,0.3); }
.tier-badge--needs_work    { background: rgba(245,197,66,0.15); color: var(--yellow); border: 1px solid rgba(245,197,66,0.3); }
.tier-badge--back_to_drawing_board { background: rgba(245,74,74,0.15); color: var(--red); border: 1px solid rgba(245,74,74,0.3); }

/* ── Sub-score bars ──────────────────────────────────────────────────────── */

.sub-scores { display: flex; flex-direction: column; gap: 12px; }

.sub-score-row {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.sub-score-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.sub-score-bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.sub-score-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent), #22d3a3);
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0;
}

.sub-score-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── VC Quote ─────────────────────────────────────────────────────────────── */

.vc-quote {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  position: relative;
}

.vc-quote__attribution {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.vc-quote__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #22d3a3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.vc-quote__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.vc-quote__title {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.vc-quote__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: italic;
}

/* ── Strengths / Gaps lists ──────────────────────────────────────────────── */

.insight-list { display: flex; flex-direction: column; gap: 8px; }

.insight-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.insight-item--strength { background: var(--green-bg); color: var(--text-secondary); }
.insight-item--gap      { background: var(--red-bg);   color: var(--text-secondary); }

.insight-icon { flex-shrink: 0; margin-top: 2px; }

/* ── Section headers ─────────────────────────────────────────────────────── */

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── Toast notification ──────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 1000;
  transition: transform 0.3s ease;
  white-space: nowrap;
}

.toast.visible { transform: translateX(-50%) translateY(0); }

/* ── Loading shimmer ─────────────────────────────────────────────────────── */

.shimmer {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Animations ──────────────────────────────────────────────────────────── */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(108, 99, 255, 0.2); }
  50%       { box-shadow: 0 0 40px rgba(108, 99, 255, 0.5); }
}

.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }
.animate-fadeIn   { animation: fadeIn 0.3s ease forwards; }

/* ── Utility classes ─────────────────────────────────────────────────────── */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.opacity-0 { opacity: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .card { padding: 20px; }
  .container { padding: 0 16px; }
  .nav__links .nav__link { display: none; }
  .nav__links .btn { padding: 10px 18px; font-size: 0.85rem; }
}
