/* Community-only: generous photo cards, native scroll gallery, application dock.
   Explicit paint order and ordinary 2D positioning avoid WebKit dropping loaded
   images in nested sticky/clip-path/3D compositor layers. */
.community-experience {
  --community-blue: #0a49ba;
  --community-red: #ed4842;
  --community-teal: #34bcb5;
  --community-ease: cubic-bezier(.23, 1, .32, 1);
}
.community-experience .community-exchange-section { padding-top: 24px; }
.community-exchange { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.community-tile { min-width: 0; }
.community-tile-surface {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f1f2f4;
  color: #111;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 10px calc(100% - 10px), 0 calc(100% - 10px));
  transform: none;
  transition: transform 240ms var(--community-ease);
}
/* Every tile shares one 3:2 frame; the photograph is cropped to fit rather than setting the height. */
.community-tile-image { position: relative; z-index: 0; display: block; flex: none; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(0); transition: filter 220ms linear; }
.community-tile-copy { position: relative; z-index: 1; flex: 1; padding: clamp(24px, 2.7vw, 40px); display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.community-tile-number { font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 12px; }
.community-tile-number::before { content: ''; width: 9px; height: 9px; background: var(--community-blue); box-shadow: 9px 9px 0 var(--community-teal), 0 18px 0 var(--community-red); margin-right: 9px; margin-bottom: 16px; }
.site-page .community-tile h3 { font-size: clamp(28px, 2.8vw, 42px); letter-spacing: -.035em; line-height: 1.04; max-width: 11ch; }
.site-page .community-tile p { font-size: 17px; line-height: 1.45; max-width: 31ch; margin: 0; }
@media (hover: hover) and (pointer: fine) {
  .community-tile:hover .community-tile-surface { transform: translateY(-4px); }
  .community-tile:hover .community-tile-image { filter: grayscale(1); }
}

/* Without enhancement, every photograph and the form remain in normal flow. */
.community-journey { position: relative; z-index: 0; background: var(--community-blue); color: #fff; }
.community-gallery-stage { position: relative; z-index: 1; padding-block: 44px; }
.community-gallery-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding-bottom: 28px; }
.community-gallery-heading .eyebrow { color: #fff; margin-bottom: 12px; }
.community-gallery-heading .eyebrow::before { background: var(--community-teal); }
.site-page .community-gallery-heading h2 { font-size: clamp(32px, 3.8vw, 56px); }
.community-gallery-skip { color: #fff; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 0; font-size: 16px; white-space: nowrap; text-underline-offset: 5px; }
.community-gallery-skip:focus-visible { outline-color: #fff; }
.community-gallery-window { position: relative; overflow: hidden; }
.community-gallery-track { width: min(1280px, calc(100% - var(--gutter) * 2)); margin-inline: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.community-gallery-photo { min-width: 0; margin: 0; }
.community-gallery-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; }
.community-gallery-photo figcaption { padding-top: 12px; color: #fff; font-size: 15px; line-height: 1.35; }
.community-gallery-progress { display: none; }
.community-journey.is-pinned { height: calc(var(--community-stage-height) + var(--community-pan-travel) + var(--community-dock-travel)); }
.community-journey.is-pinned .community-gallery-stage { position: sticky; top: var(--community-sticky-top); height: var(--community-stage-height); padding-block: 22px; display: flex; flex-direction: column; }
.community-journey.is-pinned .community-gallery-heading { flex: 0 0 auto; }
.community-journey.is-pinned .community-gallery-window { flex: 1 1 auto; min-height: 0; width: 100%; }
.community-journey.is-pinned .community-gallery-track { display: flex; gap: 24px; width: max-content; height: 100%; margin-inline: 0; padding-inline: var(--gutter); position: relative; left: var(--community-photo-x, 0px); }
.community-journey.is-pinned .community-gallery-photo { flex: 0 0 auto; height: 100%; display: flex; flex-direction: column; }
.community-journey.is-pinned .community-gallery-photo img { flex: 1 1 auto; min-height: 0; height: calc(100% - 32px); width: auto; max-width: none; aspect-ratio: var(--photo-ratio); object-fit: contain; }
.community-journey.is-pinned .community-gallery-photo figcaption { flex: 0 0 32px; padding-top: 10px; white-space: nowrap; }
.community-journey.is-pinned .community-gallery-progress { display: block; flex: 0 0 3px; margin: 18px var(--gutter) 0; background: rgb(255 255 255 / .3); }
.community-gallery-progress span { display: block; height: 100%; width: 100%; background: var(--community-teal); transform: scaleX(var(--community-pan-progress, 0)); transform-origin: left center; }

/* This real form section rises over the held gallery and then continues down. */
.community-experience .community-apply { position: relative; z-index: 2; background: #fff; padding-block: clamp(72px, 9vw, 136px); scroll-margin-top: 128px; }
.community-apply::before { content: ''; position: absolute; inset: auto 0 100%; height: 10vw; background: #fff; clip-path: polygon(0 50%, 5% 50%, 5% 0, 15% 0, 15% 50%, 25% 50%, 25% 100%, 35% 100%, 35% 50%, 45% 50%, 45% 0, 55% 0, 55% 50%, 65% 50%, 65% 100%, 75% 100%, 75% 50%, 85% 50%, 85% 0, 95% 0, 95% 50%, 100% 50%, 100% 100%, 0 100%); pointer-events: none; }
.community-journey.is-pinned + .community-apply { margin-top: calc(-1 * var(--community-stage-height)); }
.site-page .community-application { width: min(840px, calc(100% - var(--gutter) * 2)); }
.community-apply-heading { text-align: center; margin-inline: auto; max-width: 700px; margin-bottom: 44px; }
.community-apply-heading .eyebrow { justify-content: center; }
.community-apply-heading > p:not(.eyebrow) { max-width: 540px; margin: 20px auto 0; }
.site-page .community-apply-heading h2 { font-size: clamp(38px, 4.6vw, 64px); }
.community-application .support-form { max-width: none; width: 100%; border-color: #d9dde3; padding: clamp(24px, 4vw, 48px); }
.community-application .support-form > button[type='submit'] { width: 100%; }

@media (max-width: 1000px) {
  .community-exchange { gap: 16px; }
  .community-tile-copy { padding: 25px; gap: 16px; }
  .site-page .community-tile h3 { font-size: 30px; }
  .site-page .community-tile p { font-size: 16px; }
}
@media (max-width: 760px) {
  .community-exchange { grid-template-columns: 1fr; gap: 24px; }
  .community-tile-copy { padding: 32px; }
  .site-page .community-tile h3 { font-size: 36px; max-width: 14ch; }
  .site-page .community-tile p { max-width: 40ch; }
  .community-gallery-heading { align-items: flex-start; flex-direction: column; gap: 8px; padding-bottom: 18px; }
  .community-gallery-heading .eyebrow { font-size: 12px; margin-bottom: 8px; }
  .site-page .community-gallery-heading h2 { font-size: clamp(29px, 6.5vw, 42px); }
  .community-gallery-skip { padding: 4px 0; font-size: 14px; }
  .community-gallery-track { gap: 20px; }
  .community-journey.is-pinned .community-gallery-track { gap: 16px; }
  .community-gallery-photo figcaption { font-size: 13px; }
  .community-experience .community-apply { scroll-margin-top: 112px; }
  .site-page .community-application { width: min(600px, calc(100% - 32px)); }
  .community-apply-heading { margin-bottom: 32px; padding-inline: 8px; }
}
@media (max-width: 440px) {
  .community-tile-copy { padding: 28px; }
  .community-gallery-track { grid-template-columns: 1fr; }
  .community-application .field-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.community-experience) { scroll-behavior: auto; }
  .community-experience .community-tile :is(.community-tile-surface, .community-tile-image) { transition: none; transform: none; }
  .community-journey.is-pinned { height: auto; }
  .community-journey.is-pinned + .community-apply { margin-top: 0; }
}

/* 2026 partner wall: one grid, every organisation at the same visual weight. */
.community-partners-section .section-heading { margin-bottom: 16px; }
.community-partner-intro { max-width: 62ch; margin: 0 0 28px; font-size: 17px; line-height: 1.5; color: #4b5563; }
.community-partner-wall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.community-partner-tile { display: flex; align-items: center; justify-content: center; min-height: 112px; padding: 20px 24px; background: #f1f2f4; }
.community-partner-tile img { display: block; width: auto; height: auto; max-width: 100%; max-height: 52px; object-fit: contain; }
.community-partner-tile[data-tone="invert"] img { filter: invert(1); }
.community-partner-tile[data-tone="matte"] img { mix-blend-mode: multiply; }
@media (max-width: 900px) { .community-partner-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .community-partner-tile { min-height: 96px; padding: 16px 18px; } }
@media (max-width: 560px) { .community-partner-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .community-partner-tile { min-height: 84px; padding: 14px; } .community-partner-tile img { max-height: 40px; } .community-partner-intro { font-size: 16px; } }
