/* ============================================
   DMVQuiz.com — Stylesheet
   Performance: No unused CSS, minimal repaints
   ============================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --navy: #1a2744;
  --navy-light: #243352;
  --navy-dark: #111b30;
  --blue: #3b82f6;
  --blue-hover: #2563eb;
  --blue-light: #dbeafe;
  --blue-pale: #eff6ff;
  --green: #10b981;
  --green-light: #d1fae5;
  --green-dark: #059669;
  --red: #ef4444;
  --red-light: #fee2e2;
  --amber: #f59e0b;
  --amber-light: #fef3c7;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --section-pad: 80px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
ul { list-style: none; }

/* --- ACCESSIBILITY --- */
.skip-link {
  position: absolute; top: -100%; left: 16px; z-index: 9999;
  padding: 12px 24px; background: var(--navy); color: var(--white);
  border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 16px; }
.hidden { display: none !important; }

/* --- LAYOUT --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: var(--section-pad) 0; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; border-radius: var(--radius-full); transition: all 0.2s var(--ease);
  white-space: nowrap; line-height: 1;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-primary {
  background: var(--blue); color: var(--white);
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(59,130,246,0.4); }
.btn-outline {
  background: transparent; color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-outline:hover { background: var(--blue-pale); }
.btn-ghost {
  background: rgba(255,255,255,0.15); color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.5); }
.btn-white {
  background: var(--white); color: var(--navy);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

/* --- HEADER --- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow 0.3s var(--ease);
}
.header.scrolled { box-shadow: var(--shadow-md); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; }
.logo-icon { font-size: 26px; }
.logo-accent { color: var(--blue); }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 16px; font-size: 15px; font-weight: 500; color: var(--gray-600);
  border-radius: var(--radius-sm); transition: all 0.15s var(--ease);
}
.nav-link:hover { color: var(--gray-900); background: var(--gray-100); }
.nav-link.active { color: var(--blue); background: var(--blue-pale); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-cta { display: none; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span {
  width: 22px; height: 2px; background: var(--gray-700);
  border-radius: 2px; transition: all 0.3s var(--ease);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px); opacity: 0; visibility: hidden;
  transition: all 0.3s var(--ease);
}
.mobile-nav-overlay.active { opacity: 1; visibility: visible; }
.mobile-nav-content {
  position: absolute; top: 68px; left: 0; right: 0;
  background: var(--white); padding: 24px; border-bottom: 1px solid var(--gray-200);
  transform: translateY(-10px); transition: transform 0.3s var(--ease);
}
.mobile-nav-overlay.active .mobile-nav-content { transform: translateY(0); }
.mobile-nav-links { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.mobile-nav-links a {
  display: block; padding: 14px 16px; font-size: 16px; font-weight: 500;
  color: var(--gray-700); border-radius: var(--radius-sm);
}
.mobile-nav-links a:hover { background: var(--gray-100); color: var(--gray-900); }

/* --- HERO --- */
.hero {
  position: relative; padding: 140px 0 80px; background: var(--navy);
  color: var(--white); overflow: hidden;
}
.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shape {
  position: absolute; border-radius: 50%; opacity: 0.06;
  background: linear-gradient(135deg, var(--blue), var(--green));
}
.shape-1 { width: 600px; height: 600px; top: -200px; right: -100px; }
.shape-2 { width: 400px; height: 400px; bottom: -100px; left: -100px; }
.shape-3 { width: 300px; height: 300px; top: 50%; left: 50%; }

.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-block; padding: 8px 16px; margin-bottom: 24px;
  background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-full); font-size: 14px; font-weight: 600; color: #6ee7b7;
}
.hero-title { font-size: 52px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -0.02em; }
.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #34d399);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle { font-size: 18px; line-height: 1.7; color: rgba(255,255,255,0.7); margin-bottom: 32px; max-width: 520px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; align-items: center; }
.stat strong { display: block; font-size: 24px; font-weight: 800; }
.stat span { font-size: 14px; color: rgba(255,255,255,0.5); }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.15); }

