/* ================================================================
   BASE — reset, typography, containers, buttons, forms, utilities
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
/* Inverted list reset: strip markers from ALL lists, then re-enable them only
   inside .prose (long-form service copy from config/services.php, where real
   bullets are wanted). The previous version was an allowlist of specific
   containers, which silently leaked native discs into every new component
   whose <ul> wasn't added to it — it bit the footer and the service nav. */
ul, ol { list-style: none; padding: 0; margin: 0; }
.prose ul { list-style: disc; padding-left: 1.25rem; }
.prose ol { list-style: decimal; padding-left: 1.25rem; }
img, picture, svg { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; }

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--color-ink);
  /* Fraunces has normal space-glyph proportions (unlike Clash Display, the
     previous heading font, which needed +0.06/0.12em word-spacing to stop
     words visually colliding) — a serif also reads better with slightly
     tighter tracking than a bold grotesk, so letter-spacing stays negative. */
  letter-spacing: -0.01em;
  text-wrap: balance; /* stops orphan words on headline wraps */
}
h1 { letter-spacing: -0.015em; }
h3, h4 { line-height: var(--lh-snug); letter-spacing: 0; }
/* Deliberately does NOT include a bare `span`: .icon-badge is a <span>, and
   `.on-dark span` (0,1,1) outranks `.icon-badge` (0,1,0) — that repainted
   every lime icon circle white (1.29:1, invisible). Text spans inherit the
   right colour from their block parent anyway, so listing them buys nothing. */
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4,
.on-dark p, .on-dark li { color: var(--color-ink); }

h1 { font-size: var(--fs-h1); font-weight: var(--fw-bold); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); }

p { color: var(--color-ink-soft); }
.on-dark p { color: var(--color-ink-soft); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-lime-600);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--space-9); }
.section--tight { padding-block: var(--space-8); }
.section--paper2 { background: var(--color-paper-2); }
.section--dark { background: var(--color-forest-900); }

/* Headings default to deep forest on light surfaces (reference behaviour),
   and flip to white inside any .on-dark / dark shell. */
h1, h2, h3 { color: var(--color-forest-900); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4,
.shell--dark h1, .shell--dark h2, .shell--dark h3 { color: #fff; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: normal;
  text-transform: capitalize;
  color: var(--color-lime-800);
  background: var(--color-lime-100);
  border-radius: var(--radius-full);
  padding: 8px 18px;
}
/* On dark sections the reference uses a translucent white pill, not a solid one. */
.on-dark .eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}
.eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-lime-500);
  flex-shrink: 0;
}

.section-head { max-width: 640px; margin-bottom: var(--space-8); }
.section-head p { margin-top: var(--space-4); font-size: var(--fs-lede); }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------- Buttons — reference exact: radius 10px (NOT pill), bold, dark-on-lime,
   trailing dark arrow-circle baked into the right padding. ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  padding: 17px 24px;
  border-radius: var(--radius-md);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
/* A raw icon() SVG has no width/height of its own, so dropped straight
   inside a button it renders at whatever oversized intrinsic size the
   browser falls back to (this is what broke the brochure page's buttons —
   nothing scoped it). Every icon-carrying button needs this regardless of
   which icon, so it belongs here rather than fixed per instance. */
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
/* Doubled selector (0,2,0) for the same reason as .icon-badge: buttons are
   <a> elements, so any component rule shaped `.parent a { color: … }` (0,1,1)
   would otherwise repaint them — `.svc-contact a` turned "Contact Us Today"
   into translucent white on lime (~1.5:1, unreadable). */
.btn--accent,
.btn--accent.btn--accent {
  position: relative;
  background: var(--color-lime-500);
  color: var(--color-forest-900);
  box-shadow: var(--shadow-accent);
  padding-right: 60px;
}
.btn--accent::after {
  content: '';
  position: absolute;
  top: 50%; right: 7px;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  background-color: var(--color-forest-900);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h13m0 0-5-5m5 5-5 5' stroke='%23C7F268' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.btn--accent:hover { transform: translateY(-2px); }
.btn--accent:hover::after { background-color: var(--color-forest-800); }
.btn--outline {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid var(--color-border);
}
.on-dark .btn--outline { color: #fff; border-color: var(--color-border-dark); }
.btn--outline:hover { border-color: var(--color-lime-500); }
.btn--sm { padding: 12px 20px; font-size: var(--fs-small); }
.btn--sm.btn--accent { padding-right: 48px; }
.btn--sm.btn--accent::after { width: 28px; height: 28px; background-size: 12px; right: 6px; }

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--fw-medium);
}
.play-btn__circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 1px solid var(--color-border-dark);
  transition: background var(--dur-fast) var(--ease-out);
}
.play-btn:hover .play-btn__circle { background: var(--color-lime-500); color: var(--color-forest-950); }

/* ---------- Forms ---------- */
.field {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--fs-body);
}
.field:focus { border-color: var(--color-lime-600); }
textarea.field { min-height: 140px; resize: vertical; }
.field-label {
  display: block;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-2);
}
.field-error {
  color: var(--color-error);
  font-size: var(--fs-small);
  margin-top: var(--space-2);
  display: none;
}
.field.is-invalid { border-color: var(--color-error); }
.field.is-invalid + .field-error { display: block; }

/* honeypot — visually hidden, still in tab order removed */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.text-center { text-align: center; }
[data-reveal] { opacity: 1; }
