.case-detail {
  --case-deep: #052d66;
  --case-ink: #123f48;
  --case-accent: #087d84;
  --case-line: #cfe1e4;
  --case-soft: #f4f9fa;
  color: var(--case-ink);
  background: #fff;
}

.case-hero {
  min-height: 430px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--case-line);
  background: linear-gradient(110deg, #f8fdfd 0%, #e7f4f4 58%, #d7ebec 100%);
}

.case-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: .18;
  background: url('assets/banner1.jpg') center / cover no-repeat;
}

.case-hero__layout {
  min-height: 430px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
  padding-top: 42px;
  padding-bottom: 42px;
}

.case-hero__copy { min-width: 0; }

.case-hero .breadcrumb {
  margin-bottom: 26px;
  color: #42666d;
}

.case-hero__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--case-accent);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .08em;
}

.case-hero h1 {
  max-width: 18ch;
  margin: 0;
  color: var(--case-deep);
  font-size: 40px;
  line-height: 1.18;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.case-hero__meta {
  margin: 24px 0 0;
  color: #315c65;
  font-size: 17px;
  line-height: 1.7;
}

.case-hero__media {
  min-width: 0;
  aspect-ratio: 3 / 2;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(8, 125, 132, .2);
  border-radius: 16px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 18px 40px rgba(5, 45, 102, .12);
}

.case-hero__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.case-section { padding: clamp(54px, 6vw, 82px) 0; }
.case-section--soft { background: var(--case-soft); }

.case-section__head { margin-bottom: 26px; }

.case-section__head h2 {
  margin: 0;
  color: var(--case-deep);
  font-size: clamp(28px, 2.2vw, 34px);
  line-height: 1.25;
  letter-spacing: -.02em;
}

.case-section__head h2 small {
  display: block;
  margin-top: 7px;
  color: var(--case-accent);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
}

.case-section__head p {
  margin: 8px 0 0;
  color: #58757b;
  font-size: 15px;
  line-height: 1.7;
}

.case-overview__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--case-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(5, 45, 102, .07);
}

.case-overview__item {
  min-width: 0;
  grid-column: span 3;
  padding: 24px 26px;
  border-right: 1px solid var(--case-line);
  border-bottom: 1px solid var(--case-line);
}

.case-overview__item:nth-child(n+5) { grid-column: span 4; }
.case-overview__item:nth-child(4),
.case-overview__item:last-child { border-right: 0; }
.case-overview__item:nth-last-child(-n+3) { border-bottom: 0; }

.case-overview__item dt {
  margin-bottom: 9px;
  color: var(--case-accent);
  font-size: 14px;
  font-weight: 750;
}

.case-overview__item dd {
  margin: 0;
  color: var(--case-ink);
  font-size: 16px;
  font-weight: 620;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.case-project-intro {
  width: 80%;
  max-width: 75ch;
  color: #31565e;
  font-size: 17px;
  line-height: 1.95;
}

.case-project-intro p { margin: 0 0 1.25em; }
.case-project-intro p:last-child { margin-bottom: 0; }

.case-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.case-gallery--1 { grid-template-columns: minmax(0, 760px); }
.case-gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.case-gallery__item {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--case-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(5, 45, 102, .08);
}

.case-gallery__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--case-soft);
}

.case-gallery__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.case-gallery__item figcaption {
  padding: 14px 18px 16px;
  color: var(--case-deep);
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 1020px) {
  .case-hero__layout { grid-template-columns: minmax(0, .85fr) minmax(360px, 1.15fr); }
  .case-overview__item,
  .case-overview__item:nth-child(n+5) { grid-column: span 6; border-right: 1px solid var(--case-line); border-bottom: 1px solid var(--case-line); }
  .case-overview__item:nth-child(even),
  .case-overview__item:last-child { border-right: 0; }
  .case-overview__item:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 820px) {
  .case-hero__layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 34px;
    padding-bottom: 42px;
  }
  .case-hero h1 { max-width: none; }
  .case-project-intro { width: 100%; }
  .case-gallery,
  .case-gallery--2 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .case-hero__layout { min-height: 0; }
  .case-hero .breadcrumb { margin-bottom: 20px; }
  .case-hero__media { border-radius: 12px; }
  .case-hero h1 { font-size: 34px; }
  .case-overview__grid { display: block; }
  .case-overview__item,
  .case-overview__item:nth-child(n+5),
  .case-overview__item:nth-child(even),
  .case-overview__item:nth-last-child(-n+2) {
    border-right: 0;
    border-bottom: 1px solid var(--case-line);
  }
  .case-overview__item:last-child { border-bottom: 0; }
}
