.case-file {
  --mailmotte-pink: #ff449a;
  --mailmotte-ink: #a32062;
  --mailmotte-navy: #132440;
}

.case-file-hero {
  padding-block: clamp(36px, 6vw, 88px) clamp(32px, 5vw, 68px);
  background: linear-gradient(135deg, var(--white) 20%, #f6edf6);
}

.case-file-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(24px, 5vw, 68px);
}

.case-file-intro h1 {
  margin-bottom: 18px;
  color: var(--blue-950);
  font-size: clamp(2.35rem, 4.8vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -.042em;
  text-wrap: balance;
}

.case-file-intro h1 span {
  color: var(--mailmotte-ink);
}

.case-file-lead {
  max-width: 46ch;
  margin-bottom: 24px;
  font-size: clamp(1.13rem, 1.8vw, 1.35rem);
  line-height: 1.43;
}

.case-file-brand-panel {
  overflow: hidden;
  padding: 0 clamp(10px, 1.5vw, 20px) clamp(12px, 1.5vw, 20px);
  border-radius: clamp(15px, 2.2vw, 28px);
  background: radial-gradient(ellipse at 63% 46%, #423963, var(--mailmotte-navy) 74%);
  box-shadow: 0 22px 50px rgb(19 36 64 / 20%);
}

.case-file-brand-motifs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(4px, 1.4vw, 18px);
}

.case-file-wordmark {
  width: clamp(104px, 13vw, 174px);
  height: auto;
}

.case-file-hero-moth {
  display: block;
  width: min(55%, 285px);
  height: auto;
  margin-block: clamp(-22px, -1.6vw, -10px) clamp(-24px, -1.7vw, -10px);
}

.case-file-brand-panel .case-file-figure figcaption {
  color: #e1e8f4;
}

.case-file-nav {
  border-block: 1px solid var(--line);
}

.case-file-nav .container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px clamp(15px, 3vw, 36px);
  padding-block: 12px;
}

.case-file-nav a {
  padding-block: 4px;
  color: var(--blue-900);
  font-weight: 600;
  text-underline-offset: .2em;
}

.case-file-nav a:hover {
  text-decoration-color: var(--mailmotte-pink);
}

.case-file-section {
  display: grid;
  gap: clamp(22px, 3.2vw, 38px);
  padding-block: clamp(42px, 6vw, 76px);
}

.case-file-product-detail {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(22px, 4vw, 58px);
}

.case-file-problem-copy {
  display: grid;
  gap: clamp(22px, 3.2vw, 38px);
}

.case-file-band {
  background: var(--blue-050);
}

.case-file-prose,
.case-file-summary {
  width: min(100%, 740px);
  justify-self: center;
}

.case-file-prose h2 {
  margin: 0 0 22px;
  color: var(--blue-950);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.case-file-prose h3 {
  margin: 30px 0 9px;
  color: var(--blue-950);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.18;
}

.case-file-prose :is(h3:first-child, h2 + h3) {
  margin-top: 0;
}

.case-file-prose p {
  margin: 0 0 16px;
  font-size: clamp(1.0625rem, 1.65vw, 1.1875rem);
  line-height: 1.62;
}

.case-file-prose p:last-child {
  margin-bottom: 0;
}

.case-file-summary {
  padding: clamp(16px, 2.6vw, 30px);
  border-inline-start: 4px solid var(--summary-accent);
  border-radius: var(--radius-small);
  background: var(--summary-background);
}

.case-file-summary--benefits {
  --summary-accent: var(--blue-700);
  --summary-background: #e6f0f8;
}

.case-file-summary--architecture {
  --summary-accent: var(--mailmotte-ink);
  --summary-background: #f9e7f1;
}

.case-file-summary--pilot {
  --summary-accent: #246653;
  --summary-background: #e5f3ed;
}

.case-file-summary h3 {
  margin: 0 0 10px;
  color: var(--blue-950);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.2;
}

.case-file-summary ul {
  margin: 0;
  padding-inline-start: 1.2em;
  line-height: 1.48;
}

.case-file-summary li + li {
  margin-top: 8px;
}

.case-file-summary li::marker {
  color: var(--summary-accent);
}

.case-file-process {
  display: grid;
  grid-template-columns: minmax(0, .36fr) minmax(0, .64fr);
  align-items: center;
  gap: clamp(16px, 3.5vw, 48px);
  padding: clamp(14px, 3.2vw, 42px);
  border: 1px solid #e8cddd;
  border-radius: var(--radius);
  background: linear-gradient(125deg, #f8e5f1, #faf3f6);
}

.case-file-process > img {
  display: block;
  width: min(100%, 300px);
  height: auto;
  justify-self: center;
}

.case-file-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-file-flow li {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--mailmotte-pink);
  border-radius: var(--radius-small);
  background: var(--white);
}

.case-file-flow strong,
.case-file-flow span {
  display: block;
}

.case-file-flow strong {
  margin-bottom: 4px;
  color: var(--blue-950);
  line-height: 1.3;
}

.case-file-flow span {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.case-file-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(16px, 2.8vw, 36px);
}

.case-file-figure {
  min-width: 0;
  margin: 0;
}

.case-file-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--white);
}

.case-file-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.42;
}

.case-file-lightbox img {
  max-height: calc(100dvh - 128px);
}

.case-file-lightbox a {
  margin-top: 8px;
  font-size: 1rem;
  text-align: center;
}

.case-file-contact {
  padding-block: clamp(48px, 7vw, 88px);
}

.case-file-contact .contact-intro {
  align-self: center;
}

@media (max-width: 820px) {
  .case-file-hero-layout,
  .case-file-product-detail,
  .case-file-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-file-intro h1 {
    text-wrap: wrap;
  }

  .case-file-brand-panel {
    width: min(100%, 620px);
  }
}

@media (max-width: 640px) {
  .case-file-process {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-file-process > img {
    width: min(68%, 210px);
  }
}

@media (max-width: 480px) {
  .case-file-hero {
    padding-top: 30px;
  }

  .case-file-flow li {
    padding: 11px 12px;
  }
}

@media (max-width: 360px) {
  .case-file-flow {
    grid-template-columns: minmax(0, 1fr);
  }
}