/* Hero Quiz Preview */
.hero-visual { display: flex; justify-content: center; }
.quiz-preview-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 28px;
  width: 100%; max-width: 420px; color: var(--gray-800);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); transform: rotate(1deg);
}
.qp-header { margin-bottom: 20px; }
.qp-badge { font-size: 13px; font-weight: 600; color: var(--gray-500); }
.qp-progress { height: 4px; background: var(--gray-200); border-radius: 4px; margin-top: 10px; }
.qp-progress-bar { height: 100%; background: var(--blue); border-radius: 4px; }
.qp-question { font-size: 17px; font-weight: 700; margin-bottom: 16px; line-height: 1.4; }
.qp-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.qp-option {
  padding: 12px 16px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--gray-600);
}
.qp-option.selected { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.qp-result {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.qp-result.correct { background: var(--green-light); color: var(--green-dark); }
.qp-result-icon { font-size: 18px; }

/* --- TRUST BAR --- */
.trust-bar { background: var(--gray-50); padding: 20px 0; border-bottom: 1px solid var(--gray-200); }
.trust-items { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--gray-600); }
.trust-item svg { color: var(--blue); flex-shrink: 0; }

/* --- SECTION HEADERS --- */
.section-header { margin-bottom: 48px; }
.section-header.center { text-align: center; }
.section-label {
  display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--blue); margin-bottom: 12px;
}
.section-title { font-size: 36px; font-weight: 800; color: var(--gray-900); line-height: 1.2; letter-spacing: -0.02em; }
.section-subtitle { font-size: 17px; color: var(--gray-500); margin-top: 12px; max-width: 560px; }
.section-header.center .section-subtitle { margin-left: auto; margin-right: auto; }

