/* ==========================================================================
   Base: design tokens, reset, typography, shared primitives.
   Mobile first: every rule here targets the smallest screen by default.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette */
  --green: #57be65;
  --green-soft: #acdfac;
  --bg: #f3faf0;
  --ink: #184b2d;
  --surface: #ffffff;

  /* Complementary neutrals, added for hierarchy and contrast only */
  --ink-deep: #0f3019;     /* primary button hover */
  --ink-muted: #3d6349;    /* secondary text: 6.4:1 on --bg */
  --accent-text: #1e7a3c;  /* green that is legible as text: 5:1 on --bg */
  --tint: #e6f4e2;         /* icon wells, quiet fills */
  --surface-hover: #eef8eb; /* cards on hover: a touch darker than white */
  --line: #dcebd7;
  --line-strong: #bfd9ba;

  /* Type */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-sm: 0.9375rem;
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.13rem + 0.55vw, 1.625rem);
  --text-2xl: clamp(1.75rem, 1.45rem + 1.4vw, 2.625rem);
  --text-3xl: clamp(1.875rem, 1.4rem + 2.4vw, 3.5rem);
  --text-hero: clamp(3rem, 2rem + 5.2vw, 6rem);

  /* Space */
  --gutter: clamp(1rem, 5vw, 3rem);
  --section-y: clamp(3.5rem, 2.5rem + 5vw, 7rem);

  /* Shape and motion */
  --radius-sm: 0.5rem;
  --radius: 0.875rem;
  --radius-lg: 1.25rem;
  --ease: 180ms cubic-bezier(0.2, 0.7, 0.3, 1);

  --header-h: 4rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

button {
  font: inherit;
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Shared primitives
   -------------------------------------------------------------------------- */

.container {
  width: min(100% - 2 * var(--gutter), 72rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.625rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--solid {
  fill: currentColor;
  stroke: none;
}

/* Honour reduced motion everywhere, including components added later. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
