/**
 * Room Sonics Projects scroll chapter v1.7.7
 * Dedicated Projects presentation. General site reveals do not own these tiles.
 */
.rs-project-reel{position:relative;width:100%;background:#fff;}
.rs-project-reel__pin{width:100%;background:#fff;}
.project-brand-story{display:none;}

/* The project wall always uses true square tiles. */
[data-rs-project-reel] [data-project-showcase-grid]{align-items:stretch;background:#fff;gap:6px;}
[data-rs-project-reel] [data-project-showcase-card],
[data-rs-project-reel] [data-project-brand]{position:relative;aspect-ratio:1/1;overflow:hidden;background:#002e2e;}
[data-rs-project-reel] [data-project-showcase-card] img{
  display:block;width:100%;height:100%;object-fit:cover;object-position:center;
  backface-visibility:hidden;transform:translateZ(0);
  transition:transform .7s cubic-bezier(.16,1,.3,1),filter .5s ease!important;
}

/* Project hover: identity remains visible, detail opens only on intent. */
[data-rs-project-reel] [data-project-showcase-card]::after{
  content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
  background:linear-gradient(to top,rgba(0,46,46,.96) 0%,rgba(0,46,46,.56) 30%,rgba(0,46,46,.05) 64%,transparent 78%);
  transition:background .5s ease;
}
[data-rs-project-reel] [data-project-showcase-card]:hover::after,
[data-rs-project-reel] [data-project-showcase-card]:focus-visible::after{
  background:linear-gradient(to top,rgba(0,46,46,.99) 0%,rgba(0,46,46,.84) 48%,rgba(0,46,46,.18) 78%,transparent);
}
[data-rs-project-reel] [data-project-showcase-card]:hover img,
[data-rs-project-reel] [data-project-showcase-card]:focus-visible img{transform:scale(1.045)!important;filter:saturate(.92) brightness(.9);}

.projects-showcase .project-card__showcase-copy,
.projects-listing .projects-card__copy{
  position:absolute!important;z-index:5!important;left:clamp(20px,2vw,34px)!important;right:clamp(20px,2vw,34px)!important;bottom:clamp(20px,2vw,32px)!important;
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;color:#fff!important;
  opacity:1!important;transform:none!important;transition:transform .55s cubic-bezier(.16,1,.3,1)!important;
}
.projects-showcase .project-card__showcase-copy strong,
.projects-listing .projects-card__copy strong{font-size:clamp(1.15rem,1.45vw,1.65rem)!important;line-height:1.08!important;font-weight:300!important;color:#fff!important;}
.projects-showcase .project-card__showcase-copy small,
.projects-listing .projects-card__copy small{margin-top:6px!important;font-size:.82rem!important;color:rgba(255,255,255,.82)!important;font-weight:300!important;}
.project-card__hover-intro,.projects-card__intro{
  display:block;margin-top:0;max-height:0;overflow:hidden;opacity:0;transform:translateY(12px);
  font-size:clamp(.83rem,.9vw,.98rem);line-height:1.45;color:rgba(255,255,255,.9);
  transition:max-height .5s cubic-bezier(.16,1,.3,1),opacity .3s ease,transform .5s cubic-bezier(.16,1,.3,1),margin .5s ease;
}
.project-card__hover-arrow,.projects-card__hover-arrow{
  display:block;margin-top:0;color:#d4af37;font-size:1.25rem;opacity:0;transform:translateX(-14px);
  transition:opacity .3s ease,transform .55s cubic-bezier(.16,1,.3,1),margin .4s ease;
}
[data-project-showcase-card]:hover .project-card__hover-intro,
[data-project-showcase-card]:focus-visible .project-card__hover-intro,
[data-project-showcase-card]:hover .projects-card__intro,
[data-project-showcase-card]:focus-visible .projects-card__intro{max-height:130px;margin-top:14px;opacity:1;transform:translateY(0);}
[data-project-showcase-card]:hover .project-card__hover-arrow,
[data-project-showcase-card]:focus-visible .project-card__hover-arrow,
[data-project-showcase-card]:hover .projects-card__hover-arrow,
[data-project-showcase-card]:focus-visible .projects-card__hover-arrow{margin-top:16px;opacity:1;transform:translateX(0);}
[data-project-showcase-card]:hover .project-card__hover-arrow i,
[data-project-showcase-card]:hover .projects-card__hover-arrow i{animation:rsProjectArrowNudge 1.05s cubic-bezier(.16,1,.3,1) infinite alternate;}
@keyframes rsProjectArrowNudge{to{transform:translateX(9px)}}
.projects-listing .projects-card__shade{display:none!important;}
.projects-listing .projects-card__arrow{display:none!important;}

@media (min-width:901px){
  .rs-project-reel.rs-project-reel--ready{
    position:relative!important;height:var(--project-reel-height,480vh)!important;min-height:3000px!important;width:100%!important;
    overflow:visible!important;background:#fff!important;
  }
  .rs-project-reel.rs-project-reel--ready .rs-project-reel__pin{
    position:absolute!important;top:0;left:0;right:0;width:100%!important;
    height:calc(100vh - var(--project-pin-top,0px))!important;min-height:620px!important;
    overflow:hidden!important;z-index:30!important;background:#fff!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    padding-inline:var(--pad)!important;box-sizing:border-box!important;
  }
  .rs-project-reel.rs-project-reel--ready.is-pinned .rs-project-reel__pin{
    position:fixed!important;top:var(--project-pin-top,0px)!important;left:0!important;right:0!important;width:100vw!important;
  }
  .rs-project-reel.rs-project-reel--ready.is-ended .rs-project-reel__pin{
    position:absolute!important;top:auto!important;bottom:0!important;left:0!important;right:0!important;
  }

  /*
   * 3 x 2 square wall. Width grows as far as the available template/viewport allows,
   * but is still constrained by viewport height so the complete six-tile composition
   * remains visible while pinned. White 6px gutters replace the previous green bands.
   */
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-grid]{
    --rs-project-gap:8px;
    --rs-project-wall:min(calc(100vw - (var(--pad) * 2)),var(--container));
    --rs-project-tile:calc((var(--rs-project-wall) - (var(--rs-project-gap) * 3))/4);
    display:grid!important;grid-template-columns:repeat(4,var(--rs-project-tile))!important;grid-template-rows:repeat(2,var(--rs-project-tile))!important;
    grid-auto-flow:row!important;
    width:var(--rs-project-wall)!important;max-width:var(--container)!important;
    height:calc((var(--rs-project-tile) * 2) + var(--rs-project-gap))!important;
    margin:auto!important;padding:0!important;gap:var(--rs-project-gap)!important;overflow:visible!important;background:#fff!important;
  }
  /* Seven projects + the Room Sonics beat: a complete 4 x 2 wall. */
  .rs-project-reel.rs-project-reel--ready [data-project-brand]{grid-column:auto!important;}
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-card],
  .rs-project-reel.rs-project-reel--ready [data-project-brand]{
    width:var(--rs-project-tile)!important;height:var(--rs-project-tile)!important;min-width:0!important;min-height:0!important;
    aspect-ratio:1/1!important;border-radius:0!important;overflow:hidden!important;opacity:1;transform:none;filter:none;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-card] img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;}
  .rs-project-reel.rs-project-reel--ready .is-reel-hidden{display:none!important;}

  /*
   * Scroll transition stays INSIDE the square. The card itself never translates,
   * so there is no exposed sliver of the previous grid cell underneath it.
   */
  .rs-project-reel.rs-project-reel--ready .is-reel-entering{isolation:isolate!important;overflow:hidden!important;}
  .rs-project-reel.rs-project-reel--ready .is-reel-entering img{
    animation:rsProjectImageRollIn .72s cubic-bezier(.16,1,.3,1) both!important;
    will-change:transform,filter,opacity;
  }
  .rs-project-reel.rs-project-reel--ready .is-reel-entering .project-card__showcase-copy,
  .rs-project-reel.rs-project-reel--ready .is-reel-entering .projects-card__copy{
    animation:rsProjectCopyRollIn .64s .12s cubic-bezier(.16,1,.3,1) both!important;
  }
  .rs-project-reel.rs-project-reel--ready .is-reel-initial{
    animation:rsProjectInitial .55s cubic-bezier(.16,1,.3,1) both!important;animation-delay:var(--reel-delay,0ms)!important;
  }
  @keyframes rsProjectInitial{0%{opacity:0;filter:blur(5px);transform:scale(.965)}100%{opacity:1;filter:none;transform:scale(1)}}
  @keyframes rsProjectImageRollIn{
    0%{opacity:.35;transform:translateY(100%) scale(1.035);filter:brightness(.7) blur(3px)}
    62%{opacity:1;transform:translateY(-2.5%) scale(1.008);filter:brightness(.94) blur(.3px)}
    100%{opacity:1;transform:translateY(0) scale(1);filter:brightness(1) blur(0)}
  }
  @keyframes rsProjectCopyRollIn{0%{opacity:0;transform:translateY(30px)}100%{opacity:1;transform:translateY(0)}}
  .rs-project-reel.rs-project-reel--ready .is-reel-secondary img{animation:rsProjectSecondary .38s .18s ease-out both!important;}
  @keyframes rsProjectSecondary{0%{opacity:.58;filter:brightness(.72)}100%{opacity:1;filter:brightness(1)}}

  /* Room Sonics square is a typographic pause, not another image tile. */
  .rs-project-reel.rs-project-reel--ready [data-project-brand]{
    position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;
    padding:clamp(30px,3vw,58px)!important;isolation:isolate!important;background:linear-gradient(145deg,#002e2e 0%,#07504c 100%)!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-brand]::before{
    content:"";position:absolute;inset:-20%;background:radial-gradient(circle at 50% 45%,rgba(212,175,55,.10),transparent 45%);pointer-events:none;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-brand] img{display:none!important;}
  .rs-project-reel.rs-project-reel--ready .project-brand-story{
    display:flex!important;position:absolute!important;inset:0!important;z-index:8!important;align-items:center!important;justify-content:center!important;
    text-align:center!important;color:#fff!important;padding:clamp(28px,3vw,58px)!important;
  }
  .rs-project-reel.rs-project-reel--ready .project-brand-story:before{
    content:"";position:absolute;left:50%;top:calc(50% - clamp(58px,6vw,88px));transform:translateX(-50%);width:48px;height:2px;background:#d4af37;
  }
  .rs-project-reel.rs-project-reel--ready .project-brand-story span{
    display:block!important;position:absolute!important;left:7%;right:7%;top:50%!important;
    opacity:0!important;transform:translateY(24px)!important;
    font-size:clamp(2.2rem,3.35vw,4.7rem)!important;font-weight:200!important;letter-spacing:-.035em!important;line-height:.98!important;text-transform:none!important;
    transition:opacity .28s ease,transform .62s cubic-bezier(.16,1,.3,1)!important;
  }
  .rs-project-reel.rs-project-reel--ready .project-brand-story span.is-active{opacity:1!important;transform:translateY(-50%)!important;}
}

@media (max-width:900px){
  .rs-project-reel{height:auto!important;min-height:0!important;background:#fff!important;}
  .rs-project-reel__pin{position:relative!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;height:auto!important;min-height:0!important;overflow:visible!important;padding:0 var(--pad)!important;background:#fff!important;}
  .rs-project-reel .is-reel-hidden{display:block!important;}
  .project-brand-story{display:none!important;}
  [data-rs-project-reel] [data-project-showcase-grid]{gap:5px!important;background:#fff!important;}
  [data-rs-project-reel] [data-project-showcase-card], [data-rs-project-reel] [data-project-brand]{aspect-ratio:1/1!important;}
}

/* Reduced motion keeps the chapter functional; only the tile transition is simplified. */
@media (prefers-reduced-motion:reduce) and (min-width:901px){
  .rs-project-reel.rs-project-reel--ready .is-reel-entering img{animation:rsProjectReduced .24s ease-out both!important;}
  .rs-project-reel.rs-project-reel--ready .is-reel-entering .project-card__showcase-copy,
  .rs-project-reel.rs-project-reel--ready .is-reel-entering .projects-card__copy{animation:none!important;}
  .rs-project-reel.rs-project-reel--ready .is-reel-initial{animation:rsProjectReduced .22s ease-out both!important;}
  @keyframes rsProjectReduced{from{opacity:.6}to{opacity:1}}
  .rs-project-reel.rs-project-reel--ready .project-brand-story span{transition:opacity .2s linear!important;}
}


/* v1.7.7 — eight-tile wall and exact Projects-page alignment. */
@media (min-width:901px){
  /* Homepage remains within the normal site-wide container. */
  .rs-project-reel--home.rs-project-reel--ready [data-project-showcase-grid]{
    --rs-project-wall:min(calc(100vw - (var(--pad) * 2)),var(--container))!important;
    width:var(--rs-project-wall)!important;
    max-width:var(--container)!important;
  }

  /* /projects uses the exact same width as the filter bar and starts directly below it. */
  body .project-filters.container-wide{
    width:min(calc(100% - (var(--pad) * 2)),var(--container))!important;
    max-width:var(--container)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .rs-project-reel--listing.rs-project-reel--ready .rs-project-reel__pin{
    align-items:flex-start!important;
    padding-top:0!important;
  }
  .rs-project-reel--listing.rs-project-reel--ready [data-project-showcase-grid]{
    --rs-project-wall:min(calc(100vw - (var(--pad) * 2)),var(--container))!important;
    width:var(--rs-project-wall)!important;
    max-width:var(--container)!important;
    margin-top:0!important;
  }
}

/* v1.7.8 — centred Projects reel, brand-first beat, tablet + mobile scroll chapters. */

/* First reel view shows the actual Room Sonics mark. Once scrolling begins, the
   mark gives way to the typographic story. */
.rs-project-reel.rs-project-reel--ready [data-project-showcase-grid][data-reel-scene="1"] [data-project-brand] img{
  display:block!important;
  position:relative!important;
  z-index:9!important;
  width:min(72%,260px)!important;
  height:auto!important;
  object-fit:contain!important;
  margin:auto!important;
}
.rs-project-reel.rs-project-reel--ready [data-project-showcase-grid][data-reel-scene="1"] .project-brand-story{
  opacity:0!important;
  visibility:hidden!important;
}
.rs-project-reel.rs-project-reel--ready [data-project-showcase-grid]:not([data-reel-scene="1"]) [data-project-brand] img{
  display:none!important;
}
.rs-project-reel.rs-project-reel--ready [data-project-showcase-grid]:not([data-reel-scene="1"]) .project-brand-story{
  opacity:1!important;
  visibility:visible!important;
}

@media (min-width:901px){
  /* /projects now centres the same way as the homepage while pinned. */
  .rs-project-reel--listing.rs-project-reel--ready .rs-project-reel__pin{
    align-items:center!important;
    justify-content:center!important;
    padding-top:0!important;
  }
}

/* Tablet: keep the interaction, but present the wall as 2 columns x 4 rows.
   Tile size is constrained by BOTH viewport width and height so all eight squares
   remain visible while the chapter is pinned. */
@media (min-width:601px) and (max-width:900px){
  .rs-project-reel.rs-project-reel--ready{
    position:relative!important;
    height:var(--project-reel-height,520vh)!important;
    min-height:2200px!important;
    width:100%!important;
    overflow:visible!important;
    background:#fff!important;
  }
  .rs-project-reel.rs-project-reel--ready .rs-project-reel__pin{
    position:absolute!important;
    inset:0 0 auto 0!important;
    width:100%!important;
    height:calc(100vh - var(--project-pin-top,0px))!important;
    min-height:560px!important;
    overflow:hidden!important;
    z-index:30!important;
    background:#fff!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:18px var(--pad)!important;
    box-sizing:border-box!important;
  }
  .rs-project-reel.rs-project-reel--ready.is-pinned .rs-project-reel__pin{
    position:fixed!important;
    top:var(--project-pin-top,0px)!important;
    left:0!important;right:0!important;
    width:100vw!important;
  }
  .rs-project-reel.rs-project-reel--ready.is-ended .rs-project-reel__pin{
    position:absolute!important;
    top:auto!important;bottom:0!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-grid]{
    --rs-project-gap:6px;
    --rs-project-tile:min(
      calc((100vw - (var(--pad) * 2) - var(--rs-project-gap))/2),
      calc((100vh - var(--project-pin-top,0px) - 72px - (var(--rs-project-gap) * 3))/4)
    );
    display:grid!important;
    grid-template-columns:repeat(2,var(--rs-project-tile))!important;
    grid-template-rows:repeat(4,var(--rs-project-tile))!important;
    width:calc((var(--rs-project-tile) * 2) + var(--rs-project-gap))!important;
    height:calc((var(--rs-project-tile) * 4) + (var(--rs-project-gap) * 3))!important;
    max-width:none!important;
    margin:auto!important;
    padding:0!important;
    gap:var(--rs-project-gap)!important;
    overflow:hidden!important;
    background:#fff!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-card],
  .rs-project-reel.rs-project-reel--ready [data-project-brand]{
    width:var(--rs-project-tile)!important;
    height:var(--rs-project-tile)!important;
    aspect-ratio:1/1!important;
    min-width:0!important;min-height:0!important;
    overflow:hidden!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-card] img{
    width:100%!important;height:100%!important;object-fit:cover!important;
  }
  .rs-project-reel.rs-project-reel--ready .is-reel-hidden{display:none!important;}
  .rs-project-reel.rs-project-reel--ready [data-project-brand]{
    display:flex!important;align-items:center!important;justify-content:center!important;
    background:linear-gradient(145deg,#002e2e 0%,#07504c 100%)!important;
  }
  .rs-project-reel.rs-project-reel--ready .project-brand-story{
    display:flex!important;position:absolute!important;inset:0!important;
    align-items:center!important;justify-content:center!important;text-align:center!important;
  }
  .rs-project-reel.rs-project-reel--ready .project-brand-story span{
    position:absolute!important;left:8%!important;right:8%!important;top:50%!important;
    opacity:0!important;transform:translateY(22px)!important;
    font-size:clamp(1.6rem,5vw,2.8rem)!important;font-weight:200!important;line-height:1!important;
    transition:opacity .28s ease,transform .55s cubic-bezier(.16,1,.3,1)!important;
  }
  .rs-project-reel.rs-project-reel--ready .project-brand-story span.is-active{
    opacity:1!important;transform:translateY(-50%)!important;
  }
}

/* Mobile: a true stacked reel. The Room Sonics tile is the first beat, then one
   project occupies the same square at a time for up to six project beats before
   the page releases back into normal scrolling. */
@media (max-width:600px){
  .rs-project-reel.rs-project-reel--ready{
    position:relative!important;
    height:var(--project-reel-height,500vh)!important;
    min-height:1800px!important;
    width:100%!important;
    overflow:visible!important;
    background:#fff!important;
  }
  .rs-project-reel.rs-project-reel--ready .rs-project-reel__pin{
    position:absolute!important;
    top:0!important;left:0!important;right:0!important;
    width:100%!important;
    height:calc(100vh - var(--project-pin-top,0px))!important;
    min-height:460px!important;
    overflow:hidden!important;
    z-index:30!important;
    background:#fff!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:20px var(--pad)!important;
    box-sizing:border-box!important;
  }
  .rs-project-reel.rs-project-reel--ready.is-pinned .rs-project-reel__pin{
    position:fixed!important;
    top:var(--project-pin-top,0px)!important;
    left:0!important;right:0!important;width:100vw!important;
  }
  .rs-project-reel.rs-project-reel--ready.is-ended .rs-project-reel__pin{
    position:absolute!important;top:auto!important;bottom:0!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-grid]{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:1fr!important;
    width:min(calc(100vw - (var(--pad) * 2)),520px)!important;
    height:auto!important;
    aspect-ratio:1/1!important;
    margin:auto!important;
    padding:0!important;
    gap:0!important;
    overflow:hidden!important;
    background:#002e2e!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-card],
  .rs-project-reel.rs-project-reel--ready [data-project-brand]{
    grid-column:1!important;grid-row:1!important;
    width:100%!important;height:100%!important;aspect-ratio:1/1!important;
    overflow:hidden!important;
  }
  .rs-project-reel.rs-project-reel--ready .is-reel-hidden{display:none!important;}
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-card] img{
    width:100%!important;height:100%!important;object-fit:cover!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-brand]{
    display:none!important;
    align-items:center!important;justify-content:center!important;
    background:linear-gradient(145deg,#002e2e 0%,#07504c 100%)!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-brand].is-brand-active{display:flex!important;}
  .rs-project-reel.rs-project-reel--ready .project-brand-story{
    display:flex!important;position:absolute!important;inset:0!important;
    align-items:center!important;justify-content:center!important;text-align:center!important;
  }
  .rs-project-reel.rs-project-reel--ready .project-brand-story span{
    position:absolute!important;left:9%!important;right:9%!important;top:50%!important;
    opacity:0!important;transform:translateY(20px)!important;
    font-size:clamp(2rem,12vw,3.6rem)!important;font-weight:200!important;line-height:.98!important;
    transition:opacity .26s ease,transform .55s cubic-bezier(.16,1,.3,1)!important;
  }
  .rs-project-reel.rs-project-reel--ready .project-brand-story span.is-active{
    opacity:1!important;transform:translateY(-50%)!important;
  }
  .rs-project-reel.rs-project-reel--ready .is-reel-entering img{
    animation:rsProjectMobileStack .58s cubic-bezier(.16,1,.3,1) both!important;
  }
  @keyframes rsProjectMobileStack{
    from{opacity:.25;transform:translateY(18%) scale(1.025);filter:blur(2px) brightness(.78)}
    to{opacity:1;transform:translateY(0) scale(1);filter:none}
  }
}

/* v1.7.9 — cleaner brand tile and tighter responsive project reels. */

/* First view: make the Room Sonics artwork fill the whole square rather than
   appearing as a smaller image floating inside it. */
.rs-project-reel.rs-project-reel--ready [data-project-showcase-grid][data-reel-scene="1"] [data-project-brand]{
  padding:0!important;
  background:#002e2e!important;
}
.rs-project-reel.rs-project-reel--ready [data-project-showcase-grid][data-reel-scene="1"] [data-project-brand] img{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  object-fit:cover!important;
  object-position:center!important;
  background:#002e2e!important;
}

/* Tablet: show four large squares (3 projects + brand) in a 2 x 2 wall. Extra
   projects continue to rotate into those three project positions on scroll. */
@media (min-width:601px) and (max-width:900px){
  .rs-project-reel.rs-project-reel--ready{
    min-height:1500px!important;
  }
  .rs-project-reel.rs-project-reel--ready .rs-project-reel__pin{
    min-height:500px!important;
    padding:10px var(--pad)!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-grid]{
    --rs-project-gap:6px;
    --rs-project-tile:min(
      calc((100vw - (var(--pad) * 2) - var(--rs-project-gap))/2),
      calc((100vh - var(--project-pin-top,0px) - 28px - var(--rs-project-gap))/2)
    );
    grid-template-columns:repeat(2,var(--rs-project-tile))!important;
    grid-template-rows:repeat(2,var(--rs-project-tile))!important;
    width:calc((var(--rs-project-tile) * 2) + var(--rs-project-gap))!important;
    height:calc((var(--rs-project-tile) * 2) + var(--rs-project-gap))!important;
  }
}

/* Mobile: remove the large dead areas around the filter controls and start the
   stacked project square near the top of the available viewport. */
@media (max-width:600px){
  body .projects-listing{padding:0!important;}
  body .project-filters{
    padding:10px 12px 8px!important;
    gap:8px!important;
    margin:0!important;
    box-shadow:none!important;
  }
  body .project-filters select{height:48px!important;padding-left:14px!important;font-size:.9rem!important;}
  body .project-filters__reset{
    height:42px!important;
    padding:0!important;
    margin:0!important;
    justify-self:center!important;
  }
  .rs-project-reel.rs-project-reel--ready{
    min-height:1350px!important;
  }
  .rs-project-reel.rs-project-reel--ready .rs-project-reel__pin{
    min-height:0!important;
    height:calc(100vh - var(--project-pin-top,0px))!important;
    align-items:flex-start!important;
    justify-content:center!important;
    padding:10px 12px 12px!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-grid]{
    width:min(calc(100vw - 24px),520px)!important;
    margin:0 auto!important;
  }
}


/* v1.8.0 — mobile project reel viewport tidy.
   Keep the single-card interaction, but let the active project occupy the
   available mobile viewport instead of leaving a large blank area underneath
   a small square. Desktop and tablet project layouts are untouched. */
@media (max-width:600px){
  .rs-project-reel.rs-project-reel--ready{
    min-height:0!important;
  }
  .rs-project-reel.rs-project-reel--ready .rs-project-reel__pin{
    padding:8px 12px 10px!important;
    align-items:flex-start!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-grid]{
    width:min(calc(100vw - 24px),520px)!important;
    height:min(calc(100vh - var(--project-pin-top,0px) - 24px),680px)!important;
    min-height:min(132vw,620px)!important;
    aspect-ratio:auto!important;
    margin:0 auto!important;
  }
  .rs-project-reel.rs-project-reel--ready [data-project-showcase-card],
  .rs-project-reel.rs-project-reel--ready [data-project-brand]{
    width:100%!important;
    height:100%!important;
    aspect-ratio:auto!important;
  }
}

/* v1.8.1 — final responsive reel/filter tidy. */

/* An active /projects filter deliberately exits the scroll chapter. Matching
   projects are then a simple, predictable responsive grid with no pinned or
   scene-change animation. */
.rs-project-reel--listing.is-filtered{
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  background:#fff!important;
}
.rs-project-reel--listing.is-filtered .rs-project-reel__pin{
  position:static!important;
  inset:auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  padding:0 var(--pad) clamp(48px,6vw,90px)!important;
  background:#fff!important;
}
.rs-project-reel--listing.is-filtered [data-project-showcase-grid]{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-template-rows:none!important;
  width:min(calc(100% - 0px),var(--container))!important;
  max-width:var(--container)!important;
  height:auto!important;
  margin:0 auto!important;
  gap:8px!important;
  overflow:visible!important;
  background:#fff!important;
}
.rs-project-reel--listing.is-filtered [data-project-showcase-card]{
  display:block!important;
  position:relative!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:1/1!important;
  opacity:1!important;
  transform:none!important;
  filter:none!important;
  animation:none!important;
}
.rs-project-reel--listing.is-filtered [data-project-showcase-card][hidden]{display:none!important;}
.rs-project-reel--listing.is-filtered [data-project-showcase-card] img,
.rs-project-reel--listing.is-filtered [data-project-showcase-card] .projects-card__copy{
  animation:none!important;
}
.rs-project-reel--listing.is-filtered [data-project-brand]{display:none!important;}

@media(max-width:900px){
  .rs-project-reel--listing.is-filtered [data-project-showcase-grid]{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:600px){
  .rs-project-reel--listing.is-filtered .rs-project-reel__pin{padding:8px 12px 36px!important;}
  .rs-project-reel--listing.is-filtered [data-project-showcase-grid]{grid-template-columns:1fr!important;gap:8px!important;}
}

/* v1.8.4 — reduce the initial desktop dead space without changing the approved
   pinned/revolving project interaction. This file loads after final-fixes.css. */
@media(min-width:901px){
  .rs-project-reel.rs-project-reel--ready .rs-project-reel__pin,
  .rs-project-reel--listing.rs-project-reel--ready .rs-project-reel__pin{
    align-items:flex-start!important;
    justify-content:center!important;
    padding-top:clamp(18px,3vh,34px)!important;
  }
}

/* Restore the mobile reel to true squares. v1.8.0 experimented with a portrait
   viewport card; this intentionally returns to the signed-off square tile. */
@media(max-width:600px){
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered){
    min-height:0!important;
  }
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered) .rs-project-reel__pin{
    padding:8px 12px!important;
    align-items:flex-start!important;
    min-height:0!important;
  }
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered) [data-project-showcase-grid]{
    width:min(calc(100vw - 24px),520px)!important;
    height:auto!important;
    min-height:0!important;
    aspect-ratio:1/1!important;
    margin:0 auto!important;
  }
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered) [data-project-showcase-card],
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered) [data-project-brand]{
    width:100%!important;
    height:100%!important;
    aspect-ratio:1/1!important;
  }
}

/* v1.8.2 — stable two-square mobile project reel.
   Mobile browser chrome makes fixed one-card reels prone to visible jumps. Use a
   native sticky pin instead, keep two true square tiles in view, and let the
   document itself release the wall at the end of the chapter. */
@media(max-width:600px){
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered){
    height:var(--project-reel-height,290vh)!important;
    min-height:0!important;
    overflow:visible!important;
    background:#fff!important;
  }
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered) .rs-project-reel__pin,
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered).is-pinned .rs-project-reel__pin,
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered).is-ended .rs-project-reel__pin{
    position:sticky!important;
    top:var(--project-pin-top,0px)!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    width:100%!important;
    height:calc(100svh - var(--project-pin-top,0px))!important;
    min-height:0!important;
    padding:6px 12px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:#fff!important;
  }
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered) [data-project-showcase-grid]{
    --rs-mobile-gap:6px;
    --rs-mobile-tile:min(
      calc(100vw - 24px),
      calc((100svh - var(--project-pin-top,0px) - 24px - var(--rs-mobile-gap))/2)
    );
    display:grid!important;
    grid-template-columns:var(--rs-mobile-tile)!important;
    grid-template-rows:repeat(2,var(--rs-mobile-tile))!important;
    width:var(--rs-mobile-tile)!important;
    height:calc((var(--rs-mobile-tile) * 2) + var(--rs-mobile-gap))!important;
    aspect-ratio:auto!important;
    gap:var(--rs-mobile-gap)!important;
    margin:0 auto!important;
    padding:0!important;
    overflow:hidden!important;
    background:#fff!important;
  }
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered) [data-project-showcase-card],
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered) [data-project-brand]{
    grid-column:1!important;
    grid-row:auto!important;
    width:var(--rs-mobile-tile)!important;
    height:var(--rs-mobile-tile)!important;
    aspect-ratio:1/1!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  .rs-project-reel.rs-project-reel--ready:not(.is-filtered) [data-project-showcase-card] img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }
}
