/* ═══ CivicPath India — Design System ═══ */
/* Professional Dark Theme · Saffron Accents · Glassmorphism */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ═══ CSS VARIABLES ═══ */
:root {
  --bg-primary: #0B0F19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-input: rgba(255, 255, 255, 0.06);

  --saffron: #FF9933;
  --saffron-glow: rgba(255, 153, 51, 0.25);
  --saffron-light: #FFB366;
  --green-india: #138808;
  --green-light: #16A34A;
  --blue-nav: #1E40AF;
  --blue: #3B82F6;
  --blue-glow: rgba(59, 130, 246, 0.2);
  --red: #EF4444;

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 153, 51, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-glow: 0 0 24px rgba(255, 153, 51, 0.12);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);

  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ui);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 153, 51, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 153, 51, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ═══ ACCESSIBILITY ═══ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--saffron);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus { top: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible styles */
:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 2px;
}

/* ═══ TYPOGRAPHY ═══ */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 600; line-height: 1.25; color: var(--text-primary); }
h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 1.75rem; letter-spacing: -0.015em; }
h3 { font-size: 1.125rem; }
p { color: var(--text-secondary); line-height: 1.7; }
a { color: var(--saffron); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--saffron-light); }

/* ═══ LAYOUT ═══ */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ═══ HEADER ═══ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--saffron), #E67300);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px var(--saffron-glow);
}
.logo-icon svg { width: 20px; height: 20px; fill: var(--bg-primary); }

.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links button {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
}
.nav-links button:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}
.nav-links .active {
  color: var(--saffron);
  background: rgba(255, 153, 51, 0.08);
}

/* ═══ LANGUAGE SELECTOR ═══ */
.lang-selector { position: relative; margin-left: 8px; }
.lang-btn {
  padding: 6px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--font-ui);
  transition: border-color var(--transition);
}
.lang-btn:hover { border-color: var(--saffron); }
.lang-btn option { background: var(--bg-secondary); color: var(--text-primary); }

/* ═══ GLASSMORPHISM CARDS ═══ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.card-glow {
  box-shadow: var(--shadow-glow);
  border-color: var(--border-hover);
}

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--saffron), #E67300);
  color: var(--bg-primary);
  box-shadow: 0 2px 12px var(--saffron-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 153, 51, 0.35);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--saffron); color: var(--saffron); }
.btn-danger { background: var(--red); color: white; }
.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 32px; font-size: 0.9375rem; }
.btn-icon {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.btn-icon:hover { border-color: var(--saffron); color: var(--saffron); }
.btn-icon svg { width: 18px; height: 18px; }

/* ═══ HERO SECTION ═══ */
.hero {
  padding: 80px 0 40px;
  text-align: center;
  position: relative;
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--saffron) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.badge {
  padding: 5px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}
.badge-saffron { border-color: var(--saffron-glow); color: var(--saffron); }
.badge-blue { border-color: var(--blue-glow); color: var(--blue); }
.badge-green { border-color: rgba(19, 136, 8, 0.3); color: var(--green-light); }

/* ═══ CTA SECTION ═══ */
.cta-section {
  margin: 48px auto 0;
  text-align: center;
}

/* ═══ EMBLEM ═══ */
.emblem {
  width: 100px; height: 100px;
  margin: 32px auto;
  background: linear-gradient(135deg, var(--saffron), #E67300);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  animation: emblem-pulse 3s ease-in-out infinite;
}
.emblem svg { width: 40px; height: 40px; fill: var(--bg-primary); }
.emblem::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 153, 51, 0.25);
  animation: emblem-ring 3s ease-in-out infinite;
}
@keyframes emblem-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--saffron-glow); }
  50% { box-shadow: 0 0 40px rgba(255, 153, 51, 0.3); }
}
@keyframes emblem-ring {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.08); opacity: 0.2; }
}

