/* ===== "The Workshop" cards: click to colour + expand modal ===== */

/* ---- cards ---- */
.ws-card { cursor: pointer; transition: border-color .3s ease; }
.ws-card:hover { border-color: #3F3F3F !important; }
.ws-card.is-active { border-color: #4A4A4A !important; }

/* everything except the title row fades to grey when the card isn't selected */
.ws-card > :not(.ws-head) { transition: filter .45s ease, opacity .45s ease; }
.ws-card:not(.is-active) > :not(.ws-head) { filter: grayscale(1) brightness(.72); }

/* the expand button (replaces the small square in the corner) */
.ws-expand {
  position: relative;
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  padding: 0; margin: 0;
  border: 1px solid #3A3A3A;
  background: rgba(10,10,10,.45);
  color: #8A8A8A;
  cursor: pointer;
  transition: background .3s ease, border-color .3s ease, color .3s ease, transform .2s ease;
}
.ws-expand::after { content: ""; position: absolute; inset: -8px; } /* 46px touch target */
.ws-expand:hover { color: #FFFFFF; border-color: #8A8A8A; }
.ws-card.is-active .ws-expand { background: #FFD43B; border-color: #FFD43B; color: #0A0A0A; }
.ws-card.is-active .ws-expand:hover { transform: scale(1.08); }
.ws-expand:focus-visible { outline: 2px solid #FFD43B; outline-offset: 3px; }

/* ---- modal ---- */
.ws-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
  background: rgba(5,5,5,.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .25s ease;
  font-family: 'Fira Sans', system-ui, sans-serif;
}
.ws-modal.is-open { opacity: 1; }

.ws-dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow-y: auto; overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 36px;
  background: #111111;
  border: 1px solid #2E2E2E;
  color: #F5F5F5;
  transform: translateY(14px) scale(.985);
  transition: transform .3s ease;
}
.ws-modal.is-open .ws-dialog { transform: none; }
.ws-dialog:focus { outline: none; }

.ws-close {
  position: absolute; top: 24px; right: 24px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  padding: 0; border: 1px solid #3A3A3A; background: #222222; color: #E5E5E5;
  cursor: pointer; transition: background .2s ease, color .2s ease;
}
.ws-close:hover { background: #333333; color: #FFFFFF; }
.ws-close:focus-visible { outline: 2px solid #FFD43B; outline-offset: 2px; }

.ws-top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 32px; padding-right: 56px;
}
.ws-title { margin: 0 0 12px; font-weight: 500; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; color: #FFFFFF; }
.ws-desc { margin: 0; font-size: 17px; line-height: 1.6; color: #A8A8A8; }

.ws-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ws-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.5; color: #D4D4D4; }
.ws-list svg { flex: 0 0 auto; margin-top: 3px; color: #FFD43B; }

.ws-media {
  margin-top: 32px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.ws-figure {
  position: relative; margin: 0;
  height: 440px; overflow: hidden;
  border: 1px solid #2E2E2E; background: #0D0D0D;
}
.ws-figure img, .ws-figure video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ws-figure figcaption {
  position: absolute; left: 12px; bottom: 12px;
  padding: 6px 10px; background: rgba(30,30,30,.85);
  font-size: 13px; color: #E5E5E5;
}
/* the card's own illustration, enlarged */
.ws-clone { position: absolute; top: -78px; left: 0; right: 0; bottom: 0; } /* pull up: the title row isn't repeated here */
.ws-clone > * { filter: none !important; }

@media (max-width: 760px) {
  .ws-modal { padding: 12px; align-items: flex-end; }
  .ws-dialog { padding: 24px 20px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .ws-close { top: 16px; right: 16px; }
  .ws-top { grid-template-columns: 1fr; gap: 20px; padding-right: 48px; }
  .ws-list { padding-right: 0; }
  .ws-media { grid-template-columns: 1fr; margin-top: 24px; }
  .ws-figure { height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .ws-card, .ws-card > *, .ws-expand, .ws-modal, .ws-dialog { transition: none !important; }
}

body.ws-lock { overflow: hidden; }
