/**
 * AI4Arunachal Unified Design System
 * Modern, Clean, Research-Grade Indigenous Language Platform
 * Color tokens: Primary #B0031A, Surface #f8f9fa, On-Surface #1f1f1f, Outline #747775
 */

:root {
  --color-primary: #B0031A;
  --color-primary-hover: #8A0214;
  --color-primary-container: #ffdad8;
  --color-on-primary-container: #410006;
  --color-surface: #f8f9fa;
  --color-surface-container: #f0f4f9;
  --color-surface-container-high: #e9eef6;
  --color-on-surface: #1f1f1f;
  --color-on-surface-variant: #444746;
  --color-outline: #747775;
  --color-outline-variant: #c4c7c5;
}

/* ==========================================================================
   Standardized Web Typography Scale (16px Root Basis)
   ========================================================================== */

html {
  font-size: 16px;
}

body {
  font-size: 1rem;
  line-height: 1.6;
}

h1,
.hero-heading {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-on-surface);
}

h2,
.page-heading,
.section-heading {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--color-on-surface);
}

h3,
.card-heading {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-on-surface);
}

h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-on-surface);
}

.subheading {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-on-surface-variant);
  text-align: inherit;
}

.body-text,
p:not(.subheading) {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-on-surface);
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 640px) {
  .body-text,
  p:not(.subheading),
  .founder-bio-text {
    text-align-last: left;
  }
}

.text-center p,
.text-center .subheading,
.text-center,
header p,
h1 + p,
h2 + p {
  text-align: inherit;
}

.caption-text,
small {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-outline);
}

.form-label-styled {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-on-surface);
  margin-bottom: 0.375rem;
}

/* ==========================================================================
   Buttons System
   ========================================================================== */

.btn-primary-styled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 9999px;
  border: 1px solid transparent;
  box-shadow: 0 1px 3px rgba(176, 3, 26, 0.15), 0 1px 2px rgba(0,0,0,0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.btn-primary-styled:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
  box-shadow: 0 4px 12px rgba(176, 3, 26, 0.25);
  transform: translateY(-1px);
}

.btn-primary-styled:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-primary-styled:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary-styled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background-color: var(--color-surface-container);
  color: var(--color-on-surface);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid rgba(116, 119, 117, 0.2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary-styled:hover:not(:disabled) {
  background-color: var(--color-surface-container-high);
  border-color: var(--color-outline);
  color: var(--color-on-surface);
}

.btn-outline-styled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background-color: #ffffff;
  color: var(--color-on-surface-variant);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 2px solid rgba(116, 119, 117, 0.2);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-outline-styled:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: rgba(176, 3, 26, 0.04);
}

/* ==========================================================================
   Form Controls
   ========================================================================== */

.input-styled,
.select-styled,
.textarea-styled {
  width: 100%;
  background-color: var(--color-surface-container);
  border: 1px solid rgba(116, 119, 117, 0.25);
  color: var(--color-on-surface);
  border-radius: 1rem;
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.input-styled:focus,
.select-styled:focus,
.textarea-styled:focus {
  background-color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(176, 3, 26, 0.15);
}

.input-styled::placeholder,
.textarea-styled::placeholder {
  color: rgba(116, 119, 117, 0.6);
}

/* ==========================================================================
   Card Panels & Containers
   ========================================================================== */

.card-panel {
  background-color: #ffffff;
  border: 1px solid rgba(116, 119, 117, 0.12);
  border-radius: 1.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-panel:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: rgba(116, 119, 117, 0.2);
}

.page-container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

@media (min-width: 640px) {
  .page-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1024px) {
  .page-container {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */

.alert-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.alert-error-styled {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-success-styled {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.alert-info-styled {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.alert-warning-styled {
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */

.badge-styled {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.badge-primary-styled {
  background-color: rgba(176, 3, 26, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(176, 3, 26, 0.2);
}

.badge-success-styled {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-warning-styled {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-danger-styled {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-purple-styled {
  background-color: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.badge-blue-styled {
  background-color: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* ==========================================================================
   Loading & Empty States
   ========================================================================== */

.spinner-styled {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

.empty-state-card {
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--color-surface-container);
  border-radius: 1.75rem;
  border: 1px dashed rgba(116, 119, 117, 0.3);
  color: var(--color-outline);
}

