/* Final release refinements shared by every project. Loaded after project themes. */

/* Let moving-image frames recede into their project rather than reading as boxes. */
.workShell .workItem.workVideo video{
  border: 0 !important;
  outline: 1px solid color-mix(in oklab, currentColor 13%, transparent);
  outline-offset: -1px;
  box-shadow:
    inset 0 0 0 1px color-mix(in oklab, currentColor 4%, transparent),
    0 18px 46px color-mix(in oklab, #000 18%, transparent) !important;
}

/* An immersive project selector, following the spatial language of the Saisei
   reference: atmosphere first, one clear artwork, quiet navigation. */
.workShell[data-work] .workEnd{
  width: 100%;
  max-width: none;
  margin: 0;
  gap: clamp(12px, 1.5vw, 20px);
  padding-top: 0;
  padding-bottom: clamp(30px, 5vw, 62px);
  border-top: 0;
}
.workShell .workArticle{
  padding-bottom: 0;
}
.workCarousel{
  --carousel-surface: #11110f;
  --carousel-ink: #f4efe6;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  border: 0 !important;
  border-radius: 0;
  background: var(--carousel-surface) !important;
  color: var(--carousel-ink);
  box-shadow: none !important;
}
.workShell[data-work="pumares-roots-remnants"] .workCarousel{
  --carousel-surface: #131936;
  --carousel-ink: #f4f1e9;
}
.workShell[data-work="american-textures"] .workCarousel{
  --carousel-surface: #3c0718;
  --carousel-ink: #f5edd0;
}
.workShell[data-work="representacion-cobalt"] .workCarousel{
  --carousel-surface: var(--cobalt-paper);
  --carousel-ink: var(--cobalt-ink);
}
.workShell[data-work="representacion-cobalt"] .workSlide .slideBg img{
  filter: saturate(.7) brightness(.88) contrast(1.02) !important;
  opacity: .12 !important;
}
.workShell[data-work="representacion-cobalt"] .workSlide .slideBg::before{
  background: radial-gradient(circle at 50% 46%, transparent 0 16%, rgba(248, 244, 236, .42) 54%, var(--cobalt-paper) 112%) !important;
}
.workShell[data-work="representacion-cobalt"] .workSlide .slideBg::after{
  background: linear-gradient(180deg, rgba(248, 244, 236, .34), transparent 25%, transparent 55%, var(--cobalt-paper) 103%) !important;
}
.workShell[data-work="representacion-cobalt"] .workSlide figure{
  box-shadow: 0 28px 70px rgba(13, 36, 88, .14);
}
.workShell[data-work="representacion-cobalt"] .workPager--end{
  color: var(--cobalt-ink);
}
.workShell[data-work="diffractive-flora"] .workCarousel{
  --carousel-surface: #080908;
  --carousel-ink: #f4f1df;
}
.workSlide{
  min-height: clamp(640px, 86svh, 880px);
  padding: clamp(78px, 9vh, 112px) clamp(24px, 4vw, 54px) clamp(112px, 13vh, 136px);
  color: var(--carousel-ink);
  box-sizing: border-box;
}
.workSlide .slideBg img{
  filter: saturate(.72) brightness(.48) contrast(1.08) !important;
  opacity: .42 !important;
  transform: scale(1.045);
}
.workSlide .slideBg::before{
  background:
    radial-gradient(circle at 50% 46%, transparent 0 18%, color-mix(in oklab, var(--carousel-surface) 42%, transparent) 56%, var(--carousel-surface) 112%) !important;
}
.workSlide .slideBg::after{
  background: linear-gradient(180deg, color-mix(in oklab, var(--carousel-surface) 44%, transparent), transparent 24%, transparent 56%, var(--carousel-surface) 103%) !important;
}
.workSlide .slideContent{
  width: 100%;
  min-height: 430px;
  margin: 0 auto;
  padding: 0;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: center;
  align-items: end;
  justify-items: center;
  gap: clamp(17px, 2.2vh, 24px);
}
.workSlide figure{
  width: min(370px, 35vw);
  height: min(450px, 52vh);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  justify-self: center;
  transform: none;
  border: 0;
  background: transparent;
  border-radius: 0 !important;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .32);
}
.workSlide img{
  object-fit: contain;
}
.workSlide .slideText{
  width: min(650px, 100%);
  max-width: none;
  padding: 0;
  color: var(--carousel-ink);
  text-align: center;
  transform: none;
}
.workSlide .slideEyebrow{
  display: none;
}
.workSlide .slideTitle{
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.08;
  text-wrap: balance;
  color: var(--carousel-ink) !important;
}
.workSlide .slideLoc{
  margin-top: 14px;
  line-height: 1.6;
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  opacity: .72;
  color: var(--carousel-ink) !important;
}
.workSlideCount{
  top: clamp(28px, 4vw, 48px);
  right: clamp(28px, 4vw, 52px);
  color: var(--carousel-ink);
  opacity: .58;
  text-shadow: none;
}
.workDots{
  right: clamp(38px, 5vw, 76px);
  bottom: clamp(58px, 7vh, 78px);
  flex-direction: row;
  align-items: flex-end;
  gap: 2px;
}
.workDots::before,
.workDots::after{ display: none; }
.workDot{
  width: 24px;
  height: 54px;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: transparent;
}
.workDot::before{
  content: "";
  width: 4px;
  height: 29px;
  border-radius: 0;
  background: color-mix(in oklab, var(--carousel-ink) 30%, transparent);
  transition: height 180ms var(--ease), background 180ms var(--ease);
}
.workDot.is-active{
  transform: none;
  background: transparent;
  box-shadow: none;
  outline: none;
}
.workDot.is-active::before{
  height: 48px;
  background: var(--carousel-ink);
}
.workDot:focus-visible{
  outline: 2px solid var(--carousel-ink);
  outline-offset: 0;
}