/* ═══ FEATURES GRID ═══ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 48px 0 0;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-icon.saffron { background: rgba(255, 153, 51, 0.1); }
.feature-icon.saffron svg { stroke: var(--saffron); fill: none; }
.feature-icon.blue { background: rgba(59, 130, 246, 0.1); }
.feature-icon.blue svg { stroke: var(--blue); fill: none; }
.feature-icon.green { background: rgba(19, 136, 8, 0.1); }
.feature-icon.green svg { stroke: var(--green-light); fill: none; }
.features-grid .card h3 { margin-bottom: 6px; }
.features-grid .card p { font-size: 0.875rem; }

/* ═══ QUIZ / ONBOARDING ═══ */
.quiz-section { display: none; padding: 48px 0; }
.quiz-section.active { display: block; }
.quiz-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.quiz-progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.quiz-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.quiz-dot.active { background: var(--saffron); border-color: var(--saffron); box-shadow: 0 0 8px var(--saffron-glow); }
.quiz-dot.completed { background: var(--green-light); border-color: var(--green-light); }
.quiz-question { font-size: 1.125rem; margin-bottom: 24px; color: var(--text-primary); font-family: var(--font-heading); }
.quiz-options { display: grid; gap: 10px; }
.quiz-option {
  padding: 14px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.quiz-option:hover { border-color: var(--saffron); background: rgba(255, 153, 51, 0.04); }
.quiz-option.selected { border-color: var(--saffron); background: rgba(255, 153, 51, 0.08); box-shadow: var(--shadow-glow); }

/* ═══ FORM ELEMENTS ═══ */
.form-group { margin-bottom: 16px; text-align: left; }
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.form-select, .form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-select:focus, .form-input:focus { border-color: var(--saffron); }
.form-select option { background: var(--bg-secondary); }

/* ═══ SECTION HEADERS ═══ */
.section-header {
  text-align: center;
  padding-top: 48px;
  margin-bottom: 32px;
}
.section-header h2 { margin-bottom: 8px; }
.section-header p { max-width: 480px; margin: 0 auto; font-size: 0.9375rem; }

/* ═══ TIMELINE ═══ */
.timeline { max-width: 640px; margin: 0 auto; padding: 20px 0; position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--saffron), var(--green-light), var(--border));
}
.timeline-step {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
  position: relative;
}
.timeline-node {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: all var(--transition);
  z-index: 2;
}
.timeline-node.active {
  border-color: var(--saffron);
  color: var(--saffron);
  background: rgba(255, 153, 51, 0.08);
  box-shadow: 0 0 12px var(--saffron-glow);
}
.timeline-node.completed { border-color: var(--green-light); background: var(--green-light); color: white; }
.timeline-content {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.timeline-step:hover .timeline-content {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}
.timeline-title { font-size: 0.9375rem; font-weight: 600; margin-bottom: 4px; }
.timeline-desc { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.6; }
.timeline-deadline {
  font-size: 0.75rem;
  color: var(--saffron);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.timeline-critical { border-left: 3px solid var(--red); }
.step-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ═══ CHAT ═══ */
.chat-container {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.chat-message {
  display: flex;
  gap: 10px;
  max-width: 82%;
  animation: fadeIn 0.25s ease;
}
.chat-message.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.chat-message.assistant .chat-avatar { background: linear-gradient(135deg, var(--saffron), #E67300); color: var(--bg-primary); }
.chat-message.user .chat-avatar { background: var(--blue); color: white; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.6;
}
.chat-message.assistant .chat-bubble { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); }
.chat-message.user .chat-bubble { background: var(--blue); color: white; }
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  align-items: center;
}
.chat-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--saffron); }
.chat-input::placeholder { color: var(--text-muted); }

.voice-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.voice-btn svg { width: 18px; height: 18px; }
.voice-btn:hover { border-color: var(--saffron); color: var(--saffron); }
.voice-btn.recording { background: var(--red); border-color: var(--red); color: white; animation: recording-pulse 1.2s infinite; }
@keyframes recording-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* ═══ MYTH DETECTOR ═══ */
.myth-result { padding: 20px; border-radius: var(--radius-md); margin-top: 16px; }
.myth-result.myth { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.25); }
.myth-result.fact { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.25); }
.myth-result.misleading { background: rgba(255, 153, 51, 0.08); border: 1px solid rgba(255, 153, 51, 0.25); }
.myth-verdict { font-size: 1.125rem; font-weight: 700; font-family: var(--font-heading); margin-bottom: 8px; }

/* ═══ FOOTER ═══ */
.footer {
  margin-top: 80px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer p { font-size: 0.8125rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 12px; }
.footer-links a { color: var(--text-secondary); font-size: 0.8125rem; font-weight: 500; }
.footer-links a:hover { color: var(--saffron); }

/* ═══ LOADING ═══ */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--saffron);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ═══ TOAST NOTIFICATIONS ═══ */
.toast-container { position: fixed; top: 76px; right: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.8125rem;
  animation: fadeIn 0.25s ease;
  max-width: 320px;
}
.toast.success { border-color: var(--green-light); }
.toast.error { border-color: var(--red); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 48px 0 24px; }
  .container { padding: 0 16px; }
  .header-inner { height: 56px; }
  .nav-links { gap: 2px; }
  .nav-links button { padding: 6px 10px; font-size: 0.75rem; }
  .features-grid { grid-template-columns: 1fr; }
  .chat-message { max-width: 92%; }
  .timeline::before { left: 14px; }
  .timeline-node { width: 36px; height: 36px; font-size: 0.75rem; }
  .emblem { width: 80px; height: 80px; }
  .emblem svg { width: 32px; height: 32px; }
  .lang-selector { display: none; }
}

@media (max-width: 480px) {
  .hero-badges { gap: 6px; }
  .badge { font-size: 0.6875rem; padding: 4px 10px; }
  .nav-links button { padding: 6px 8px; }
}
