/* ==========================================================================
   Reset, base typography, layout primitives
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--surface-page);
    color: var(--ink-body);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

/* Display face for section titles; body stays Source Sans 3 */
h1,
h2,
.hero__title,
.final-cta__title,
.section-heading h2 {
    font-family: var(--font-display);
    font-weight: 600;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    color: var(--ink-strong);
    line-height: 1.25;
}

h1 {
    margin-bottom: var(--space-5);
    font-size: var(--fs-h1);
    line-height: var(--lh-h1);
    letter-spacing: var(--tracking-h1);
}

h2 {
    margin-bottom: var(--space-5);
    font-size: var(--fs-h2);
    line-height: var(--lh-h2);
    letter-spacing: -0.01em;
}

h3,
h4 {
    margin-bottom: var(--space-3);
    font-weight: 700;
}

h3 {
    font-size: var(--fs-h3);
}

/* These blocks already space the following copy via margin-top on the next element */
.hero__title,
.final-cta__title,
.section-heading h2,
.page-head h1,
.page-head h2 {
    margin-bottom: 0;
}

p {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: var(--green-deep);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--green-mid);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ---------- Layout primitives ---------- */

/* --container-max is the measured *content* width, so gutters sit outside it.
   At 1440px this puts content at x 80 -> 1360, matching the reference. */
.container {
    width: 100%;
    max-width: calc(var(--container-max) + (2 * var(--container-pad)));
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.section {
    padding-block: var(--section-pad-y);
}

.section--tight {
    padding-block: var(--space-10);
}

.section--strip {
    background: var(--surface-strip);
    padding-block: var(--space-8);
}

.grid {
    display: grid;
    gap: var(--grid-gutter);
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid--6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* ---------- Utilities ---------- */

.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;
    left: 50%;
    transform: translate(-50%, -110%);
    z-index: 100;
    padding: var(--space-3) var(--space-6);
    background: var(--green-deep);
    color: #fff;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-weight: 600;
}

.skip-link:focus {
    transform: translate(-50%, 0);
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
