/*
 * Portfolio pages (Creative, Events, Branding & Identity): featured case studies and the WorkGallery.
 * Site typography (Advent Pro), white background, purple selection with a yellow accent.
 */
.cw-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.cw-section {
  margin: 0 0 64px;
}

.cw-eyebrow {
  margin: 0 0 14px;
  color: #6b6578;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.cw-eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 3px;
  margin-inline-end: 10px;
  vertical-align: middle;
  border-radius: 3px;
  background: #fac400;
}

/* ---------------------------------------------------------------- Featured case study */
.cw-case {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e9e3f2;
  border-radius: 18px;
  background: #fff;
  color: #1e2333;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.cw-case:hover {
  border-color: #b9a6d6;
  color: #1e2333;
  text-decoration: none;
  box-shadow: 0 18px 36px -26px rgba(61, 28, 97, 0.45);
}

.cw-case:focus-visible {
  outline: 2px solid #542785;
  outline-offset: 3px;
}

.cw-case__media {
  display: block;
  min-height: 100%;
  overflow: hidden;
  background: #f4f0f9;
}

.cw-case__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.cw-case:hover .cw-case__media img {
  transform: scale(1.03);
}

.cw-case__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 34px;
}

.cw-case__client {
  color: #542785;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.cw-case__title {
  margin: 6px 0 14px;
  color: #1e2333;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  text-align: start;
}

.cw-case__text {
  margin-bottom: 16px;
  color: #3b3647;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}

.cw-case__tags {
  margin-bottom: 22px;
  color: #6b6578;
  font-size: 14px;
  font-weight: 600;
}

.cw-case__cta {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding-bottom: 3px;
  border-bottom: 3px solid #fac400;
  color: #542785;
  font-size: 16px;
  font-weight: 700;
}

.cw-case__cta i {
  font-size: 12px;
  transition: translate 0.2s ease;
}

.cw-case:hover .cw-case__cta i {
  translate: calc(4px * var(--rk-x, 1)) 0;
}

/* ---------------------------------------------------------------- Case-study cards (two-up) */
.cw-cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cw-cases > li {
  display: flex;
}

.cw-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e9e3f2;
  border-radius: 18px;
  background: #fff;
  color: #1e2333;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.cw-card:hover {
  border-color: #b9a6d6;
  color: #1e2333;
  text-decoration: none;
  box-shadow: 0 18px 36px -26px rgba(61, 28, 97, 0.45);
}

.cw-card:focus-visible {
  outline: 2px solid #542785;
  outline-offset: 3px;
}

.cw-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f4f0f9;
}

.cw-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.cw-card__media--logo {
  display: grid;
  place-items: center;
  padding: 0 18%;
  background: #f7f5fb;
}

.cw-card__media--logo img {
  height: auto;
  object-fit: contain;
}

.cw-card:hover .cw-card__media img {
  transform: scale(1.03);
}

.cw-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 24px 24px;
}

.cw-card__title {
  margin: 4px 0 10px;
  color: #1e2333;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  text-align: start;
}

.cw-card .cw-case__text {
  flex: 1;
}

/* ---------------------------------------------------------------- Film strip (Events) */
.cw-films {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cw-film {
  display: block;
  color: #1e2333;
  text-decoration: none;
}

.cw-film:hover {
  color: #1e2333;
  text-decoration: none;
}

.cw-film:focus-visible {
  outline: 2px solid #542785;
  outline-offset: 4px;
  border-radius: 12px;
}

.cw-film__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 10px;
  border-radius: 12px;
  background: #1e2333;
}

.cw-film__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.cw-film:hover .cw-film__media img {
  transform: scale(1.04);
}

.cw-film__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #542785;
  font-size: 15px;
  transform: translate(-50%, -50%);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cw-film__play i {
  margin-left: 3px;
}

.cw-film:hover .cw-film__play,
.cw-film:focus-visible .cw-film__play {
  background: #542785;
  color: #fff;
}

.cw-film__client {
  display: block;
  color: #542785;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cw-film__title {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.cw-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 3px;
  border-bottom: 3px solid #fac400;
  color: #542785;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.cw-link:hover {
  color: #3d1c61;
  text-decoration: none;
}

.cw-link:focus-visible {
  outline: 2px solid #542785;
  outline-offset: 3px;
}

