html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

#wall {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  will-change: transform;
}

.batch, .separator {
  position: absolute;
  top: 0;
  height: 100%;
}

.separator img {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
}

/* Start title: lettering on the wall. Bottom set by wall.js. */
.title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: rgba(40, 44, 40, 0.75);
  will-change: opacity;
}

.title-name {
  letter-spacing: 0.08em;
}

.title-source {
  margin-top: 0.4em;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

/* Frame: padding holds the moulding sides. Background shows as a thin dark joint in the mitres. */
.frame {
  position: absolute;
  box-sizing: border-box;
  box-shadow: 3px 5px 10px rgba(0, 0, 0, 0.16), 1px 1px 2px rgba(0, 0, 0, 0.18);
}

.mat {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  box-shadow: inset 2px 3px 5px rgba(0, 0, 0, 0.22);
}

/* Bevel cut of the passe-partout: top/left face away from the light. */
.mat img {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid;
  border-color: #d9d5cc #fdfcf9 #ffffff #e1ddd5;
}

.mat.no-mat img {
  border: 0;
}

/* Moulding side: strip with the outer edge on top, rotated into place by wall.js. */
.side {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

.side::before, .side::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* Light from top left. Gradients run outer edge -> inner edge.
   Top/left: outer slope faces the light. Bottom/right: inner slope does, outer is in shade. */
.top::after    { background: linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 45%, rgba(0, 0, 0, 0.10)); }
.left::after   { background: linear-gradient(rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02) 45%, rgba(0, 0, 0, 0.12)); }
.right::after  { background: linear-gradient(rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.14) 50%, rgba(0, 0, 0, 0.06)); }
.bottom::after { background: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.18) 50%, rgba(0, 0, 0, 0.08)); }

/* Profiles per style, outer edge -> inner edge: rounded edges, grooves, beads, rabbet lip. */
.black { background: #050505; }
.black .side::before {
  background: linear-gradient(rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 12%,
    rgba(255, 255, 255, 0) 86%, rgba(255, 255, 255, 0.12) 90%, rgba(0, 0, 0, 0.4));
}

.white { background: #b9b5ab; }
.white .side::before {
  background: linear-gradient(rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0) 10%,
    rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.06) 82%, rgba(255, 255, 255, 0.3) 88%, rgba(0, 0, 0, 0.18));
}

.oak { background: #4a3014; }
.oak .side::before {
  background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0) 6%, rgba(255, 255, 255, 0.10) 12%,
    rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, 0) 80%,
    rgba(0, 0, 0, 0.18) 84%, rgba(255, 255, 255, 0.10) 88%, rgba(0, 0, 0, 0.35));
}

.walnut { background: #120a04; }
.walnut .side::before {
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.10) 15%,
    rgba(255, 255, 255, 0.03) 35%, rgba(0, 0, 0, 0.08) 52%, rgba(0, 0, 0, 0.35) 57%,
    rgba(255, 210, 160, 0.14) 61%, rgba(0, 0, 0, 0) 68%,
    rgba(0, 0, 0, 0.05) 88%, rgba(0, 0, 0, 0.5));
}

.gold { background: #4d3910; }
.gold .side::before {
  background: linear-gradient(rgba(60, 35, 0, 0.45), rgba(255, 245, 200, 0.35) 8%, rgba(60, 35, 0, 0.30) 15%,
    rgba(255, 240, 190, 0.05) 22%, rgba(255, 250, 220, 0.30) 40%, rgba(80, 50, 0, 0.10) 58%,
    rgba(80, 50, 0, 0.35) 66%, rgba(255, 240, 190, 0.35) 72%, rgba(80, 50, 0, 0.25) 78%,
    rgba(255, 240, 190, 0.20) 86%, rgba(60, 35, 0, 0.5));
}

.silver { background: #55575a; }
.silver .side::before {
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.3) 20%,
    rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 80%, rgba(0, 0, 0, 0.35));
}
