/* Adjoining studio sections meet at the same graphite value. Each light pool
   lives inside its own background so it never dims text or interactive art. */
body {
  --studio-ground: #030303;
  --studio-falloff: clamp(52px, 6vw, 112px);
  --studio-edge-light: linear-gradient(to bottom,
    var(--studio-ground), transparent var(--studio-falloff),
    transparent calc(100% - var(--studio-falloff)), var(--studio-ground));
}
main > .signature {
  background: linear-gradient(#000 70%, var(--studio-ground));
}
/* Blend the steel and dust together before their layers end; keep the copy above the fade. */
main > .signature::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: var(--studio-falloff);
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom,
    transparent, color-mix(in srgb, var(--studio-ground) 12%, transparent) 24%, color-mix(in srgb, var(--studio-ground) 53%, transparent) 51%,
    color-mix(in srgb, var(--studio-ground) 90%, transparent) 76%, var(--studio-ground) 93%);
}
/* The gaps between exhibits reveal one continuous surface under the page. */
main > #works, main > #custom-assets, main > #plans, main > #care-plans {
  background: transparent;
}
#studio #ar-home-stage {
  background: var(--studio-ground);
}
/* The chamber artwork extends into its padding. Catch that light at each end
   without compositing the emblem, text or running dust layer. */
#studio #ar-home-stage::before,
#studio #ar-home-stage::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 48px;
  z-index: 2;
  pointer-events: none;
}
#studio #ar-home-stage::before {
  top: 0;
  background: linear-gradient(var(--studio-ground), transparent);
}
#studio #ar-home-stage::after {
  bottom: 0;
  background: linear-gradient(transparent, var(--studio-ground));
}
#studio.ar-portfolio .ar-project-work {
  background: var(--studio-edge-light),
    radial-gradient(ellipse at 72% 40%, #0b0b0b, transparent 65%), #040404;
}
#studio.ar-portfolio .collection-heading,
#sound.listening .score-heading {
  border-bottom: 0;
}
main > #sound.listening {
  border-block: 0;
  background: transparent;
}
main > #commission {
  background: transparent;
}
main > .closing-verses {
  background: linear-gradient(transparent, var(--studio-ground));
}
main > .closing-verses::before {
  content: none;
}
body > footer {
  background: linear-gradient(var(--studio-ground), #010101);
}

/* A tapered silver rule marks the change of section inside the graphite fade. */
main > .studio-divider {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  column-gap: 12px;
  padding-inline: max(var(--gutter),calc((100% - 1380px)/2));
  height: 18px;
  background: transparent;
  pointer-events: none;
}
.signature + .studio-divider, #studio + .studio-divider {
  background: linear-gradient(var(--studio-ground), transparent);
}
.studio-divider:has(+ #studio) {
  background: linear-gradient(transparent, var(--studio-ground));
}
.studio-divider + section { scroll-margin-block-start: 18px; }
.studio-divider-signature + section { scroll-margin-block-start: 32px; }
.studio-divider::before, .studio-divider::after {
  content: "";
  height: 5px;
  background: radial-gradient(ellipse farthest-side,
    rgb(169 172 164 / .43), rgb(136 141 137 / .21) 38%,
    rgb(117 123 120 / .06) 73%, transparent);
}
.studio-divider > span {
  display: block;
  width: 15px;
  height: 7px;
  background: linear-gradient(117deg,transparent 32%,#93918a 33% 39%,transparent 41% 57%,#6d706f 59% 65%,transparent 67%);
}
main > .studio-divider-signature { height: 32px; column-gap: 14px; }
.studio-divider-signature > img { display: block; width: 24px; height: 24px; opacity: .78; }
@media (forced-colors:active) {
  .studio-divider::before, .studio-divider::after { height: 1px; background: CanvasText; forced-color-adjust: none; }
}

/* Carry the exhibition toolbar into the first surface of the opened site. */
#demo-room[data-project="valence"] { --project-surface: #111311; }
#demo-room[data-project="vesper"] { --project-surface: #292b26; }
#demo-room[data-project="meridian"] { --project-surface: #000; --toolbar-start: #101010; }
#demo-room[data-project="northline"] { --project-surface: #0b171b; }
#demo-room[data-project="ember"] { --project-surface: #33231d; }
#demo-room[data-project="civic"] { --project-surface: #153746; }
#demo-room[data-project="signal"] { --project-surface: #101114; }
#demo-room[data-project="food"] {
  --project-surface: #eee7d5;
  --toolbar-start: #d6cdb9;
  --toolbar-ink: #302b25;
}
#demo-room[data-project] > header {
  border-bottom: 0;
  background: linear-gradient(var(--toolbar-start, #17191a), var(--project-surface) 95%);
  color: var(--toolbar-ink, #e3e3df);
}
#demo-room[data-project="food"] > header button img { filter: brightness(.2); }
#demo-room[data-project="food"] > header :focus-visible { outline-color: #504535; }
