/* =========================================================
   RENDER ROOM — "THE WORK" portfolio carousel (9 Vimeo videos + enquiry card).
   Playback uses the shared player (assets/css/video-player.css, Render Room theme).
   Every rule is scoped to .rrw / .rrw-card / .rrw-cta, so nothing else changes.
   Uses the hero's condensed font stack (--rr-cond) and logo yellow (--rr-yellow),
   both defined on .rr-page in render-room.css.
   ========================================================= */

.rrw {
  --rrw-gap: clamp(14px, 1.5vw, 22px);
  --rrw-pad: var(--pad-x);
  --rrw-visible: 4.28;                     /* four cards and a glimpse of the fifth */
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  margin: 0 var(--frame-gap) var(--frame-gap);
  padding: clamp(40px, 4.4vw, 68px) 0 clamp(36px, 4vw, 56px);
  border-radius: var(--radius-frame);
  overflow: hidden;
  overflow: clip;
  background: #fbfbfa;
  color: #000001;
}
.rrw::after {                              /* very subtle grain */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .3 0 0 0 0 .3 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
:where(.rrw) :is(h2, p, ul) { margin: 0; }

/* ---------- Heading ---------- */
.rrw__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 0 var(--rrw-pad);
}
.rrw__label {
  font-family: var(--rr-cond);
  font-size: clamp(.95rem, 1.2vw, 1.15rem);
  letter-spacing: .32em;
  text-transform: uppercase;
}
.rrw__title {
  margin-top: 6px;
  font-family: var(--rr-cond);
  font-weight: 400;
  font-size: clamp(3rem, 6.4cqw, 6.4rem);
  line-height: .92;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.rrw__dot { color: var(--rr-yellow); }
.rrw__lede {
  max-width: 22em;
  padding-bottom: .4em;
  font-family: var(--rr-cond);
  font-size: clamp(1.15rem, 2cqw, 2rem);
  line-height: 1.12;
  text-align: right;
}

/* ---------- Ruler ---------- */
.rrw__ruler {
  position: relative;
  height: 22px;
  margin: clamp(22px, 2.6vw, 36px) var(--rrw-pad) 0;
  background:
    linear-gradient(#000001, #000001) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 1, .55) 0 1px, transparent 1px calc(100% / 6)) 0 50% / calc(100% + 1px) 16px no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 1, .35) 0 1px, transparent 1px calc(100% / 60)) 0 50% / calc(100% + 1px) 7px no-repeat;
}
.rrw__marker {
  --rrw-p: 0;
  position: absolute;
  left: 0; top: -4px; bottom: -8px;
  width: 2px;
  margin-left: -1px;
  background: var(--rr-yellow);
  transform: translateX(calc(var(--rrw-p) * var(--rrw-ruler-w, 0px)));
  transition: transform .35s var(--ease);
}
.rrw__marker::before {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: 13px; height: 13px;
  margin-left: -6.5px;
  border-radius: 2px 2px 7px 7px;
  background: var(--rr-yellow);
}

/* ---------- Carousel ---------- */
.rrw__viewport { position: relative; }
.rrw__track {
  --rrw-card: calc((100cqw - var(--rrw-pad) - var(--rrw-gap) * 4) / var(--rrw-visible));
  display: flex;
  gap: var(--rrw-gap);
  padding: clamp(28px, 3vw, 44px) var(--rrw-pad);   /* room so glows and shadows are never clipped */
  margin: 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--rrw-pad);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.rrw__track::-webkit-scrollbar { display: none; }
.rrw__item { flex: 0 0 var(--rrw-card); scroll-snap-align: start; }

.rrw-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #e9e8e4;
  cursor: pointer;
  color: inherit;
  font: inherit;
  box-shadow: 0 14px 26px -18px rgba(0, 0, 1, .45);
  transition: box-shadow .35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.rrw-card__frame {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}
.rrw-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.rrw-card__play {
  position: absolute;
  left: 50%; top: 50%;
  display: grid;
  place-items: center;
  width: clamp(44px, 3.6vw, 54px);
  height: clamp(44px, 3.6vw, 54px);
  margin: calc(clamp(44px, 3.6vw, 54px) / -2) 0 0 calc(clamp(44px, 3.6vw, 54px) / -2);
  border-radius: 50%;
  background: var(--rr-yellow);
  color: #000001;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 1, .45);
}
.rrw-card__play svg { width: 42%; height: 42%; margin-left: 8%; }
.rrw-card:hover,
.rrw-card:focus-visible {
  box-shadow: 0 0 0 1.5px rgba(255, 204, 0, .9), 0 0 32px 4px rgba(255, 204, 0, .42), 0 16px 30px -18px rgba(0, 0, 1, .5);
}
.rrw-card:hover .rrw-card__img,
.rrw-card:focus-visible .rrw-card__img { transform: scale(1.04); }
.rrw-card:focus-visible { outline: 2px solid #000001; outline-offset: 4px; }

/* No poster image available: plain dark card with the play button (no fake still) */
.rrw-card.is-noposter { background: radial-gradient(120% 80% at 30% 20%, #26262a, #121214 70%); }
.rrw-card.is-noposter .rrw-card__img { display: none; }

/* ---------- Slide 10: enquiry card (same size, radius and hover glow as a video card) ---------- */
.rrw-cta {
  position: relative;
  container-type: inline-size;       /* sizes below are relative to this card's width */
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  background: radial-gradient(90% 55% at 55% 30%, #1d1b14, #0d0d0e 70%);
  color: #f4f4f2;
  box-shadow: 0 14px 26px -18px rgba(0, 0, 1, .45);
  transition: box-shadow .35s var(--ease);
}
.rrw-cta:hover,
.rrw-cta:focus-within {
  box-shadow: 0 0 0 1.5px rgba(255, 204, 0, .9), 0 0 32px 4px rgba(255, 204, 0, .42), 0 16px 30px -18px rgba(0, 0, 1, .5);
}
.rrw-cta__in {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 12cqw 11cqw 13cqw;
}
.rrw-cta__art { display: block; flex: 1 1 auto; min-height: 0; }
.rrw-cta__art svg { display: block; width: 86%; height: 100%; max-height: 74cqw; margin: 2cqw auto 0; overflow: visible; }
.rrw-cta__bracket { fill: none; stroke: rgba(244, 244, 242, .38); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rrw-cta__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 5cqw; }
.rrw-cta__title {
  margin: 0;
  font-family: var(--rr-cond);
  font-weight: 400;
  font-size: clamp(1.6rem, 13.5cqw, 2.6rem);
  line-height: .98;
  letter-spacing: .005em;
  text-transform: uppercase;
  color: var(--rr-yellow);
  text-wrap: balance;
}
.rrw-cta__text { margin: 0; font-size: clamp(.95rem, 6.2cqw, 1.1rem); line-height: 1.45; color: rgba(244, 244, 242, .74); }
.rrw-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  margin-top: 2cqw;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--rr-yellow);
  color: #000001;
  font-weight: 600;
  font-size: clamp(.92rem, 6cqw, 1.02rem);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.rrw-cta__btn svg { width: 14px; height: 14px; }
.rrw-cta__btn:hover { background: #ffd633; box-shadow: 0 8px 22px -10px rgba(255, 204, 0, .8); }
.rrw-cta__btn:focus-visible { outline: 2px solid #ffcc00; outline-offset: 3px; }

/* ---------- Navigation, counter, progress ---------- */
.rrw__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4vw, 64px);
  margin-top: 4px;
}
.rrw__arrow {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  padding: 0;
  border: 1.5px solid #000001;
  border-radius: 50%;
  background: transparent;
  color: #000001;
  cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), opacity .25s var(--ease);
}
.rrw__arrow svg { width: 22px; height: 22px; }
.rrw__arrow--next { border-color: var(--rr-yellow); background: var(--rr-yellow); }
.rrw__arrow:hover:not(:disabled) { background: #000001; color: #fff; border-color: #000001; }
.rrw__arrow:focus-visible { outline: 2px solid #000001; outline-offset: 3px; }
.rrw__arrow:disabled { opacity: .3; cursor: default; }
.rrw__arrow--next:disabled { background: transparent; border-color: #000001; }
.rrw__count {
  min-width: 4.6em;
  font-family: var(--rr-cond);
  font-size: clamp(1.6rem, 2.2vw, 2.1rem);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.rrw__total { color: rgba(0, 0, 1, .4); }
.rrw__progress {
  width: min(64%, 1030px);
  height: 4px;
  margin: 22px auto 0;
  border-radius: 2px;
  background: rgba(0, 0, 1, .12);
  overflow: hidden;
}
.rrw__progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--rr-yellow);
  transform-origin: 0 50%;
  transform: scaleX(var(--rrw-progress, .1));
  transition: transform .35s var(--ease);
}
.rrw__help {
  margin-top: 18px !important;
  font-size: .95rem;
  letter-spacing: .14em;
  text-align: center;
  color: rgba(0, 0, 1, .7);
}

/* ---------- Tablet: two cards and part of the next ---------- */
@media (max-width: 1023px) {
  .rrw { --rrw-visible: 2.4; }
  .rrw__track { --rrw-card: calc((100cqw - var(--rrw-pad) - var(--rrw-gap) * 2) / var(--rrw-visible)); }
}

/* ---------- Mobile: one card and part of the next ---------- */
@media (max-width: 599px) {
  .rrw { --rrw-visible: 1.32; --rrw-pad: 20px; }
  .rrw__track { --rrw-card: calc((100cqw - var(--rrw-pad) - var(--rrw-gap)) / var(--rrw-visible)); }
  .rrw__head { flex-direction: column; align-items: flex-start; }
  .rrw__lede { text-align: left; }
  .rrw__arrow { width: 52px; height: 52px; }
  .rrw__progress { width: calc(100% - 40px); }
  .rrw__help { padding: 0 20px; letter-spacing: .08em; }
}

@media (prefers-reduced-motion: reduce) {
  .rrw-card, .rrw-card__img, .rrw__marker, .rrw__progress span, .rrw__arrow, .rrw-cta, .rrw-cta__btn { transition: none; }
  .rrw-card:hover .rrw-card__img, .rrw-card:focus-visible .rrw-card__img { transform: none; }
}
