@font-face {
  font-family: Instrument Serif;
  src: url("fonts/instrument-serif.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Instrument Sans;
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f5f0e6;
  --ink: #36291f;
  --muted: #63564a;
  --rule: #cbbdaf;
  --accent: #963e21;
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a, button, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:where(a, button, input):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.sheet { max-width: 1660px; margin: auto; padding: 0 clamp(18px, 4vw, 73px) clamp(20px, 3vw, 54px); }
.mast {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 74px; border-bottom: 1px solid var(--rule);
}
.signature { font-size: 14px; font-weight: 700; letter-spacing: .14em; }
.mast a { display: inline-flex; align-items: center; min-height: 44px; font-size: .91rem; text-underline-offset: 4px; }
.mast a:hover { color: var(--accent); }
main {
  display: grid; grid-template-columns: minmax(215px, .72fr) minmax(0, 1.9fr);
  grid-template-rows: 1fr auto; column-gap: clamp(32px, 5vw, 110px);
  padding-top: clamp(28px, 4vw, 69px); align-items: start;
}
.heading { align-self: start; padding-top: clamp(5px, 4vw, 65px); }
.eyebrow, .caption-title {
  margin: 0; font-size: .72rem; letter-spacing: .15em; font-weight: 650; text-transform: uppercase;
}
h1 {
  font: 400 clamp(5.3rem, 9.1vw, 10rem)/.9 "Instrument Serif", Georgia, serif;
  letter-spacing: -.043em; margin: .2em 0 .22em -.025em;
}
.intro { max-width: 26ch; font-size: clamp(1.04rem, 1.42vw, 1.3rem); line-height: 1.48; margin: 0; }
figure { grid-column: 2; grid-row: 1 / 3; margin: 0; min-width: 0; }
.stage {
  position: relative; isolation: isolate; width: 100%; overflow: hidden; background: #ca9977;
  aspect-ratio: 1.26;
}
.stage img, .stage canvas { position: absolute; width: 100%; height: 100%; inset: 0; display: block; }
.stage img { object-fit: cover; }
.stage canvas { opacity: 0; }
.stage[data-renderer="webgl"] canvas { opacity: 1; }
figcaption {
  display: flex; gap: 8px 20px; align-items: baseline; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--muted);
}
.caption-title { flex: none; color: var(--ink); font-size: .68rem; }
#shadow-description { font-size: .86rem; line-height: 1.38; }
.controls { padding: 24px 0 18px; width: min(100%, 360px); align-self: end; }
.time-label, .extents { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.time-label label { font-size: .96rem; font-weight: 640; }
output { color: var(--accent); font: 400 clamp(2.4rem, 4vw, 4rem)/.95 "Instrument Serif", Georgia, serif; font-variant-numeric: tabular-nums; }
input[type=range] {
  --pos: 25%; display: block; width: 100%; height: 44px; margin: 6px 0 -1px;
  accent-color: var(--accent); border-radius: 0; appearance: none; background: transparent; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, var(--accent) var(--pos), var(--rule) var(--pos)); }
input[type=range]::-moz-range-track { height: 3px; background: var(--rule); }
input[type=range]::-moz-range-progress { height: 3px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb {
  appearance: none; border: 2px solid var(--paper); border-radius: 50%; background: var(--accent);
  width: 19px; height: 19px; margin-top: -8px; box-shadow: 0 0 0 1px var(--accent);
}
input[type=range]::-moz-range-thumb { width: 15px; height: 15px; background: var(--accent); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--accent); border-radius: 50%; }
.extents { color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.presets { display: flex; gap: 3px; margin-top: 18px; }
.presets button {
  flex: 1; position: relative; min-height: 44px; padding: 7px 3px; margin: 0;
  border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--muted);
  font: 560 .88rem/1.2 "Instrument Sans", sans-serif; cursor: pointer; touch-action: manipulation;
}
.presets button:hover { color: var(--accent); }
.presets button[aria-pressed=true] { color: var(--accent); border-bottom: 3px solid var(--accent); padding-bottom: 5px; }
@media (min-width: 1650px) { .stage { max-height: 780px; } }
@media (min-width: 781px) {
  .stage { height: min(54vw, max(350px, calc(100svh - 172px)), 780px); aspect-ratio: auto; }
}
@media (max-width: 780px) {
  .sheet { padding-inline: clamp(16px, 4.5vw, 32px); }
  .mast { min-height: 56px; }
  main { grid-template-columns: 1fr; grid-template-rows: auto; padding-top: 25px; }
  .heading { padding: 0; }
  h1 { font-size: clamp(4.5rem, 11vw, 7rem); margin: .12em 0 .17em -.02em; }
  .intro { max-width: 37ch; font-size: 1rem; }
  figure { grid-column: 1; grid-row: auto; margin-top: 20px; }
  .stage { aspect-ratio: 1.38; }
  figcaption { flex-wrap: wrap; padding-block: 9px; }
  .controls { width: 100%; max-width: 600px; margin: auto; padding: 17px 0 0; }
  .presets { margin-top: 10px; }
}
@media (max-width: 490px) {
  figcaption { flex-direction: column; gap: 3px; }
  .stage { aspect-ratio: 1.23; }
}
@media (forced-colors: active) {
  input[type=range] { appearance: auto; }
  .presets button[aria-pressed=true] { border-color: Highlight; }
}

