/* Keep the moving scenery visible outside the heading, with no hard edge around the text. */
:is(.hero-copy, #solucion .solutions-heading, #resultados .section-head, #video .overview-grid > div:first-child, .platform-heading, .ix-heading, .crece-header, #contacto .contact-content > div:first-child) {
  position: relative;
  isolation: isolate;
}

:is(.hero-copy, #solucion .solutions-heading, #resultados .section-head, #video .overview-grid > div:first-child, .platform-heading, .ix-heading, .crece-header, #contacto .contact-content > div:first-child)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: clamp(-44px, -5svh, -24px) clamp(-52px, -3vw, -16px);
  inset-block-end: var(--heading-haze-end, clamp(-44px, -5svh, -24px));
  pointer-events: none;
  background: var(--heading-haze, #f2f6fa59);
  backdrop-filter: blur(8px) saturate(.74);
  -webkit-backdrop-filter: blur(8px) saturate(.74);
  filter: none;
  mask-image: linear-gradient(180deg, transparent, #000 27% 69%, transparent),
    linear-gradient(90deg, transparent, #000 9% 91%, transparent);
  mask-composite: intersect;
}

.hero-copy { --heading-haze-end: 48px; }

:is(#video .overview-grid, #contacto .contact-content) > div:first-child {
  --heading-haze: #19304716;
}

:is(.ix-heading, .crece-header) {
  --heading-haze: #f5f8fba0;
}

/* Allow the outgoing camera to travel beyond each seam under the incoming fade. */
.dawn-stage {
  inset-block-end: calc(-1 * clamp(104px, 16svh, 142px));
  mask-image: linear-gradient(180deg, transparent, #000 180px, #000 calc(100% - 290px),
    #000e calc(100% - 240px), #0008 calc(100% - 150px), #0002 calc(100% - 62px), transparent);
}

.ix-scene {
  inset-block-end: -88px;
  opacity: .476;
  mask-image: linear-gradient(180deg, transparent, #0002 min(4svh, 34px),
    #0008 min(10svh, 80px), #000 min(20svh, 162px) calc(100% - 205px),
    #0009 calc(100% - 122px), transparent);
}

.ix-scene-camera img { filter: saturate(.75); }

.method-background {
  opacity: .7395;
  inset-block-end: calc(-1 * clamp(124px, 19svh, 165px));
  mask-image: linear-gradient(180deg, transparent, #0002 min(6svh, 48px),
    #000 min(21svh, 165px) calc(100% - 225px), #000d calc(100% - 178px),
    #0006 calc(100% - 92px), #0002 calc(100% - 40px), transparent);
}

.method-background-camera { filter: saturate(.76); }

.capability-landscape {
  opacity: .595;
  mask-image: linear-gradient(180deg, transparent min(5svh, 42px),
    #0001 min(10svh, 83px), #0005 min(15svh, 125px), #000b min(22svh, 185px),
    #000 min(30svh, 242px) calc(100% - 68px), transparent);
}

.capability-city { filter: blur(var(--city-focus, 0px)) saturate(.68); }

/* The bright horizon passes through the cut before the new architecture resolves. */
:is(.ix-chapter, .capability-chapter)::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(-1 * var(--seam-overlap)) 0 auto;
  height: clamp(180px, 27svh, 250px);
  pointer-events: none;
  background: radial-gradient(ellipse at var(--seam-light) 48%, #fffaf0a0, #edf3f740 62%, transparent 86%);
  backdrop-filter: blur(13px) saturate(.7);
  mask-image: linear-gradient(180deg, transparent, #0004 18%, #000 47%, #0009 68%, #0002 86%, transparent);
}

.ix-chapter { --seam-overlap: 92px; --seam-light: 32%; }
.capability-chapter { --seam-overlap: 58px; --seam-light: 64%; }

@media (prefers-reduced-motion: reduce) {
  .dawn-stage, .ix-scene, .method-background { inset-block-end: 0; }
  .capability-city { filter: saturate(.68); }
  :is(.ix-chapter, .capability-chapter)::after { content: none; }
}
