/* =========================================================
   RENDER ROOM — "WHAT WE DO" (.rrs) and the shared white sheet (.rr-sheet)

   .rr-sheet wraps "The Work" carousel and this section: one white
   background, one grain texture and one rounded frame, so there is no
   seam between them. Inside it, the carousel hands its own background,
   grain, bottom margin and corners to the sheet; nothing else changes.
   Uses --rr-cond and --rr-yellow from render-room.css.
   ========================================================= */

.rr-sheet {
  position: relative;
  isolation: isolate;
  margin: 0 var(--frame-gap) var(--frame-gap);
  border-radius: var(--radius-frame);
  overflow: hidden;
  overflow: clip;
  background: #fbfbfa;                      /* same white as the carousel */
}
.rr-sheet::after {                          /* same grain as the carousel */
  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");
}
.rr-sheet > .rrw { margin: 0; border-radius: 0; background: transparent; isolation: auto; }
.rr-sheet > .rrw::after { content: none; }

/* ---------- WHAT WE DO ---------- */
.rrs {
  --rrs-pad: var(--pad-x);                   /* same side margins as the carousel */
  --rrs-ph: 93%;                             /* playhead position across the tracks */
  position: relative;
  container-type: inline-size;
  padding: clamp(36px, 4vw, 60px) 0 clamp(44px, 5vw, 76px);
  color: #000001;
}
:where(.rrs) :is(h2, h3, p, ul) { margin: 0; }

.rrs__head { padding: 0 var(--rrs-pad); }
.rrs__label {
  font-family: var(--rr-cond);
  font-size: clamp(.95rem, 1.2vw, 1.15rem);
  letter-spacing: .32em;
  text-transform: uppercase;
}
.rrs__title {
  max-width: 9.5em;
  margin-top: 8px;
  font-family: var(--rr-cond);
  font-weight: 400;
  font-size: clamp(3rem, 7.6cqw, 7.6rem);
  line-height: .9;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.rrs__q { color: var(--rr-yellow); }
.rrs__lede {
  margin-top: clamp(14px, 1.6vw, 22px);
  font-size: clamp(1.05rem, 1.6cqw, 1.5rem);
  line-height: 1.38;
}

/* ---------- Tracks ---------- */
.rrs__tracks {
  position: relative;
  margin-top: clamp(30px, 3.4vw, 52px);
  padding: 0 calc(var(--rrs-pad) - 26px);   /* rows tint slightly wider than the text */
}
.rrs__ruler {
  height: 22px;
  margin: 0 26px 12px;
  background:
    linear-gradient(rgba(0, 0, 1, .55), rgba(0, 0, 1, .55)) 0 100% / 100% 1.5px no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 1, .55) 0 1.5px, transparent 1.5px calc(100% / 6)) 0 100% / calc(100% + 1.5px) 18px no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 1, .35) 0 1px, transparent 1px calc(100% / 24)) 0 100% / calc(100% + 1px) 8px no-repeat;
}
.rrs__playhead {                             /* thin yellow playhead, right of all text and graphics */
  position: absolute;
  z-index: 2;
  top: -6px; bottom: 0;
  left: calc(26px + (100% - 52px) * .93);
  width: 3px;
  margin-left: -1.5px;
  background: var(--rr-yellow);
  pointer-events: none;
}
.rrs__playhead::before {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  margin-left: -10px;
  border: 10px solid transparent;
  border-top: 16px solid var(--rr-yellow);
  border-bottom: 0;
}

.rrs__list { padding: 0; list-style: none; }
.rrs-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1.3fr) minmax(0, .95fr) minmax(0, .85fr);
  grid-template-areas: "num name desc gfx";
  align-items: center;
  column-gap: clamp(20px, 2.6vw, 44px);
  min-height: clamp(96px, 7.4vw, 114px);
  padding: 12px calc((100% - 52px) * .085 + 26px) 12px 26px;   /* graphics end before the playhead */
  border-top: 1px solid rgba(0, 0, 1, .12);
  transition: background-color .3s var(--ease);
}
.rrs-row:last-child { border-bottom: 1px solid rgba(0, 0, 1, .12); }
.rrs-row:hover { background-color: #fff8dc; }

.rrs-row__num {
  grid-area: num;
  display: flex;
  align-items: center;
  height: 44px;
  padding-right: 18px;
  border-right: 1.5px solid rgba(0, 0, 1, .2);
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(0, 0, 1, .45);
}
.rrs-row__name {
  grid-area: name;
  font-family: var(--rr-cond);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.1cqw, 3.2rem);
  line-height: .95;
  text-wrap: balance;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.rrs-row__desc {
  grid-area: desc;
  max-width: 24em;
  font-size: clamp(.98rem, 1.32cqw, 1.22rem);
  line-height: 1.42;
  color: rgba(0, 0, 1, .86);
}
.rrs-gfx {
  grid-area: gfx;
  justify-self: start;
  width: 100%;
  max-width: 360px;
  height: auto;
  overflow: visible;
}

/* ---------- Hover: one small, settled movement per graphic ---------- */
.rrs-gfx * { transition: transform .45s var(--ease), fill .3s var(--ease); transform-box: fill-box; transform-origin: center; }
.rrs-row--reels:hover .rrs-clip--1 { transform: translateX(8px); }
.rrs-row--reels:hover .rrs-clip--2 { transform: translateX(-6px); }
.rrs-row--reels:hover .rrs-clip--3 { transform: translateX(5px); }
.rrs-row--ads:hover .rrs-crop--tl { transform: translate(-5px, -4px); }
.rrs-row--ads:hover .rrs-crop--tr { transform: translate(5px, -4px); }
.rrs-row--ads:hover .rrs-crop--bl { transform: translate(-5px, 4px); }
.rrs-row--ads:hover .rrs-crop--br { transform: translate(5px, 4px); }
.rrs-row--long:hover .rrs-ph { transform: translateX(40px); }
.rrs-row--motion:hover .rrs-key--hi { transform: scale(1.35); fill: #000001; }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .rrs-row {
    grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "num name desc" "num gfx gfx";
    row-gap: 14px;
    padding-top: 20px; padding-bottom: 20px;
    padding-right: calc((100% - 52px) * .1 + 26px);
  }
  .rrs-row__num { align-self: start; height: 34px; }
  .rrs-gfx { max-width: 300px; }
}

/* ---------- Mobile: number, name, description, smaller graphic ---------- */
@media (max-width: 599px) {
  .rrs { --rrs-pad: 20px; }
  .rrs__tracks { padding: 0 6px; }
  .rrs__ruler { margin: 0 14px 10px; }
  .rrs__playhead { left: calc(100% - 22px); }
  .rrs-row {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas: "num name" "num desc" "num gfx";
    row-gap: 10px;
    column-gap: 14px;
    padding: 20px 40px 22px 14px;
  }
  .rrs-row__num { height: auto; padding: 4px 10px 4px 0; font-size: .95rem; }
  .rrs-row__name { font-size: clamp(1.7rem, 8.4vw, 2.2rem); }
  .rrs-gfx { max-width: 220px; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .rrs-gfx *, .rrs-row { transition: none; }
  .rrs-row:hover .rrs-gfx * { transform: none; }
  .rrs-row--motion:hover .rrs-key--hi { fill: #000001; }
}
