/* ==========================================================================
   BISPL — OUR WORK : PROJECT CARDS + PROJECT VIEWER
   --------------------------------------------------------------------------
   Namespace : .bwp-*   (isolated — never overrides existing site styles)
   Theme     : inherits the site theme system  html[data-theme="light|dark"]
               by mapping the already-defined --bis-* tokens.
   Scope     : everything BELOW the existing featured project block.

   v2 — PREMIUM CARD + ON-CARD CAROUSEL
   ------------------------------------
   The card is now a soft white surface: a large rounded image on top,
   the project title underneath, and — when a project has more than one
   photo — the gallery controls sit ON the card itself:

       • circular prev / next arrows over the image
       • an "01 / 06" counter pill
       • pagination dots under the image
       • a "View Gallery · 06 Photos" line in the footer

   Browsing on the card does NOT open the popup. Clicking the image does,
   and it opens on whatever photo the visitor had reached (see
   bbc-projects.js). Single-image projects hide every control, so the
   carousel affordance is only ever shown when it is real.
   ========================================================================== */


/* ==========================================================
   1. DESIGN TOKENS
   Mapped from the existing --bis-* theme tokens so the
   section flips automatically with the site theme switcher.
========================================================== */

.bwp,
.bwp-modal {
  --bwp-accent: var(--bis-orange, #f36b21);
  --bwp-accent-hover: var(--bis-orange-hover, #ff7b2d);

  --bwp-bg: var(--bis-bg, #ffffff);
  --bwp-soft: var(--bis-bg-soft, #f5f6f7);

  --bwp-heading: var(--bis-heading, #11191f);
  --bwp-text: var(--bis-text, #69737a);
  --bwp-muted: var(--bis-muted, #9aa1a6);

  --bwp-line: var(--bis-border, rgba(17, 25, 31, .12));
  --bwp-line-strong: rgba(17, 25, 31, .26);

  --bwp-media: #0c151b;
  --bwp-stage: #0a1116;

  --bwp-shadow: 0 30px 70px -34px rgba(8, 14, 20, .42);
  --bwp-shadow-modal: 0 60px 150px -50px rgba(0, 0, 0, .55);

  --bwp-ease: cubic-bezier(.16, .8, .2, 1);
  --bwp-radius: 2px;

  /* ---- v2 card surface ---- */
  --bwp-card-surface: #ffffff;
  --bwp-card-border: rgba(17, 25, 31, .07);
  --bwp-card-radius: clamp(20px, 1.5vw, 28px);
  --bwp-card-pad: clamp(10px, .8vw, 14px);
  --bwp-media-radius: clamp(14px, 1.1vw, 20px);

  --bwp-card-shadow:
    0 1px 2px rgba(12, 20, 28, .04),
    0 12px 28px -18px rgba(12, 20, 28, .28);

  --bwp-card-shadow-hover:
    0 2px 4px rgba(12, 20, 28, .05),
    0 34px 60px -28px rgba(12, 20, 28, .34);
}

html[data-theme="dark"] .bwp,
html[data-theme="dark"] .bwp-modal {
  --bwp-line-strong: rgba(255, 255, 255, .3);
  --bwp-media: #0b1318;
  --bwp-stage: #070c10;
  --bwp-shadow: 0 30px 70px -34px rgba(0, 0, 0, .8);
  --bwp-shadow-modal: 0 60px 150px -50px rgba(0, 0, 0, .85);

  --bwp-card-surface: rgba(255, 255, 255, .038);
  --bwp-card-border: rgba(255, 255, 255, .09);

  --bwp-card-shadow: 0 16px 34px -22px rgba(0, 0, 0, .85);
  --bwp-card-shadow-hover: 0 40px 70px -30px rgba(0, 0, 0, .95);
}

.bwp *,
.bwp *::before,
.bwp *::after,
.bwp-modal *,
.bwp-modal *::before,
.bwp-modal *::after {
  box-sizing: border-box;
}


/* ==========================================================
   2. GRID
   Desktop 3 / Tablet 2 / Mobile 1
========================================================== */

.bwp {
  width: 100%;
}

.bwp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(20px, 1.8vw, 34px);
  row-gap: clamp(24px, 2.2vw, 42px);
  margin: 0;
  padding: 0;
  list-style: none;
}


/* ==========================================================
   3. CARD  (white surface — image, dots, title)
========================================================== */

.bwp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--bwp-card-pad);
  border: 1px solid var(--bwp-card-border);
  border-radius: var(--bwp-card-radius);
  background: var(--bwp-card-surface);
  box-shadow: var(--bwp-card-shadow);

  /* scroll reveal — played only once (JS unobserves) */
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity .62s var(--bwp-ease) var(--bwp-delay, 0ms),
    transform .62s var(--bwp-ease) var(--bwp-delay, 0ms),
    box-shadow .5s var(--bwp-ease),
    border-color .5s ease;
  will-change: opacity, transform;
}

.bwp-card.is-in {
  opacity: 1;
  transform: none;
}

/* once revealed, drop the compositing hint but keep the hover transitions */
.bwp-card.is-settled {
  will-change: auto;
  transition:
    box-shadow .5s var(--bwp-ease),
    border-color .5s ease,
    transform .5s var(--bwp-ease);
}


/* ---------- media ---------- */

.bwp-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--bwp-media-radius);
  background: var(--bwp-media);
  touch-action: pan-y;
}

/* stacked slides — cross-faded by JS */
.bwp-card-slides {
  position: absolute;
  inset: 0;
}

.bwp-card-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.001);
  transition:
    opacity .5s ease,
    transform 1.05s var(--bwp-ease),
    visibility 0s linear .5s;
}

