/* 1. Import Charis SIL from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Charis+SIL:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* CSS 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;
  scroll-behavior: smooth;
}

body {
  /* ➤ CHANGED: Applied Charis SIL globally */
  font-family: 'Charis SIL', serif;
  font-size: var(--text-base);
  font-weight: 400; /* Normal weight for Charis */
  line-height: 1.6;
  color: var(--gray-900);
  background-color: var(--gray-50);
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  /* ➤ CHANGED: Ensure headings also use the serif font */
  font-family: 'Charis SIL', serif;
  font-weight: 700; /* Bold */
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--gray-900);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

/* Lists */
ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Buttons */
button {
  /* ➤ CHANGED: Force buttons to inherit the font */
  font-family: 'Charis SIL', serif; 
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Form elements */
input, textarea, select {
  /* ➤ CHANGED: Force inputs to inherit the font */
  font-family: 'Charis SIL', serif;
  font-size: inherit;
  line-height: inherit;
}

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

*:focus:not(:focus-visible) {
  outline: none;
}

/* Selection */
::selection {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

/* Scrollbar (Webkit) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-8);
  }
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !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-width: 0;
}