.reference-card-text {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.reference-card-text .reference-card-copy,
.case-study-hero.is-text-only .article-hero-grid {
  max-width: 880px;
}

.case-study-hero.is-text-only .article-hero-grid {
  grid-template-columns: minmax(0, 1fr);
  margin-inline: auto;
}

.case-video, .reference-card, .article-hero-image {
  position: relative;
}

.illustration-note, .video-label {
  position: absolute;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(29, 34, 39, .88);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
}

.illustration-note { inset: 12px auto auto 12px; }
.video-label { inset: auto auto 12px 12px; }

.video-facade {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--graphite);
  cursor: pointer;
}

.video-facade img,
.case-study-hero .case-video .video-facade img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-facade .video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(48px, 6vw, 72px);
  aspect-ratio: 1;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.video-facade .video-play::after {
  content: '';
  margin-left: 4px;
  border: 11px solid transparent;
  border-right-width: 0;
  border-left: 17px solid currentColor;
}

.case-video .video-embed,
.reference-video .video-embed,
.case-videos .video-embed,
.case-journey .video-embed {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.reference-photos, .case-journey-grid, .case-related, .case-videos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.reference-photos-2, .case-videos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reference-photo, .case-journey-grid figure > a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.reference-photo img, .case-journey-grid figure > a img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.case-journey-grid figure > a img.case-model { object-fit: contain; }
.case-journey-grid figure, .case-videos figure { min-width: 0; margin: 0; }
.case-journey-grid figcaption, .case-videos figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: .9rem;
}

.case-journey-grid figcaption b, .case-related b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.reference-video { max-width: 930px; }
.case-stats { padding-block: 24px 0; }
.case-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 12px;
  margin: 0;
}

.case-stats-grid > div, .case-related a {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.case-stats-grid dt, .case-stats-note, .case-related span {
  color: var(--muted);
  font-size: .82rem;
}

.case-stats-grid dd {
  margin: 4px 0 0;
  color: var(--red);
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.case-stats-note { margin: 10px 0 0; }
.case-timeline { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.case-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  column-gap: 20px;
  padding: 0 0 22px 22px;
}

.case-timeline li::before {
  content: '';
  position: absolute;
  top: 6px;
  left: -6px;
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
}

.case-timeline time { grid-row: span 2; color: var(--red); font-weight: 700; }
.case-timeline span { color: var(--muted); }
.case-related a { display: block; }
.case-related a:hover { border-color: var(--red); }

@media (min-width: 721px) {
  .case-study-reasons .feature-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .reference-photos, .case-journey-grid, .case-related, .case-videos, .case-timeline li {
    grid-template-columns: minmax(0, 1fr);
  }
  .case-timeline time { grid-row: auto; }
}

@media (scripting: none) {
  .reveal { opacity: 1; transform: none; }
  .video-facade { cursor: default; }
}

/* Original exterior rendering: show the full image in the case-study header. */
.cirkarena-hero-art{margin:0}
.case-study-hero .cirkarena-hero-art .article-hero-image img{display:block;height:auto;min-height:0}
.cirkarena-hero-art figcaption{margin:.65rem .25rem 0;color:var(--muted);font-size:.875rem}
.cirkarena-hero-art figcaption a{text-decoration:underline}
