.sienna-threshold {
  position: relative;
  z-index: 30;
  height: 560svh;
  background: #000;
  isolation: isolate;
}

.sienna-threshold-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 50%, rgba(35, 94, 84, .2), transparent 32%),
    radial-gradient(circle at 76% 42%, rgba(93, 69, 109, .13), transparent 34%),
    #000;
}

.sienna-threshold-stage::before,
.sienna-threshold-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sienna-threshold-stage::before {
  z-index: 0;
  opacity: var(--threshold-grid-opacity, .45);
  background:
    linear-gradient(rgba(104, 243, 238, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 191, 115, .035) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(circle at 45% 50%, #000, transparent 78%);
}

.sienna-threshold-stage::after {
  z-index: 1;
  opacity: var(--threshold-vignette-opacity, 1);
  background: radial-gradient(circle at center, transparent 38%, rgba(0, 0, 0, .76) 100%);
}

.sienna-threshold-copy {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: clamp(38px, 6vw, 112px);
  width: min(43vw, 640px);
  color: #f8edcf;
  opacity: var(--threshold-copy-opacity, 1);
  filter: blur(var(--threshold-copy-blur, 0px));
  transform: translate3d(var(--threshold-copy-shift, 0px), -50%, 0) scale(var(--threshold-copy-scale, 1));
  transform-origin: right center;
  will-change: transform, opacity, filter;
  pointer-events: none;
}

.sienna-threshold-kicker,
.sienna-threshold-signature {
  margin: 0;
  color: #68f3ee;
  font: 800 clamp(10px, .82vw, 13px)/1.4 Arial, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sienna-threshold-copy h2 {
  display: grid;
  gap: .04em;
  margin: 20px 0 24px;
  font: 400 clamp(36px, 3.8vw, 64px)/.9 Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sienna-threshold-line {
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  text-shadow: 0 0 28px rgba(230, 191, 115, .1);
}

.sienna-threshold-line::before,
.sienna-threshold-line::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.sienna-threshold-line::before {
  color: #68f3ee;
  transform: translateX(-3px);
}

.sienna-threshold-line::after {
  color: #e6bf73;
  transform: translateX(4px);
}

.sienna-threshold-stage.is-fracturing .sienna-threshold-line::before {
  animation: thresholdTextFractureA 980ms steps(2, end) infinite;
}

.sienna-threshold-stage.is-fracturing .sienna-threshold-line::after {
  animation: thresholdTextFractureB 1.27s steps(2, end) infinite reverse;
}

.sienna-threshold-line:nth-child(2)::before,
.sienna-threshold-line:nth-child(2)::after { animation-delay: -310ms !important; }
.sienna-threshold-line:nth-child(3)::before,
.sienna-threshold-line:nth-child(3)::after { animation-delay: -670ms !important; }
.sienna-threshold-line:nth-child(4)::before,
.sienna-threshold-line:nth-child(4)::after { animation-delay: -140ms !important; }
.sienna-threshold-line:nth-child(5)::before,
.sienna-threshold-line:nth-child(5)::after { animation-delay: -840ms !important; }

.sienna-threshold-signature {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(248, 237, 207, .58);
}

.sienna-threshold-signature::before {
  content: "";
  width: clamp(36px, 5vw, 78px);
  height: 1px;
  background: linear-gradient(90deg, #e6bf73, rgba(104, 243, 238, .2));
  box-shadow: 0 0 12px rgba(230, 191, 115, .34);
}

.sienna-threshold-portal {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  width: 34vw;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(230, 191, 115, var(--threshold-edge-opacity, .72));
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(104, 243, 238, calc(var(--threshold-edge-opacity, .72) * .34)),
    0 0 54px rgba(104, 243, 238, calc(var(--threshold-edge-opacity, .72) * .2)),
    0 38px 110px rgba(0, 0, 0, .82);
  transform: translate3d(8vw, 32vh, 0);
  transform-origin: center;
  will-change: width, height, transform, border-radius;
}

.sienna-threshold-portal video,
.sienna-threshold-portal-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sienna-threshold-portal video {
  z-index: 1;
  background: #000;
}

.sienna-threshold-portal-poster {
  z-index: 0;
}

.sienna-threshold-frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  opacity: var(--threshold-edge-opacity, .72);
  box-shadow:
    inset 0 0 0 8px rgba(0, 0, 0, .28),
    inset 0 0 0 9px rgba(248, 237, 207, .16),
    inset 0 0 58px rgba(104, 243, 238, .08);
}

.sienna-threshold-frame::before,
.sienna-threshold-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.sienna-threshold-frame::before {
  inset: 12px;
  border: 1px solid rgba(248, 237, 207, .22);
  clip-path: polygon(0 0, 20% 0, 20% 1px, 80% 1px, 80% 0, 100% 0, 100% 100%, 80% 100%, 80% calc(100% - 1px), 20% calc(100% - 1px), 20% 100%, 0 100%);
}

.sienna-threshold-frame::after {
  left: 0;
  right: 0;
  top: 0;
  height: 32%;
  opacity: .14;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .2), transparent);
}

.sienna-threshold-void {
  position: absolute;
  z-index: 8;
  inset: 0;
  background: #000;
  opacity: var(--threshold-void-opacity, 0);
  pointer-events: none;
}

.sienna-aftervoid {
  position: relative;
  z-index: 30;
  min-height: 150svh;
  display: grid;
  place-items: end center;
  padding: 0 24px 24svh;
  overflow: hidden;
  color: #f8edcf;
  background: #000;
}

.sienna-aftervoid-copy {
  width: min(860px, 100%);
  text-align: center;
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 1.4s ease, transform 1.4s cubic-bezier(.2, .8, .2, 1);
}

.sienna-aftervoid.is-awake .sienna-aftervoid-copy {
  opacity: 1;
  transform: translateY(0);
}

.sienna-aftervoid-copy span {
  display: block;
  margin-bottom: 18px;
  color: #68f3ee;
  font: 800 11px/1.4 Arial, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sienna-aftervoid-copy strong {
  display: block;
  font: 400 clamp(36px, 6vw, 92px)/.94 Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.sienna-portal-dominant .site-head,
.sienna-portal-dominant .swimming-fish {
  opacity: 0 !important;
  pointer-events: none !important;
}

@keyframes thresholdTextFractureA {
  0%, 78%, 100% { opacity: 0; clip-path: inset(0); }
  80% { opacity: .72; clip-path: inset(18% 0 54% 0); }
  85% { opacity: .45; clip-path: inset(62% 0 16% 0); }
  90% { opacity: 0; }
}

@keyframes thresholdTextFractureB {
  0%, 68%, 100% { opacity: 0; clip-path: inset(0); }
  70% { opacity: .56; clip-path: inset(48% 0 28% 0); }
  76% { opacity: .38; clip-path: inset(8% 0 72% 0); }
  83% { opacity: 0; }
}

@media (max-width: 760px) {
  .sienna-threshold {
    height: 470svh;
  }

  .sienna-threshold-copy {
    top: auto;
    right: auto;
    left: 9vw;
    bottom: 7svh;
    width: 82vw;
    transform: translate3d(0, var(--threshold-copy-shift, 0px), 0) scale(var(--threshold-copy-scale, 1));
    transform-origin: left bottom;
  }

  .sienna-threshold-copy h2 {
    margin: 12px 0 15px;
    font-size: clamp(24px, 7.5vw, 38px);
    line-height: .9;
  }

  .sienna-threshold-portal {
    width: 82vw;
    transform: translate3d(9vw, 16svh, 0);
  }

  .sienna-threshold-signature {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sienna-threshold {
    height: 115svh;
  }

  .sienna-threshold-stage {
    position: relative;
  }

  .sienna-threshold-portal {
    left: 5vw;
    top: 12svh;
    width: 90vw;
    height: min(72svh, 50.625vw);
    transform: none !important;
    border-radius: 0 !important;
  }

  .sienna-threshold-copy {
    display: none;
  }

  .sienna-threshold-line::before,
  .sienna-threshold-line::after {
    animation: none !important;
  }
}
