/* ========================================================
   Citizen Opinion — Design System
   Indian-inspired civic engagement palette
======================================================== */

/* === CSS Reset === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Design Tokens === */
:root {
  /* Primary Palette — derived from logo */
  --saffron: #E88830;
  /* Megaphone orange */
  --saffron-dark: #CC7428;
  --saffron-light: #F0A050;
  --green-india: #138808;
  --green-light: #1FA80F;
  --green-dark: #0E6B06;
  --navy: #0E1B30;
  /* Deep logo background */
  --navy-light: #1B2D4F;
  /* Logo circle fill */
  --navy-mid: #152540;
  --teal: #2A8F9E;
  /* Logo people/bubbles */
  --teal-light: #3BA8B8;
  --teal-dark: #1E7585;

  /* Accent Colors — logo gold ring + complements */
  --gold: #D4A534;
  /* Logo gold ring */
  --gold-light: #E8C04A;
  --coral: #FF6B6B;
  --blue-accent: #3A7FC2;
  --purple: #7E57C2;
  --amber: #E88830;

  /* Neutral Palette */
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --black: #000000;

  /* Semantic Colors */
  --agree: #4CAF50;
  --agree-bg: rgba(76, 175, 80, 0.1);
  --disagree: #F44336;
  --disagree-bg: rgba(244, 67, 54, 0.1);
  --neutral-vote: #FF9800;
  --neutral-bg: rgba(255, 152, 0, 0.1);
  --success: #4CAF50;
  --warning: #FF9800;
  --error: #F44336;
  --info: #2196F3;

  /* Background & Surface */
  --bg-primary: #F0F4F8;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #E8EDF2;
  --surface: #FFFFFF;
  --surface-hover: #F8FAFC;
  --surface-active: #F1F5F9;
  --overlay: rgba(10, 22, 40, 0.6);

  /* Text Colors */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --text-inverse: #FFFFFF;
  --text-link: #1976D2;

  /* Border */
  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-strong: #94A3B8;

  /* Typography */
  --font-en: 'Inter', system-ui, -apple-system, sans-serif;
  --font-te: 'Noto Sans Telugu', sans-serif;
  --font-hi: 'Noto Sans Devanagari', sans-serif;
  --font-family: var(--font-en);

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* Spacing (4px grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --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 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  --shadow-glow-saffron: 0 0 20px rgba(232, 136, 48, 0.3);
  --shadow-glow-teal: 0 0 20px rgba(42, 143, 158, 0.3);
  --shadow-glow-gold: 0 0 20px rgba(212, 165, 52, 0.3);

  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-blur: blur(20px);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;

  /* Container */
  --container-max: 1280px;
  --container-narrow: 768px;
}

/* === Dark Theme === */
[data-theme="dark"] {
  --bg-primary: #0B1121;
  --bg-secondary: #111827;
  --bg-tertiary: #1E293B;
  --surface: #1A2332;
  --surface-hover: #1E293B;
  --surface-active: #243044;
  --overlay: rgba(0, 0, 0, 0.7);

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;
  --text-inverse: #0F172A;
  --text-link: #60A5FA;

  --border-light: #2A3A50;
  --border-medium: #3B4D65;
  --border-strong: #64748B;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.5);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.6);

  --glass-bg: rgba(26, 35, 50, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);

  --saffron: #F09040;
  --saffron-light: #F5A860;
  --gold-light: #F0D060;
  --teal-light: #45BDD0;
  --agree: #66BB6A;
  --agree-bg: rgba(102, 187, 106, 0.15);
  --disagree: #EF5350;
  --disagree-bg: rgba(239, 83, 80, 0.15);
  --neutral-vote: #FFB74D;
  --neutral-bg: rgba(255, 183, 77, 0.15);

  --gray-50: #1A2332;
  --gray-100: #1E293B;
  --gray-200: #2A3A50;
  --gray-300: #3B4D65;
  --gray-400: #64748B;
  --gray-500: #94A3B8;
  --gray-600: #CBD5E1;
  --gray-700: #E2E8F0;
  --gray-800: #F1F5F9;
  --gray-900: #F8FAFC;
}


/* === Base Styles === */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--leading-normal);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Language-specific font switching */
body[data-lang="te"] {
  --font-family: var(--font-te);
}

body[data-lang="hi"] {
  --font-family: var(--font-hi);
}

body[data-lang="en"] {
  --font-family: var(--font-en);
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--teal);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* === Utility Classes === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-1 {
  gap: var(--space-1);
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

.grid {
  display: grid;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* === Selection === */
::selection {
  background: var(--saffron);
  color: var(--white);
}