/* Marketing Pustaka section. The poster and camera share the stack baseline. */
.connected-work-head.knowledge-os-heading {
  padding: 100px var(--ic-edge, clamp(24px, 5vw, 72px)) 60px;
  text-align: center;
}
.connected-work-head.knowledge-os-heading h2 {
  font: 400 clamp(32px, 4.3vw, 58px)/1.12 Geist, Arial, sans-serif;
  letter-spacing: -.045em;
}
.connected-work-head.knowledge-os-heading > p {
  max-width: 760px;
  margin: 22px auto 0;
  justify-self: center;
  color: #6a6c65;
  font: 400 17px/1.65 Geist, Arial, sans-serif;
  text-wrap: pretty;
}

.knowledge-os {
  position: relative;
  --kos-end-hold-ratio: .28;
  height: calc(250svh + 100svh * var(--kos-end-hold-ratio));
  background: #171717;
  color: #fff;
  font-family: Geist, Arial, sans-serif;
  scroll-margin-top: 0;
  overflow-anchor: none;
}
.knowledge-os * { box-sizing: border-box; }
.kos-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at center, #292929, #171717 74%);
}
.kos-layout {
  position: absolute;
  inset: clamp(88px, 13svh, 112px) max(24px, calc((100% - 1480px) / 2)) clamp(20px, 6svh, 52px);
  container-type: size;
  --kos-plate: min(51vw, 108cqh, calc(100cqw - 410px), 840px);
  --kos-model-gutter: 28px;
  --kos-model-width: calc(var(--kos-plate) + var(--kos-model-gutter));
  --kos-stack-base: 66%;
  --kos-card-gap: clamp(18px, 3vw, 42px);
  --kos-drop-distance: 112px;
  --kos-drop-duration: 450ms;
  --kos-reveal: .36s cubic-bezier(.16, 1, .3, 1);
}
.kos-model {
  position: absolute;
  inset: 0 auto 0 50%;
  width: var(--kos-model-width);
  transform: translateX(-50%);
  filter: grayscale(1);
}
.kos-poster,
.kos-canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.kos-poster { transition: opacity .24s ease; }
.kos-poster img {
  --kos-poster-opacity: .69;
  /* Layer renders share the same canvas and baseline. */
  --kos-art-offset: -64.5%;
  position: absolute;
  top: var(--kos-stack-base);
  left: 50%;
  width: calc(var(--kos-plate) * 1.989);
  max-width: none;
  height: auto;
  opacity: var(--kos-poster-opacity);
  transform: translate(-50%, var(--kos-art-offset));
  transition: opacity var(--kos-reveal);
}
.kos-poster img.is-active { --kos-poster-opacity: 1; }
.knowledge-os.is-sequenced .kos-poster img:not(.is-revealed) {
  opacity: 0;
}
.knowledge-os.is-sequenced .kos-poster img.is-revealed {
  animation: kos-layer-drop var(--kos-drop-duration) linear;
}
@keyframes kos-layer-drop {
  0% {
    transform: translate(-50%, calc(var(--kos-art-offset) - min(var(--kos-drop-distance), 17cqh)));
    opacity: 0;
    animation-timing-function: cubic-bezier(.45, 0, .8, .55);
  }
  22% { opacity: var(--kos-poster-opacity); }
  82%, 100% { transform: translate(-50%, var(--kos-art-offset)); }
  91% { transform: translate(-50%, calc(var(--kos-art-offset) - 4px)); }
}
.kos-canvas { opacity: 0; transition: opacity .24s ease; }
.knowledge-os.is-webgl-ready .kos-canvas { opacity: 1; }
.knowledge-os.is-webgl-ready .kos-poster { opacity: 0; }
.knowledge-os.is-over-stack .kos-stage { cursor: pointer; }

