/* Homepage compositions use the production grid, card, typography and media systems. */
.cfk-home { min-inline-size: 0; --cfk-home-section-space: var(--ptn-region-fluid-space); }
.cfk-home > section:not(:where(#latest-news)) > .ptn-container.ptn-region { margin-block: 0; padding-block: var(--cfk-home-section-space); }
.cfk-home .ptn-stack > :is(h1,h2,h3,p) { margin-block: 0; }
.cfk-home .cfk-prose > :first-child { margin-block-start: 0; }
.cfk-home .cfk-prose > :last-child { margin-block-end: 0; }
.cfk-home :is(h1,h2,h3,p) { overflow-wrap: anywhere; }
.cfk-home-features, .cfk-home-editorial, .cfk-home-brands { background: var(--cfk-color-white); }

.cfk-home-spotlight {
  --cfk-wave-background-color: var(--cfk-color-black);
  --cfk-wave-background-image: none;
  --cfk-wave-background-size: cover;
  color: var(--cfk-color-white);
}
.cfk-home > .cfk-home-spotlight > .ptn-container.ptn-region { padding-block-end: calc(var(--cfk-home-section-space) + var(--cfk-wave-height)); }
.cfk-home-spotlight__intro { min-inline-size: 0; position: relative; z-index: 1; align-self: center; }
.cfk-home-spotlight__intro :is(h1,.cfk-prose,.cfk-prose p) { color: var(--cfk-color-white); }
.cfk-home-spotlight__intro .cfk-prose { max-inline-size: 65ch; }
.cfk-home-spotlight__actions { --ptn-cluster-gap: 1rem; margin-block-end:var(--ptn-space-xl); }
.cfk-home-spotlight__visual { display:flex;justify-content:center;align-items:center;min-inline-size:0;min-block-size:0;align-self:center;inline-size:100%; }
/* Top and Bottom describe the section edges, not the padded grid cell.
   Restore the pre-height-cap edge anchoring without filling/cropping the image:
   the wrapper stretches through the row, while its contained image stays
   naturally proportioned and is pinned to the relevant vertical edge. */
.cfk-home-spotlight__visual--top {
  align-self:stretch;
  align-items:flex-start;
  margin-block-start:calc(-1 * var(--cfk-home-section-space));
}
.cfk-home-spotlight__visual--bottom {
  align-self:stretch;
  align-items:flex-end;
  /* Place the artwork through the reserved wave area. The matching mask on
     the whole bottom-aligned section trims it to the exact wave contour. */
  margin-block-end:calc(-1 * (var(--cfk-home-section-space) + var(--cfk-wave-height)));
}
/* Natural replaced-element dimensions: max-width and max-height limit the image
   proportionally; neither the grid nor the flex wrapper stretches its box.
   This works with the ORIGINAL attachment, not a potentially cropped preset. */
.cfk-home-spotlight__image { display:block;flex:0 1 auto;inline-size:auto;block-size:auto;min-inline-size:0;max-inline-size:100%;max-block-size:28rem;margin-inline:auto;object-fit:contain;aspect-ratio:auto;border-radius:var(--cfk-radius-lg); }
.cfk-home-spotlight__visual--top .cfk-home-spotlight__image,.cfk-home-spotlight__visual--bottom .cfk-home-spotlight__image { border-radius:0; }


/* Bottom-anchored foreground artwork shares the EXACT SAME full-width wave edge
   as the hero background. Mask the SECTION, not the image column: applying the
   SVG directly to the narrower image wrapper would distort the wave's curve.
   Remove the inner background's mask so the edge is only antialiased once.
   Image sizing/positioning stays natural, so no top/bottom cropping returns. */
@supports (mask-image: linear-gradient(#fff,#fff)) or (-webkit-mask-image: linear-gradient(#fff,#fff)) {
  .cfk-home-spotlight--image-bottom.cfk-wave-section {
    --cfk-wave-mask-height: calc(var(--cfk-wave-height) * 62.7 / 56.7);
    -webkit-mask-image: linear-gradient(#fff,#fff), url('../../images/backgrounds/section-wave-mask-v2.svg');
    mask-image: linear-gradient(#fff,#fff), url('../../images/backgrounds/section-wave-mask-v2.svg');
    -webkit-mask-size: 100% calc(100% - var(--cfk-wave-mask-height) + 1px), 100% var(--cfk-wave-mask-height);
    mask-size: 100% calc(100% - var(--cfk-wave-mask-height) + 1px), 100% var(--cfk-wave-mask-height);
    -webkit-mask-position: center top, center bottom;
    mask-position: center top, center bottom;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-composite: source-over;
    mask-composite: add;
    mask-mode: alpha;
  }
  .cfk-home-spotlight--image-bottom.cfk-wave-section > .cfk-wave-section__background {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

.cfk-home-impact { background: var(--cfk-color-pink) var(--cfk-hands-pink) center / var(--cfk-hand-background-size) no-repeat; color: var(--cfk-color-white); }
.cfk-home-impact h2 { color: inherit; }
.cfk-home-impact__video { min-inline-size: 0; inline-size: 100%; }
.cfk-home-impact__video .cfk-embed-frame { margin-block: 0; }
.cfk-home-impact__feature { grid-template-columns:minmax(0,1fr);align-items:center;min-inline-size:0; }
.cfk-home-impact__routes { min-inline-size:0; }
.cfk-home-impact__routes .cfk-compact-links { display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(min-content,1fr);gap:.75rem;list-style:none;margin:0;padding:0;--cfk-compact-link-color:var(--cfk-color-pink-dark);--cfk-compact-link-hover:var(--cfk-color-pink-hover-surface); }
.cfk-home-impact__routes .cfk-compact-links > li { display:flex;padding:.375rem;margin:0; }
.cfk-home-impact__routes .cfk-compact-links .cfk-compact-links__link { inline-size:100%;block-size:100%;padding:.25rem;gap:1rem; }
.cfk-home-impact__routes .cfk-compact-links .cfk-compact-links__link > .cfk-compact-links__media { flex:0 0 clamp(4.5rem,6vw,6rem);inline-size:clamp(4.5rem,6vw,6rem);block-size:clamp(4.5rem,6vw,6rem); }
.cfk-home-impact__routes .cfk-compact-links .cfk-compact-links__link .cfk-compact-links__title { font:700 clamp(1.35rem,2.2vw,1.75rem)/1.15 var(--cfk-font-heading); }
.cfk-home-statistics { align-items:stretch; }
.cfk-home-stat { --ptn-stack-gap:.65rem;min-inline-size:0;text-align:center;justify-content:center;padding:clamp(1rem,2.5vw,2rem);border:2px solid var(--cfk-color-green-dark);border-radius:var(--cfk-radius-lg);background:var(--cfk-color-green);color:var(--cfk-color-black); }
.cfk-home-stat__number { display:flex;align-items:center;justify-content:center;min-block-size:5rem;margin:0;font:700 clamp(2.15rem,3.5vw,3.75rem)/1.1 var(--cfk-font-heading);font-variant-numeric:tabular-nums;color:inherit; }
.cfk-home-stat__visual { display:block; }
.cfk-home-stat__value { white-space:nowrap; }
.cfk-home-stat__suffix { font-size:.65em; }
.cfk-home-stat__description { margin:0;font-size:var(--cfk-text-body);line-height:var(--cfk-leading-ui); }
@media (min-width:60em) {
  .cfk-home-impact__feature { grid-template-columns:minmax(0,2fr) minmax(0,3fr); }
  .cfk-home-impact__routes { order:1; }
  .cfk-home-impact__video { order:2; }
}
@media (min-width:75em) {
  .cfk-home-impact__feature { align-items:stretch; }
  .cfk-home-impact__video { align-self:center; }
  .cfk-home-impact__routes .cfk-compact-links { block-size:100%; }
}
@media(max-width:44.999em){.cfk-home-statistics{grid-template-columns:minmax(0,1fr)}}

.cfk-home-local { color: var(--cfk-color-white); background: var(--cfk-color-blue) var(--cfk-hands-blue) center / var(--cfk-hand-background-size) no-repeat; }
.cfk-home-local h2 { color: inherit; }
.cfk-home-local__map { max-inline-size: 16rem; }
.cfk-home-local__map svg { display: block; inline-size: 100%; block-size: auto; }
.cfk-home .teams-map .marker { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .cfk-home .teams-map.cfk-home-map-animate .marker { animation: cfk-home-marker-pop .6s both; }
  .cfk-home .teams-map.cfk-home-map-animate .marker:nth-child(3n+2) { animation-delay: .1s; }
  .cfk-home .teams-map.cfk-home-map-animate .marker:nth-child(3n) { animation-delay: .2s; }
  @keyframes cfk-home-marker-pop { from { opacity: .5; transform: translateY(-.8rem); } to { opacity: 1; transform: none; } }
}

.cfk-home-brands { --cfk-home-section-space: var(--ptn-space-xl); }
.cfk-home > .cfk-home-brands > .ptn-container.ptn-region { padding-block-end:calc(var(--cfk-home-section-space) + var(--cfk-wave-height) + var(--ptn-space-md)); }
@media (max-width: 44.999em) {
  .cfk-home-local__map { inline-size: min(55%,12rem); }
}


/* Stack at the same breakpoint as the shared 60/40 grid. Foreground artwork
   retains the page gutters and stays clear of the background-only wave. */
@media (max-width:44.999em) {
  .cfk-home-spotlight__visual--top { order:-1; }
  .cfk-home-spotlight__visual--bottom { order:2; }
}

/* The responsive cap constrains BOTH dimensions. It never masks image content. */
@supports (height: 1svh) {
  .cfk-home-spotlight__image { max-block-size:min(28rem,70svh); }
}
