:root {
  color-scheme: light;
  --room-paper: #eee6d8;
  --room-ink: #392f28;
  --room-muted: #695b4d;
  --room-line: #b9a891;
  --copper: #81543c;
  --index: ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--room-ink); background: var(--room-paper); font: 15px/1.55 var(--sans); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button, input { font: inherit; }
button { color: inherit; }
.skip-link { position: absolute; z-index: 3; top: .5rem; left: .5rem; background: var(--room-paper); padding: .5rem 1rem; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

.masthead {
  padding: 1rem clamp(1rem, 4.35vw, 5rem);
  border-bottom: 1px solid var(--room-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.studio { display: inline-flex; align-items: center; gap: .7rem; font: 21px/1 var(--serif); text-decoration: none; }
.masthead > :last-child { font-size: 13px; }
.room {
  width: min(100%, 1600px);
  margin-inline: auto;
  padding: 2.8rem clamp(1rem, 4.35vw, 5rem) 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 26.4%);
  column-gap: clamp(1.75rem, 4.5vw, 5rem);
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "painting intro" "painting lamp" "notes notes";
}
.introduction { grid-area: intro; align-self: end; padding: 1.25rem 0 1.5rem; }
.eyebrow { color: var(--room-muted); font: 11px/1.3 var(--index); letter-spacing: .12em; text-transform: uppercase; }
.introduction .eyebrow { display: flex; align-items: center; gap: .55rem; margin: 0 0 1rem; }
.introduction .eyebrow span { width: .52rem; height: .52rem; border: 1px solid var(--copper); border-radius: 50%; background: #b98258; }
h1 { margin: 0; font: 300 clamp(2.8rem, 5.15vw, 5rem)/.94 var(--serif); letter-spacing: -.055em; }
h1 em { display: block; color: var(--copper); }
.lede { margin: 1.35rem 0 0; max-width: 26ch; }

.painting { grid-area: painting; margin: 0; min-width: 0; }
.wall {
  --light-x: 24%;
  --light-y: 21%;
  --shadow-x: 13px;
  --shadow-y: 15px;
  --beam: .53;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  background: #99806c;
  background-image:
    radial-gradient(ellipse at var(--light-x) var(--light-y), rgb(255 226 180 / var(--beam)), transparent 69%),
    radial-gradient(ellipse at 50% 44%, #c3ae97 6%, #ae947c 53%, #7f6655 100%);
  aspect-ratio: 822 / 820;
}
.wall::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("plaster.svg");
  mix-blend-mode: multiply;
  opacity: .46;
}
.wall::after {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 8rem rgb(71 43 26 / .29);
}
#cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
#mount {
  width: 59.8%;
  position: relative;
  transform-origin: 59% 64%;
}
#mount canvas {
  display: block;
  width: 100%;
  height: auto;
  filter:
    drop-shadow(var(--shadow-x) var(--shadow-y) 14px rgb(47 28 15 / .38))
    drop-shadow(0 3px 3px rgb(46 28 13 / .36))
    drop-shadow(0 1px 0 rgb(47 28 24 / .71));
}
.wall[data-detail="true"] #mount { transform: scale(2.18); }
figcaption { display: flex; justify-content: space-between; gap: .7rem; padding-top: .8rem; color: var(--room-muted); font-size: 13px; }
figcaption i { font: italic 21px/1 var(--serif); color: var(--room-ink); }
.caption-separator { padding-inline: .3rem; color: var(--room-line); }
#plate-label { font: 11px/1.55 var(--index); text-transform: uppercase; letter-spacing: .04em; text-align: right; }

.desk { grid-area: lamp; }
.controls { border: 0; border-top: 1px solid var(--room-line); margin: 0; padding: 0; min-width: 0; }
.controls legend { padding: 0 .75rem 0 0; font: 400 24px/1.15 var(--serif); }
.desk-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem; align-items: center; margin: .15rem 0 .45rem; }
.desk-top p { color: var(--room-muted); font-size: 13px; max-width: 21ch; }
.dial { display: block; fill: none; stroke: var(--room-line); }
.dial-oval { stroke: var(--copper); stroke-width: 1; }
#dial-hand { stroke: var(--copper); stroke-dasharray: 1 3; }
#dial-lamp { fill: var(--copper); stroke: var(--room-paper); stroke-width: 1; }
.dial[data-source="true"] #dial-lamp, .dial[data-source="true"] #dial-hand { opacity: 0; }
.presets { display: flex; flex-wrap: wrap; gap: .38rem; }
button {
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--room-line);
  padding: .5rem .58rem;
  min-height: 40px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color .15s, color .15s;
}
button:hover { background: #e5d6c2; }
button[aria-pressed="true"] { background: var(--room-ink); color: var(--room-paper); border-color: var(--room-ink); }
button:disabled { opacity: .65; cursor: default; }
button span[aria-hidden="true"] { font-size: 15px; line-height: 0; }
.setting { display: grid; grid-template-columns: auto auto; align-items: baseline; margin-top: 1rem; gap: 0 .5rem; }
.setting label { font-size: 13px; }
.setting output { text-align: right; color: var(--copper); font: 12px/1.5 var(--index); }
.setting input { grid-column: 1 / -1; display: block; width: 100%; height: 28px; margin: 0; accent-color: var(--copper); cursor: pointer; }
.scale { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--room-muted); font: 9px/1.6 var(--index); text-transform: uppercase; }
.close-look { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--room-line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem; }
.close-look a { color: var(--room-muted); font-size: 12px; }
#renderer-note { font-size: 13px; }
#renderer-note:empty { display: none; }
.notes { grid-area: notes; display: flex; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--room-line); margin-top: 2.5rem; padding-top: 1rem; color: var(--room-muted); font-size: 13px; }
.notes nav { display: flex; flex-wrap: wrap; align-content: flex-start; gap: .15rem 1rem; }
.notes nav p { width: 100%; }
.notes p { margin: 0 0 .55rem; }
.notes a { display: inline-block; }

@media (max-width: 840px) {
  .room {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "intro" "painting" "lamp" "notes";
    padding-top: 1rem;
    max-width: 690px;
  }
  .introduction { padding-top: .6rem; }
  h1 em { display: inline; }
  .lede { max-width: 34ch; margin-top: .7rem; }
  .desk { margin-top: 1.4rem; }
}
@media (max-width: 450px) {
  .notes { flex-direction: column; gap: 1.2rem; }
  figcaption { font-size: 11px; }
  figcaption i { font-size: 18px; }
  #plate-label { font-size: 10px; }
  .wall::after { box-shadow: inset 0 0 3rem rgb(71 43 26 / .24); }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
