.gl {
  position: relative;
  isolation: isolate;
}

.gl::before {
  content: "";
  position: absolute;
  inset: -40px -20% auto;
  z-index: -1;
  height: 900px;
  background:
    radial-gradient(30% 40% at 30% 30%, rgba(255, 154, 60, calc(0.2 * var(--glow-strength) / 0.62)), transparent 70%),
    radial-gradient(30% 40% at 70% 34%, rgba(255, 90, 122, calc(0.16 * var(--glow-strength) / 0.62)), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.gl-hero {
  padding: 40px 0 0;
}

.gl-stage {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 2;
  border-radius: 28px;
  background: #050508;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 60px 160px -70px rgba(255, 154, 60, calc(0.9 * var(--glow-strength) / 0.62)),
    0 40px 120px -60px rgba(255, 90, 122, calc(0.7 * var(--glow-strength) / 0.62));
  overflow: hidden;
}

.gl-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gl-layer[data-layer="1"] {
  opacity: 1;
  transition: none;
}

.gl-stage[data-step="16"] .gl-layer[data-layer="16"],
.gl-stage[data-step="final"] .gl-layer[data-layer="16"],
.gl-stage[data-step="final"] .gl-layer[data-layer="final"] {
  opacity: 1;
}

.gl-stage:not([data-resolving]) .gl-layer[data-layer="final"] {
  opacity: 1;
}

.gl-bar {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 44px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  color: rgba(245, 243, 239, 0.72);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.gl-status {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  min-width: 9.5ch;
}

.gl-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff9a3c;
  box-shadow: 0 0 10px #ff9a3c;
  animation: gl-pulse 1.1s ease-in-out infinite;
}

.gl-status[data-state="finished"] i {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
  animation: none;
}

.gl-status b,
.gl-count b {
  color: rgba(245, 243, 239, 0.95);
  font-weight: 400;
}

.gl-meter {
  position: relative;
  flex: 1 1 auto;
  height: 2px;
  min-width: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.gl-meter span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #ff9a3c, #ff5a7a 50%, #a855f7);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}

.gl-status[data-state="finished"] ~ .gl-meter span {
  background: #4ade80;
}

.gl-count {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.gl-count abbr {
  display: none;
  text-decoration: none;
}

.gl-count b {
  display: inline-block;
  min-width: 5ch;
  text-align: right;
}

.gl-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 48px 64px;
  padding: 72px 0 40px;
}

.gl-intro h1 {
  font-size: clamp(48px, 7vw, 104px);
}

.gl-lede {
  max-width: 520px;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
}

.gl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.gl-actions-centre {
  justify-content: center;
}

.gl-mat {
  padding: 120px 0;
}

.gl-mat-in {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto 1fr;
  grid-template-areas:
    "stage ."
    "stage copy"
    "stage chips";
  column-gap: 72px;
}

.gl-mat-stage {
  grid-area: stage;
}

.gl-mat-copy {
  grid-area: copy;
}

.gl-mat-stage {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  border-radius: 28px;
  background: #d9d6d1;
  box-shadow: inset 0 0 0 1px var(--line), 0 50px 120px -60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.gl-mat-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gl-mat-stage img.is-on {
  opacity: 1;
}

.gl-mat-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: calc(100% - 36px);
  padding: 10px 16px 11px;
  border-radius: 16px;
  background: rgba(10, 10, 14, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  color: rgba(245, 243, 239, 0.7);
  font-size: 13px;
  line-height: 1.35;
}

.gl-mat-tag b {
  color: #f5f3ef;
  font-size: 15px;
  font-weight: 400;
}

.gl-mat-lede {
  max-width: 500px;
  font-size: 17px;
  line-height: 1.6;
}

.gl-chips {
  grid-area: chips;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  margin-top: 32px;
}

.gl-chips button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 15px 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--pane-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  overflow: hidden;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.gl-chips button:hover {
  background: var(--pane);
  color: var(--ink);
}

.gl-chips button i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.gl-chips button[aria-checked="true"] {
  background: var(--ink);
  box-shadow: none;
  color: var(--bg);
}

.gl-chips button::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 5px;
  left: 14px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--bg);
  opacity: 0;
  transform-origin: left;
  transform: scaleX(0);
}

.gl-chips[data-auto] button[aria-checked="true"]::after {
  opacity: 0.35;
  animation: gl-tick var(--tick, 2800ms) linear forwards;
}

.gl-work {
  padding: 40px 0 120px;
}

.gl-work-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.gl-work-head p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.6;
}

.gl-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.gl-tile {
  --ratio: 1;
  position: relative;
  grid-column: span 4;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--pane);
  box-shadow: inset 0 0 0 1px var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
  overflow: hidden;
}

