/* ///////////////////////// START public/css/modules/modal.css (MODIFIED) ///////////////////////// */
/* MODIFIED (version 2.28): hero picture carousel (Previous / Next) with a 25% peek */
/* MODIFIED (version 2.27): Details = 3 sections 125px apart, "Explore File" title, Clients logo cells */
/* MODIFIED (version 2.25): phones — Details header floats over the picture with tags + dark 49px close, 25px left edge */
/* MODIFIED (version 2.14): no top padding on pictures, intro gap 0, new Explore card (Figma 322:52731),
   Figma viewer fills the window */
/* MODIFIED (version 2): work pages get a top header + inline Details panel + gallery captions */
/* MODIFIED (v9): tokens only — gaps 30 (--spacer06), close 49px in a 79px frame, rounded
   sections --radius-rounded, Explore title = display type, Flip Phone = Paragraph Medium */
/* MODIFIED (v7): book prototype embed (no controls), phone-upright "Flip Phone" screen */
/* MODIFIED (v6): the window scales up from the pressed card (rwsModal.js). Dark round close
   button, book placeholder page, rounded-section overlay, mobile sizes. */
/* MODIFIED (v4): project page fills the screen, room for the drawer bar, rounded gallery
   section and "Explore the full project" panel. */
/* NEW FILE: public/css/modules/modal.css — styles for js/modules/rwsModal.js */

.rws-modal {
  position: absolute;
  inset: 0;
  z-index: var(--z-modal);
  pointer-events: none;
}

.rws-modal.is-open { pointer-events: auto; }

/* ///////////////////////// START window (MODIFIED v6) ///////////////////////// */
.rws-modal__window {
  position: absolute;
  left: 0;
  top: var(--rws-modal-top);
  width: 100%;
  height: calc(100% - var(--rws-modal-top));
  overflow: hidden;
  border-radius: 0;
  background: var(--color-bcg-e01);
  transform-origin: 0 0;       /* scale-up starts at the card's top-left */
  visibility: hidden;
  will-change: transform, clip-path;
}

.rws-modal.is-open .rws-modal__window { visibility: visible; }
.rws-modal.is-closing { pointer-events: none; }

/* Close button + drawer bar fade in once the page has filled the screen */
.rws-modal__close,
.rws-modal__drawer .rws-drawer__bar {
  opacity: 0;
  transition: opacity var(--motion-duration) var(--motion-easing);
}
.rws-modal.is-settled .rws-modal__close,
.rws-modal.is-settled .rws-modal__drawer .rws-drawer__bar { opacity: 1; }

/* Book page (Figma 783:182846) */
.rws-modal__window--dark { background: var(--color-book-page); }
/* ///////////////////////// END window (MODIFIED v6) ///////////////////////// */

.rws-modal__scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: var(--size-drawer-bar);  /* room for the drawer bar */
}

/* Figma 783:183011: 79px frame 10px from the top-right, 49px dark circle */
.rws-modal__close {
  position: absolute;
  top: var(--spacer02);
  right: var(--spacer02);
  z-index: 4;                  /* above the drawer bar */
  padding: var(--spacer03);
}

.rws-modal__close-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--size-close);
  height: var(--size-close);
  border-radius: var(--radius-circle);
  background: var(--color-close-dark);
  color: var(--color-white);
  transition: transform var(--motion-duration) var(--motion-easing);
}

.rws-modal__close:hover .rws-modal__close-button { transform: scale(var(--scale-press)); }

.rws-modal__close-button img,
.rws-modal__close-button svg { display: block; width: var(--size-icon-l); height: var(--size-icon-l); }

.rws-modal__details {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  height: var(--size-drawer-bar-mobile);
  padding: var(--spacer03);
  pointer-events: none;
}

.rws-modal__details > * { pointer-events: auto; }

/* Modal gallery sections */
.rws-modal__body {
  display: flex;
  flex-direction: column;
  gap: var(--spacer06);
  padding: var(--spacer06) 0;
}

.rws-modal__full {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.rws-modal__full--first { margin-top: calc(var(--spacer06) * -1); }  /* hero sits flush with the top edge */

.rws-modal__pair {
  display: flex;
  align-items: center;
  width: 100%;
}

.rws-modal__pair-item {
  position: relative;
  flex: 1 0 0;
  min-width: var(--size-pair-min-w);
  min-height: var(--size-pair-min-h);
  overflow: hidden;
  border-radius: var(--radius-card);
}

.rws-modal__band {
  position: relative;
  width: 100%;
  background: var(--color-black);
}

.rws-modal__band-img {
  position: absolute;
  object-fit: cover;
}

.rws-modal__square {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ratio-square);
  overflow: hidden;
  border-radius: var(--radius-card);
}

