:root {
  --bg: #09090b;
  --bg-elevated: #18181b;
  --bg-card: #1c1c1f;
  --fg: #fafafa;
  --fg-muted: #a1a1aa;
  --fg-subtle: #71717a;
  --accent: #f97316;
  --accent-dim: rgba(249, 115, 22, 0.15);
  --border: #27272a;
  --success: #22c55e;
}

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

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
}

/* Navigation */
.nav {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

/* Hero */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 480px;
}

/* Benchmark Card */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.benchmark-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.benchmark-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.benchmark-label {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.benchmark-trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.benchmark-trend.up {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.benchmark-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}

.benchmark-context {
  font-size: 0.875rem;
  color: var(--fg-subtle);
  margin-top: 0.5rem;
}

.metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.metric {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.metric-value {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.metric-label {
  display: block;
  font-size: 0.75rem;
  color: var(--fg-subtle);
  margin-top: 0.25rem;
}

/* Stats */
.stats {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-top: 0.5rem;
  max-width: 200px;
}

.stat-divider {
  width: 1px;
  height: 60px;
  background: var(--border);
}

/* Features */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.features-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.features-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.features-header p {
  color: var(--fg-muted);
  font-size: 1.125rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.feature {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.feature h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature p {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* How it works */
.how {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 5rem 2rem;
}

.how-content {
  max-width: 1200px;
  margin: 0 auto;
}

.how h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.step {
  display: flex;
  flex-direction: column;
}

.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.step-text h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-text p {
  color: var(--fg-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Closing */
.closing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}

.closing h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.closing p {
  color: var(--fg-muted);
  font-size: 1.25rem;
  margin-bottom: 3rem;
}

.closing-statement {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--fg-subtle);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--fg-subtle);
}

.footer-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.75rem;
  color: var(--fg-subtle);
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 1.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .stats-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stat-divider {
    display: none;
  }

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

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

  .closing h2 {
    font-size: 2rem;
  }
}

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

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

/* ========= Nav additions ========= */
.nav-inner--wide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  text-decoration: none;
  color: var(--fg);
}

.nav-cta {
  font-size: 0.875rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-cta:hover {
  color: var(--fg);
}

/* ========= Hero CTA ========= */
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: var(--fg);
  font-weight: 500;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-ghost:hover {
  background: var(--bg-elevated);
}

/* ========= Analyze page ========= */
.analyze-page {
  padding: 4rem 2rem 6rem;
}

.analyze-container {
  max-width: 680px;
  margin: 0 auto;
}

.analyze-header {
  margin-bottom: 3rem;
}

.analyze-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 1rem 0 0.75rem;
}

.analyze-subtitle {
  font-size: 1.0625rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

.analyze-form {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field--small {
  width: 140px;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--fg-subtle);
  margin-top: 0.125rem;
}

.form-field input {
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s;
  outline: none;
}

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

.form-field input::placeholder {
  color: var(--fg-subtle);
}

.input-with-unit {
  position: relative;
}

.input-with-unit input {
  width: 100%;
  padding-right: 6rem;
}

.input-unit {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--fg-subtle);
  pointer-events: none;
}

.form-error {
  padding: 0.875rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #f87171;
  font-size: 0.875rem;
}

.btn-analyze {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 0.5rem;
}

.btn-analyze:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-analyze:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ========= Results page ========= */
.results-page {
  padding: 3rem 2rem 6rem;
}

.results-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.results-team-label {
  display: block;
  font-size: 0.75rem;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.results-team-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.results-team-size {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.results-date {
  font-size: 0.875rem;
  color: var(--fg-subtle);
  flex-shrink: 0;
}

/* Score hero */
.score-hero {
  display: flex;
  gap: 3rem;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
}

.score-ring-wrapper {
  position: relative;
  flex-shrink: 0;
}

.score-ring {
  width: 130px;
  height: 130px;
  transform: rotate(-90deg);
}

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

.score-ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease;
}

.score-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.score-max {
  font-size: 0.875rem;
  color: var(--fg-subtle);
}

.score-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.score-tier {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.score-percentile {
  font-size: 1rem;
  color: var(--fg-muted);
}

.score-percentile strong {
  color: var(--fg);
}

.score-summary {
  font-size: 0.9375rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-top: 0.5rem;
  max-width: 480px;
}

/* Breakdown */
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.section-subtitle {
  font-size: 0.9375rem;
  color: var(--fg-muted);
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.breakdown-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.breakdown-card-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.breakdown-icon {
  color: var(--accent);
  font-size: 1rem;
}

.breakdown-label {
  font-size: 0.875rem;
  font-weight: 500;
  flex: 1;
}

.breakdown-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-muted);
}

.breakdown-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}

.breakdown-compare {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--fg-subtle);
}

.breakdown-yours strong,
.breakdown-target strong {
  color: var(--fg-muted);
}

/* Recommendations */
.recs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rec-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.rec-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
}

.rec-body {
  flex: 1;
}

.rec-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.rec-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.rec-impact {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rec-impact--high {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.rec-impact--medium {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.rec-impact--low {
  background: rgba(113, 113, 122, 0.15);
  color: var(--fg-muted);
}

.rec-description {
  font-size: 0.9375rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* Results CTA */
.results-cta {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(249, 115, 22, 0.05) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
}

.results-cta-inner h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.results-cta-inner p {
  color: var(--fg-muted);
  margin-bottom: 1.75rem;
}

/* Responsive additions */
@media (max-width: 700px) {
  .score-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.75rem;
  }

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

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

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

  .form-field--small {
    width: 100%;
  }

  .results-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .analyze-title {
    font-size: 1.75rem;
  }
}