*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html, body { overflow-x: hidden; }
* { -webkit-tap-highlight-color: rgba(45, 139, 90, 0.18); }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

a {
  color: var(--c-green);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--c-green-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  color: var(--c-forest);
}
h1 { font-size: var(--fs-display-xl); letter-spacing: -0.025em; }
h2 { font-size: var(--fs-display-lg); letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h2); }
h4 { font-size: var(--fs-h3); line-height: var(--lh-snug); }

p { line-height: var(--lh-relaxed); }
.lead {
  font-size: var(--fs-lead);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-green);
}
/* Layout primitives */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: var(--container-wide); }

section { padding-block: clamp(3.5rem, 8vw, 7rem); }
section.tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--c-stone); }
.section-dark .lead { color: var(--text-on-dark-muted); }
.section-dark .eyebrow { color: var(--c-green-soft); }

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

/* Utilities */
.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }
.stack-xl > * + * { margin-top: var(--space-7); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: var(--space-6);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.text-center { text-align: center; }
.muted { color: var(--text-secondary); }

/* Mobile: collapse inline two-column grids to one column */
@media (max-width: 720px) {
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns:1fr 1.5fr"],
  [style*="grid-template-columns:1.4fr 1fr"],
  [style*="grid-template-columns:1fr 1.1fr"] {
    grid-template-columns: 1fr !important;
    gap: var(--space-5) !important;
  }
}

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

/* Focus */
:focus-visible {
  outline: 2px solid var(--c-green);
  outline-offset: 3px;
  border-radius: 2px;
}
