/* Gallery artwork shares its height with the screenshots at every breakpoint. */
.work-page .work-collection {
  background: var(--paper);
  padding-bottom: clamp(24px, 3vw, 48px);
  overflow: clip;
}

.work-list .work-entry {
  position: relative;
  isolation: isolate;
  align-items: center;
  padding-block: clamp(40px, 4.5vw, 72px);
  border: 0;
}

.work-list .work-entry-copy {
  padding-top: 0;
}

.work-entry-copy h2 {
  font-weight: 600;
  text-wrap: balance;
}

.work-list .work-entry-type {
  color: var(--ink);
  font-size: var(--type-sm);
  font-weight: 600;
}

.work-list .work-entry :is(.work-entry-summary, .work-entry-detail) {
  color: var(--ink);
}

.work-list .work-entry-media {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: clamp(20px, 3vw, 48px);
  background: transparent;
}

/* A low pool of reflected light grounds the paper sculpture and screen. */
.work-entry-media::after {
  content: "";
  position: absolute;
  inset: 0 -3%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 46% at 51% 47%, var(--work-image-surface), transparent),
    radial-gradient(ellipse 38% 11% at 53% 81%, rgb(36 41 47 / .10), transparent);
}

.work-entry-media::before {
  content: "";
  position: absolute;
  inset: -2% -1.5%;
  z-index: -1;
  pointer-events: none;
  background: var(--project-art, var(--work-image-surface));
  --vertical-fade: linear-gradient(to bottom, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent),
              var(--vertical-fade);
  mask-composite: intersect;
}

#bluebirds {
  --project-art:
    radial-gradient(ellipse 85% 100% at 80% 0%, transparent 58%, rgb(79 129 176 / .32) 58.2%,
      transparent 58.5% 66%, rgb(91 140 184 / .24) 66.2%, transparent 66.5% 74%,
      rgb(108 156 199 / .26) 74.2%, transparent 74.5%),
    radial-gradient(ellipse 77% 100% at 73% 40%, #e9f3fa 14%, #c3dced 55%, transparent 90%);
}

#ricorn {
  --project-art: linear-gradient(163deg,
    transparent 17%, #f2e8d9 calc(17% + 1px), #ddcbb2 47%, #fbf2df calc(47% + 1px),
    #b8a185 calc(47% + 3px), #deccb6 65%, #c3b097 76%, transparent calc(76% + 1px));
}

#joytek {
  --project-art: radial-gradient(ellipse 76% 105% at 66% 30%,
    #f1f7ed 21%, #c8ded0 46%, #9fbeb2 61%, #87a79c 66%,
    #deebe2 calc(66% + 1px), #becfc6 calc(66% + 3px), transparent calc(66% + 4px));
}

#joytek-pos {
  --project-art: linear-gradient(126deg,
    transparent 16%, #d7d1df calc(16% + 1px), #f5f1f8 48%, #aaa0b9 calc(48% + 1px),
    #d5cddf 59%, #bfb5cd 76%, transparent calc(76% + 1px));
}

#royal {
  --project-art: radial-gradient(ellipse 72% 112% at 54% 101%,
    transparent 51%, #cfb2a0 calc(51% + 1px), #f2ddd0 calc(51% + 3px), #d7b8a5 73%,
    #b68e78 83%, #efdbcb calc(83% + 1px), transparent calc(83% + 3px));
}

#sportiq {
  --project-art: linear-gradient(var(--fold-angle, 145deg),
    transparent 19%, #e6eee0 calc(19% + 1px), #cddbc6 39%, #a1b59f 54%,
    #f0f3e8 calc(54% + 1px), #91a68e calc(54% + 3px), transparent calc(54% + 4px));
}

#umrahhotels {
  --work-image-surface: #f6eedb;
  --project-art: linear-gradient(158deg,
    transparent 19%, #f3ead4 calc(19% + 1px), #ecd8a6 45%,
    #fff0bf calc(45% + 1px), #c7aa69 calc(45% + 3px),
    #e4cd93 61%, #d7bb7d 74%, transparent calc(74% + 1px));
}

#reem-digitals {
  --work-image-surface: #deeeeb;
  --project-art:
    linear-gradient(175deg, #eef8f5, #c0dfd9 3px, #a1ccc8 86%, #8ebcba) 1% 15% / 66% 45% no-repeat,
    linear-gradient(165deg, #faf2d7, #decc88) 71% 7% / 20% 25% no-repeat,
    linear-gradient(175deg, #d2ebe5, #95c3bf 3px, #6fa7a2 78%, #80b3b1) 42% 58% / 91% 55% no-repeat,
    linear-gradient(90deg, #bdddd7, #e5efde) 89% 92% / 57% 23% no-repeat;
}

#jannat-tours {
  --work-image-surface: #e6eaf7;
  --project-art:
    radial-gradient(circle, rgb(54 77 128 / .27) 1.2px, transparent 1.8px) 0 14% / 13px 12px repeat-x,
    radial-gradient(circle, rgb(54 77 128 / .27) 1.2px, transparent 1.8px) 0 86% / 13px 12px repeat-x,
    linear-gradient(116deg, #e7edf9 5%, #c2cdec 36%, #dce2f4 60%, #f1d5ce 94%);
}

#jannat-tours .work-entry-media::before {
  clip-path: polygon(5% 9%, 95% 9%, 98% 14%, 98% 42%, 95% 46%, 95% 54%, 98% 58%,
    98% 86%, 95% 91%, 5% 91%, 2% 86%, 2% 58%, 5% 54%, 5% 46%, 2% 42%, 2% 14%);
}

#akurana-ugyg {
  --work-image-surface: #f1dedc;
  --project-art:
    repeating-linear-gradient(35deg, transparent 0 26px, rgb(120 54 70 / .16) 27px 28px),
    repeating-linear-gradient(145deg, transparent 0 26px, rgb(147 110 55 / .18) 27px 28px),
    radial-gradient(ellipse at 42% 48%, #dcaeb9, #ecd0d2 48%, #f1e0ce 79%, #f4eadd);
}

#akurana-ugyg .work-entry-media::before {
  clip-path: ellipse(62% 46% at 52% 50%);
}

.work-list .work-shot:not(.bluebirds-shot, .work-device, [inert]) {
  box-shadow: 0 2px 4px rgb(19 31 42 / .09),
              0 16px 28px -13px rgb(19 31 42 / .24);
}

/* The copy column is half a gallery plus the grid gap. Only the inline
   bounds change. The fold keeps its height as it fades across the type. */
@media (min-width: 801px) {
  .work-entry {
    --art-reach: calc(-50% - clamp(48px, 7.5vw, 120px));
    --fade-direction: to left;
  }

  .work-entry:nth-child(even) {
    --fade-direction: to right;
  }

  .work-entry-copy {
    position: relative;
    z-index: 1;
  }

  .work-entry-media::before {
    mask-image:
      linear-gradient(var(--fade-direction), transparent, black 6% 51%, rgb(0 0 0 / .70) 66%, rgb(0 0 0 / .36) 81%, transparent),
      var(--vertical-fade);
  }

  .work-entry:nth-child(odd) .work-entry-media::before { left: var(--art-reach); }
  .work-entry:nth-child(even) .work-entry-media::before { right: var(--art-reach); }

  /* A shallower diagonal lets the sage fold pass behind the SportIQ title. */
  #sportiq { --fold-angle: 166deg; }
}
@media (forced-colors: active) {
  .work-entry-media::before,
  .work-entry-media::after { display: none; }
}