.rws-modal__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ///////////////////////// START rounded + explore (NEW v4) ///////////////////////// */
.rws-modal__rounded { padding: 0 var(--spacer13); }

.rws-modal__rounded-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-rounded);
  background: var(--color-black);
}

/* Cut-out image over a rounded section (centred) */
.rws-modal__rounded-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--overlay-rounded-width);
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Book placeholder — "Rei Watanabe  ☺  Design Process" centred on dark */
.rws-modal__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacer04);
  min-height: calc(100vh - var(--size-drawer-bar));
  color: var(--color-bse-e04);
  font-family: var(--paragraph-font-family);
  font-size: var(--rws-text-size);
  line-height: var(--rws-text-line);
}

.rws-modal__placeholder-mark {
  width: var(--size-placeholder-mark);
  height: var(--size-placeholder-mark);
  border-radius: var(--radius-circle);
  background: var(--color-bse-e04);
}

/* Figma 432:154685: 300px outer padding (capped on smaller screens), panel, 75px gaps */
.rws-explore { padding: min(var(--spacer17), 15vw); }

.rws-explore__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacer12);
  padding: var(--spacer12) var(--spacer15);
  border-radius: var(--radius-card);
  background: var(--color-explore);
}

.rws-explore__title {
  margin: 0;
  color: var(--color-black);
  font-family: var(--header-font-family);
  font-size: var(--display-font-size);
  font-weight: var(--regular);
  line-height: var(--display-line-height);
  letter-spacing: var(--display-letter-spacing);
  white-space: nowrap;
}

.rws-explore__preview {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ratio-explore);
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-explore-dark);
  cursor: pointer;
}

.rws-explore__preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--opacity-explore);   /* Figma lays the dark colour over the image */
}

/* NEW (version 2.10): the Figma file thumbnail shows at full strength (no dark overlay) */
.rws-explore__preview-img--figma { opacity: 1; object-position: 50% 0; }

.rws-explore__preview-logo {
  position: absolute;
  inset: var(--explore-logo-inset);
  width: auto;
  height: auto;
  object-fit: contain;
}

.rws-explore__pill {
  position: absolute;
  left: var(--spacer01);
  top: var(--spacer01);
  display: inline-flex;
  align-items: center;
  gap: var(--spacer02);
  padding: var(--padding-pill);
  border-radius: var(--radius-title);
  background: var(--color-bse-e04);
  color: var(--color-ink-e06);
  font-family: var(--label-font-family);
  font-size: var(--rws-label-size);
  line-height: var(--rws-label-line);
  white-space: nowrap;
}

.rws-file__pill { position: static; }
.rws-explore__pill-icon { width: var(--size-figma-icon-w); height: var(--size-icon); object-fit: contain; }

.rws-explore__button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacer03);
  height: var(--size-explore-button);
  padding: var(--padding-button);
  border: var(--stroke-hair) solid var(--color-black);
  border-radius: var(--radius-button);
  background: var(--color-explore);
  color: var(--color-ink-e03);
  font-family: var(--label-font-family);
  font-size: var(--rws-label-size);
  transition: background-color var(--motion-duration) var(--motion-easing);
}

