/* Shared typography and spacing rhythm across every public template. */
:root {
    --site-section-space: 28px;
    --site-content-space: 24px;
    --site-compact-space: 18px;
}

main :is(
    #home-gateway-title,
    #home-core-title,
    #home-agriculture-title,
    #home-strategic-title,
    #about-built-title,
    #about-story-title,
    #about-role-title,
    #about-rwanda-title,
    #about-who-title,
    #about-principles-title,
    #agri-introduction-title,
    #agri-systems-title,
    #alkareem-role-title,
    #agri-produce-title,
    #agri-inputs-title,
    #consultation-intro-title,
    #consultation-advisory-title,
    #consultation-facilitation-title,
    #consultation-legal-title,
    #consultation-financial-title,
    #contact-introduction-title,
    #contact-enquiry-title,
    #commerce-introduction-title,
    #commerce-directions-title,
    #commerce-procurement-title,
    #commerce-logistics-title,
    #commerce-products-title,
    #commerce-automotive-title,
    #commerce-vehicles-title,
    #coffee-introduction-title,
    #coffee-capabilities-title,
    #coffee-portfolio-title,
    #coffee-flexible-title,
    #coffee-packaging-title,
    #coffee-samples-title,
    #coffee-community-title,
    #coffee-markets-title,
    #land-considerations-title,
    #land-sourcing-title,
    #land-guidance-title,
    #land-development-title,
    #land-process-title,
    #services-opening-title,
    .land-opening-copy > h2,
    .generic-page > .container > h2
) {
    font-size: 35px !important;
    line-height: 1.12;
}

main :is(.section-heading, .section-copy, .form-heading) {
    margin-bottom: var(--site-content-space);
}

main :is(.intro-grid, .editorial-grid, .statement-grid, .image-copy-grid) {
    gap: var(--site-section-space);
}

main :is(.inline-actions, .hero-actions) {
    margin-top: var(--site-content-space);
}

main section:not(.inner-banner):not(.home-hero-slider):not(.commerce-logistics-group) {
    padding-block: var(--site-section-space);
}

.inner-banner {
    /* The banner needs clearance for its image and overlaid title. */
    padding-block: 64px !important;
}

.home-hero-slider {
    padding-block: 0 !important;
}

.generic-page,
.not-found {
    /* Keep page titles clear of the sticky header while compacting the body. */
    padding-top: 64px !important;
    padding-bottom: var(--site-section-space) !important;
}

.footer-grid {
    grid-template-columns: minmax(240px, 1.2fr) minmax(150px, .8fr) minmax(220px, 1.1fr) minmax(220px, 1fr);
    gap: var(--site-section-space);
    align-items: start;
    padding-block: var(--site-section-space);
    padding-inline: var(--gutter);
}

.footer-brand p {
    margin: 18px 0;
}

.footer-column {
    min-width: 0;
}

.footer-bottom {
    padding-inline: var(--gutter);
}

.footer-credit {
    color: inherit;
    text-decoration: none;
    transition: color var(--motion);
}

.footer-credit:hover,
.footer-credit:focus-visible {
    color: var(--brand-white);
}

@media (max-width: 767px) {
    :root {
        --site-section-space: 24px;
        --site-content-space: 20px;
        --site-compact-space: 16px;
    }

    .inner-banner {
        padding-block: 52px !important;
    }

    .generic-page,
    .not-found {
        padding-top: 52px !important;
    }
}

/* A single tablet breakpoint for every primary section composition. */
@media (max-width: 992px) {
    main section :is(
        [class*="-grid"],
        [class*="-layout"],
        [class*="-editorial"],
        [class*="-shell"]
    ),
    .consultation-intro > .container,
    .section-heading,
    .services-intro,
    .services-opening-copy,
    .services-collection > .container,
    .service-preview,
    .home-gateway-intro,
    .home-gateway-path,
    .home-supporting-copy,
    .home-strategic-list,
    .about-role-directions,
    .about-purpose-grid,
    .about-principles-list,
    .coffee-portfolio-heading,
    .coffee-origin-details,
    .coffee-capability-path,
    .coffee-profile-grid,
    .coffee-flexible-panel,
    .consultation-advisory-list,
    .consultation-facilitation-list,
    .consultation-legal-list,
    .consultation-financial-heading,
    .consultation-financial-list,
    .agri-systems-overview,
    .agri-project-path-copy,
    .land-opening-focus,
    .land-consideration-panel,
    .land-consideration-group,
    .land-consideration-group ul,
    .land-sourcing-heading,
    .land-support-list,
    .land-development-intro,
    .land-development-services,
    .land-process-list,
    .commerce-section-heading,
    .commerce-process-heading,
    .commerce-logistics-heading,
    .commerce-products-heading,
    .contact-enquiry-heading,
    .commerce-direction-grid,
    .commerce-process-list,
    .commerce-logistics-group ul,
    .commerce-category-nav,
    .commerce-category-card,
    .commerce-category-pair,
    .commerce-food,
    .commerce-tag-list,
    .commerce-detail-list,
    .commerce-automotive-list,
    .commerce-vehicle-callout div,
    .compact-list,
    .divided-list,
    .facts-grid,
    .gateway-list,
    .capabilities-list,
    .spec-grid,
    .form-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        column-gap: 0 !important;
        row-gap: var(--site-content-space);
    }

    main section :is(
        [class*="-grid"],
        [class*="-layout"],
        [class*="-editorial"],
        [class*="-shell"]
    ) > *,
    .services-collection > .container > *,
    .footer-grid > * {
        min-width: 0;
        width: 100%;
    }

    :is(.cta-panel, .home-services-head) {
        grid-template-columns: minmax(0, 1fr) !important;
        flex-direction: column;
        align-items: stretch;
        gap: var(--site-content-space);
    }

    .cta-action {
        width: 100%;
        justify-content: flex-start;
        justify-self: stretch;
    }

    :is(.commerce-logistics-visual, .coffee-packaging-visual) {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 1080px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        column-gap: var(--site-section-space) !important;
        row-gap: var(--site-content-space);
        align-items: start;
    }

    .footer-grid > * {
        grid-column: auto !important;
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .footer-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .footer-grid,
    .footer-bottom {
        padding-inline: 20px;
    }
}