.workPager--end{
  position: relative;
  z-index: 4;
  width: min(250px, calc(100% - 40px));
  margin: -70px auto 22px;
  justify-content: center;
  gap: clamp(18px, 4vw, 42px);
  color: #f4efe6;
}
.workPager--end button{
  min-width: 44px;
  min-height: 44px;
  padding: 12px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit !important;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}
.workPager--end button:hover,
.workPager--end button:focus-visible{
  transform: translateY(-1px);
  background: transparent;
  opacity: .68;
}
.workBack{
  margin-top: 0;
  margin-left: clamp(18px, 3vw, 42px);
}
.workModalFooter{
  grid-column: 1 / -1;
  width: 100%;
  margin-top: clamp(8px, 1.5vw, 18px);
  padding-top: clamp(15px, 2vw, 22px);
  padding-inline: clamp(10px, 1.4vw, 18px);
  box-sizing: border-box;
  border-top: 1px solid color-mix(in oklab, currentColor 12%, transparent);
  display: flex;
  justify-content: flex-end;
  color: inherit;
}
.workModalFooter p{
  margin: 0;
  font: 400 clamp(12px, .95vw, 14px)/1.5 var(--serif);
  font-style: italic;
  letter-spacing: .025em;
  opacity: .62;
}

@media (max-width: 900px){
  .workSlide{
    min-height: min(760px, 88svh);
    padding: 78px 20px 116px;
  }
  .workSlide .slideContent{
    width: 100%;
    min-height: 470px;
    padding: 0;
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: center;
    gap: 18px;
  }
  .workSlide figure{
    width: min(280px, 72vw);
    height: min(360px, 43svh);
    max-height: 360px;
    aspect-ratio: auto;
    justify-self: center;
  }
  .workSlide .slideText{
    width: 100%;
    max-width: none;
    padding: 0;
    text-align: center;
  }
  .workSlide .slideTitle{
    font-size: clamp(27px, 8vw, 40px);
  }
  .workDots{
    position: absolute;
    margin: 0;
    right: clamp(18px, 5vw, 28px);
    bottom: 68px;
    flex-direction: row;
    transform: none;
  }
  .workDot::before{
    width: 3px;
    height: 23px;
  }
  .workDot.is-active::before{
    height: 38px;
  }
  .workPager--end{
    grid-column: 1;
  }
  .workModalFooter{
    justify-content: flex-start;
  }
}

/* American Textures closing statement: three short formal observations above
   one centered closing paragraph, with source copy left untouched. */