/* --- QUICK QUIZ --- */
.quick-quiz { background: var(--gray-50); }
.quiz-container { max-width: 680px; margin: 0 auto; }
.quiz-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow-lg); border: 1px solid var(--gray-200);
}
.quiz-progress-wrap { margin-bottom: 28px; }
.quiz-progress-text { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--gray-500); margin-bottom: 8px; }
.score-display { font-weight: 700; }
.quiz-progress { height: 6px; background: var(--gray-200); border-radius: 6px; overflow: hidden; }
.quiz-progress-bar { height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 6px; transition: width 0.5s var(--ease); width: 0%; }
.quiz-difficulty { margin-bottom: 12px; }
.quiz-difficulty span {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.diff-easy { background: var(--green-light); color: var(--green-dark); }
.diff-medium { background: var(--amber-light); color: #92400e; }
.diff-hard { background: var(--red-light); color: #991b1b; }
.quiz-question { font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 24px; color: var(--gray-900); }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-md);
  font-size: 15px; font-weight: 500; color: var(--gray-700); cursor: pointer;
  transition: all 0.15s var(--ease); position: relative;
}
.quiz-option:hover { border-color: var(--blue); background: var(--blue-pale); }
.quiz-option.selected { border-color: var(--blue); background: var(--blue-light); color: var(--blue); }
.quiz-option.correct { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.quiz-option.incorrect { border-color: var(--red); background: var(--red-light); color: #991b1b; }
.quiz-option.disabled { pointer-events: none; }
.option-letter {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; background: var(--gray-100); color: var(--gray-500); flex-shrink: 0;
  transition: all 0.15s var(--ease);
}
.quiz-option.selected .option-letter { background: var(--blue); color: var(--white); }
.quiz-option.correct .option-letter { background: var(--green); color: var(--white); }
.quiz-option.incorrect .option-letter { background: var(--red); color: var(--white); }

.quiz-explanation {
  margin-top: 20px; padding: 16px 20px; border-radius: var(--radius-md);
  font-size: 14px; line-height: 1.6; display: flex; align-items: flex-start; gap: 12px;
  animation: fadeIn 0.3s var(--ease);
}
.quiz-explanation.correct-exp { background: var(--green-light); color: #065f46; }
.quiz-explanation.incorrect-exp { background: var(--red-light); color: #991b1b; }
.explanation-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

.quiz-actions { margin-top: 24px; }

/* Quiz Results */
.quiz-results { max-width: 680px; margin: 0 auto; }
.results-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 48px 36px; box-shadow: var(--shadow-lg); border: 1px solid var(--gray-200);
  text-align: center;
}
.results-score-ring { position: relative; width: 140px; height: 140px; margin: 0 auto 24px; }
.results-score-ring svg { width: 100%; height: 100%; }
.results-score-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.results-percent { font-size: 32px; font-weight: 800; color: var(--gray-900); }
.results-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; color: var(--gray-900); }
.results-subtitle { font-size: 16px; color: var(--gray-500); margin-bottom: 32px; }
.results-breakdown {
  display: flex; justify-content: center; gap: 32px; margin-bottom: 32px;
  padding: 20px; background: var(--gray-50); border-radius: var(--radius-md);
}
.breakdown-item { text-align: center; }
.breakdown-item .num { font-size: 24px; font-weight: 800; display: block; }
.breakdown-item .label { font-size: 13px; color: var(--gray-500); }
.results-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- CATEGORIES --- */
.category-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.category-card {
  background: var(--white); border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 28px 24px;
  transition: all 0.2s var(--ease); cursor: pointer; text-align: center;
}
.category-card:hover {
  border-color: var(--blue); transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.category-icon { font-size: 40px; margin-bottom: 16px; display: block; }
.category-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
.category-card p { font-size: 13px; color: var(--gray-500); line-height: 1.5; }
.category-count { margin-top: 14px; font-size: 12px; font-weight: 600; color: var(--blue); }

/* --- HOW IT WORKS --- */
.steps-grid { display: flex; align-items: center; justify-content: center; gap: 0; }
.step-card {
  background: var(--white); border: 2px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 36px 28px; text-align: center; flex: 1; max-width: 320px;
  transition: all 0.2s var(--ease); position: relative;
}
.step-card:hover { border-color: var(--blue); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-number {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 32px; height: 32px; background: var(--blue); color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.step-icon { font-size: 36px; margin-bottom: 16px; }
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
.step-card p { font-size: 14px; color: var(--gray-500); line-height: 1.6; }
.step-connector { padding: 0 12px; color: var(--gray-300); }

/* --- FAQ --- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border: 2px solid var(--gray-200); border-radius: var(--radius-md);
  margin-bottom: 12px; overflow: hidden; transition: border-color 0.2s var(--ease);
}
.faq-item[open] { border-color: var(--blue); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; font-size: 16px; font-weight: 600; color: var(--gray-800);
  cursor: pointer; list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; content: ''; }
.faq-chevron { transition: transform 0.2s var(--ease); color: var(--gray-400); flex-shrink: 0; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); color: var(--blue); }
.faq-answer { padding: 0 24px 20px; }
.faq-answer p { font-size: 15px; color: var(--gray-600); line-height: 1.7; }
.faq-answer a { color: var(--blue); text-decoration: underline; }

/* --- CTA SECTION --- */
.cta-section { padding: 80px 0; }
.cta-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius-xl); padding: 64px 48px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.cta-content { position: relative; z-index: 1; }
.cta-card h2 { font-size: 36px; font-weight: 800; color: var(--white); margin-bottom: 16px; }
.cta-card p { font-size: 17px; color: rgba(255,255,255,0.7); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; justify-content: center; }

/* --- FOOTER --- */
.footer { background: var(--gray-900); color: var(--gray-400); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { font-size: 14px; line-height: 1.7; margin-top: 16px; }
.footer-links-group h4 { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links-group ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links-group a { font-size: 14px; color: var(--gray-400); transition: color 0.15s; }
.footer-links-group a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--gray-700); padding-top: 24px; font-size: 13px; color: var(--gray-500); text-align: center; }

/* --- ANIMATIONS --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { margin-top: 40px; }
  .quiz-preview-card { transform: rotate(0); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --section-pad: 56px; }
  .nav-links { display: none; }
  .nav-cta { display: inline-flex; }
  .hamburger { display: flex; }
  .hero { padding: 120px 0 56px; }
  .hero-title { font-size: 36px; }
  .section-title { font-size: 28px; }
  .steps-grid { flex-direction: column; gap: 24px; }
  .step-connector { transform: rotate(90deg); padding: 4px 0; }
  .step-card { max-width: 100%; }
  .results-breakdown { flex-direction: column; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta-card { padding: 40px 24px; }
  .cta-card h2 { font-size: 28px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 30px; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .stat-divider { width: 40px; height: 1px; }
  .category-grid { grid-template-columns: 1fr; }
  .quiz-card { padding: 24px 20px; }
  .trust-items { flex-direction: column; gap: 12px; align-items: center; }
}
