/* Destination-aware project surfaces, shared by all current and future case-end links. */
.case-end a.project-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 240px;
  padding: 36px !important;
  border: 0 !important;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  background: linear-gradient(130deg, #085cbd, #102d73);
  color: #f6f6f4;
}
.case-end a.project-surface[data-project-surface='axis'] {
  background: linear-gradient(130deg, #97144d, #4b123f);
}
.case-end a.project-surface[data-project-surface='zoca'] {
  background: linear-gradient(130deg, #724afe, #3d27a8);
}
.case-end a.project-surface[data-project-surface='kmrl'] {
  background: linear-gradient(130deg, #006a68, #073c47);
}
.case-end a.project-surface[data-project-surface='my-pet'] {
  background: linear-gradient(130deg, #006685, #063950);
}
.project-surface-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}
.case-end a.project-surface::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(transparent, #0005);
  pointer-events: none;
}
.case-end a.project-surface > .case-eyebrow {
  color: #ffffffb3;
  font:
    500 11px/1.4 Satoshi,
    sans-serif;
  letter-spacing: 0.1em;
}
.case-end a.project-surface > .case-project-name {
  color: white;
  font:
    700 clamp(28px, 3vw, 38px)/1.15 Satoshi,
    sans-serif;
}
.case-end a.project-surface > .case-project-description {
  color: #ffffffe0;
  font:
    400 14px/1.6 Satoshi,
    sans-serif;
  max-width: 42ch;
}
.case-end {
  gap: 20px;
}
@media (max-width: 600px) {
  .case-end a.project-surface {
    padding: 28px !important;
    min-height: 220px;
    border-radius: 20px;
  }
}

/* Match the barrel card: saturated shared artwork, a restrained edge and grain. */
.case-content .case-end {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.case-end a.project-surface {
  min-height: 280px;
  padding: 28px !important;
  justify-content: flex-start;
  gap: 12px;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px #ffffff12;
  transition: transform var(--motion-settle) var(--motion-ease);
}
.case-end a.project-surface::after {
  background: linear-gradient(#00000050, #00000038 35%, transparent 65%, #00000030);
  box-shadow: inset 0 0 0 1px #ffffff12;
  border-radius: inherit;
}
.case-end a.project-surface > .case-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 8px;
  color: #ffffffcc;
  font-size: 11px;
}
.case-end a.project-surface > .case-eyebrow span {
  font-size: 20px;
  line-height: 1;
}
.case-end a.project-surface > .case-project-name {
  font:
    700 28px/1.2 Satoshi,
    sans-serif;
  letter-spacing: -0.5px;
}
.case-end a.project-surface > .case-project-description {
  font-size: 14px;
  line-height: 1.5;
  max-width: 100%;
  color: #fffffff5;
}
.case-project-logo {
  display: block;
  align-self: flex-end;
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-top: auto;
  padding-top: 4px;
  box-sizing: content-box;
}
@media (hover: hover) {
  .case-end a.project-surface:hover {
    transform: translateY(-4px);
  }
}
.case-end a.project-surface:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
@media (max-width: 520px) {
  .case-content .case-end {
    gap: 12px;
  }
  .case-end a.project-surface {
    padding: 16px !important;
    min-height: 260px;
    border-radius: 16px;
    gap: 10px;
  }
  .case-end a.project-surface > .case-project-name {
    font-size: 21px;
  }
  .case-end a.project-surface > .case-project-description {
    font-size: 12px;
    line-height: 1.5;
  }
  .case-end a.project-surface > .case-eyebrow {
    font-size: 10px;
    letter-spacing: 0.03em;
    gap: 4px;
  }
  .case-project-logo {
    width: 44px;
    height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .case-end a.project-surface {
    transition: none;
  }
  .case-end a.project-surface:hover {
    transform: none;
  }
}
body[data-page='case-study'] .case-end .case-project-cell.project-surface {
  border-radius: 20px;
}
@media (max-width: 520px) {
  body[data-page='case-study'] .case-end .case-project-cell.project-surface {
    border-radius: 16px;
  }
}

/* Each card needs a readable 280px column; otherwise preserve order in one column. */
.case-content .case-end {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.case-end a.project-surface {
  min-height: 220px;
}
@media (max-width: 520px) {
  .case-end a.project-surface {
    min-height: 180px;
    padding: 24px !important;
  }
  .case-end a.project-surface > .case-project-name {
    font-size: 24px;
  }
  .case-end a.project-surface > .case-project-description {
    font-size: 14px;
  }
  .case-end a.project-surface > .case-eyebrow {
    font-size: 11px;
  }
}

/* Secondary navigation stays compact beside the case-study content. */
.case-end a.project-surface {
  min-height: 168px;
  padding: 24px !important;
  gap: 8px;
}
.case-end a.project-surface > .case-eyebrow {
  margin-bottom: 4px;
  font-size: 10px;
}
.case-end a.project-surface > .case-project-name {
  font-size: 24px;
}
.case-end a.project-surface > .case-project-description {
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 520px) {
  .case-end a.project-surface {
    min-height: 148px;
    padding: 20px !important;
  }
  .case-end a.project-surface > .case-project-name {
    font-size: 23px;
  }
}

/* Uppercase project-title preview; descriptions retain their reading case. */
.case-project-name {
  text-transform: uppercase;
}