.rws-explore__button:hover { background: var(--color-hover); }
/* ///////////////////////// END rounded + explore (NEW v4) ///////////////////////// */
/* ///////////////////////// START mobile (NEW v6) ///////////////////////// */
/* Figma 669:65944 (402px): hero on top, gallery stacks, smaller corners + paddings */
.rws-is-mobile .rws-modal__close { top: var(--spacer02); right: var(--spacer02); padding: var(--spacer03); }
.rws-is-mobile .rws-modal__close-button { width: var(--size-close-mobile); height: var(--size-close-mobile); background: var(--color-scrim-light); color: var(--color-black); }
.rws-is-mobile .rws-modal__body { gap: var(--spacer03); padding: var(--spacer03) 0; }
.rws-is-mobile .rws-modal__full--first { margin-top: calc(var(--spacer03) * -1); }
.rws-is-mobile .rws-modal__pair-item { min-width: 0; min-height: 0; border-radius: var(--radius-tab); }
.rws-is-mobile .rws-modal__rounded { padding: 0 var(--spacer04); }
.rws-is-mobile .rws-modal__rounded-frame { border-radius: var(--radius-rounded-m); }
.rws-is-mobile .rws-explore { padding: var(--spacer05); }
.rws-is-mobile .rws-explore__panel { gap: var(--spacer06); padding: var(--spacer08) var(--spacer04); }
.rws-is-mobile .rws-explore__title { white-space: normal; text-align: center; line-height: var(--display-font-size); }
.rws-is-mobile .rws-explore__button { height: var(--size-explore-button-mobile); padding: 0 var(--spacer06); }
/* ///////////////////////// END mobile (NEW v6) ///////////////////////// */
/* ///////////////////////// START book prototype (NEW v7) ///////////////////////// */
/* Desktop + phone sideways (Figma 783:182846 / 855:30421): prototype fills the page above the bar */
.rws-modal__proto {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: var(--size-drawer-bar);
  overflow: hidden;
  background: var(--color-book-page);
}

.rws-modal__proto-frame {
  position: absolute;
  inset: calc(var(--rws-proto-crop, 0px) * -1);
  width: calc(100% + var(--rws-proto-crop, 0px) * 2);
  height: calc(100% + var(--rws-proto-crop, 0px) * 2);
  border: 0;
  background: var(--color-book-page);
}

.rws-modal__window--proto .rws-modal__scroll { overflow: hidden; }

/* Dark book page: the collapsed bar sits on the dark background */
.rws-modal__window--dark .rws-drawer:not(.is-open) { background: var(--color-book-page); }
.rws-modal__window--dark .rws-drawer:not(.is-open) .rws-drawer__title { color: var(--color-bse-e04); }
.rws-modal__window--dark .rws-drawer:not(.is-open) .rws-drawer__tags .rws-chip { background: var(--color-white); }
.rws-modal__window--dark .rws-drawer:not(.is-open) .rws-drawer__toggle-button { background: var(--color-white); }

/* "Flip Phone" labels (Figma 855:75928): hidden everywhere except phones held upright */
.rws-flip,
.rws-flip__label--fixed { display: none; }

.rws-flip__label {
  position: absolute;
  padding: var(--padding-flip);
  border-radius: var(--radius-xs);
  background: var(--color-ink-e06);
  color: var(--color-bse-e05);
  font-family: var(--paragraph-font-family);
  font-size: var(--paragraph-font-size);
  font-weight: var(--medium);
  line-height: var(--paragraph-line-height);
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(var(--rws-flip-rotate, 0deg));
  animation: rws-flip-pop var(--motion-pop) var(--motion-easing) both;   /* pops in and stays */
}

@keyframes rws-flip-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rws-flip-rotate, 0deg)) scale(var(--scale-pop-from)); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--rws-flip-rotate, 0deg)) scale(1); }
}

/* Phone upright (Figma 855:29936): white page, prototype as a centred 16:9 band */
.rws-is-mobile.rws-is-portrait .rws-modal__window--proto { background: var(--color-white); }
.rws-is-mobile.rws-is-portrait .rws-modal__window--proto .rws-modal__proto {
  top: 50%;
  bottom: auto;
  aspect-ratio: var(--ratio-proto);
  transform: translateY(-50%);
}
.rws-is-mobile.rws-is-portrait .rws-modal__window--proto .rws-modal__proto-frame { pointer-events: none; }
.rws-is-mobile.rws-is-portrait .rws-modal__window--proto .rws-flip {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}
.rws-is-mobile.rws-is-portrait .rws-modal__window--proto .rws-flip__label--fixed {
  display: block;
  left: 50%;
  top: var(--flip-fixed-top);
  z-index: 1;
  transform: translate(-50%, -50%);
  animation: none;
}
.rws-is-mobile.rws-is-portrait .rws-modal__window--proto .rws-modal__drawer { display: none; }
.rws-is-mobile .rws-modal__window--proto .rws-modal__close-button { background: var(--color-close); color: var(--color-black); }