.bwp-card-slide.is-active {
  opacity: 0;
  visibility: visible;
  transition:
    opacity .5s ease,
    transform 1.05s var(--bwp-ease),
    visibility 0s;
}

/* only fade in once the file has actually decoded */
.bwp-card-slide.is-active.is-loaded {
  opacity: 1;
}

/* bottom veil so the controls stay legible on light photographs */
.bwp-card-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg,
      rgba(6, 12, 17, .30) 0%,
      rgba(6, 12, 17, 0) 30%,
      rgba(6, 12, 17, 0) 54%,
      rgba(6, 12, 17, .55) 100%);
  opacity: .9;
  transition: opacity .45s ease;
  pointer-events: none;
}

/* full-image hit area → opens the lightbox at the current slide */
.bwp-card-hit {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.bwp-card-hit:focus {
  outline: none;
}

.bwp-card-hit:focus-visible {
  outline: 2px solid var(--bwp-accent);
  outline-offset: -4px;
  border-radius: var(--bwp-media-radius);
}


/* ---------- overlays on the image ---------- */

.bwp-card-no {
  position: absolute;
  z-index: 5;
  top: 14px;
  left: 16px;
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  line-height: 1;
  pointer-events: none;
}

/* 01 / 06 counter pill */
.bwp-card-count {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(8, 14, 19, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  line-height: 1;
  pointer-events: none;
}

.bwp-card-count b {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* expand hint — shown on hover, purely decorative */
.bwp-card-expand {
  position: absolute;
  z-index: 5;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: #11191f;
  opacity: 0;
  transform: translate3d(0, 8px, 0) scale(.9);
  transition:
    opacity .38s var(--bwp-ease),
    transform .38s var(--bwp-ease);
  pointer-events: none;
}

.bwp-card-expand svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ---------- on-card carousel arrows ---------- */

.bwp-card-nav {
  position: absolute;
  z-index: 6;
  top: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #11191f;
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background .28s ease,
    color .28s ease,
    opacity .32s var(--bwp-ease),
    transform .32s var(--bwp-ease);
  box-shadow: 0 6px 18px -8px rgba(6, 12, 17, .55);
}

.bwp-card-nav svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bwp-card-prev {
  left: 12px;
}

.bwp-card-next {
  right: 12px;
}

.bwp-card-nav:hover {
  background: var(--bwp-accent);
  color: #fff;
}

.bwp-card-nav:focus-visible {
  outline: 2px solid var(--bwp-accent);
  outline-offset: 3px;
}


/* ---------- pagination dots ----------
   Overlaid on the photo, NOT stacked under it. Anything below the image
   adds height to the card, and CSS grid stretches every card in a row to
   the tallest one — one gallery card would then leave a band of dead
   space under its neighbours' titles. Overlaid, the indicator costs no
   height at all and every card in the grid measures the same. */

.bwp-card-dots {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 18px;
}

.bwp-card-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(6, 12, 17, .45);
  transition:
    width .34s var(--bwp-ease),
    background .28s ease;
}

.bwp-card-dot.is-active {
  width: 20px;
  background: var(--bwp-accent);
}

.bwp-card-dot:focus-visible {
  outline: 2px solid var(--bwp-accent);
  outline-offset: 3px;
}


/* ---------- footer : title + gallery line ---------- */

.bwp-card-foot {
  padding: 14px clamp(6px, .5vw, 10px) clamp(6px, .6vw, 10px);
}

.bwp-card-foot-main {
  min-width: 0;
}

.bwp-card-title {
  margin: 0;
  min-width: 0;
  font-size: clamp(17px, 1.2vw, 21px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.4px;
}

.bwp-card-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  background: none;
  color: var(--bwp-heading);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .3s ease;
}

.bwp-card-open:focus {
  outline: none;
}

.bwp-card-open:focus-visible {
  outline: 2px solid var(--bwp-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* "View Gallery · 06 Photos" — sits under the title */
.bwp-card-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: var(--bwp-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: color .3s ease;
}

.bwp-card-note svg {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- single-image projects ---------- */

/* A single-image card simply has no carousel controls to render — and
   because none of them occupy space in the card's flow, it stays exactly
   as tall as a gallery card. */
.bwp-card.is-single .bwp-card-nav,
.bwp-card.is-single .bwp-card-count {
  display: none;
}


/* ---------- hover / focus choreography ---------- */

@media (hover: hover) and (pointer: fine) {

  /* the arrows stay visible — a visitor should be able to tell a project
     has several photos without hovering — and simply firm up on hover */
  .bwp-card-nav {
    opacity: .62;
    transform: translateY(-50%) scale(.92);
  }

  .bwp-card:hover,
  .bwp-card:focus-within {
    box-shadow: var(--bwp-card-shadow-hover);
    border-color: var(--bwp-line);
    transform: translate3d(0, -4px, 0);
  }

  .bwp-card:hover .bwp-card-slide.is-active,
  .bwp-card:focus-within .bwp-card-slide.is-active {
    transform: scale(1.045);
  }

  .bwp-card:hover .bwp-card-veil,
  .bwp-card:focus-within .bwp-card-veil {
    opacity: 1;
  }

  .bwp-card:hover .bwp-card-nav,
  .bwp-card:focus-within .bwp-card-nav {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }

  .bwp-card:hover .bwp-card-expand,
  .bwp-card:focus-within .bwp-card-expand {
    opacity: 1;
    transform: none;
  }

  .bwp-card:hover .bwp-card-open,
  .bwp-card:focus-within .bwp-card-open {
    color: var(--bwp-accent);
  }

  .bwp-card:hover .bwp-card-note,
  .bwp-card:focus-within .bwp-card-note {
    color: var(--bwp-accent);
  }

  /* the expand hint would collide with the next arrow on multi-image cards */
  .bwp-card:not(.is-single) .bwp-card-expand {
    right: 60px;
  }
}

/* touch devices: controls always visible, no hover choreography */
@media (hover: none) {

  .bwp-card-expand {
    opacity: 1;
    transform: none;
  }

  .bwp-card:not(.is-single) .bwp-card-expand {
    display: none;
  }
}


/* ==========================================================
   4. LOAD STATUS  (progressive rendering feedback)
========================================================== */

.bwp-status {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(40px, 4vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--bwp-line);
}

.bwp-status-count {
  flex: none;
  color: var(--bwp-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.bwp-status-count b {
  color: var(--bwp-heading);
  font-weight: 700;
}

.bwp-status-track {
  position: relative;
  flex: 1 1 auto;
  height: 1px;
  background: var(--bwp-line);
  overflow: hidden;
}

.bwp-status-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--bwp-accent);
  transition: width .6s var(--bwp-ease);
}

.bwp-status-more {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 13px 22px;
  border: 1px solid var(--bwp-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--bwp-heading);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}

.bwp-status-more svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.bwp-status-more:hover {
  background: var(--bwp-accent);
  border-color: var(--bwp-accent);
  color: #fff;
}

.bwp-status-more[hidden],
.bwp-status[hidden] {
  display: none;
}

.bwp-sentinel {
  width: 100%;
  height: 1px;
  margin-top: -1px;
  pointer-events: none;
}

.bwp-empty {
  padding: 40px 0;
  color: var(--bwp-muted);
  font-size: 15px;
}


/* ==========================================================
   5. PROJECT VIEWER (POPUP / LIGHTBOX)
========================================================== */

.bwp-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .38s ease, visibility 0s linear .38s;
}

.bwp-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .38s ease, visibility 0s;
}

.bwp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 15, .78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.bwp-modal-shell {
  position: absolute;
  inset: clamp(0px, 2.5vh, 32px) clamp(0px, 2.5vw, 46px);
  max-width: 1780px;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--bwp-line);
  border-radius: clamp(0px, 1.2vw, 22px);
  background: var(--bwp-bg);
  box-shadow: var(--bwp-shadow-modal);
  opacity: 0;
  transform: translate3d(0, 22px, 0) scale(.988);
  transition:
    opacity .42s var(--bwp-ease),
    transform .42s var(--bwp-ease);
}

.bwp-modal.is-open .bwp-modal-shell {
  opacity: 1;
  transform: none;
}


/* ---------- top bar ---------- */

.bwp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(16px, 1.6vw, 26px);
  height: clamp(58px, 5vw, 72px);
  border-bottom: 1px solid var(--bwp-line);
  background: var(--bwp-bg);
}

.bwp-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.bwp-counter {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 0;
  color: var(--bwp-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.bwp-counter b {
  color: var(--bwp-heading);
  font-size: 15px;
  font-weight: 700;
}

.bwp-counter-track {
  position: relative;
  width: clamp(60px, 9vw, 150px);
  height: 1px;
  background: var(--bwp-line);
  overflow: hidden;
}

.bwp-counter-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--bwp-accent);
  transition: width .45s var(--bwp-ease);
}

.bwp-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bwp-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--bwp-line);
  border-radius: 50%;
  background: transparent;
  color: var(--bwp-heading);
  cursor: pointer;
  transition:
    background .28s ease,
    border-color .28s ease,
    color .28s ease,
    transform .28s var(--bwp-ease);
}

