/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, p, ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Variables */
:root {
  --color-link: #718096;
  --color-link-hover: #2D3748;
  --color-orange: #f97316;
  --color-orange-hover: #ea580c;
  --color-gray-500: #6b7280;
  --color-gray-700: #374151;
  --max-width: 1280px;
}

/* Base */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: url('/cream_pixels.png') repeat;
}

a {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

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

hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem auto;
  max-width: 28rem;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.header {
  background: white;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo img {
  height: 3rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-menu ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-menu a {
  color: var(--color-gray-500);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
  color: var(--color-gray-700);
  border-bottom-color: var(--color-gray-700);
}

.nav-menu a.active {
  border-bottom-color: var(--color-gray-500);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    width: 100%;
  }

  .nav-menu.open {
    display: block;
  }

  .nav-menu ul {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
  }
}

/* Footer */
.footer {
  padding: 0 2rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--color-orange);
  color: white;
  font-weight: bold;
  padding: 1rem 1.5rem;
  border-radius: 0.25rem;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s;
}

.btn:hover {
  background: var(--color-orange-hover);
  color: white;
}

.btn-large {
  font-size: 1.25rem;
  padding: 1rem 1.5rem;
  width: 100%;
}

/* Cards */
.card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card p {
  margin-bottom: 0.75rem;
  color: var(--color-gray-700);
}

.card p:last-child {
  margin-bottom: 0;
}

.card .btn {
  margin-top: 1rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1024px) {
  .grid-4, .grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-5 {
    grid-template-columns: 1fr;
  }
}

/* Flex utilities */
.flex-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.flex-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 768px) {
  .flex-row {
    flex-direction: column;
  }
}

.flex-1 {
  flex: 1;
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-sm {
  font-size: 0.875rem;
}

.font-bold {
  font-weight: bold;
}

.font-semibold {
  font-weight: 600;
}

/* Spacing */
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-16 { margin-bottom: 4rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Max width */
.max-w-4xl {
  max-width: 56rem;
}

.max-w-md {
  max-width: 28rem;
}

/* Hero section */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: bold;
  max-width: 56rem;
  margin: 0 auto 1rem;
}

.hero h2 {
  font-size: 1.25rem;
  max-width: 56rem;
  margin: 0 auto 1rem;
  font-weight: normal;
}

.hero p {
  font-size: 1.5rem;
  max-width: 56rem;
  margin: 0 auto 1rem;
}

/* CTA buttons row */
.cta-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .cta-row {
    flex-direction: row;
  }

  .cta-row .btn {
    flex: 1;
  }
}

/* Sponsors */
.sponsors {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0 2rem;
}

.sponsors img {
  max-height: 60px;
  width: auto;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.sponsors img:hover {
  opacity: 0.75;
}

/* Volunteer cards */
.volunteer-card {
  text-align: center;
}

.volunteer-card img {
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.volunteer-card strong {
  display: block;
}

.volunteer-card .role {
  color: var(--color-gray-500);
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.25rem;
}

.volunteer-card a {
  color: var(--color-orange);
  font-weight: 500;
}

.volunteer-card a:hover {
  text-decoration: underline;
  color: var(--color-orange-hover);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  font-size: 1rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.form-textarea {
  min-height: 6rem;
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.form-submit {
  background: var(--color-orange);
  color: white;
  font-weight: bold;
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.form-submit:hover {
  background: var(--color-orange-hover);
}

/* Markdown content */
.markdown-body {
  line-height: 1.7;
}

.markdown-body h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.markdown-body h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.markdown-body p {
  margin-bottom: 1rem;
}

.markdown-body strong {
  font-weight: 600;
}

.markdown-body a {
  color: var(--color-orange);
}

.markdown-body a:hover {
  text-decoration: underline;
}

/* Link colors for inline links */
a.link-blue {
  color: #2563eb;
}

a.link-blue:visited {
  color: #7c3aed;
}

a.link-blue:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