/* Phone sideways (Figma 855:30421): prototype above the bar */
.rws-is-mobile.rws-is-landscape .rws-modal__window--proto .rws-modal__proto { bottom: var(--size-drawer-bar-mobile); }
/* ///////////////////////// END book prototype (NEW v7) ///////////////////////// */
/* ///////////////////////// START header page (NEW version 2) ///////////////////////// */
/* Figma v05 Work/details 295:370371: top header bar (drawer.css .rws-drawer--header),
   no bottom bar -> the scroll starts under the header and runs to the bottom edge */
.rws-modal__window--header .rws-modal__scroll {
  padding-top: var(--size-header-bar);
  padding-bottom: 0;
}
/* close button sits inside the header, vertically centred */
.rws-modal__window--header .rws-modal__close { top: calc((var(--size-header-bar) - var(--size-close-frame)) / 2); right: 0; }
.rws-modal__window--header .rws-modal__drawer { z-index: 3; }

/* Gallery caption: dark box bottom-left of the image (468 x 75, radius 4, 10/15, 12px) */
.rws-modal__has-caption { position: relative; }
.rws-modal__caption {
  position: absolute;
  left: var(--spacer05);
  bottom: var(--spacer05);
  z-index: 2;
  max-width: var(--size-caption-w);
  margin: 0;
  padding: var(--padding-caption);
  border-radius: var(--radius-caption);
  background: var(--color-caption);
  color: var(--color-caption-ink);
  font-family: var(--paragraph-font-family);
  font-size: var(--paragraph-font-size);
  line-height: var(--paragraph-line-height);
}

/* ///////////////////////// START details panel (MODIFIED version 2.2) ///////////////////////// */
/* Figma Work/details 295:370371 "Properties": full-width #f8f8fa sheet, 25px insets.
   v2.0 had an extra #f1f1f1 frame with 30px corners — removed. */
