.visualisations {
  position: relative;
  overflow: hidden;
  padding: clamp(110px, 13vw, 190px) clamp(24px, 6vw, 105px);
  color: #fff;
  background:
    radial-gradient(circle at 78% 35%, rgba(100, 212, 157, .09), transparent 34%),
    #0d271c;
}
.visualisations::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}
.viz-intro,
.viz-stage,
.viz-synthesis { position: relative; z-index: 1; }
.viz-intro {
  display: grid;
  grid-template-columns: minmax(190px, .55fr) 1.45fr;
  gap: 2rem 8vw;
  margin-bottom: clamp(70px, 8vw, 120px);
}
.viz-intro .eyebrow { color: var(--green-bright); }
.viz-intro h2 {
  grid-column: 2;
  max-width: 15ch;
  margin: -12px 0 20px;
  font: 400 clamp(3rem, 5.4vw, 6rem) / 1.02 var(--serif);
  letter-spacing: -.045em;
}
.viz-intro h2 em { color: var(--green-bright); font-style: italic; }
.viz-intro > p:last-child {
  grid-column: 2;
  max-width: 60ch;
  color: rgba(255,255,255,.58);
  font-size: 1.08rem;
  line-height: 1.7;
}

.viz-stage {
  display: grid;
  grid-template-columns: minmax(285px, .58fr) minmax(0, 1.42fr);
  gap: clamp(32px, 5vw, 82px);
  align-items: center;
}
.viz-label {
  margin: 0 0 14px;
  color: rgba(255,255,255,.4);
  font: 400 .66rem var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.viz-tabs {
  display: grid;
  margin-bottom: 48px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.viz-tabs button {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 2px 10px;
  padding: 18px 8px;
  color: rgba(255,255,255,.46);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
  cursor: pointer;
  transition: color .2s ease, padding-left .28s ease, background .2s ease;
}
.viz-tabs button > span {
  grid-row: 1 / 3;
  padding-top: 3px;
  color: rgba(100,212,157,.55);
  font: 400 .67rem var(--mono);
}
.viz-tabs button b { font: 500 1rem var(--serif); }
.viz-tabs button small { font-size: .73rem; }
.viz-tabs button:hover,
.viz-tabs button:focus-visible,
.viz-tabs button.active {
  padding-left: 16px;
  color: #fff;
  background: rgba(255,255,255,.055);
}
.viz-tabs button.active { box-shadow: inset 3px 0 var(--green-bright); }
.viz-tabs button.active > span { color: var(--green-bright); }
.viz-story > p:first-child {
  margin-bottom: 11px;
  color: var(--green-bright);
  font: 400 .67rem var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.viz-story h3 {
  max-width: 14ch;
  margin-bottom: 18px;
  font: 500 clamp(1.8rem, 2.7vw, 3rem) / 1.1 var(--serif);
  letter-spacing: -.025em;
}
.viz-story > p:not(:first-child) {
  max-width: 47ch;
  color: rgba(255,255,255,.58);
  line-height: 1.65;
}
.viz-story ul { margin: 26px 0 0; padding: 0; list-style: none; }
.viz-story li {
  padding: 9px 0;
  color: rgba(255,255,255,.78);
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem;
}
.viz-story li::before { margin-right: 9px; color: var(--green-bright); content: "↳"; }

.viz-window {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #fcfbf8;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 13px;
  box-shadow: 0 45px 110px rgba(0,0,0,.42);
  transform: perspective(1600px) rotateY(-2deg) rotateX(1deg);
  transition: transform .65s cubic-bezier(.2,.8,.2,1), box-shadow .65s ease;
}
.viz-stage:hover .viz-window {
  box-shadow: 0 55px 130px rgba(0,0,0,.5);
  transform: perspective(1600px) rotateY(0) rotateX(0) translateY(-4px);
}
.viz-window-bar {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 17px;
  color: #536066;
  background: #f5f4ef;
  border-bottom: 1px solid #dfe3df;
}
.viz-window-bar > span {
  width: 8px;
  height: 8px;
  background: #ccd2ce;
  border-radius: 50%;
}
.viz-window-bar > span:first-child { background: var(--green); }
.viz-window-bar p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 auto;
  font: 400 .61rem var(--mono);
  letter-spacing: .04em;
}
.viz-window-bar p i {
  width: 6px;
  height: 6px;
  background: #1d6b4a;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #e4efe8;
}
.viz-window-bar b { color: var(--green); font: 400 .61rem var(--mono); }
.viz-screen {
  position: relative;
  aspect-ratio: 1.86;
  overflow: hidden;
  background: #f5f4ef;
}
.viz-screen img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: left top;
  transition: opacity .22s ease, transform .8s cubic-bezier(.18,.85,.25,1), filter .22s ease;
}
.viz-stage.changing .viz-screen img {
  opacity: .16;
  filter: blur(2px);
  transform: scale(1.035);
}
.viz-reticle {
  position: absolute;
  z-index: 2;
  left: var(--x);
  top: var(--y);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(100,212,157,.9);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(31,90,60,.15), 0 0 28px rgba(100,212,157,.25);
  transform: translate(-50%, -50%);
  transition: left .7s cubic-bezier(.2,.8,.2,1), top .7s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
}
.viz-reticle::before,
.viz-reticle::after {
  position: absolute;
  content: "";
  background: var(--green-bright);
}
.viz-reticle::before { left: 50%; top: -9px; width: 1px; height: 68px; }
.viz-reticle::after { top: 50%; left: -9px; width: 68px; height: 1px; }
.viz-reticle i {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 50%;
}
.viz-reticle i:last-child { inset: 20px; background: var(--green-bright); border: 0; }
.viz-stage.changing .viz-reticle { opacity: 0; }
.viz-callout {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  width: min(320px, 42%);
  padding: 15px 17px;
  color: #fff;
  background: rgba(18,52,38,.95);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 7px;
  box-shadow: 0 16px 38px rgba(18,34,28,.26);
  backdrop-filter: blur(9px);
  transition: opacity .2s ease, transform .36s ease;
}
.viz-stage.changing .viz-callout { opacity: 0; transform: translateY(10px); }
.viz-callout span {
  display: block;
  margin-bottom: 5px;
  color: var(--green-bright);
  font: 400 .58rem var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.viz-callout b { display: block; font-size: .75rem; line-height: 1.45; }
.viz-window figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  color: #46585f;
  background: #fcfbf8;
}
.viz-window figcaption > div { display: flex; gap: 20px; }
.viz-window figcaption span { font-size: .64rem; }
.viz-window figcaption span b { margin-right: 4px; color: #1f5a3c; font: 600 .83rem var(--serif); }
.viz-window figcaption small { color: #93a2a6; font: 400 .54rem var(--mono); }

.viz-synthesis {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: clamp(18px, 3vw, 46px);
  margin-top: clamp(80px, 9vw, 130px);
  padding-top: 34px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.viz-synthesis article { display: grid; grid-template-columns: 42px 1fr; gap: 12px; }
.viz-synthesis article > span { color: var(--green-bright); font: 400 .68rem var(--mono); }
.viz-synthesis article b { display: block; margin-bottom: 6px; font: 500 1.18rem var(--serif); }
.viz-synthesis article p { margin: 0; color: rgba(255,255,255,.48); font-size: .78rem; line-height: 1.5; }
.viz-synthesis > i { color: rgba(100,212,157,.5); font-style: normal; }

@media (max-width: 1050px) {
  .viz-intro { grid-template-columns: 1fr; }
  .viz-intro .eyebrow,
  .viz-intro h2,
  .viz-intro > p:last-child { grid-column: 1; }
  .viz-intro h2 { margin-top: 0; }
  .viz-stage { grid-template-columns: 1fr; }
  .viz-sidebar { display: grid; grid-template-columns: .75fr 1.25fr; gap: 36px; }
  .viz-label { grid-column: 1 / -1; margin-bottom: -24px; }
  .viz-tabs { margin-bottom: 0; }
  .viz-window { transform: none; }
  .viz-stage:hover .viz-window { transform: translateY(-3px); }
}

@media (max-width: 720px) {
  .visualisations { padding-right: 20px; padding-left: 20px; }
  .viz-intro h2 { font-size: clamp(2.7rem, 13vw, 4rem); }
  .viz-sidebar { display: block; }
  .viz-label { margin-bottom: 12px; }
  .viz-tabs { margin-bottom: 34px; }
  .viz-window-bar { height: 39px; }
  .viz-window-bar p { display: none; }
  .viz-reticle { width: 35px; height: 35px; }
  .viz-reticle::before { top: -6px; height: 47px; }
  .viz-reticle::after { left: -6px; width: 47px; }
  .viz-reticle i { inset: 6px; }
  .viz-reticle i:last-child { inset: 13px; }
  .viz-callout { right: 8px; bottom: 8px; width: calc(100% - 16px); padding: 10px 12px; }
  .viz-callout b { font-size: .65rem; }
  .viz-window figcaption { align-items: flex-start; flex-direction: column; }
  .viz-window figcaption > div { flex-wrap: wrap; gap: 7px 14px; }
  .viz-synthesis { grid-template-columns: 1fr; }
  .viz-synthesis > i { transform: rotate(90deg); justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .viz-window,
  .viz-screen img,
  .viz-reticle,
  .viz-callout,
  .viz-tabs button { transition: none; }
}
