/* ==========================================
   Global Styles & Design System
   ========================================== */

/* CSS Variables - Design Tokens
   These colors match tailwind.config.js for consistency
   ========================================== */
:root {
  /* Brand Colors - Primary Palette */
  --color-primary: #0B1120;      /* Navy - Hero backgrounds, footer */
  --color-secondary: #F59E0B;    /* Saffron/Gold - CTAs, highlights */
  --color-accent: #334155;       /* Slate-Grey - Secondary buttons */
  --color-background: #F8FAFC;   /* Light grey - Main content area */
  --color-text: #1E293B;         /* Slate-800 - Body text */

  /* Semantic Colors */
  --color-success: #10B981;      /* Emerald-500 */
  --color-error: #EF4444;        /* Red-500 */
  --color-warning: #F59E0B;      /* Amber-500 (same as secondary) */
  --color-info: #3B82F6;         /* Blue-500 */

  /* Neutral Colors */
  --color-white: #FFFFFF;
  --color-gray-50: #F8FAFC;
  --color-gray-100: #F1F5F9;
  --color-gray-200: #E2E8F0;
  --color-gray-300: #CBD5E1;
  --color-gray-400: #94A3B8;
  --color-gray-500: #64748B;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1E293B;
  --color-gray-900: #0F172A;

  /* Legacy aliases (for backward compatibility) */
  --color-bg: var(--color-background);
  --color-gray-light: var(--color-gray-100);
  --color-gray: var(--color-gray-500);
  --color-gray-dark: var(--color-gray-700);

  /* Typography */
  --font-gurmukhi: 'Noto Sans Gurmukhi', 'Gurmukhi MN', sans-serif;
  --font-english: 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 64px;

  /* Borders & Radius */
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --border-radius-lg: 24px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* ==========================================
   Reset & Base Styles
   ========================================== */

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

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-english);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==========================================
   Typography
   ========================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 2rem);
}

p {
  margin: 0;
  line-height: 1.6;
}

.gurmukhi-text {
  font-family: var(--font-gurmukhi);
  font-weight: 600;
}

/* ==========================================
   Buttons & Interactive Elements
   ========================================== */

button, .button, a.button {
  min-height: 80px;
  min-width: 120px;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 1.25rem;
  font-family: var(--font-english);
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius);
  background: var(--color-primary);
  color: var(--color-white);
  cursor: pointer;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              background var(--transition-fast);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button:hover, .button:hover, a.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

button:active, .button:active, a.button:active {
  transform: scale(0.95);
  box-shadow: var(--shadow-sm);
}

button:disabled, .button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.button-secondary {
  background: var(--color-secondary);
}

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

.button-outline {
  background: transparent;
  border: 3px solid var(--color-primary);
  color: var(--color-primary);
}

/* ==========================================
   Links
   ========================================== */

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ==========================================
   Utility Classes
   ========================================== */

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

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

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

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================
   Animations
   ========================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

/* Animation Utility Classes */
.animate-fadeIn {
  animation: fadeIn var(--transition-normal);
}

.animate-slideInUp {
  animation: slideInUp var(--transition-normal);
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* ==========================================
   Loading Spinner
   ========================================== */

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--color-gray-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-small {
  width: 30px;
  height: 30px;
  border-width: 3px;
}

.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* ==========================================
   Responsive Breakpoints
   ========================================== */

/* Tablets and small laptops */
@media (min-width: 768px) {
  :root {
    font-size: 18px;
  }
}

/* Desktops and large screens */
@media (min-width: 1024px) {
  :root {
    font-size: 20px;
  }
}

/* Extra large screens */
@media (min-width: 1440px) {
  :root {
    font-size: 22px;
  }
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
  body {
    background: white;
    color: black;
  }

  button, .button {
    display: none;
  }
}

/* ==========================================
   Accessibility
   ========================================== */

/* Focus styles for keyboard navigation */
*:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Remove outline for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Ensure focus is visible for keyboard users */
*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-bg: #FFFFFF;
    --color-text: #000000;
  }
}