.rws-modal__panel {
  margin: 0;
  padding: var(--spacer05) 0 var(--spacer15);
  background: var(--color-panel-inner);
}
.rws-modal__panel .rws-drawer__body {
  flex: none;
  overflow: visible;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-ink-e06);
}
/* Intro: headline left half (750 max), description right half, industries row under */
.rws-modal__panel .rws-drawer__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--spacer05);
  row-gap: 0;
  align-items: start;
  padding: var(--spacer05);
}
.rws-modal__panel .rws-drawer__headline { grid-column: 1; grid-row: 1; max-width: var(--size-headline-max); padding-bottom: var(--spacer05); }
.rws-modal__panel .rws-drawer__description { grid-column: 2; grid-row: 1; max-width: none; }
.rws-modal__panel .rws-drawer__industries { grid-column: 1 / -1; grid-row: 2; padding-top: var(--spacer05); gap: var(--spacer-xs); }
/* Same-brand works at 50% (Figma row: 562 tall, 25px corners, 12.5 padding, 25 gap) */
.rws-drawer__related {
  margin: var(--spacer05) 0 var(--spacer10);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.rws-drawer__related::-webkit-scrollbar { display: none; }
.rws-drawer__related-track {
  display: flex;
  gap: var(--spacer05);
  width: max-content;
  height: var(--size-related-row);
  padding: var(--padding-related);
}
.rws-drawer__related-item {
  position: relative;
  flex: none;
  height: 100%;
  aspect-ratio: var(--rws-related-ratio, 1 / 1);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--color-bse-e04);
  cursor: pointer;
}
.rws-drawer__related-media { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Details / Credits: title 50 / 45 (-3), rows = two equal columns, 25px top + bottom */
.rws-modal__panel .rws-drawer__section { gap: 0; padding: var(--spacer05) 0; }
.rws-modal__panel .rws-drawer__section-title { padding: var(--spacer05); letter-spacing: var(--bio-letter-spacing); }
.rws-modal__panel .rws-drawer__props,
.rws-modal__panel .rws-drawer__credits-list { gap: 0; padding: var(--spacer05); }
.rws-modal__panel .rws-drawer__prop,
.rws-modal__panel .rws-drawer__credit-group { column-gap: 0; padding: var(--spacer05) 0; }
.rws-modal__panel .rws-drawer__props dd { max-width: none; }
/* ///////////////////////// END details panel (MODIFIED version 2.2) ///////////////////////// */
.rws-is-mobile .rws-modal__caption { left: var(--spacer03); bottom: var(--spacer03); max-width: calc(100% - var(--spacer03) * 2); }
.rws-is-mobile .rws-modal__panel .rws-drawer__intro { grid-template-columns: 1fr; }
.rws-is-mobile .rws-modal__panel .rws-drawer__description { grid-column: 1; grid-row: 2; }
.rws-is-mobile .rws-modal__panel .rws-drawer__industries { grid-row: 3; }
.rws-is-mobile .rws-drawer__related-track { height: calc(var(--size-related-row) / 2); }
.rws-is-mobile .rws-modal__window--header .rws-modal__scroll { padding-top: var(--size-drawer-bar-mobile); }
/* ///////////////////////// END header page (NEW version 2) ///////////////////////// */
/* ///////////////////////// START details fixes (NEW version 2.14) ///////////////////////// */
/* Pictures start at the very top of the page (no header-bar padding; the header floats over) */
.rws-modal__window--header .rws-modal__scroll { padding-top: 0; }
.rws-is-mobile .rws-modal__window--header .rws-modal__scroll { padding-top: 0; }
/* Intro: no gap, so the 2nd column (description) lines up with the 2nd column of Details / Credits */
.rws-modal__panel .rws-drawer__intro { column-gap: 0; row-gap: 0; }

/* "Explore" (Figma 322:52731): title like Credits, then the file thumbnail card —
   16:9, 20px corners, #f8f8fa, soft layered shadow, Figma pill top-left (5px inset) */
.rws-explore.rws-explore--v05 { padding: 0; background: transparent; }
.rws-explore--v05 .rws-explore__panel {
  display: block;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.rws-explore--v05 .rws-explore__title {
  padding: var(--spacer05);
  white-space: normal;
  letter-spacing: var(--bio-letter-spacing);
}
.rws-explore--v05 .rws-explore__card {
  padding: var(--spacer05);
  filter: drop-shadow(0 5px 5.375px rgba(0, 0, 0, 0.1)) drop-shadow(0 19.75px 9.875px rgba(0, 0, 0, 0.02)) drop-shadow(0 44.5px 13.375px rgba(0, 0, 0, 0.05)) drop-shadow(0 79px 15.75px rgba(0, 0, 0, 0.01));
}
.rws-explore--v05 .rws-explore__preview {
  width: 100%;
  aspect-ratio: 1100 / 618.75;
  border-radius: var(--radius-card);
  background: var(--color-panel-inner);
}
.rws-explore--v05 .rws-explore__preview:focus-visible { outline: 2px solid var(--color-ink-e06); outline-offset: 2px; }
.rws-explore--v05 .rws-explore__preview-img { object-fit: cover; }
.rws-explore--v05 .rws-explore__pill {
  left: var(--spacer01);
  top: var(--spacer01);
  gap: var(--spacer01);
  height: var(--size-chip);
  padding: 0 var(--spacer03);
  border-radius: var(--radius-title);
  background: var(--color-explore-pill);
  color: var(--color-explore-pill-ink);
  font-family: var(--label-font-family);
  font-size: var(--rws-label-size);
  line-height: var(--rws-label-line);
}
.rws-explore--v05 .rws-explore__pill-icon { width: 13px; height: var(--size-icon); padding: 0; }
.rws-is-mobile .rws-explore.rws-explore--v05 { padding: 0; }

/* Figma viewer (books + Explore): the file fills 100% of the window above the bottom bar */
.rws-modal__window--proto .rws-modal__proto { left: 0; right: 0; top: 0; width: 100%; }
.rws-modal__window--proto .rws-modal__proto-frame { width: 100%; height: 100%; }
/* collapsed bottom bar: only the bar shows (the page title no longer peeks out under it) */
.rws-drawer:not(.is-open) .rws-drawer__body { visibility: hidden; }
/* ///////////////////////// END details fixes (NEW version 2.14) ///////////////////////// */
/* ///////////////////////// START hero description (NEW version 2.19) ///////////////////////// */
/* Notion Cards "Description": bottom-left of the screen, 25px in, while the hero is on screen
   (rwsModal.js adds .is-pinned), then it rests at the hero's bottom-left */
/* MODIFIED (version 2.26): position: fixed removed (broke inside the opening transform) — see "sticky caption" */
/* ///////////////////////// START sticky caption (NEW version 2.26) ///////////////////////// */
/* Figma Work/details: the description stays at the bottom-left of the screen while the hero is
   scrolled, then leaves with the hero. The track covers the hero; the caption is sticky in it. */
.rws-modal__full--first { overflow: clip; }     /* clip (not hidden) so sticky follows the page scroll */
.rws-modal__caption-track {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--spacer05);
  pointer-events: none;
}
.rws-modal__caption-track .rws-modal__caption.rws-modal__caption--hero {
  position: sticky;
  left: auto;
  bottom: var(--spacer05);
  align-self: flex-start;
  pointer-events: auto;
}
.rws-is-mobile .rws-modal__caption-track .rws-modal__caption.rws-modal__caption--hero { max-width: 100%; }
/* ///////////////////////// END sticky caption (NEW version 2.26) ///////////////////////// */
/* ///////////////////////// END hero description (NEW version 2.19) ///////////////////////// */
/* ///////////////////////// START related brands (NEW version 2.23) ///////////////////////// */
/* Figma 448:343030: "Related" title, then a sideways carousel of 625px brand cells (logo centred,
   pill centred under the cell, the brand's work rises in over the logo on hover) */
.rws-related { padding: var(--spacer05) 0 var(--spacer10); }
.rws-related__title { padding: var(--spacer05); letter-spacing: var(--bio-letter-spacing); }
.rws-related__track {
  display: flex;
  gap: var(--spacer05);
  padding: var(--padding-related);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.rws-related__track::-webkit-scrollbar { display: none; }
.rws-card.rws-related__cell {
  position: relative;
  flex: none;
  width: var(--size-stack);
  padding-bottom: calc(var(--size-stack-title-gap) + var(--size-stack-title));
}
.rws-related__cell .rws-card__media { height: var(--size-stack); }
.rws-related__cell .rws-card__brand-logo { width: var(--size-related-logo); height: var(--size-related-logo); }
.rws-related__cell .rws-card__details {
  top: auto;
  bottom: 0;
  justify-content: center;
  padding: 0;
}
.rws-related__cell .rws-card__tags { display: none; }
.rws-is-mobile .rws-card.rws-related__cell { width: 80vw; }
.rws-is-mobile .rws-related__cell .rws-card__media { height: 80vw; }
/* ///////////////////////// END related brands (NEW version 2.23) ///////////////////////// */
/* ///////////////////////// START mobile details (NEW version 2.25) ///////////////////////// */
/* Figma mobile Details 359:56850 (408 wide): header floats over the picture — client pill 25px in,
   the work's tags (light pills) wrap under it, a 49px dark round close button 25px from the
   top-right; everything below lines up 25px from the left edge. Phones only. */
.rws-is-mobile .rws-modal .rws-drawer.rws-drawer--header:not(.is-scrolled) { background: transparent; }
.rws-is-mobile .rws-modal .rws-drawer.rws-drawer--header .rws-drawer__bar {
  padding: var(--spacer05) calc(var(--size-close) + var(--spacer05) * 2) var(--spacer02) var(--spacer05);
  background: transparent;
}
.rws-is-mobile .rws-modal .rws-drawer.rws-drawer--header .rws-drawer__bar-main { row-gap: var(--spacer-xs); column-gap: var(--spacer-hair); }
.rws-is-mobile .rws-modal .rws-drawer.rws-drawer--header .rws-drawer__tags { display: flex; flex-wrap: wrap; width: 100%; gap: var(--spacer-xs); }
.rws-is-mobile .rws-modal .rws-drawer.rws-drawer--header .rws-drawer__tags .rws-chip { background: var(--color-bse-e04); color: var(--color-ink-e06); }
.rws-is-mobile .rws-modal__close { top: var(--spacer05); right: var(--spacer05); padding: 0; }
.rws-is-mobile .rws-modal__close-button,
.rws-is-mobile .rws-modal__window--proto .rws-modal__close-button {
  width: var(--size-close);
  height: var(--size-close);
  background: var(--color-ink-e06);
  color: var(--color-white);
}
.rws-is-mobile .rws-modal__panel .rws-drawer__body { padding-left: var(--spacer05); padding-right: var(--spacer05); }
.rws-is-mobile .rws-modal__panel .rws-drawer__section-title { padding: var(--spacer05) 0; }
.rws-is-mobile .rws-modal__panel .rws-drawer__props,
.rws-is-mobile .rws-modal__panel .rws-drawer__credits-list { padding: 0; }
.rws-is-mobile .rws-modal__caption { left: var(--spacer05); max-width: calc(100% - var(--spacer05) * 2); }
/* ///////////////////////// END mobile details (NEW version 2.25) ///////////////////////// */
/* ///////////////////////// START explore in place (NEW version 2.26) ///////////////////////// */
/* Figma 495:75961 explore — default: grey #f1f2f7 module (15px corners, no shadow), the file card
   (shadow l01) centred, "See the full project ->" outlined pill 50px under it.
   hover: the module gets a soft shadow, the card shadow l03. press (.is-open): the module grows to
   the full width (1870 x 1052) and Figma's viewer fills it. 125px above + below, 25px sides. */
.rws-explore.rws-explore--inline { padding: var(--spacer14) var(--spacer05); background: var(--color-panel-inner); }
.rws-explore--inline .rws-explore__title { display: none; }   /* version 2.27: shown again, see "details sections" */
.rws-explore--v05.rws-explore--inline .rws-explore__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacer10);
  padding: var(--padding-explore-module);
  border-radius: var(--radius-explore-module);
  background: var(--color-bse-e04);
  cursor: pointer;
  transition: box-shadow var(--motion-duration) var(--motion-easing), padding var(--motion-open) var(--motion-open-easing);
}
.rws-explore--inline .rws-explore__card { width: 100%; padding: 0; filter: none; }
.rws-explore--inline .rws-explore__preview {
  border-radius: var(--radius-explore-module);
  box-shadow: var(--shadow-dsp-l01);
  transition: box-shadow var(--motion-duration) var(--motion-easing);
}
.rws-explore--inline:not(.is-open) .rws-explore__panel:hover { box-shadow: var(--shadow-explore-module); }
.rws-explore--inline:not(.is-open) .rws-explore__panel:hover .rws-explore__preview { box-shadow: var(--shadow-dsp-l03); }
.rws-explore--inline .rws-explore__more {
  display: inline-flex;
  align-items: center;
  gap: var(--spacer-xs);
  height: var(--size-close);
  padding: 0 var(--spacer04);
  border: 1px solid var(--color-ink-e06);
  border-radius: var(--radius-round);
  background: transparent;
  color: var(--color-ink-e06);
  font-family: var(--paragraph-font-family);
  font-size: var(--paragraph-font-size);
  line-height: var(--paragraph-line-height);
}
.rws-explore--inline .rws-explore__more:hover { background: var(--color-hover); }
/* press: the Figma file, in place */
.rws-explore--v05.rws-explore--inline.is-open .rws-explore__panel {
  padding: 0;
  aspect-ratio: var(--ratio-explore-open);
  cursor: default;
  box-shadow: var(--shadow-dsp-l03);
  overflow: hidden;
}
.rws-explore--inline.is-open .rws-explore__card,
.rws-explore--inline.is-open .rws-explore__more { display: none; }
.rws-explore__viewer { position: absolute; inset: 0; border-radius: var(--radius-explore-module); overflow: hidden; background: var(--color-panel-inner); }
.rws-explore__frame { width: 100%; height: 100%; border: 0; display: block; }
.rws-is-mobile .rws-explore.rws-explore--inline { padding: var(--spacer10) var(--spacer05); }
.rws-is-mobile .rws-explore--v05.rws-explore--inline.is-open .rws-explore__panel { aspect-ratio: 3 / 4; }
/* ///////////////////////// END explore in place (NEW version 2.26) ///////////////////////// */
/* ///////////////////////// START clients carousel (NEW version 2.26) ///////////////////////// */
/* Figma 295:374726 "Clients": agency stacks + brand logo cells side by side, every title pill
   under its box (same line), like the Agency page */