.gl-tile[data-size="wide"] {
  --ratio: 3 / 2;
  grid-column: span 8;
}

.gl-tile[data-size="tall"] {
  --ratio: 3 / 4;
}

.gl-tile[data-size="half"] {
  --ratio: 4 / 3;
  grid-column: span 6;
}

.gl-tile[data-size="portrait"] {
  --ratio: 4 / 5;
}

.gl-tile img {
  width: 100%;
  height: 100%;
  aspect-ratio: var(--ratio);
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gl-tile:hover img {
  transform: scale(1.025);
}

.gl-tile-cap {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 48px 20px 18px;
  background: linear-gradient(180deg, transparent, rgba(5, 5, 8, 0.72));
  color: #f5f3ef;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.gl-tile:hover .gl-tile-cap,
.gl-tile:focus-visible .gl-tile-cap {
  opacity: 1;
  transform: none;
}

.gl-tile-cap b {
  display: block;
  font-size: 17px;
  font-weight: 400;
}

.gl-tile-cap span {
  color: rgba(245, 243, 239, 0.66);
  font-size: 13.5px;
}

.gl-tile-cap em {
  flex: none;
  color: rgba(245, 243, 239, 0.66);
  font-family: var(--mono);
  font-size: 11.5px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.gl-end {
  padding: 40px 0 140px;
}

.gl-end-in {
  text-align: center;
}

.gl-end-in p {
  max-width: 520px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.6;
}

.gl-box {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}

.gl-box[hidden] {
  display: none;
}

.gl-box-scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 5, 0.86);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  animation: gl-fade 260ms ease;
}

.gl-box-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 20px 28px;
  width: min(1480px, calc(100vw - 48px));
  height: calc(100dvh - 48px);
  color: #f5f3ef;
  animation: gl-rise 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gl-box-view {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template: 100% / 100%;
  place-items: center;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.gl-box-view img {
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 120px -40px rgba(0, 0, 0, 0.8);
  -webkit-user-drag: none;
}

.gl-box-noisy {
  clip-path: inset(0 calc(100% - var(--wipe, 0%)) 0 0 round 18px 0 0 18px);
  pointer-events: none;
}

.gl-wipe {
  position: absolute;
  top: var(--top, 0);
  bottom: var(--top, 0);
  left: calc(var(--left, 0px) + var(--wide, 0px) * var(--w, 0));
  width: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.gl-box-view.is-wiping .gl-wipe {
  opacity: 1;
}

.gl-wipe::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.5px;
  width: 1px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}

.gl-wipe span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: rgba(10, 10, 14, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.gl-wipe span::before,
.gl-wipe span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border: solid #f5f3ef;
  border-width: 0 0 1.5px 1.5px;
}

.gl-wipe span::before {
  left: 9px;
  transform: rotate(45deg);
}

.gl-wipe span::after {
  right: 9px;
  transform: rotate(-135deg);
}

.gl-wipe-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  height: 30px;
  margin: 0;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: rgba(245, 243, 239, 0.8);
  font-size: 13px;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 300ms ease;
}

.gl-box-view.is-wiping .gl-wipe-hint,
.gl-box-view.was-wiped .gl-wipe-hint {
  opacity: 0;
}

.gl-box-side {
  align-self: center;
  min-width: 0;
}

.gl-box-kicker {
  margin: 0 0 12px;
  color: rgba(245, 243, 239, 0.5);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gl-box-side h3 {
  color: #f5f3ef;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.gl-box-text {
  color: rgba(245, 243, 239, 0.72);
  font-size: 15.5px;
  line-height: 1.6;
}

.gl-box-specs {
  display: grid;
  margin: 24px 0 26px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.gl-box-specs div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.gl-box-specs div:last-child {
  box-shadow: none;
}

.gl-box-specs dt {
  color: rgba(245, 243, 239, 0.5);
}

.gl-box-specs dd {
  margin: 0;
  color: #f5f3ef;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.gl-box-open {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: #f5f3ef;
}

.gl-box-open:hover {
  background: rgba(255, 255, 255, 0.09);
}

.gl-box-open[hidden] {
  display: none;
}

.gl-box-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gl-box-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: #f5f3ef;
  cursor: pointer;
  transition: background 160ms ease;
}

.gl-box-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.gl-box-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gl-box-x {
  position: absolute;
  top: 0;
  right: 0;
}

.gl-box-pos {
  min-width: 5ch;
  color: rgba(245, 243, 239, 0.6);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

html.gl-locked,
html.gl-locked body {
  overflow: hidden;
}

@keyframes gl-pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes gl-tick {
  to {
    transform: scaleX(1);
  }
}

@keyframes gl-fade {
  from {
    opacity: 0;
  }
}

@keyframes gl-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

@media (max-width: 1080px) {
  .gl-box-in {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 16px;
    width: calc(100vw - 32px);
    height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .gl-box-view {
    height: 62dvh;
  }

  .gl-box-side {
    max-width: 640px;
  }

  .gl-box-x {
    position: static;
    order: 4;
  }
}

@media (max-width: 960px) {
  .gl-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .gl-mat-in {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "copy"
      "stage"
      "chips";
  }

  .gl-mat-copy {
    margin-bottom: 36px;
  }

  .gl-mat-stage {
    width: 100%;
    max-width: 620px;
    justify-self: center;
  }

  .gl-chips {
    justify-content: center;
    margin-top: 20px;
  }

  .gl-intro {
    padding: 52px 0 24px;
  }

  .gl-mat {
    padding: 80px 0;
  }

  .gl-tile,
  .gl-tile[data-size] {
    --ratio: 1;
    grid-column: span 6;
  }

  .gl-tile[data-size="wide"],
  .gl-tile:last-child:nth-child(even) {
    --ratio: 3 / 2;
    grid-column: span 12;
  }
}

@media (max-width: 620px) {
  .gl-hero {
    padding-top: 20px;
  }

  .gl-stage {
    aspect-ratio: 4 / 3.6;
    border-radius: 22px;
  }

  .gl-bar {
    right: 12px;
    bottom: 12px;
    left: 12px;
    gap: 12px;
    height: 40px;
    padding: 0 14px 0 12px;
    font-size: 11px;
  }

  .gl-count span {
    display: none;
  }

  .gl-count abbr {
    display: inline;
  }

  .gl-mat-stage {
    border-radius: 22px;
  }

  .gl-mat-tag {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
  }

  .gl-grid {
    gap: 12px;
  }

  .gl-tile,
  .gl-tile[data-size] {
    --ratio: var(--native);
    grid-column: span 12;
    border-radius: 18px;
  }

  .gl-tile-cap {
    opacity: 1;
    transform: none;
    padding: 40px 16px 14px;
  }

  .gl-box-specs div {
    padding: 9px 14px;
  }
}

@media (hover: none) {
  .gl-tile-cap {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gl-layer,
  .gl-mat-stage img,
  .gl-tile img,
  .gl-box-in,
  .gl-box-scrim {
    transition: none;
    animation: none;
  }

  .gl-status i,
  .gl-chips[data-auto] button[aria-checked="true"]::after {
    animation: none;
  }
}
