/* ===== BASE RESET & GLOBALS ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img, picture, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role='list'], ol[role='list'] { list-style: none; }

input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.2;
  font-weight: 700;
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

a { color: inherit; text-decoration: none; }

button { cursor: pointer; background: none; border: none; }

::selection {
  background: var(--color-primary-light);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== UTILITY CLASSES ===== */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--content-narrow);
}

.container--default {
  max-width: var(--content-default);
}

.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;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.625rem var(--space-5);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: 0 4px 14px rgba(61,139,55,0.25);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary-light);
}

.btn--outline-white {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn--outline-white:hover {
  background: rgba(255,255,255,0.1);
}

.btn--white {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}
.btn--white:hover {
  background: #f0faf0;
}

.btn--lg {
  padding: 0.875rem var(--space-8);
  font-size: var(--text-base);
}

.btn--sm {
  padding: 0.4rem var(--space-4);
  font-size: var(--text-xs);
}

/* Pills / tags */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
}

.pill--green {
  background: var(--color-primary-light);
  color: var(--color-primary-hover);
}

.pill--grey {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

/* Section spacing */
.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.section--muted {
  background: var(--color-surface-muted);
}

.section--dark {
  background: var(--color-dark-bg);
  color: var(--color-text-inverse);
}

.section--green {
  background: var(--color-primary);
  color: #fff;
}

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.section-header p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-inline: auto;
}

.section-header--light p {
  color: rgba(255,255,255,0.8);
}