.kos-layers {
  position: absolute;
  inset: 15% 0 12%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--kos-model-width) minmax(0, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.kos-layer {
  grid-row: calc(5 - var(--kos-step));
  width: min(292px, calc(100% - var(--kos-card-gap)));
  border-radius: 12px;
  background: #202020;
  box-shadow: inset 0 0 0 1px #ffffff19;
  pointer-events: auto;
  transition: opacity var(--kos-reveal), transform var(--kos-reveal), background .24s ease, box-shadow .24s ease;
}
.knowledge-os.is-sequenced .kos-layer:not(.is-revealed) {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
.kos-layer:nth-child(1) { --kos-step: 1; }
.kos-layer:nth-child(2) { --kos-step: 2; }
.kos-layer:nth-child(3) { --kos-step: 3; }
.kos-layer:nth-child(4) { --kos-step: 4; }
.kos-layer:nth-child(odd) {
  grid-column: 3;
  justify-self: start;
  margin-inline-start: var(--kos-card-gap);
}
.kos-layer:nth-child(even) {
  grid-column: 1;
  justify-self: end;
  margin-inline-end: var(--kos-card-gap);
}
.knowledge-os .kos-layer.is-active {
  background: linear-gradient(105deg, #2d2d2d, #232323);
  box-shadow: inset 0 0 0 1px #ffffff45;
}
.kos-toggle {
  appearance: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  margin: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kos-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.kos-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border: 1px solid #ffffff36;
  border-radius: 50%;
  color: #ddd;
  font: 500 10px/1 Geist, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  transition: background .24s ease, color .24s ease;
}
.kos-layer.is-active .kos-index { background: #f1f1f1; color: #171717; }
.kos-label {
  display: block;
  color: #f4f4f4;
  font: 500 15px/1.3 Geist, Arial, sans-serif;
  letter-spacing: -.015em;
}
.kos-description {
  display: block;
  margin-top: 4px;
  color: #bfbfbf;
  font: 400 12.5px/1.42 Geist, Arial, sans-serif;
  text-wrap: pretty;
}
.kos-description strong { color: #ededed; font-weight: 600; }
.kos-layer.is-active .kos-description { color: #e1e1e1; }
.kos-skip {
  position: absolute;
  left: 24px;
  bottom: 12px;
  padding: 12px 16px;
  border-radius: 24px;
  background: #252525;
  color: #fff;
  font-size: 13px;
  transform: translateX(-150%);
}
.kos-skip:focus-visible { transform: none; outline: 2px solid #fff; outline-offset: -4px; }
.connected-work:has(.knowledge-os) > .source-chat { padding-top: 100px; }

@media (max-width: 1250px) {
  .kos-layers { inset: 8% 0; }
  .kos-toggle { row-gap: 5px; }
  .kos-toggle > span:last-child { display: contents; }
  .kos-label { align-self: center; }
  .kos-description { grid-column: 1 / -1; margin-top: 0; }
}

@media (max-width: 760px) {
  .connected-work-head.knowledge-os-heading { padding: 64px 24px 36px; }
  .connected-work-head.knowledge-os-heading h2 { font-size: 34px; }
  .connected-work-head.knowledge-os-heading > p { margin-top: 18px; font-size: 14px; line-height: 1.65; }
  .knowledge-os { height: calc(190svh + 100svh * var(--kos-end-hold-ratio)); }
  .kos-layout {
    inset: 82px 14px 24px;
    --kos-plate: min(43cqw, 35cqh, calc(100cqw - 188px), 216px);
    --kos-model-gutter: 18px;
    --kos-stack-base: 53%;
    --kos-card-gap: 14px;
    --kos-drop-distance: 88px;
  }
  .kos-model { left: 0; transform: none; }
  .kos-layers { inset: 0; grid-template-columns: var(--kos-model-width) minmax(0, 1fr); }
  .kos-layer:nth-child(n) {
    grid-row: var(--kos-step);
    grid-column: 2;
    justify-self: start;
    width: calc(100% - var(--kos-card-gap));
    margin-inline: var(--kos-card-gap) 0;
  }
  .kos-toggle { gap: 5px 7px; padding: 9px; }
  .kos-index { width: 20px; height: 20px; font-size: 9px; }
  .kos-label { font-size: 14px; }
  .kos-description { font-size: 12px; }
  .connected-work:has(.knowledge-os) > .source-chat { padding-top: 64px; }
}

@media (max-width: 760px) and (max-height: 839px), (max-width: 360px), (max-height: 639px), (prefers-reduced-motion: reduce) {
  .knowledge-os { height: auto; }
  .kos-stage { position: relative; height: max(720px, 100svh); }
}

@media (max-width: 760px) and (max-height: 839px), (max-width: 360px), (max-height: 639px) {
  .kos-stage { overflow: clip; }
  .kos-model {
    position: sticky;
    inset: clamp(72px, 14svh, 108px) auto auto;
    height: min(50svh, 280px);
    margin-inline: auto;
    transform: none;
    --kos-stack-base: 62%;
  }
  .kos-layers { inset: 0; }
  .kos-layer { grid-row: var(--kos-step); }

  @media (max-width: 760px) {
    .kos-stage { min-height: 880px; }
    .kos-model { margin-inline: 0; }
  }
}

@media (min-width: 761px) and (max-height: 639px) {
  .kos-layout { --kos-plate: min(51vw, 69svh, calc(100cqw - 410px), 416px); }
  .kos-model { height: min(64svh, 360px); }
}

@media (prefers-reduced-motion: reduce) {
  .knowledge-os *, .knowledge-os *::before, .knowledge-os *::after { transition: none; animation: none; }
}