.cw-link i {
  font-size: 12px;
}

/* ---------------------------------------------------------------- Selected work */
.cw-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 32px;
  margin-bottom: 18px;
}

.cw-heading {
  margin: 0;
  color: #1e2333;
  font-size: 26px;
  font-weight: 700;
}

.cw-intro {
  max-width: 520px;
  margin: 0;
  color: #3b3647;
  font-size: 16px;
  line-height: 1.6;
}

.cw-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ebe6f2;
}

.cw-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #e3dcee;
  border-radius: 999px;
  background: #fff;
  color: #3b3647;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.cw-filter:hover {
  border-color: #b9a6d6;
  color: #542785;
}

.cw-filter:focus-visible {
  outline: 2px solid #542785;
  outline-offset: 3px;
}

.cw-filter[aria-pressed="true"] {
  border-color: #542785;
  background: #542785;
  color: #fff;
  box-shadow: inset 0 -3px 0 #fac400;
}

.cw-filter__count {
  min-width: 24px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1ebf8;
  color: #542785;
  font-size: 12px;
  text-align: center;
}

.cw-filter[aria-pressed="true"] .cw-filter__count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Masonry: every piece keeps its true proportions */
.cw-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 4 220px;
  column-gap: 16px;
}

.cw-item {
  margin: 0 0 16px;
  break-inside: avoid;
}

.cw-item[hidden] {
  display: none !important;
}

.cw-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid #efeaf5;
  border-radius: 12px;
  background: #f6f3fa;
}

.cw-tile img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.6s ease;
}

.cw-tile:hover img {
  transform: scale(1.04);
}

.cw-tile:focus-visible {
  outline: 2px solid #542785;
  outline-offset: 3px;
}

.cw-tile__zoom,
.cw-tile__badge {
  position: absolute;
  inset-inline-end: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #542785;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px -6px rgba(30, 35, 51, 0.4);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cw-tile__zoom {
  width: 32px;
  height: 32px;
  justify-content: center;
}

.cw-tile__badge {
  padding: 6px 12px;
  opacity: 1;
  transform: none;
}

.cw-tile__badge i {
  font-size: 10px;
  transform: rotate(-45deg);
}

.cw-tile:hover .cw-tile__zoom,
.cw-tile:focus-visible .cw-tile__zoom {
  opacity: 1;
  transform: none;
}

.cw-more {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.cw-more__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid #542785;
  border-radius: 999px;
  background: #fff;
  color: #542785;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cw-more__btn:hover {
  background: #542785;
  color: #fff;
}

.cw-more__btn:focus-visible {
  outline: 2px solid #542785;
  outline-offset: 3px;
}

.cw-more__count {
  color: inherit;
  font-size: 13px;
  opacity: 0.75;
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 992px) {
  .cw-films {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cw-case {
    grid-template-columns: 1fr;
  }

  .cw-case__media {
    aspect-ratio: 2544 / 1320;
  }

  .cw-case__body {
    padding: 24px;
  }

  .cw-case__title {
    font-size: 27px;
  }
}

@media (max-width: 576px) {
  .cw-cases,
  .cw-films {
    grid-template-columns: 1fr;
  }

  .cw-card__title {
    font-size: 21px;
  }

  .cw-section {
    margin-bottom: 48px;
  }

  .cw-grid {
    columns: 2;
    column-gap: 10px;
  }

  .cw-item {
    margin-bottom: 10px;
  }

  .cw-filter {
    min-height: 40px;
    padding: 0 13px;
    font-size: 14px;
  }

  .cw-heading {
    font-size: 23px;
  }

  .cw-intro {
    font-size: 15px;
  }

  .cw-case__title {
    font-size: 24px;
  }

  .cw-tile__zoom {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cw-case,
  .cw-case__media img,
  .cw-card,
  .cw-card__media img,
  .cw-film__media img,
  .cw-film__play,
  .cw-case__cta i,
  .cw-filter,
  .cw-tile img,
  .cw-tile__zoom,
  .cw-more__btn {
    transition: none;
  }

  .cw-case:hover .cw-case__media img,
  .cw-card:hover .cw-card__media img,
  .cw-film:hover .cw-film__media img,
  .cw-tile:hover img {
    transform: none;
  }
}
