:root {
  --section-inset: clamp(24px, 4vw, 48px);
  --section-gap: calc(2 * var(--section-inset));
}

/* Match the space on both sides of a boundary between page sections. */
body > section:not(.navbar-section, .footer-section),
body .home-bg-block > :is(.hero-section, .references-section),
body main > section:not(.performance-screen),
body .page-section-visual {
  margin-block: 0 !important;
  padding-block-end: var(--section-inset) !important;
}

body > section:not(.navbar-section, .footer-section, [class*="hero"]),
body .home-bg-block > .references-section,
body main > section:not(.performance-screen, [class*="hero"]),
body .page-section-visual {
  padding-block-start: var(--section-inset) !important;
}

/* These visuals are standalone blocks, with their own section spacing. */
body .page-section-visual :is(.learning-visual, .report-pin-track, .report-demo, .development-report),
body #aisim-example .conversation-demo {
  margin-block: 0;
}

/* These home sections share a wrapper and need the full gap within it. */
body .home-products-ending .home-mobile-section {
  margin-block: 0;
  padding-block: var(--section-gap) 0;
}

body .home-partners-following .home-partners {
  margin-block: 0;
  padding-block: 0;
}

body .home-partners-following .future-learn-container {
  margin-block-start: var(--section-gap);
}