.bwp-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bwp-icon:hover {
  background: var(--bwp-accent);
  border-color: var(--bwp-accent);
  color: #fff;
}

.bwp-icon:focus-visible {
  outline: 2px solid var(--bwp-accent);
  outline-offset: 3px;
}

.bwp-icon-close {
  margin-left: 6px;
}

.bwp-icon-close:hover {
  transform: rotate(90deg);
}


/* ---------- body ---------- */

.bwp-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
  min-height: 0;
}


/* ---------- media column ---------- */

.bwp-media {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  background: var(--bwp-stage);
  border-right: 1px solid var(--bwp-line);
}

.bwp-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.bwp-stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: clamp(10px, 1.6vw, 26px);
  opacity: 0;
  transform: scale(1.012);
  transition: opacity .42s ease, transform .6s var(--bwp-ease);
}

.bwp-stage-img.is-ready {
  opacity: 1;
  transform: none;
}

.bwp-stage-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .28s ease, color .28s ease;
}

.bwp-stage-nav svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bwp-stage-nav:hover {
  background: var(--bwp-accent);
}

.bwp-stage-nav:focus-visible {
  outline: 2px solid var(--bwp-accent);
  outline-offset: 3px;
}

.bwp-stage-prev {
  left: clamp(10px, 1.4vw, 22px);
}

