/* diedetap.com — work item (case study + NDA-locked variant) */

.case-intro,
.case-brief,
.case-row,
.case-duo,
.case-triple,
.case-locked,
.case-hair,
.case-nav { margin: 0 52px; }

.divider {
  height: 100%;
  background: var(--line);
  align-self: stretch;
}

.case-intro {
  padding: 44px 0 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 56px;
}
.case-intro h1 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 60px;
  line-height: 1.06;
  letter-spacing: -0.006em;
  max-width: 20ch;
  text-wrap: pretty;
}

/* Brief: copy left, meta list right */
.case-brief {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.6fr 1px 1fr;
}
.brief-copy {
  padding: 34px 44px 40px 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.lede {
  margin: 0;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.5;
  text-wrap: pretty;
}
.copy {
  margin: 0;
  font-size: 18px;
  line-height: 1.62;
  text-wrap: pretty;
}
.meta {
  padding: 16px 0 34px 44px;
  display: flex;
  flex-direction: column;
}
.meta-row {
  padding: 22px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.meta-label {
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.005em;
  color: var(--ink-60);
}
.meta-value {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.meta .rule { margin-left: -44px; }

/* Placeholder figures, clipped to the superellipse shapes */
.fig {
  background: repeating-linear-gradient(135deg, #E3DCC8 0 10px, #EDE7D6 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fig {
  width: 100%;
  cursor: zoom-in;
  overflow: hidden;
}
.fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fig[data-lb]:focus { outline: none; }
.fig[data-lb]:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; }
.fig span {
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.005em;
  color: var(--ink-60);
}
.fig-land { /* aspect-ratio and clip-path are set per block */ }
.fig-sq { aspect-ratio: 1 / 1; clip-path: url(#se); }


/* Media/copy rows; .flip mirrors the columns */
.case-row {
  display: grid;
  grid-template-columns: 3fr 1px 1fr;
}
.case-row.flip { grid-template-columns: 1fr 1px 3fr; }
.row-media { padding: 48px 44px 48px 0; }
.row-copy {
  padding: 48px 0 48px 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.case-row.flip .row-media { padding: 48px 0 48px 44px; }
.case-row.flip .row-copy { padding: 48px 44px 48px 0; }
.row-copy h2 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.24;
  letter-spacing: 0.002em;
  text-wrap: pretty;
}

/* Two equal text columns, for when there is more to say than to show */
.case-duo {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
}
.duo-col {
  padding: 48px 44px 48px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.case-duo .duo-col + .divider + .duo-col { padding: 48px 0 48px 44px; }
.duo-col h2 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.24;
  letter-spacing: 0.002em;
  text-wrap: pretty;
}
.duo-col ul,
.duo-col ol { margin: 0; padding-left: 22px; }
.duo-col li { margin-bottom: 7px; font-size: 18px; line-height: 1.62; }

.case-triple {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  column-gap: 44px;
}
.case-triple > div:not(.divider) { padding: 48px 0; }

/* NDA-locked brief + password form */
.case-locked {
  padding: 60px 0 68px;
  display: flex;
  justify-content: center;
}
.locked-inner {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.locked-inner h2 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.22;
  letter-spacing: 0.002em;
  text-wrap: pretty;
}
.pw-form {
  width: 100%;
  margin-top: 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
}
.pw-form input {
  flex: 1;
  min-width: 160px;
  box-sizing: border-box;
  margin: 0;
  padding: 11px 14px 12px;
  background: var(--paper);
  border: none;
  border-radius: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  outline: none;
}
.pw-form button {
  flex: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.pw-form button:hover { color: var(--coral); }
.pw-form button img { height: 15px; width: auto; }
.pw-form button span { white-space: nowrap; }

.case-nav {
  padding: 34px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 34px;
}
.case-nav a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--olive);
}

/* Lightbox: the picture lifts out of its thumbnail, settles in the middle of
   the screen, and drops back into place on the way out. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: #22231EF7;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox.is-open .lb-backdrop { opacity: 1; }

/* Clicks pass through the stage to the backdrop; only the picture keeps them. */
.lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.lb-frame {
  position: relative;
  pointer-events: auto;
  overflow: hidden;
  border-radius: 7px;
  background: #1B1C17;
  transform-origin: top left;
  clip-path: none;
}
.lb-frame img,
.lb-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
}
/* Those set display, so the hidden attribute needs to win explicitly. */
.lb-frame img[hidden],
.lb-frame video[hidden] { display: none; }

.lb-btn {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #F2EDE0A6;
  opacity: 0;
  transition: opacity 0.28s ease 0.1s, color 0.18s ease, background-color 0.18s ease;
}
.lightbox.is-open .lb-btn { opacity: 1; }
.lb-btn[hidden] { display: none; }
.lb-btn:hover {
  color: var(--cream);
  background-color: #F2EDE01A;
}
.lb-btn:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.lb-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lb-close { top: 20px; right: 24px; }
.lb-prev { left: 18px; top: 50%; margin-top: -23px; }
.lb-next { right: 18px; top: 50%; margin-top: -23px; }

@media (max-width: 640px) {
  .lb-close { top: 10px; right: 10px; }
  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-backdrop,
  .lb-btn { transition: none; }
}

@media (max-width: 1240px) {
  .case-intro,
  .case-brief,
  .case-row,
  .case-duo,
  .case-triple,
  .case-locked,
  .case-hair,
  .case-nav { margin: 0 34px; }
  .case-intro { padding: 36px 0 32px; gap: 40px; }
  .case-intro h1 { font-size: 48px; }
  .brief-copy { padding: 28px 34px 34px 0; }
  .meta { padding: 12px 0 30px 34px; }
  .meta .rule { margin-left: -34px; }
  .row-media { padding: 40px 34px 40px 0; }
  .row-copy { padding: 40px 0 40px 34px; }
  .case-row.flip .row-media { padding: 40px 0 40px 34px; }
  .case-row.flip .row-copy { padding: 40px 34px 40px 0; }
  .duo-col { padding: 40px 34px 40px 0; }
  .case-duo .duo-col + .divider + .duo-col { padding: 40px 0 40px 34px; }
  .case-triple { column-gap: 34px; }
  .case-triple > div:not(.divider) { padding: 40px 0; }
  .case-locked { padding: 54px 0 60px; }
}

@media (max-width: 900px) {
  .case-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
  }
  .case-brief { grid-template-columns: 1fr; }
  .divider { height: 1px; }
  .brief-copy { padding: 26px 0; }
  .meta { padding: 8px 0 26px; }
  .meta .rule { margin-left: 0; }
  .case-row,
  .case-row.flip { grid-template-columns: 1fr; row-gap: 24px; }
  .case-duo { grid-template-columns: 1fr; }
  .case-duo .divider { display: none; }
  .duo-col,
  .case-duo .duo-col + .divider + .duo-col { padding: 30px 0 0; }
  .case-duo .duo-col:last-child { padding-bottom: 34px; }
  .case-row .divider { display: none; }
  .row-media,
  .case-row.flip .row-media { order: -1; padding: 34px 0 0; }
  .row-copy,
  .case-row.flip .row-copy { padding: 0 0 34px; }
  .locked-inner h2 { font-size: 28px; }
}

@media (max-width: 820px) {
  .case-triple { grid-template-columns: 1fr; row-gap: 22px; }
  .case-triple > div:not(.divider) { padding: 0; }
  .case-triple > div:first-child { padding-top: 34px; }
  .case-triple > div:last-child { padding-bottom: 34px; }
  .case-triple .divider { display: none; }
}

@media (max-width: 640px) {
  .case-intro,
  .case-brief,
  .case-row,
  .case-triple,
  .case-locked,
  .case-hair,
  .case-nav { margin: 0 22px; }
  .case-intro { padding: 28px 0 26px; }
  .case-intro h1 { font-size: 36px; }
  .row-media,
  .case-row.flip .row-media { padding-top: 30px; }
  .row-copy,
  .case-row.flip .row-copy { padding-bottom: 30px; }
  .case-triple > div:first-child { padding-top: 30px; }
  .case-triple > div:last-child { padding-bottom: 30px; }
}

/* Lists inside authored copy */
.row-copy ul,
.row-copy ol,
.brief-copy ul,
.brief-copy ol {
  margin: 0;
  padding-left: 22px;
}
.row-copy li,
.brief-copy li {
  margin-bottom: 7px;
  font-size: 18px;
  line-height: 1.62;
}
.row-copy a,
.brief-copy a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }

/* Video embeds */
.case-video { padding: 48px 0; }
.embed {
  position: relative;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: var(--olive);
}
.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.media-caption {
  margin: 10px 0 0;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-60);
}
@media (max-width: 900px) {
  .case-video { padding: 34px 0; }
}

/* A short silent loop filling one of the three square cells, cropped and
   clipped exactly like a photo would be. */
.fig-clip video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A video sitting inside one of the three square cells: the player keeps its
   own 16:9 shape, centred in the superellipse, on a colour you choose. */
.fig-video {
  cursor: default;
  background: var(--olive);
}
.embed-inset {
  width: 100%;
  border-radius: 0;
  background: transparent;
}