@media (min-width: 901px){
  .workShell[data-work="american-textures"] .american-reflection{
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(18px, 2vw, 30px);
    width: min(1180px, 92vw);
    max-width: min(1180px, 92vw);
    padding-top: clamp(24px, 2.6vw, 36px);
  }

  .workShell[data-work="american-textures"] .american-reflection > div{
    display: contents;
  }

  .workShell[data-work="american-textures"] .american-reflection > div:first-child .pairText{
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .workShell[data-work="american-textures"] .american-reflection > div:first-child .pairText:nth-child(1){
    grid-column: 1 / span 4;
    grid-row: 1;
  }

  .workShell[data-work="american-textures"] .american-reflection > div:first-child .pairText:nth-child(2){
    grid-column: 5 / span 4;
    grid-row: 1;
  }

  .workShell[data-work="american-textures"] .american-reflection > div:first-child .pairText:nth-child(3){
    grid-column: 9 / span 4;
    grid-row: 1;
  }

  .workShell[data-work="american-textures"] .american-reflection > div:last-child .pairText{
    grid-column: 3 / span 8;
    grid-row: 2;
    max-width: 62ch;
    margin: clamp(28px, 3vw, 44px) auto 0;
    padding-top: clamp(20px, 2vw, 28px);
    border-top: 1px solid rgba(245, 237, 208, 0.18);
    text-align: center;
    color: rgba(245, 237, 208, 0.76);
  }
}

@media (max-width: 900px){
  .workShell[data-work="american-textures"] .american-reflection{
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .workShell[data-work="american-textures"] .american-reflection > div{
    display: contents;
  }

  .workShell[data-work="american-textures"] .american-reflection .pairText{
    grid-column: 1;
    max-width: 34ch;
    margin: 0;
    padding-block: 16px;
    border-top: 1px solid rgba(245, 237, 208, 0.12);
  }

  .workShell[data-work="american-textures"] .american-reflection > div:last-child .pairText{
    margin-top: 12px;
    color: rgba(245, 237, 208, 0.76);
  }
}

@media (max-width: 520px){
  .workVideoToggle{
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: 40px;
  }
  .workSlide{
    min-height: min(720px, 88svh);
    padding: 72px 16px 112px;
  }
  .workSlideCount{
    font-size: 10px;
  }
  .workPager--end{
    justify-content: center;
  }
  .workPager--end button{
    flex: 0 1 auto;
    padding-inline: 10px;
  }
  .workModalFooter p{
    font-size: 12px;
  }
}

/* American Textures: preserve every source sentence while keeping prose at
   reading scale. Images, not isolated pull quotes, carry the visual rhythm. */
.workShell[data-work="american-textures"] :is(
  .american-ongoing-note,
  .american-film-note,
  .american-fragments-note
) .textBody,
.workShell[data-work="american-textures"] :is(
  .american-ongoing-note,
  .american-film-note,
  .american-fragments-note
) .textBody:first-of-type,
.workShell[data-work="american-textures"] :is(
  .american-ongoing-note,
  .american-film-note,
  .american-fragments-note
) .textBody:nth-of-type(2),
.workShell[data-work="american-textures"] :is(
  .american-ongoing-note,
  .american-film-note,
  .american-fragments-note
) .textBody:nth-of-type(3){
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  font: 400 clamp(15px, 1.02vw, 17px)/1.78 "Libre Baskerville", "EB Garamond", var(--serif);
  letter-spacing: 0;
  color: rgba(245, 237, 208, 0.88);
}

.workShell[data-work="american-textures"] .american-reflection > div:first-child .pairText,
.workShell[data-work="american-textures"] .american-reflection > div:last-child .pairText{
  max-width: 40ch;
  font: 400 clamp(15px, 1.05vw, 17px)/1.82 "Libre Baskerville", "EB Garamond", var(--serif);
  color: rgba(245, 237, 208, 0.86);
}

.workShell[data-work="american-textures"] .american-reflection > div:first-child .pairText + .pairText{
  margin-top: 14px;
  padding-top: 14px;
}

@media (min-width: 901px){
  .workShell[data-work="american-textures"] :is(
    .american-ongoing-note,
    .american-film-note,
    .american-fragments-note
  ){
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(18px, 1.8vw, 28px);
    align-items: start;
    padding-block: clamp(22px, 2.5vw, 34px);
  }

  .workShell[data-work="american-textures"] :is(
    .american-ongoing-note,
    .american-film-note,
    .american-fragments-note
  )::before{
    left: 0;
  }

  .workShell[data-work="american-textures"] :is(
    .american-ongoing-note,
    .american-film-note,
    .american-fragments-note
  ) .textLabel{
    grid-column: 1 / span 2;
    grid-row: 1;
    margin-top: 3px;
  }

  .workShell[data-work="american-textures"] :is(
    .american-ongoing-note,
    .american-film-note,
    .american-fragments-note
  ) .textBody:first-of-type{
    grid-column: 3 / span 3;
    grid-row: 1;
  }

  .workShell[data-work="american-textures"] :is(
    .american-ongoing-note,
    .american-film-note,
    .american-fragments-note
  ) .textBody:nth-of-type(2){
    grid-column: 6 / span 3;
    grid-row: 1;
  }

  .workShell[data-work="american-textures"] :is(
    .american-ongoing-note,
    .american-film-note,
    .american-fragments-note
  ) .textBody:nth-of-type(3){
    grid-column: 9 / span 4;
    grid-row: 1;
  }
}

@media (max-width: 900px){
  .workShell[data-work="american-textures"] :is(
    .american-ongoing-note,
    .american-film-note,
    .american-fragments-note
  ) .textBody,
  .workShell[data-work="american-textures"] :is(
    .american-ongoing-note,
    .american-film-note,
    .american-fragments-note
  ) .textBody:first-of-type,
  .workShell[data-work="american-textures"] :is(
    .american-ongoing-note,
    .american-film-note,
    .american-fragments-note
  ) .textBody:nth-of-type(2),
  .workShell[data-work="american-textures"] :is(
    .american-ongoing-note,
    .american-film-note,
    .american-fragments-note
  ) .textBody:nth-of-type(3){
    grid-column: 1;
    grid-row: auto;
    max-width: 34ch;
    font-size: clamp(15px, 4.2vw, 17px);
    line-height: 1.72;
  }
}
