:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #ec4899;
  --secondary-hover: #db2777;
  --text: #1f2937;
  --text-light: #6b7280;
  --background: #ffffff;
  --background-light: #f3f4f6;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.heading-1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.heading-2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

.text-center {
  text-align: center;
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

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

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

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

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Header */
header {
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 0;
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo h1 {
  font-size: 1.5rem;
  margin-bottom: 0;
}

.logo .primary {
  color: var(--primary);
}

.logo .secondary {
  color: var(--secondary);
}

.tagline {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-left: 0.5rem;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover, nav a.active {
  color: var(--primary);
}

/* Main Content */
main {
  padding-top: 5rem;
}

.section {
  padding: 4rem 0;
}

.bg-light {
  background-color: var(--background-light);
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-content {
  max-width: 500px;
}

.font-preview-card {
  background-color: var(--background-light);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.font-pair {
  margin-bottom: 1.5rem;
}

.font-pair:last-child {
  margin-bottom: 0;
}

.font-pair h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.font-pair p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* Font Classes */
.montserrat {
  font-family: 'Montserrat', sans-serif;
}

.merriweather {
  font-family: 'Merriweather', serif;
}

.playfair {
  font-family: 'Playfair Display', serif;
}

.source-sans {
  font-family: 'Source Sans Pro', sans-serif;
}

.oswald {
  font-family: 'Oswald', sans-serif;
}

.open-sans {
  font-family: 'Open Sans', sans-serif;
}

.roboto-slab {
  font-family: 'Roboto Slab', serif;
}

.roboto {
  font-family: 'Roboto', sans-serif;
}

.poppins {
  font-family: 'Poppins', sans-serif;
}

.lora {
  font-family: 'Lora', serif;
}

/* How It Works Section */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.step-card {
  background-color: var(--background);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.step-number {
  width: 3rem;
  height: 3rem;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Questionnaire Section */
.hidden {
  display: none;
}

.progress-container {
  margin-bottom: 2rem;
}

.progress-bar {
  width: 100%;
  height: 0.5rem;
  background-color: var(--background-light);
  border-radius: 0.25rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

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

.step-info {
  text-align: right;
  font-size: 0.875rem;
  color: var(--text-light);
}

.question-card {
  background-color: var(--background);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.question-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.question-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option {
  display: flex;
  align-items: flex-start;
}

.option input {
  margin-top: 0.25rem;
  margin-right: 0.75rem;
}

.option label {
  cursor: pointer;
}

.max-selections {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.75rem;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Results Section */
.results-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin: 3rem 0;
}

.font-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.font-option {
  background-color: var(--background);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.font-option:hover {
  transform: translateY(-2px);
}

.font-option.active {
  border-color: var(--primary);
}

.font-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.font-option-title {
  font-size: 1.25rem;
  margin-bottom: 0;
}

.best-match {
  background-color: var(--primary);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
}

.font-preview {
  background-color: var(--background-light);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.font-preview-header {
  margin-bottom: 2rem;
}

.font-preview-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.font-preview-subtitle {
  color: var(--text-light);
}

.font-preview-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.font-preview-content p {
  margin-bottom: 1.5rem;
}

.font-preview-content h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.implementation {
  margin-top: 3rem;
}

.code-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.code-block {
  background-color: #1e293b;
  border-radius: 0.75rem;
  padding: 1.5rem;
  color: white;
}

.code-block h4 {
  color: #94a3b8;
  margin-bottom: 1rem;
}

pre {
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Footer */
footer {
  background-color: var(--background-light);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.footer-logo h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.link-group h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.link-group ul {
  list-style: none;
}

.link-group li {
  margin-bottom: 0.5rem;
}

.link-group a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.copyright {
  text-align: center;
  color: var(--text-light);
  font-size: 0.875rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Responsive Design */
@media (max-width: 768px) {
  .heading-1 {
    font-size: 2rem;
  }
  
  .heading-2 {
    font-size: 1.75rem;
  }
  
  .hero {
    grid-template-columns: 1fr;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .results-container {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  nav {
    display: none;
  }
}

@media (max-width: 480px) {
  .button-group {
    flex-direction: column;
  }
  
  .steps {
    grid-template-columns: 1fr;
  }
}
