/* Shared footer areas: partner logo wall, supported organisations and the tree-planting note. */
.footer-trust {
    --footer-trust-ink: #252721;
    --footer-trust-ink-2: rgba(37, 39, 33, 0.78);
    --footer-trust-accent: #0E8377;
    --footer-trust-mint: #E3F2EF;
    --footer-trust-cream: #F7F7F3;
    --footer-trust-line: rgba(37, 39, 33, 0.12);
    font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--footer-trust-ink);
    padding: 56px 0 64px;
}

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

/* Partner wall backdrop: three faint concentric rings and a mint core behind the logos. Static. */
.footer-trust-partners {
    background:
        radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 38%),
        radial-gradient(circle at 50% 52%, transparent 238px, rgba(14, 131, 119, 0.09) 239px, rgba(14, 131, 119, 0.09) 240px, transparent 241px),
        radial-gradient(circle at 50% 52%, transparent 368px, rgba(14, 131, 119, 0.07) 369px, rgba(14, 131, 119, 0.07) 370px, transparent 371px),
        radial-gradient(circle at 50% 52%, transparent 508px, rgba(14, 131, 119, 0.05) 509px, rgba(14, 131, 119, 0.05) 510px, transparent 511px),
        radial-gradient(ellipse 70% 80% at 50% 50%, var(--footer-trust-mint), var(--footer-trust-cream) 70%);
}

.footer-trust-support {
    background: #ffffff;
}

.footer-trust-eyebrow {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--footer-trust-accent);
}

.footer-trust .footer-trust-title {
    margin: 0 0 24px;
    font-family: inherit;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--footer-trust-ink);
}

/* Partner logo wall: the logos float without tiles, five per row. Depth
   comes from three planes picked by their list position — near (larger, full), mid, far (smaller,
   paler, a touch soft) — and from a small vertical rhythm; nothing animates by itself. */
.footer-trust-logo-wall {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px 10px;
    margin: 0;
    padding: 8px 0 4px;
    list-style: none;
}

.footer-trust-logo-wall li {
    margin: 0;
}

.footer-trust-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 74px;
    padding: 0 8px;
}

.footer-trust-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 44px;
    object-fit: contain;
    opacity: 0.82;
    filter: grayscale(1) drop-shadow(0 8px 12px rgba(11, 59, 54, 0.12));
}

.footer-trust-logo img.is-tall {
    max-height: 60px;
}

.footer-trust-logo img.is-wide {
    max-height: 34px;
}

/* Far plane */
.footer-trust-logo-wall li:nth-child(5n+2) .footer-trust-logo,
.footer-trust-logo-wall li:nth-child(7n+4) .footer-trust-logo {
    transform: scale(0.84);
}

.footer-trust-logo-wall li:nth-child(5n+2) .footer-trust-logo img,
.footer-trust-logo-wall li:nth-child(7n+4) .footer-trust-logo img {
    opacity: 0.58;
    filter: grayscale(1) blur(0.4px) drop-shadow(0 4px 8px rgba(11, 59, 54, 0.08));
}

/* Near plane */
.footer-trust-logo-wall li:nth-child(4n+1) .footer-trust-logo {
    transform: scale(1.08);
}

.footer-trust-logo-wall li:nth-child(4n+1) .footer-trust-logo img {
    opacity: 0.95;
}

/* Vertical rhythm */
.footer-trust-logo-wall li:nth-child(3n+2) .footer-trust-logo {
    translate: 0 6px;
}

.footer-trust-logo-wall li:nth-child(3n) .footer-trust-logo {
    translate: 0 -6px;
}

/* Marks that are pale by design keep full strength and a little extra contrast on every plane. */
.footer-trust-logo-wall li:nth-child(n) .footer-trust-logo img.is-faint {
    opacity: 1;
    filter: grayscale(1) contrast(1.2) drop-shadow(0 8px 12px rgba(11, 59, 54, 0.12));
}

.footer-trust-logo:focus-visible {
    outline: 2px solid var(--footer-trust-accent);
    outline-offset: 6px;
    border-radius: 8px;
}