@media (max-width: 992px) {
    /* Keep copy between major visuals when desktop split sections stack. */
    :is(
        .home-editorial-copy,
        .home-agriculture-copy,
        .about-built-copy,
        .about-origin-copy,
        .about-rwanda-content,
        .about-who-copy,
        .agri-introduction-copy,
        .agri-systems-content,
        .agri-produce-content,
        .consultation-intro > .container > .content,
        .consultation-facilitation-main,
        .coffee-introduction-copy,
        .coffee-packaging-content,
        .coffee-community-copy,
        .coffee-markets-copy,
        .land-opening-copy,
        .land-support-list,
        .land-development-services,
        .commerce-introduction-content,
        .commerce-logistics-groups,
        .commerce-food-copy,
        .commerce-category-copy,
        .commerce-automotive-content,
        .commerce-vehicles-copy,
        .contact-introduction-copy,
        .contact-form
    ) {
        order: 1 !important;
    }

    :is(
        .home-editorial-visual,
        .home-agriculture-visual,
        .about-built-visual,
        .about-origin-visual,
        .about-rwanda-image,
        .about-who-visual,
        .agri-introduction-visual,
        .agri-systems-visual,
        .agri-produce-visual,
        .consultation-intro > .container > .image,
        .consultation-facilitation-visual,
        .coffee-introduction-visual,
        .coffee-packaging-visual,
        .coffee-community-image,
        .coffee-map,
        .land-opening-visual,
        .land-sourcing-visual,
        .land-development-visual,
        .commerce-introduction-visual,
        .commerce-logistics-visual,
        .commerce-food-image,
        .commerce-category-image,
        .commerce-automotive-visual,
        .commerce-vehicles-image,
        .contact-introduction-visual,
        .contact-information
    ) {
        order: 2 !important;
    }

    .agri-systems-overview {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: var(--site-content-space);
        align-items: start;
    }

    .agri-systems-visual {
        width: 100%;
        max-width: none;
        min-height: 0 !important;
        aspect-ratio: 16/10;
    }

    .agri-systems-content {
        width: 100%;
    }

    .agri-verified-facts {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .agri-capability-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0 !important;
    }

    .agri-capability-grid li,
    .agri-capability-grid li:nth-child(even) {
        padding: 24px 0 !important;
        border-right: 0 !important;
        border-left: 0 !important;
    }

    .agri-project-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .agri-project-steps {
        gap: 16px !important;
    }

    .agri-project-steps li,
    .agri-project-steps li:nth-child(4),
    .agri-project-steps li:last-child {
        grid-column: auto;
    }
}

@media (max-width: 680px) {
    .agri-verified-facts,
    .agri-capability-grid,
    .agri-project-steps {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .agri-capability-grid {
        gap: 0 !important;
    }

    .agri-capability-grid li,
    .agri-capability-grid li:nth-child(even) {
        padding: 24px 0 !important;
        border-left: 0 !important;
    }

    .agri-project-steps {
        row-gap: 28px !important;
        overflow: visible;
    }

    .agri-project-steps li:not(:last-child)::after,
    html[dir="rtl"] .agri-project-steps li:not(:last-child)::after {
        content: '\2304';
        top: auto !important;
        right: auto !important;
        bottom: -25px !important;
        left: 50% !important;
        display: flex !important;
        width: 22px;
        height: 22px;
        align-items: center;
        justify-content: center;
        transform: translateX(-50%);
        line-height: 1;
    }
}
