/* =========================================================
   css/styles.css — Base Design System
   US University AI Policy Repository — Trinka
   ========================================================= */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,600;1,400;1,600&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
  /* Brand Colors */
  --color-primary:       #763393;
  --color-coral:         #FF5C5C;
  --color-amber:         #FDB933;
  --color-deep-purple:   #4B2C82;
  --color-violet:        #6F2496;
  --color-white:         #FFFFFF;
  --color-light-purple:  #F5F0FA;
  --color-body:          #333333;
  --color-muted:         #555555;
  --color-border:        #E8E0F0;

  /* Gradients */
  --gradient-hero:   linear-gradient(135deg, #2D1659 0%, #4B2C82 40%, #763393 75%, #6F2496 100%);
  --gradient-btn:    linear-gradient(135deg, #763393 0%, #6F2496 100%);
  --gradient-btn-hover: linear-gradient(135deg, #6F2496 0%, #4B2C82 100%);

  /* Typography */
  --font-family: 'Poppins', sans-serif;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Breakpoints (reference only, use in media queries) */
  --mobile:  767px;
  --tablet:  1024px;
  --desktop: 1280px;

  /* Shadows */
  --shadow-card:  0 2px 12px rgba(118, 51, 147, 0.06);
  --shadow-hover: 0 8px 24px rgba(118, 51, 147, 0.15);
  --shadow-nav:   0 2px 8px rgba(118, 51, 147, 0.08);

  /* Transitions */
  --transition: 0.22s ease;
  --transition-slow: 0.4s ease;

  /* Z-index layers */
  --z-nav:     100;
  --z-sticky:   80;
  --z-dropdown: 200;
  --z-toast:   9999;
  --z-overlay:  300;
}

/* ---- CSS Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  color: var(--color-body);
  background: var(--color-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: var(--font-family);
}

ul, ol {
  list-style: none;
}

/* ---- Typography Classes ---- */
.heading-01 {
  font-size: 48px;
  line-height: 58px;
  font-weight: 600;
}

.heading-02 {
  font-size: 36px;
  line-height: 44px;
  font-weight: 600;
}

.heading-03 {
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
}

.heading-04 {
  font-size: 20px;
  line-height: 30px;
  font-weight: 600;
}

.body-text {
  font-size: 20px;
  line-height: 30px;
  font-weight: 400;
}

.tag-text {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

.link-text {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: var(--color-primary);
}

.small-text {
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
}

.tiny-text {
  font-size: 12px;
  line-height: 18px;
  font-weight: 400;
}

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--space-3xl) 0;
}

/* ---- Flex Utilities ---- */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-start {
  display: flex;
  align-items: flex-start;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ---- Grid Utilities ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* ---- Text Utilities ---- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.text-primary { color: var(--color-primary); }
.text-muted  { color: var(--color-muted); }
.text-white  { color: var(--color-white); }
.text-amber  { color: var(--color-amber); }
.text-coral  { color: var(--color-coral); }
.fw-600 { font-weight: 600; }
.italic { font-style: italic; }

/* ---- Spacing Utilities ---- */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ---- Visibility ---- */
.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;
}

.hidden { display: none !important; }

/* ---- Focus Styles (Accessibility) ---- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Responsive Grid Collapse ---- */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .heading-01 { font-size: 30px; line-height: 38px; }
  .heading-02 { font-size: 26px; line-height: 34px; }
  .heading-03 { font-size: 22px; line-height: 30px; }
  .body-text  { font-size: 16px; line-height: 26px; }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: var(--space-xl) 0;
  }
}

/* ---- Global Responsive: Prevent horizontal overflow ---- */
html, body {
  overflow-x: clip;
  max-width: 100vw;
}

img, svg, canvas, video {
  max-width: 100%;
  height: auto;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
