:root {
  --color-bg: #ffffff;
  --color-surface: #f7f8fb;
  --color-accent: #e9eefd;
  --color-primary: #4f46e5;
  --color-primary-dark: #3730a3;
  --color-primary-light: #818cf8;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-success: #10b981;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1100px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.narrow {
  max-width: 720px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-primary);
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-bg) 100%);
  text-align: center;
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: #fff;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary-light);
}

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

/* Sections */
.section {
  padding: 4rem 0;
}

.section-muted {
  background: var(--color-surface);
}

.section-accent {
  background: var(--color-accent);
}

.section-results {
  background: var(--color-surface);
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  text-align: center;
}

.section > .container > p {
  color: var(--color-text-muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* Waitlist form */
.waitlist-form {
  margin-top: 1.5rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.input {
  flex: 1 1 180px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-message {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  text-align: center;
}

.form-message.success {
  color: var(--color-success);
}

.form-message.error {
  color: #ef4444;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.step {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.step p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Quiz */
.quiz-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.quiz-progress {
  margin-bottom: 1.5rem;
}

.progress-bar {
  height: 8px;
  background: #dbe4ff;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}

.quiz-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}

.question {
  margin-bottom: 1.5rem;
}

.question-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.question-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: -0.5rem 0 1rem;
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.option {
  position: relative;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-label {
  display: block;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  transition: all 0.15s ease;
}

.option input:checked + .option-label {
  border-color: var(--color-primary);
  background: var(--color-accent);
  color: var(--color-primary-dark);
}

.option-label:hover {
  border-color: var(--color-primary-light);
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 0.75rem;
}

.quiz-nav .btn {
  flex: 1;
}

.quiz-loading {
  text-align: center;
  padding: 3rem 1rem;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #dbe4ff;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

/* Results */
.results-intro {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.result-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.result-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.result-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tag {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-radius: 999px;
}

.result-description {
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
}

.result-reasoning {
  font-size: 0.95rem;
  color: var(--color-primary-dark);
  background: var(--color-accent);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin: 0 0 0.75rem;
}

.result-career {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

.result-career strong {
  color: var(--color-text);
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: #9ca3af;
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.footer-inner p {
  margin: 0;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

/* Legal pages */
.legal {
  text-align: left;
}

.legal h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.legal h2 {
  font-size: 1.25rem;
  text-align: left;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.legal p,
.legal ul {
  color: var(--color-text-muted);
}

.legal ul {
  padding-left: 1.25rem;
}

.legal-hint {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  text-align: center;
}

/* Utility */
[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 0 2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .quiz-form {
    padding: 1.25rem;
  }

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

  .quiz-nav {
    flex-direction: column;
  }
}