.bwp-stage-next {
  right: clamp(10px, 1.4vw, 22px);
}

.bwp-stage-count {
  position: absolute;
  z-index: 4;
  left: clamp(14px, 1.6vw, 24px);
  bottom: clamp(14px, 1.6vw, 24px);
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(7, 13, 17, .62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

/* single-image projects hide every gallery control */
.bwp-media.is-single .bwp-stage-nav,
.bwp-media.is-single .bwp-stage-count,
.bwp-media.is-single .bwp-thumbs {
  display: none;
}


/* ---------- thumbnails ---------- */

.bwp-thumbs {
  display: flex;
  gap: 10px;
  padding: 14px clamp(14px, 1.6vw, 24px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-top: 1px solid rgba(255, 255, 255, .08);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bwp-thumbs::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.bwp-thumb {
  position: relative;
  flex: none;
  width: 86px;
  height: 62px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #000;
  cursor: pointer;
  opacity: .48;
  transition: opacity .3s ease;
}

.bwp-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.bwp-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: border-color .3s ease;
}

.bwp-thumb:hover {
  opacity: .85;
}

.bwp-thumb.is-active {
  opacity: 1;
}

.bwp-thumb.is-active::after {
  border-color: var(--bwp-accent);
}

.bwp-thumb:focus-visible {
  outline: 2px solid var(--bwp-accent);
  outline-offset: 2px;
}


/* ---------- info column ---------- */

.bwp-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bwp-bg);

  /* no visible scrollbar — the panel still scrolls with wheel / touch */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bwp-info::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.bwp-info-inner {
  flex: 1 1 auto;
  padding: clamp(28px, 3vw, 54px) clamp(24px, 2.6vw, 52px) clamp(34px, 3.4vw, 60px);
}

/* content swap (project change, or per-image content) */
@keyframes bwpSwapIn {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.bwp-info-inner.is-swap {
  animation: bwpSwapIn .34s var(--bwp-ease) both;
}

/* ---------- heading ----------
   The markup carries the site's own heading classes:
     .rs-about-six .rs-about-title.watermark-title   → giant watermark
     .rs-section-subtitle.has-theme-orange           → orange sub-heading
     .rs-section-title                               → main title
   Typography therefore comes from main.css / theme.css and stays in sync
   with the rest of the website. The :where() blocks below are
   ZERO-specificity fallbacks for the case those classes are missing. */

:where(.bwp-eyebrow) {
  color: var(--bwp-accent);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

:where(.bwp-title) {
  color: var(--bwp-heading);
  font-weight: 700;
}

.bwp-head {
  display: block;
  margin-bottom: 22px;
  font-size: 1rem;
}

/* Bootstrap .row adds -12px side margins and 12px child padding */
.bwp-head.row {
  margin-inline: 0;
}

.bwp-head.row>* {
  padding-inline: 0;
}

.bwp-head .rs-about-title.watermark-title {
  position: absolute;
  top: -10px;
  inset-inline-start: -3px;
  z-index: -1;
  margin: 0;
  justify-content: flex-start;
  font-size: clamp(42px, 4.2vw, 76px);
  line-height: .8;
  letter-spacing: -2px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.bwp-eyebrow {
  margin-bottom: 10px;
}

.bwp-eyebrow[hidden] {
  display: none;
}

.bwp-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.14;
}

.bwp-desc {
  margin: 0;
  color: var(--bwp-text);
  font-size: 18px;
  line-height: 1.85;
}

.bwp-desc[hidden] {
  display: none;
}

.bwp-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: clamp(28px, 3vw, 44px) 0 0;
  border-top: 1px solid var(--bwp-line);
  border-left: 1px solid var(--bwp-line);
}

.bwp-meta[hidden] {
  display: none;
}

/* a lone row must not leave half a bordered box hanging */
.bwp-meta[data-rows="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.bwp-meta-item {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--bwp-line);
  border-bottom: 1px solid var(--bwp-line);
}

.bwp-meta-item dt {
  margin: 0 0 7px;
  color: var(--bwp-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.bwp-meta-item dd {
  margin: 0;
  color: var(--bwp-heading);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}


/* screen-reader only */
.bwp-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* ---------- page scroll lock ---------- */

html.bwp-lock,
html.bwp-lock body {
  overflow: hidden !important;
}


/* ==========================================================
   6. RESPONSIVE
========================================================== */

/* ---- tablet : 2 columns ---- */
@media (max-width: 1199px) {

  .bwp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bwp-modal-body {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  }

  .bwp-title {
    letter-spacing: -1px;
  }
}


/* ---- stacked viewer ---- */
@media (max-width: 991px) {

  .bwp-modal-shell {
    inset: 0;
    border: 0;
    border-radius: 0;
  }

  .bwp-modal-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .bwp-modal-body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .bwp-media {
    grid-template-rows: auto auto;
    border-right: 0;
    border-bottom: 1px solid var(--bwp-line);
  }

  .bwp-stage {
    height: min(52vh, 460px);
  }

  .bwp-info {
    overflow: visible;
  }

  .bwp-thumbs {
    padding-block: 12px;
  }

  .bwp-thumb {
    width: 74px;
    height: 54px;
  }
}


/* ---- mobile : 1 column ---- */
@media (max-width: 767px) {

  .bwp-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 22px;
  }

  .bwp-card-media {
    aspect-ratio: 3 / 2;
  }

  .bwp-card-title {
    font-size: 19px;
  }

  .bwp-card-nav {
    width: 36px;
    height: 36px;
  }

  .bwp-status {
    flex-wrap: wrap;
    gap: 16px;
  }

  .bwp-status-track {
    order: 3;
    flex-basis: 100%;
  }

  .bwp-bar {
    height: 60px;
    padding-inline: 14px;
  }

  .bwp-counter-track {
    display: none;
  }

  .bwp-icon {
    width: 42px;
    height: 42px;
  }

  .bwp-stage {
    height: min(46vh, 380px);
  }

  .bwp-stage-nav {
    width: 44px;
    height: 44px;
  }

  .bwp-info-inner {
    padding: 26px 20px 30px;
  }

  .bwp-eyebrow {
    font-size: 13px;
  }

  .bwp-meta {
    grid-template-columns: minmax(0, 1fr);
  }

}


@media (max-width: 420px) {

  .bwp-thumbs {
    gap: 8px;
  }
}


/* ---- large desktop / 2K ---- */
@media (min-width: 1900px) {

  .bwp-card-title {
    font-size: 23px;
  }

  .bwp-card-nav {
    width: 44px;
    height: 44px;
  }

  .bwp-thumb {
    width: 100px;
    height: 70px;
  }
}


/* ---- 4K ---- */
@media (min-width: 2800px) {

  .bwp-grid {
    column-gap: 44px;
    row-gap: 60px;
  }

  .bwp-card {
    --bwp-card-radius: 38px;
    --bwp-media-radius: 28px;
    --bwp-card-pad: 20px;
  }

  .bwp-card-title {
    font-size: 30px;
  }

  .bwp-card-note {
    font-size: 18px;
  }

  .bwp-status-count {
    font-size: 19px;
  }

  .bwp-card-count {
    font-size: 16px;
    padding: 10px 16px;
  }

  .bwp-card-no {
    font-size: 18px;
  }

  .bwp-card-note svg {
    width: 16px;
    height: 16px;
  }

  .bwp-card-count b {
    font-size: 14px;
  }

  .bwp-card-nav {
    width: 58px;
    height: 58px;
  }

  .bwp-card-nav svg {
    width: 20px;
    height: 20px;
  }


  .bwp-title {
    font-size: 58px;
  }

  .bwp-desc {
    font-size: 19px;
  }

  .bwp-meta-item dd {
    font-size: 18px;
  }

  .bwp-thumb {
    width: 130px;
    height: 92px;
  }

  .bwp-meta-item dd {
    font-size: 30px;
  }

  .bwp-meta-item dt {
    font-size: 18px;
  }

  .bwp-desc {
    font-size: 27px;
  }

  .bwp-title {
    font-size: 60px;
  }

  .bwp-counter b {
    font-size: 20px;
  }

  .bwp-counter {
    font-size: 20px;
  }

  .bwp-stage-count {
    font-size: 16px;
  }

  .bwp-stage-img {
    object-fit: cover;
  }
}


/* ==========================================================
   7. REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

  .bwp-card {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .bwp *,
  .bwp-modal * {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}