/* Project structure: content blocks stay independent and freely reorderable. */
.mhz-case {
  --mhz-case-gap: 150px;
  --mhz-case-card-height: 589px;
  --mhz-case-image-radius: 40px;
}
.mhz-case-header {
  padding-top: 120px;
}
.mhz-case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.mhz-case-tags .mhz-project__label {
  padding: 16px 24px;
  border-radius: 999px;
  background: var(--wp--custom--design--charcoal);
}
.mhz-case-header .mhz-case-title {
  margin-bottom: 80px;
  color: var(--wp--custom--design--white);
}
.mhz-case-hero,
.mhz-case-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1400 / 830;
  border-radius: var(--mhz-case-image-radius, 40px);
}
.mhz-case-hero img,
.mhz-case-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* DDT's source artwork includes the wall; match the design's selected crop. */
.single-mhz_project.postid-19 .mhz-case-hero img {
  left: -25.37%;
  width: 128.55%;
  max-width: none;
  object-fit: fill;
}
.mhz-case .mhz-case-intro {
  max-width: 686px;
  min-height: 252px;
  margin-block: 80px 84px;
  font-size: 28px;
  line-height: 1.5;
}
.mhz-case .mhz-case-section {
  margin-bottom: 58px;
}
.mhz-case-caption {
  margin-bottom: 31px;
  font: var(--wp--custom--design--font-weight-regular) var(--wp--custom--design--type-lead-size) / 1.5 var(--wp--custom--design--font-body);
  color: var(--wp--custom--design--white);
}
.mhz-case-caption::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-top: 10px;
  background: var(--wp--custom--design--yellow);
}
.mhz-case-palette__grid {
  display: grid;
  grid-template-columns: repeat(var(--mhz-palette-count, 2), minmax(0, 1fr));
  gap: 20px;
}
.mhz-case-swatch {
  display: flex;
  min-width: 0;
  min-height: var(--mhz-case-card-height, 589px);
  flex-direction: column;
  justify-content: space-between;
  padding: 32px;
  border-radius: 8px;
  background: var(--mhz-swatch-color);
  color: var(--mhz-swatch-ink);
  overflow-wrap: anywhere;
}
.mhz-case-swatch__hex,
.mhz-font-specimen__label {
  font-size: var(--wp--custom--design--type-lead-size);
  line-height: 1.5;
}
.mhz-case-swatch__name {
  font: var(--wp--custom--design--font-weight-display) 32px / 1 var(--wp--custom--design--font-display);
}
.mhz-case-fonts,
.mhz-case-image-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 20px;
}
.mhz-font-specimen {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: var(--mhz-case-card-height, 589px);
  align-items: center;
  justify-content: center;
  padding: 90px 32px;
  border-radius: 8px;
  background: var(--wp--custom--design--charcoal);
}
.mhz-font-specimen__label {
  position: absolute;
  top: 32px;
  left: 32px;
  right: 32px;
}
.mhz-font-specimen .mhz-font-specimen__sample {
  margin: 0;
  font-family: var(--mhz-specimen-font, sans-serif);
  font-size: var(--mhz-specimen-size, 60px);
  font-weight: var(--mhz-specimen-weight, 400);
  line-height: 1;
  text-align: center;
  overflow-wrap: anywhere;
}
.mhz-case .mhz-case-section--fonts {
  margin-bottom: 116px;
}
.mhz-case-image--bleed {
  aspect-ratio: 1728 / 910;
  border-radius: 0;
}
.mhz-case .mhz-case-section--bleed,
.mhz-case .mhz-case-section--pair,
.mhz-case .mhz-case-section--last {
  margin-bottom: var(--mhz-case-gap, 150px);
}
.mhz-case-image--portrait {
  aspect-ratio: 690 / 830;
}
.mhz-case-copy h2 {
  margin-bottom: var(--wp--custom--design--space-heading-content);
}
.mhz-case-copy p {
  max-width: 453px;
}
.mhz-case-related {
  padding-block: 150px;
  background: var(--wp--custom--design--charcoal);
}
.mhz-case-related__title {
  margin-bottom: 30px;
}
.mhz-block-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 12px;
}
@media (max-width: 1199px) {
  .mhz-case {
    --mhz-case-gap: 96px;
    --mhz-case-card-height: 420px;
  }
  .mhz-case-header { padding-top: 72px; }
  .mhz-case-swatch { padding: 24px; }
  .mhz-case-swatch__hex { font-size: 16px; }
  .mhz-case-related { padding-block: 96px; }
}
@media (max-width: 700px) {
  .mhz-case {
    --mhz-case-gap: 72px;
    --mhz-case-card-height: 280px;
    --mhz-case-image-radius: 20px;
  }
  .mhz-case-header { padding-top: 48px; }
  .mhz-case-header .mhz-case-title { margin-bottom: 40px; }
  .mhz-case .mhz-case-intro { margin-block: 40px 56px; min-height: 0; font-size: 22px; }
  .mhz-case-palette__grid { grid-template-columns: repeat(min(var(--mhz-palette-count), 2), minmax(0, 1fr)); gap: 12px; }
  .mhz-case-fonts,
  .mhz-case-image-grid { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .mhz-font-specimen .mhz-font-specimen__sample { font-size: min(var(--mhz-specimen-size), 48px); }
  .mhz-case .mhz-case-section--fonts { margin-bottom: 72px; }
  .mhz-case-related { padding-block: 72px; }
}
/* Preserve spacing against the editor's block-margin resets. */
.editor-styles-wrapper .block-editor-block-list__block.mhz-case-intro { margin-block: 80px 84px; }
.editor-styles-wrapper .block-editor-block-list__block.mhz-case-section { margin-bottom: 58px; }
.editor-styles-wrapper .block-editor-block-list__block.mhz-case-caption { margin-bottom: 32px; }
.editor-styles-wrapper .block-editor-block-list__block.mhz-case-section--fonts { margin-bottom: 116px; }
.editor-styles-wrapper .block-editor-block-list__block:is(.mhz-case-section--bleed, .mhz-case-section--pair, .mhz-case-section--last) { margin-bottom: var(--mhz-case-gap, 150px); }
.editor-styles-wrapper .mhz-case-copy h2 { margin-bottom: var(--wp--custom--design--space-heading-content); }
.editor-styles-wrapper .mhz-case-image:has(.components-placeholder) { min-height: 320px; aspect-ratio: auto; }

.mhz-case-section--fonts .mhz-case-caption { margin-bottom: 26px; }
.mhz-case-related .mhz-case-related__title { margin-bottom: 30px; }
.mhz-case-image.is-style-mhz-artwork img {
  left: -25.37%;
  width: 128.55%;
  max-width: none;
  object-fit: fill;
}
.mhz-case-image-grid > .is-style-mhz-artwork:first-child img { left: -31.24%; }
.mhz-case-related {
  --mhz-project-gap: 20px;
}
@media (max-width: 700px) {
  .mhz-case-title {
    font-size: clamp(36px, 10vw, 60px);
    text-wrap: balance;
  }
  .mhz-case-swatch { padding: 20px; }
  .mhz-case-swatch__name { font-size: 24px; }
}

.mhz-case > .wp-block-post-content > :is(.mhz-case-palette, .mhz-font-specimen) {
  width: min(var(--wp--custom--design--container-width), calc(100% - var(--wp--custom--design--container-gutter)));
  margin-inline: auto;
  margin-bottom: 58px;
}

.editor-styles-wrapper .mhz-case-section--fonts .mhz-case-caption { margin-bottom: 26px; }
