/* Photograph behind the whole painting page; procedural clouds float above it. */
body.page-works {
  background: #9dcced url('../images/works/painting-sky.jpg') center / cover fixed no-repeat;
}
body.page-works .site-header,
body.page-works .site-footer { background: transparent; }

/* Large, softly layered clouds: no glossy outlines or synchronized pulses. */
.page-works .works-cloud {
  width: clamp(330px, 36vw, 580px); height: 220px;
  opacity: .82; filter: blur(6px); transform: translateZ(0);
  will-change: transform;
  animation: organic-cloud-drift var(--cloud-duration, 48s) ease-in-out infinite alternate;
  animation-delay: var(--cloud-delay, -16s);
}
.page-works .works-cloud span {
  border-radius: 48% 57% 43% 52%; box-shadow: none;
  background:
    radial-gradient(ellipse at 36% 24%, #fff 0%, #f4fbfff0 20%, transparent 52%),
    radial-gradient(ellipse at 64% 65%, #6eacd695 0%, #91c5e860 30%, transparent 62%),
    radial-gradient(ellipse at 48% 48%, #b3dcf5f2 0%, #a1cfeedf 34%, #bddff09c 54%, #d9eff646 68%, transparent 82%);
  /* Keep the filtered cloud texture still; move only the whole cloud layer. */
  animation: none;
}
.page-works .works-cloud-a { left: -8vw; top: 86px; }
.page-works .works-cloud-b { right: -10vw; top: 160px; }
.page-works .works-cloud-c { left: 5vw; bottom: -35px; }
.page-works .works-cloud-d { right: 7vw; bottom: 60px; }
.page-works .works-cloud-e { left: 30vw; top: 30px; opacity: .82; }
.page-works .works-cloud-f { right: 24vw; top: 280px; opacity: .62; }
.page-works .works-cloud-d, .page-works .works-cloud-f,
.page-works .works-cloud-h { display: none; }
.page-works .works-cloud-g { left: -12vw; top: 380px; }
.page-works .works-cloud-h { right: -14vw; bottom: -60px; }
body.page-works::before, body.page-works::after {
  /* The sky photograph and cloud layers already supply the atmosphere. */
  display: none; animation: none;
}
@keyframes organic-cloud-drift {
  0% { transform: translate3d(-70px, 18px, 0) rotate(-3deg); }
  45% { transform: translate3d(15px, -22px, 0) rotate(2deg); }
  100% { transform: translate3d(var(--cloud-drift, 150px), 28px, 0) rotate(-1deg); }
}
@keyframes organic-cloud-breathe {
  from { transform: translate(-14px, 8px) scale(.96); }
  to { transform: translate(var(--puff-drift, 24px), -12px) scale(1.1); }
}
/* Animated strips occupy a stable stage, so the page bottom never follows hover. */
.works-gallery-stage { position: relative; width: 100%; }
.page-works .works-gallery-stage .strips {
  position: absolute; top: 0; left: 0; width: 100%; margin-bottom: 0;
  z-index: 1;
}
.page-works .works-gallery-stage .works-static-shadow {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; user-select: none; opacity: .72;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, #000a 90%, #0008 100%);
  mask-image: linear-gradient(to bottom, #000 65%, #000a 90%, #0008 100%);
}
.works-static-shadow canvas { display: block; width: 100%; height: 100%; }
/* Hover must not relayout every strip or rescale the image backgrounds. */
.page-works .strips .strip {
  --rest-height: clamp(100px, 12.5svh, 160px);
  height: var(--rest-height);
  transform: translateZ(0);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.page-works .strips .strip:first-child { --rest-height: clamp(256px, 32svh, 410px); }
.page-works .strips .strip:nth-child(4) { --rest-height: clamp(118px, 14.5svh, 185px); }
.page-works .strips .strip:last-child { --rest-height: clamp(200px, 25svh, 330px); }
.page-works .strips .strip:hover { height: var(--rest-height); }
.page-works .strip-bg { filter: none; }
@media (hover: hover) and (pointer: fine) {
  .page-works .strips .strip:hover,
  .page-works .strips .strip:focus-visible { transform: translate3d(0, -2px, 0) scale(1.018); }
}
@media (prefers-reduced-motion: reduce) {
  .page-works .strips .strip { transition: none; }
  .page-works .strips .strip:hover,
  .page-works .strips .strip:focus-visible { transform: none; }
}
.works-purchase {
  position: relative; z-index: 2; display: flex;
  align-items: center; justify-content: space-between;
  gap: 16px 24px; width: auto;
  margin: 22px calc(var(--pad-x) - clamp(70px, 9vw, 180px)) 12px;
  color: #428dbb; text-align: left;
  font-family: var(--sans-2); font-size: 12px; font-weight: 400;
  letter-spacing: .18em; text-transform: uppercase;
}
.works-purchase p {
  margin: 0; font: inherit; letter-spacing: inherit; line-height: 1.6;
}
.works-contact-button {
  flex-shrink: 0; display: inline-flex; align-items: center; padding: 0;
  border: 0; border-radius: 0;
  background: transparent; color: #428dbb; text-decoration: none;
  font: inherit; line-height: 1.6; letter-spacing: inherit;
  transition: color .2s ease;
}
.works-contact-button:hover { color: #2877a7; }
.works-contact-button:focus-visible { outline: 2px solid #29465c; outline-offset: 4px; }
@media (max-width: 720px) {
  .works-purchase { width: auto; gap: 16px; margin: 18px 4px 12px; }
  .page-works .works-cloud { width: 340px; height: 180px; filter: blur(5px); opacity: .74; }
}
@media (prefers-reduced-motion: reduce) {
  .page-works .works-cloud, .page-works .works-cloud span,
  body.page-works::before, body.page-works::after { animation: none; }
}
