/* diedetap.com — work index */

.work-intro {
  margin: 0 52px;
  padding: 44px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 56px;
}
.work-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;
}
.intro-line {
  flex: none;
  max-width: 42ch;
  padding-bottom: 10px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-75);
  text-wrap: pretty;
}

.work-grid {
  margin: 0 52px 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
  background-clip: padding-box;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 1px;
}
.cell {
  background: var(--cream);
  padding: 26px;
}
.cell.wide { grid-column: span 2; }

.tile {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  clip-path: url(#se);
  overflow: hidden;
  background: var(--olive);
}
/* No picture set yet — fall back to the striped placeholder. */
.tile-empty { background: repeating-linear-gradient(135deg, #E3DCC8 0 8px, #EDE7D6 8px 16px); }
.tile-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wide .tile {
  aspect-ratio: auto;
  height: 100%;
  clip-path: url(#se-wide);
}
.scrim {
  position: absolute;
  inset: 0;
  /* Colour and strength come from the work page settings. */
  background: color-mix(in srgb, var(--tile-overlay, #3A4030)
              calc(var(--tile-overlay-opacity, 0.72) * 100%), transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px;
  box-sizing: border-box;
  text-align: center;
}
.tile:hover .scrim { background: #C05F45C4; }
.tile-empty .tile-image { display: none; }

/* Cream text on the scrim stays cream on hover */
.tile-cat {
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #F2EDE0C0;
}
.tile-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: 0.004em;
  color: var(--cream);
  text-wrap: pretty;
}

@media (max-width: 1240px) {
  .work-intro { margin: 0 34px; padding: 36px 0 32px; gap: 40px; }
  .work-intro h1 { font-size: 48px; }
  .work-grid { margin: 0 34px 8px; }
  .cell { padding: 20px; }
  .tile-title { font-size: 22px; }
}
@media (max-width: 900px) {
  .work-intro { flex-direction: column; align-items: flex-start; gap: 26px; }
  .intro-line { max-width: none; padding-bottom: 0; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .work-intro { margin: 0 22px; padding: 28px 0 26px; }
  .work-intro h1 { font-size: 36px; }
  .work-grid { grid-template-columns: 1fr; margin: 0 22px 8px; }
  .cell { padding: 18px; }
  .cell.wide { grid-column: span 1; }
  .wide .tile {
    height: auto;
    aspect-ratio: 1 / 1;
    clip-path: url(#se);
  }
}
