/* CASCODE — closing manifesto and global film grain */
.cascode-site-grain {
  position: fixed;
  z-index: 2147483000;
  inset: -40%;
  width: 180%;
  height: 180%;
  pointer-events: none;
  opacity: .173;
  mix-blend-mode: soft-light;
  background-image: url("/cascode-film-grain.png");
  background-repeat: repeat;
  background-size: 310px 278px;
  filter: contrast(1.65) brightness(1.28);
  image-rendering: auto;
  animation: cascodeGrain .18s steps(2, end) infinite;
  will-change: transform, background-position;
}

@keyframes cascodeGrain {
  0% { transform: translate3d(-3%, 2%, 0); background-position: 0 0; }
  20% { transform: translate3d(2%, -3%, 0); background-position: 133px 202px; }
  40% { transform: translate3d(-1%, 3%, 0); background-position: -91px 67px; }
  60% { transform: translate3d(3%, 1%, 0); background-position: 241px -116px; }
  80% { transform: translate3d(-2%, -2%, 0); background-position: -177px 139px; }
  100% { transform: translate3d(1%, 3%, 0); background-position: 56px -204px; }
}

.cascode-manifesto {
  position: relative;
  z-index: 3;
  min-height: 230vh;
  overflow: clip;
  color: #f4f2ec;
  background: #05080c;
}

.cascode-manifesto__sticky {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 50% 50%, rgba(93,231,197,.09), transparent 42%),
    linear-gradient(180deg, rgba(5,8,12,.94), rgba(5,8,12,.82));
}

.cascode-manifesto__sticky.is-pinned {
  position: fixed;
  top: 0;
  bottom: auto;
}

.cascode-manifesto__sticky.is-after {
  top: auto;
  bottom: 0;
}

.cascode-manifesto__top,
.cascode-manifesto__bottom {
  position: absolute;
  z-index: 2;
  left: clamp(28px, 7vw, 104px);
  right: clamp(28px, 7vw, 104px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #778289;
  font: 10px/1 var(--font-mono, monospace);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.cascode-manifesto__top {
  top: clamp(100px, 13vh, 130px);
}

.cascode-manifesto__top b,
.cascode-manifesto__bottom b {
  color: #5de7c5;
  font-weight: 500;
}

.cascode-manifesto__bottom {
  bottom: clamp(30px, 5vh, 54px);
  padding-top: 17px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.cascode-manifesto__rows {
  display: grid;
  gap: clamp(5px, 1.2vh, 14px);
  transform: rotate(-2.2deg) scale(1.04);
}

.cascode-manifesto__row {
  --manifest-x: 0px;
  display: flex;
  width: max-content;
  transform: translate3d(var(--manifest-x), 0, 0);
  will-change: transform;
}

.cascode-manifesto__row span {
  display: block;
  padding-right: .22em;
  color: #f4f2ec;
  font-family: var(--font-sans, sans-serif);
  font-size: clamp(72px, 10.2vw, 158px);
  font-weight: 760;
  line-height: .82;
  letter-spacing: -.065em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cascode-manifesto__row:nth-child(2) span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(244,242,236,.72);
}

.cascode-manifesto__row:nth-child(3) span {
  color: #5de7c5;
}

.cascode-manifesto__cross {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(58vw, 760px);
  aspect-ratio: 1;
  border: 1px solid rgba(93,231,197,.1);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(var(--manifest-orbit, .7));
  opacity: var(--manifest-orbit-opacity, .4);
  will-change: transform, opacity;
}

.cascode-manifesto__cross::before,
.cascode-manifesto__cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(93,231,197,.15);
  transform: translate(-50%, -50%);
}

.cascode-manifesto__cross::before { width: 140%; height: 1px; }
.cascode-manifesto__cross::after { width: 1px; height: 140%; }

@media (max-width: 860px) {
  .cascode-site-grain {
    opacity: .127;
    background-size: 270px 242px;
    filter: contrast(1.5) brightness(1.2);
  }

  .cascode-manifesto {
    min-height: 210vh;
  }

  .cascode-manifesto__sticky {
    min-height: 100svh;
  }

  .cascode-manifesto__top,
  .cascode-manifesto__bottom {
    left: 20px;
    right: 20px;
  }

  .cascode-manifesto__top {
    top: 104px;
  }

  .cascode-manifesto__top span:last-child,
  .cascode-manifesto__bottom span:first-child {
    display: none;
  }

  .cascode-manifesto__rows {
    gap: 12px;
    transform: rotate(-3.5deg) scale(1.08);
  }

  .cascode-manifesto__row span {
    font-size: clamp(62px, 21vw, 92px);
    line-height: .86;
  }

  .cascode-manifesto__cross {
    width: 110vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cascode-site-grain { animation: none; }
}
