/* A single orthographic projection keeps all three layers on the same axis. */
.stack-art {
  --art-progress: var(--stack-progress, .55);
  position: relative;
  width: 100%;
  height: 100%;
  min-height: min(54vw, 300px);
  overflow: hidden;
  isolation: isolate;
  container-type: size;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 47% 38%, rgba(147, 109, 61, .21), transparent 60%),
    radial-gradient(ellipse at 70% 88%, #29261e 0%, #181b18 55%, #121613 100%);
}
.stack-art > .sa-lift {
  --edge: min(53cqw, 60cqh, 355px);
  --gap: calc(min(9cqw, 10cqh) + min(10cqw, 11cqh) * var(--art-progress));
  --turn: calc(-35deg + var(--art-progress) * 9deg);
  --tilt: calc(61deg - var(--art-progress) * 5deg);
  --projection: translate(-50%, -50%) rotateX(var(--tilt)) rotateZ(var(--turn));
  --depth: clamp(4px, 1.25cqw, 8px);
  position: absolute;
  inset: 0;
  transform: translateY(var(--lift, 0px));
}
.stack-art .sa-ui {
  --lift: calc(-1 * var(--gap));
  --material: linear-gradient(130deg, #403629, #70583e 38%, #ab8752 57%, #82643e 76%, #a38354);
  --edge-light: #e6c58c;
  --rim: linear-gradient(110deg, #30291e, #a18655 52%, #443720 73%, #c5a775);
  --ink: #d9c197;
}
.stack-art .sa-read {
  --material: linear-gradient(135deg, #77654c, #c3aa7e 41%, #e3c899 55%, #b7a17b 76%, #9e8965);
  --edge-light: #f2dcad;
  --rim: linear-gradient(110deg, #564b3c, #d0bd92 48%, #6e614b 71%, #dbc89c);
  --ink: #665234;
}
.stack-art .sa-sql {
  --lift: var(--gap);
  --material: linear-gradient(145deg, #282e2a, #4e544b 43%, #6d7162 55%, #484e46 77%, #303831);
  --edge-light: #acac93;
  --rim: linear-gradient(105deg, #32382f, #969585 49%, #393e35 70%, #999783);
  --ink: #cbc8a8;
}
.stack-art .sa-floor {
  width: 62%;
  height: 10%;
  position: absolute;
  left: 19%;
  top: 76%;
  border-radius: 50%;
  background: #060805;
  opacity: .7;
  filter: blur(clamp(8px, 1.7vw, 20px));
  transform: scaleX(calc(.9 + .08 * var(--art-progress)));
}
.stack-art .sa-surface,
.stack-art .sa-lift::before {
  position: absolute;
  width: var(--edge);
  height: calc(var(--edge) * .83);
  top: 50%;
  left: 50%;
  transform: var(--projection);
  border-radius: 8% / 10%;
}
.stack-art .sa-lift::before {
  content: '';
  top: calc(50% + var(--depth));
  background: var(--rim);
  box-shadow: inset 0 0 0 1px #302e23, -7px 12px 18px #07090588;
}
.stack-art .sa-surface {
  border: 1px solid var(--edge-light);
  background: var(--material);
  box-shadow: inset 1px 1px 1px #fff4cf88, inset -1px -2px 3px #16191066;
  color: var(--ink);
}
.stack-art .sa-inlay {
  position: absolute;
  inset: 6%;
  border: 1px solid currentColor;
  opacity: .36;
  border-radius: 5% / 6%;
}
.stack-art .sa-surface::before,
.stack-art .sa-surface::after {
  content: '';
  position: absolute;
  left: 8.5%;
  top: 10%;
  width: 1.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #38362d;
  box-shadow: inset 1px 1px 1px #171b16, .5px 1px 1px #e2d5b6;
}
.stack-art .sa-surface::after { inset: auto 8.5% 10% auto; }
.stack-art .sa-pins {
  position: absolute;
  right: 10%;
  bottom: 10%;
  width: 10%;
  height: 2%;
  opacity: .75;
  background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px);
}
.stack-art .sa-window {
  position: absolute;
  inset: 18% 23%;
  border-radius: 5%;
  border: 1.5px solid currentColor;
  background: linear-gradient(135deg, #4d412eaa, #4e402344);
  box-shadow: 1px 2px 0 #d7bb8055, inset 0 0 0 2px #3c352744;
}
.stack-art .sa-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  height: 19%;
  width: 100%;
  border-bottom: 1px solid;
  background: linear-gradient(100deg, #d9c09333, transparent);
}
.stack-art .sa-toolbar::after {
  content: '';
  position: absolute;
  left: 6%;
  top: 42%;
  width: 22%;
  height: 18%;
  background: repeating-linear-gradient(90deg, currentColor 0 12%, transparent 12% 27%);
}
.stack-art .sa-sidebar { position: absolute; top: 19%; bottom: 0; left: 24%; border-right: 1px solid; }
.stack-art .sa-content {
  position: absolute;
  left: 32%;
  top: 32%;
  right: 9%;
  height: 49%;
  background:
    linear-gradient(currentColor,currentColor) left top / 75% 12%,
    linear-gradient(currentColor,currentColor) left 37% / 93% 5%,
    linear-gradient(currentColor,currentColor) left 67% / 78% 5%,
    linear-gradient(currentColor,currentColor) left bottom / 52% 5%;
  background-repeat: no-repeat;
}
.stack-art .sa-track {
  position: absolute;
  inset: 48% 18% 32%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stack-art .sa-track::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: currentColor;
}
.stack-art .sa-track i {
  position: relative;
  width: 14%;
  aspect-ratio: 1;
  background: #beaa84;
  border: 2px solid currentColor;
  border-radius: 23%;
  box-shadow: inset 0 0 0 3px #b19a73, 1px 1px 0 #f4e0b3;
}
.stack-art .sa-track i:nth-child(2) { border-radius: 50%; }
.stack-art .sa-platter {
  position: absolute;
  left: 34%;
  top: 41%;
  width: 33%;
  height: 38%;
  border: 2px solid currentColor;
  border-radius: 50% / 22%;
  background: linear-gradient(110deg, #3e463d, #696e5f 55%, #464d43);
}
.stack-art .sa-platter i {
  display: block;
  height: 32%;
  border-bottom: 1px solid currentColor;
  border-radius: 0 0 48% 48%;
}
.stack-art .sa-platter i:first-child {
  height: 39%;
  margin: -1px -1px 0;
  border: 1px solid currentColor;
  border-radius: 50%;
}
#stack[data-step="0"] .stack-art .sa-ui .sa-surface,
#stack[data-step="1"] .stack-art .sa-read .sa-surface,
#stack[data-step="2"] .stack-art .sa-sql .sa-surface {
  border-color: #ffe2aa;
  box-shadow: inset 1px 1px 2px #fff5cfcc, inset -1px -2px 3px #16191066, 0 0 13px #ebbc6325;
}
@media (prefers-reduced-motion: reduce) {
  .stack-art { --art-progress: .6; }
}