.rws-related__cell:not(.rws-related__cell--stack) .rws-card__details { bottom: calc((var(--size-stack-title-gap) + var(--size-stack-title)) * -1); }
.rws-related__cell--stack { cursor: pointer; }
.rws-related__cell--stack .rws-card__details--stack { top: auto; bottom: 0; }
/* ///////////////////////// END clients carousel (NEW version 2.26) ///////////////////////// */
/* ///////////////////////// START floating header (NEW version 2.26) ///////////////////////// */
/* Figma Work/details (2026-11-29): the header floats over the picture — no white bar; dark client
   pill, LIGHT tag pills (#f1f2f7). Once the page is scrolled (.is-scrolled) the white bar and the
   dark tags (v2.14) come back so the header stays readable over the text. */
.rws-modal .rws-drawer.rws-drawer--header:not(.is-scrolled) { background: transparent; }
.rws-modal .rws-drawer.rws-drawer--header:not(.is-scrolled) .rws-drawer__tags .rws-chip { background: var(--color-bse-e04); color: var(--color-ink-e06); }
/* ///////////////////////// END floating header (NEW version 2.26) ///////////////////////// */
/* ///////////////////////// START details sections (NEW version 2.27) ///////////////////////// */
/* Figma 295:374726 (2026-11-29 update): three sections, each with 125px under it —
   1. intro + the brand's other work, 2. Details + Credits + Clients, 3. "Explore File" (75px title) */
