.section04-story {
  --section04-line-2-opacity: 0;
  --section04-line-3-opacity: 0;
  position: relative;
  height: 600svh;
}

.section04-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: min(42rem, 100svh);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(17, 20, 22, 0.026) 1px, transparent 1px) 0 0 / 25vw 100%,
    radial-gradient(circle at 84% 76%, rgba(255, 255, 255, 0.7), transparent 33%),
    var(--page);
}

.section04-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
}

.section04-copy {
  position: absolute;
  z-index: 20;
  top: calc(var(--header-height) + clamp(1.25rem, 3vh, 2.5rem));
  right: var(--gutter);
  left: var(--gutter);
  min-height: clamp(12rem, 26vh, 18rem);
  pointer-events: none;
}

.section04-beat {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  opacity: var(--section04-beat-opacity, 0);
  transform: translateY(var(--section04-beat-shift, 0));
  transition: opacity 360ms ease-out, transform 360ms ease-out;
  will-change: opacity, transform;
}

.section04-beat:first-child {
  --section04-beat-opacity: 1;
}

.section04-thesis {
  display: grid;
  gap: clamp(0.22rem, 0.62vh, 0.44rem);
  max-width: 100%;
  margin: 0;
  font-size: clamp(2.5rem, 3.3125vw, 4.3125rem);
  font-weight: 420;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: pretty;
}

.section04-beat[data-section04-beat="1"] .section04-thesis,
.section04-beat[data-section04-beat="2"] .section04-thesis,
.section04-beat[data-section04-beat="3"] .section04-thesis {
  font-size: clamp(2.25rem, 2.55vw, 3.35rem);
}

.section04-thesis span {
  display: block;
}

.section04-thesis sup {
  margin-left: 0.08em;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.34em;
  font-weight: 620;
  line-height: 0;
  vertical-align: super;
}

.section04-thesis span:nth-child(2) {
  opacity: var(--section04-line-2-opacity);
}

.section04-thesis span:nth-child(3) {
  opacity: var(--section04-line-3-opacity);
}

.section04-visuals {
  position: absolute;
  z-index: 10;
  top: clamp(22rem, 44.5vh, 29rem);
  right: var(--gutter);
  bottom: max(
    clamp(2.8rem, 5.5vh, 4.5rem),
    calc(var(--viewport-footer-rail-height) + var(--viewport-footer-art-gap))
  );
  left: var(--gutter);
  min-height: 15rem;
}

.section04-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  margin: 0;
  border-top: 0.5px solid color-mix(in srgb, var(--ink) 24%, transparent);
  background: color-mix(in srgb, #f5f5f7 88%, var(--page));
  opacity: var(--section04-scene-opacity, 0);
  transform: translateY(var(--section04-scene-shift, 0));
  transition: opacity 420ms ease-out, transform 420ms ease-out;
  pointer-events: none;
  will-change: opacity, transform;
}

.section04-scene:first-child {
  --section04-scene-opacity: 1;
}

.section04-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  filter: saturate(0.76) contrast(1.025) brightness(1.015);
  user-select: none;
}

.section04-scene--filter {
  border-top-color: color-mix(in srgb, var(--ink) 15%, transparent);
  background: var(--page);
}

.section04-scene--origin {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 2fr) minmax(0, 0.6fr);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(0.8rem, 1.35vw, 1.35rem);
  align-items: center;
  padding: clamp(1rem, 2.25vh, 1.75rem) clamp(1.25rem, 5vw, 5rem)
    clamp(3.1rem, 6.5vh, 4.25rem);
  background: color-mix(in srgb, #fff 82%, var(--page));
}

.section04-origin-note {
  position: absolute;
  z-index: 3;
  bottom: 0.78rem;
  left: clamp(1.25rem, 5vw, 5rem);
  margin: 0;
  color: var(--muted);
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.66rem, 0.72vw, 0.82rem);
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.section04-origin-note a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

.section04-origin-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.section04-origin-panel a {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.section04-origin-panel a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 0.35rem;
}