/* Pointer devices: the hovered logo turns to colour and lifts a little; keyboard focus does the same. */
@media (hover: hover) {
    .footer-trust-logo-wall li:nth-child(n) .footer-trust-logo:hover img,
    .footer-trust-logo-wall li:nth-child(n) .footer-trust-logo:focus-visible img {
        opacity: 1;
        filter: grayscale(0) drop-shadow(0 14px 18px rgba(11, 59, 54, 0.18));
    }

    .footer-trust-logo:hover,
    .footer-trust-logo:focus-visible {
        transform: translateY(-3px);
    }

    .footer-trust-logo-wall li:nth-child(5n+2) .footer-trust-logo:hover,
    .footer-trust-logo-wall li:nth-child(5n+2) .footer-trust-logo:focus-visible,
    .footer-trust-logo-wall li:nth-child(7n+4) .footer-trust-logo:hover,
    .footer-trust-logo-wall li:nth-child(7n+4) .footer-trust-logo:focus-visible {
        transform: scale(0.84) translateY(-4px);
    }

    .footer-trust-logo-wall li:nth-child(4n+1) .footer-trust-logo:hover,
    .footer-trust-logo-wall li:nth-child(4n+1) .footer-trust-logo:focus-visible {
        transform: scale(1.08) translateY(-3px);
    }
}

/* The hover change eases only where motion is welcome; otherwise it switches instantly. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .footer-trust-logo {
        transition: transform 0.2s ease;
    }

    .footer-trust-logo img {
        transition: filter 0.2s ease, opacity 0.2s ease;
    }
}

/* Supported organisations */
.footer-trust-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.footer-trust-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--footer-trust-line);
    border-radius: 20px;
}

.footer-trust-card.is-featured {
    border-color: var(--footer-trust-accent);
    box-shadow: inset 0 3px 0 var(--footer-trust-accent);
}

.footer-trust-card-logo {
    display: flex;
    align-items: center;
    height: 96px;
}

.footer-trust-card-logo img {
    width: auto;
    height: auto;
    max-width: 180px;
    max-height: 96px;
    object-fit: contain;
}

.footer-trust .footer-trust-card-title {
    margin: 0;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--footer-trust-ink);
}

.footer-trust-card-text {
    flex: 1;
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--footer-trust-ink-2);
}

.footer-trust-card-link {
    align-self: flex-start;
    font-size: 14px;
    font-weight: 700;
    color: var(--footer-trust-accent);
    text-decoration: none;
}

.footer-trust-card-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Tree-planting note */
.footer-trust-trees {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    margin-top: 16px;
    padding: 32px;
    background: var(--footer-trust-mint);
    border-radius: 20px;
}

.footer-trust-trees-icon {
    flex: none;
    width: 72px;
    height: 72px;
    color: var(--footer-trust-accent);
}

.footer-trust .footer-trust-trees-title {
    margin: 0;
    font-family: inherit;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--footer-trust-ink);
}

.footer-trust-trees-lead {
    max-width: 720px;
    margin: 8px 0 20px;
    font-size: 16px;
    line-height: 1.55;
    color: var(--footer-trust-ink-2);
}

.footer-trust-trees-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.footer-trust-trees-points > div {
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 14px;
}

.footer-trust .footer-trust-trees-points h4 {
    margin: 0 0 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--footer-trust-accent);
}

.footer-trust-trees-points p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--footer-trust-ink-2);
}

@media (max-width: 1024px) {
    .footer-trust-logo-wall {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .footer-trust {
        padding: 40px 0 44px;
    }

    .footer-trust .footer-trust-title {
        font-size: 22px;
    }

    /* Three per row; the last logo sits centred under the last full row. Smaller rings for the
       narrow section. */
    .footer-trust-partners {
        background:
            radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 38%),
            radial-gradient(circle at 50% 52%, transparent 118px, rgba(14, 131, 119, 0.09) 119px, rgba(14, 131, 119, 0.09) 120px, transparent 121px),
            radial-gradient(circle at 50% 52%, transparent 218px, rgba(14, 131, 119, 0.07) 219px, rgba(14, 131, 119, 0.07) 220px, transparent 221px),
            radial-gradient(circle at 50% 52%, transparent 318px, rgba(14, 131, 119, 0.05) 319px, rgba(14, 131, 119, 0.05) 320px, transparent 321px),
            radial-gradient(ellipse 90% 70% at 50% 50%, var(--footer-trust-mint), var(--footer-trust-cream) 70%);
    }

    .footer-trust-logo-wall {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px 6px;
    }

    .footer-trust-logo-wall li:nth-child(25) {
        grid-column: 2;
    }

    .footer-trust-trees-points {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .footer-trust-logo {
        height: 54px;
    }

    .footer-trust-logo img {
        max-height: 32px;
    }

    .footer-trust-logo img.is-tall {
        max-height: 44px;
    }

    .footer-trust-logo img.is-wide {
        max-height: 24px;
    }

    .footer-trust-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-trust-card {
        padding: 20px;
    }

    .footer-trust-trees {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .footer-trust-trees-icon {
        width: 56px;
        height: 56px;
    }

    .footer-trust .footer-trust-trees-title {
        font-size: 19px;
    }
}