.rws-modal__panel .rws-drawer__related { margin-bottom: var(--spacer14); }
.rws-related { padding: var(--spacer05) 0 var(--spacer14); }
.rws-explore.rws-explore--inline { padding: 0 0 var(--spacer14); background: transparent; }
.rws-explore--v05.rws-explore--inline .rws-explore__title {
  display: block;
  margin: 0;
  padding: var(--spacer05);
  font-family: var(--header-font-family);
  font-size: var(--header-font-size);
  font-weight: var(--header-font-weight);
  line-height: var(--header-line-height);
  letter-spacing: var(--header-letter-spacing);
  text-align: left;
  white-space: normal;
}
.rws-explore--v05.rws-explore--inline .rws-explore__panel { margin: var(--spacer05); }
/* Clients (Figma clients interaction): default = the client's logo, big and centred, light pill
   under it (logo + name); hover = the logo fades, the client's work rises in stacked, pill turns dark */
.rws-related__cell .rws-card__media,
.rws-related__cell:hover .rws-card__media,
.rws-related__cell.is-hovered .rws-card__media { background: transparent; }
.rws-related__cell .rws-card__brand-logo {
  width: var(--size-client-logo);
  height: var(--size-client-logo);
  transition: opacity var(--motion-duration) var(--motion-easing);
}
.rws-related__cell:hover .rws-card__brand-logo,
.rws-related__cell.is-hovered .rws-card__brand-logo { opacity: 0; }
.rws-related__cell .rws-card__subtitle { display: none; }
/* every client pill sits under its 625 box (Figma title at y 685), agencies and brands alike */
.rws-card.rws-related__cell .rws-card__media { overflow: visible; }
.rws-card.rws-related__cell .rws-card__details { top: auto; bottom: calc((var(--size-stack-title-gap) + var(--size-stack-title)) * -1); }
.rws-related__cell .rws-card__brand { background: var(--color-bse-e04); color: var(--color-ink-e06); transition: background-color var(--motion-duration) var(--motion-easing), color var(--motion-duration) var(--motion-easing); }
.rws-related__cell .rws-card__brand-icon { filter: none; }
.rws-related__cell:hover .rws-card__brand { background: var(--color-ink-e06); color: var(--color-bse-e06); }
.rws-related__cell:hover .rws-card__brand-icon { filter: var(--filter-white); }
.rws-is-mobile .rws-related { padding-bottom: var(--spacer10); }
.rws-is-mobile .rws-explore.rws-explore--inline { padding-bottom: var(--spacer10); }
.rws-is-mobile .rws-explore--v05.rws-explore--inline .rws-explore__title { font-size: var(--title-font-size); line-height: var(--title-line-height); }
/* ///////////////////////// END details sections (NEW version 2.27) ///////////////////////// */
/* ///////////////////////// START hero carousel (NEW version 2.28) ///////////////////////// */
/* Figma 495:93892: the picture is the only live area (cursor label Previous / Next, click steps);
   the other card's picture lies over the first one; the 25% peek sits flush bottom-right */
.rws-hero--carousel { cursor: pointer; }
.rws-hero__swap { position: absolute; inset: 0; z-index: 1; display: none; }
.rws-hero--carousel.is-swapped .rws-hero__swap { display: block; }
.rws-hero__swap .rws-modal__img { width: 100%; height: 100%; object-fit: cover; }
.rws-hero__peek {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-duration) var(--motion-easing);
}
.rws-hero--carousel.is-peeking .rws-hero__peek { opacity: 1; }
.rws-hero__peek .rws-modal__img { width: 100%; height: 100%; object-fit: cover; }
.rws-is-mobile .rws-hero__peek { display: none; }
/* ///////////////////////// END hero carousel (NEW version 2.28) ///////////////////////// */
/* ///////////////////////// END public/css/modules/modal.css (MODIFIED) ///////////////////////// */
