:root {
  --sheet: #f4ede0;
  --type: #252a28;
  --quiet: #5c5850;
  --rule: #bdb3a4;
  --mark: #945640;
}

* { box-sizing: border-box; }
html, body { background: var(--sheet); color: var(--type); }
body { min-width: 0; }
a, h1, h2, h3, p { color: inherit; }
a:hover { color: var(--mark); border-color: currentColor; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--mark); outline-offset: 4px; }
[hidden] { display: none !important; }
.eyebrow {
  color: var(--quiet);
  font: 11px/1.5 var(--font-mono);
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.masthead {
  width: min(1420px, calc(100% - 96px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 25px 0 18px;
  border-bottom: 1px solid var(--rule);
}
.wordmark { font-family: var(--font-serif); font-size: 25px; line-height: 1.1; width: max-content; }
.masthead-centre { text-align: center; }
.masthead > :last-child { text-align: right; }

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr);
  align-items: center;
  gap: clamp(34px, 5.3vw, 88px);
  width: min(1420px, calc(100% - 96px));
  margin: 26px auto 56px;
}

.installation { margin: 0; align-self: start; }
.wall {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 640px;
  padding: 53px 35px 65px;
  background:
    radial-gradient(ellipse at 45% 28%, #fff5db98, transparent 63%),
    linear-gradient(122deg, #d7c5a9 1%, #e8dbc6 50%, #b9a48c 100%);
}
.wall::before {
  position: absolute;
  inset: 0;
  content: '';
  z-index: -1;
  background:
    radial-gradient(ellipse at 27% 20%, #fef9e6a1, transparent 50%),
    linear-gradient(118deg, transparent 49%, #5a443e24 82%, #61504d32 100%),
    url('wall-grain.svg');
  opacity: .83;
}
.wall::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 61%;
  aspect-ratio: .75;
  transform: translate(8%, 4%);
  background: radial-gradient(ellipse, #fce2b764, transparent 64%);
  filter: blur(19px);
}

.lightbox {
  position: relative;
  width: min(100%, 376px);
  padding: 13px;
  background: linear-gradient(148deg, #564a3f 0%, #1e201e 52%, #302923);
  border: 1px solid #746454;
  border-right-color: #37322c;
  border-bottom-color: #26231e;
  box-shadow:
    1px 1px 0 #564739, 2px 2px 0 #514333, 3px 3px 0 #4b4032, 4px 4px 0 #43382d,
    5px 5px 0 #42362c, 6px 6px 0 #392f27, 7px 7px 0 #352d24,
    10px 16px 15px #39282071, 24px 35px 54px #49362b64,
    inset 1px 1px 0 #bcab8c66, inset -1px -1px 0 #151412;
}
.glass {
  position: relative;
  overflow: hidden;
  border: 1px solid #827765;
  border-right-color: #62584a;
  border-bottom-color: #665d4e;
}
.glass::after {
  position: absolute;
  content: '';
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(123deg, #fff8e324 0%, transparent 39%, transparent 76%, #fff2e416 100%),
    linear-gradient(119deg, transparent 13%, #fffaef14 17%, transparent 26%);
  box-shadow: inset 1px 1px 3px #fff6dc70, inset -1px -2px 5px #110d0c4d;
}
#panel {
  background: #26241e;
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 592 / 794;
}
figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--quiet);
  font: 11px/1.5 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}

.intro { max-width: 406px; }
.plate-label { display: flex; align-items: center; gap: 9px; }
.mark { width: 7px; height: 7px; background: var(--mark); border-radius: 50%; }
h1 { font-size: clamp(65px, 8.3vw, 142px); line-height: .82; letter-spacing: -.065em; margin: 25px 0 24px -4px; }
h1 em { font-weight: 300; }
.intro-source { font-size: 17px; }
.description { color: var(--quiet); max-width: 33ch; margin: 0 0 28px; }
.viewer { border-block: 1px solid var(--rule); padding: 16px 0 20px; }
.instrument { display: flex; align-items: center; gap: 15px; }
.angle-dial { width: 88px; height: 88px; flex: none; }
.angle-dial svg { display: block; fill: none; stroke: #a19382; }
.dial-inner { stroke-dasharray: 1.5 4.2; }
.dial-ticks { stroke-width: 1.2; }
.rear-axis { stroke-dasharray: 3 2; }
.front-axis { stroke: var(--mark); stroke-width: 2.4; }
.dial-pin { stroke: var(--sheet); fill: var(--mark); }
#angle-readout { display: block; font: 38px/.99 var(--font-serif); font-variant-numeric: tabular-nums; }
.state { color: var(--quiet); font-size: 13px; margin: 3px 0 0; }
#angle { display: block; margin: 18px 0 1px; width: 100%; min-height: 24px; accent-color: var(--mark); }
.range-scale {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  color: var(--quiet);
  font: 10px/1.5 var(--font-mono);
}
.presets { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 18px; }
.presets button {
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--type);
  font: 12px/1.2 var(--font-mono);
  min-width: 45px;
  padding: 9px;
  cursor: pointer;
}
.presets button:hover { border-color: var(--mark); }
.presets button[aria-pressed='true'] { border-color: var(--type); background: var(--type); color: var(--sheet); }
.presets button:disabled { cursor: default; }
#swatch-angle { align-self: center; margin-inline-start: 7px; }
#remove { margin-left: auto; }
.folio-note { margin: 16px 0 0; }

.details { width: min(1260px, calc(100% - 96px)); margin: auto; }
.detail { border-top: 1px solid var(--rule); padding: 38px 0 48px; }
.detail-heading { margin-bottom: 18px; }
.detail-heading p { margin-bottom: 4px; }
h2 { font-size: clamp(36px, 4vw, 59px); }
.detail > p { max-width: 70ch; color: var(--quiet); }
.stills, .swatches { display: grid; gap: 14px; }
.stills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stills a { display: block; }
.stills img { display: block; width: 100%; aspect-ratio: 1400 / 900; object-fit: contain; background: #dfd2be; }
.stills span {
  display: block;
  padding: 8px 0 3px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0; }
.swatch-color {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.7;
  border: 6px solid #373029;
  box-shadow: inset 0 0 0 1px #b2a28c;
}
.swatch-color::after {
  content: '';
  position: absolute;
  height: 67%;
  width: 0;
  border-left: 1px dashed #fefaf8ac;
  transform: rotate(var(--axis));
}
.swatch-color span { position: absolute; top: 5px; left: 6px; padding: 1px 4px; background: var(--sheet); }
.swatch h3 { margin: 6px 0 0; }
.swatch p { font: 12px/1.4 var(--font-mono); color: var(--quiet); }
.origins { display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 32px; }
.origins img { display: block; width: 100%; }
.links { display: flex; gap: 12px 20px; flex-wrap: wrap; }
.links a { border-bottom-color: var(--rule); }
footer {
  width: min(1420px, calc(100% - 96px));
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 0 22px;
  border-top: 1px solid var(--rule);
  color: var(--quiet);
  font: 11px/1.5 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.plate .interactive, .plate .details, .plate footer { display: none; }
.plate .masthead { width: calc(100% - 128px); }
.plate .gallery {
  width: calc(100% - 128px);
  margin-top: 28px;
  margin-bottom: 0;
  gap: 64px;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}
.plate .wall { min-height: 686px; }
.plate .lightbox { width: min(100%, 423px); }
.plate .viewer { padding-bottom: 16px; }

@media (max-width: 900px) {
  .masthead, .gallery, .details, footer { width: calc(100% - 48px); }
  .gallery { grid-template-columns: minmax(0, 1.25fr) minmax(250px, 1fr); gap: 28px; }
  .wall { min-height: 0; padding: 45px 32px 52px; }
  .lightbox { padding: 9px; }
}

@media (max-width: 630px) {
  .masthead, .gallery, .details, footer { width: calc(100% - 36px); }
  .masthead { grid-template-columns: 1fr 1fr; padding-block: 16px; }
  .masthead-centre { display: none; }
  .gallery { display: flex; flex-direction: column; align-items: stretch; gap: 25px; margin: 18px auto 40px; }
  .intro { width: 100%; max-width: none; }
  .installation { width: 100%; }
  .wall { padding: 30px 38px 42px; }
  .stills { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .origins { grid-template-columns: 1fr; }
}