.section04-origin-panel:first-of-type a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.section04-scene--origin .section04-origin-panel:first-of-type img {
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  border: 0.5px solid color-mix(in srgb, var(--ink) 28%, #e7dece);
  background: color-mix(in srgb, #efe8da 72%, var(--page));
}

html[data-section04-state="1"] .section04-scene--origin {
  pointer-events: auto;
}

.section04-scene--origin .section04-origin-panel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: none;
}

.section04-scene--origin .section04-origin-panel--pipeline img {
  height: auto;
  max-height: 100%;
}

.section04-scene--filter img {
  object-fit: cover;
  object-position: center;
  filter: none;
}

.section04-filter-composite {
  position: absolute;
  inset: 0;
}

.section04-filter-layer,
.section04-filter-scatter {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.section04-filter-layer {
  object-fit: cover;
  object-position: center;
  filter: none;
}

.section04-scene--filter img.section04-filter-layer--blue {
  z-index: 1;
  filter:
    var(--signal-blue-treatment)
    drop-shadow(0.38px 0 0 var(--blue))
    drop-shadow(-0.38px 0 0 var(--blue));
}

.section04-scene--filter img.section04-filter-layer--orange {
  z-index: 2;
  filter:
    var(--signal-orange-treatment)
    drop-shadow(0.34px 0 0 var(--orange))
    drop-shadow(-0.34px 0 0 var(--orange));
}

.section04-filter-layer--gate {
  z-index: 4;
}

.section04-filter-scatter {
  z-index: 3;
  background: #ff7a00;
  filter:
    var(--signal-orange-treatment)
    drop-shadow(0.34px 0 0 var(--orange))
    drop-shadow(-0.34px 0 0 var(--orange));
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: cover;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: cover;
}

.section04-filter-scatter--inside {
  mask-image: url("./webv2-assets/section-4/filter/orange-scatter-inside-gate.png");
  -webkit-mask-image: url("./webv2-assets/section-4/filter/orange-scatter-inside-gate.png");
}

.section04-filter-scatter--exit {
  mask-image: url("./webv2-assets/section-4/filter/orange-scatter.png");
  -webkit-mask-image: url("./webv2-assets/section-4/filter/orange-scatter.png");
}

.section04-scene--delivery {
  background: #1b282f;
}

.section04-scene--delivery img {
  object-fit: contain;
  object-position: center;
  filter: none;
}

.section04-progress .section-progress__chit {
  top: calc(var(--section04-progress, 0) * (100% - 3.2rem));
}

.section04-progress--safe-harbor {
  --section04-progress: 1;
  cursor: default;
  pointer-events: none;
}

.section04-progress:focus-visible {
  outline: none;
}

.section04-progress:focus-visible .section-progress__track {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 58%, var(--page));
}

html[data-section04-progress-dragging="true"] .section04-progress {
  cursor: grabbing;
}

html[data-section04-progress-dragging="true"] .section04-progress__chit {
  transition: none;
}

.section04-scroll-cue {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  animation: none;
}

html[data-section04-active="true"][data-section04-has-more="true"] .section04-scroll-cue {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  animation: opening-scroll-cue-breathe 5.6s ease-in-out infinite;
}

@media (min-width: 761px) and (max-width: 54rem) and (hover: none),
  (min-width: 761px) and (max-width: 54rem) and (pointer: coarse) {
  /* This band still uses the desktop scene height, so six wrapped lines need a tablet cap. */
  .section04-thesis,
  .section04-beat[data-section04-beat="1"] .section04-thesis,
  .section04-beat[data-section04-beat="2"] .section04-thesis,
  .section04-beat[data-section04-beat="3"] .section04-thesis {
    font-size: 2rem;
  }

  .section04-scene--filter img.section04-filter-layer--gate {
    object-position: right center;
  }

  .section04-filter-scatter {
    mask-position: right center;
    -webkit-mask-position: right center;
  }
}

@media (max-width: 760px) and (hover: none), (max-width: 760px) and (pointer: coarse) {
  .section04-story {
    height: 640svh;
  }

  .section04-sticky {
    min-height: min(38rem, 100svh);
    background: var(--page);
  }

  .section04-copy {
    top: calc(var(--header-height) + 0.9rem);
    right: 1rem;
    left: 1rem;
    min-height: 17rem;
  }

  .section04-thesis {
    gap: 0.45rem;
    font-size: 2rem;
    line-height: 1;
  }

  .section04-beat[data-section04-beat="1"] .section04-thesis,
  .section04-beat[data-section04-beat="2"] .section04-thesis,
  .section04-beat[data-section04-beat="3"] .section04-thesis {
    font-size: clamp(1.82rem, 7.2vw, 2rem);
  }

  .section04-visuals {
    top: clamp(23rem, 56vh, 31rem);
    right: 1rem;
    bottom: max(
      3.75rem,
      calc(var(--viewport-footer-rail-height) + var(--viewport-footer-art-gap))
    );
    left: 1rem;
  }

  .section04-scene img {
    object-fit: contain;
    object-position: center;
  }

  .section04-scene--delivery img {
    object-fit: contain;
    object-position: center;
  }

  .section04-scene--origin {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 0.75rem;
    padding: 0.85rem 0.85rem 3.4rem;
  }

  .section04-scene--origin .section04-origin-panel:first-of-type {
    grid-column: 1;
    grid-row: 2;
  }

  .section04-origin-panel--pipeline {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .section04-scene--origin .section04-origin-panel:last-of-type {
    grid-column: 2;
    grid-row: 2;
  }

  .section04-origin-note {
    bottom: 0.7rem;
    left: 0.85rem;
    max-width: calc(100% - 1.7rem);
  }

  .section04-scroll-cue {
    right: 1rem;
    bottom: calc((var(--viewport-footer-rail-height) - 1.75rem) / 2);
  }
}

@media (min-width: 900px) and (max-height: 760px) {
  .section04-copy {
    top: calc(var(--header-height) + 0.8rem);
  }

  .section04-thesis {
    font-size: clamp(2.1rem, 2.45vw, 3.1rem);
  }

  .section04-visuals {
    top: clamp(19rem, 45vh, 22rem);
    bottom: calc(var(--viewport-footer-rail-height) + var(--viewport-footer-art-gap));
  }
}

@media (prefers-reduced-motion: reduce) {
  .section04-beat,
  .section04-scene {
    transition: none;
  }

  .section04-scroll-cue {
    animation: none !important;
  }
}
