.casestudy {
  background: var(--paper);
}

.case-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  height: 629.5px;
  padding: 10px;
  border-radius: 40px;
  background: #f5f5e9;
  align-items: stretch;
}

.case-left {
  min-width: 0;
  display: grid;
  grid-template-rows: 349.5px 250px;
  gap: 10px;
}

.case-main {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 30px;
  overflow: hidden;
  background: #fffffa;
}

.case-main .eksempel {
  right: 16px;
  top: 14px;
}

.case-heading {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.case-title {
  max-width: 585px;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.04em;
  font-variation-settings: "wght" 585;
}

.case-facts {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0 0 10px;
}

.case-facts div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 20px;
  min-height: 29px;
}

.case-facts dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.025em;
  color: var(--muted);
}

.case-fact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.case-fact-chip::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(36, 36, 36, 0.12);
  background:
    radial-gradient(circle at 50% 50%, var(--ink) 2px, transparent 3px),
    #fffffa;
}

.case-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 30px;
  background: #fffffa;
}

.case-stats .stat {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 30px;
}

.case-stat-2 {
  border-left: 1px solid #f5f5e9;
}

.case-stats .stat .stat-num {
  margin-top: 53px;
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 600;
  font-variation-settings: "wght" 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.case-stats .stat > .fine {
  max-width: 180px;
  margin-top: auto;
}

.stat-unit {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.5em;
  line-height: 1.3;
  color: var(--accent);
  vertical-align: top;
}

.stat-icon {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  border: 1px solid rgba(36, 36, 36, 0.06);
  background: #f5f5e9;
}

.stat-icon::before {
  content: "↗";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: rgba(20, 26, 31, 0.7);
}

.case-stats .stat .eksempel {
  top: auto;
  right: 12px;
  bottom: 10px;
  left: auto;
}

.case-side {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-areas:
    "top"
    "visual"
    "cta";
  grid-template-rows: 152.5px 381.5px 55.5px;
  row-gap: 10px;
}

.case-top {
  grid-area: top;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1px;
  overflow: hidden;
  border-radius: 30px;
  background: #f5f5e9;
}

.case-services {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 30px;
  overflow: hidden;
  border-radius: 30px 0 0 30px;
  background: #fffffa;
}

.case-services .service-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.case-services .chip {
  padding: 3px 9px;
  background: #f5f5e9;
}

.case-services .eksempel {
  right: 12px;
  top: 10px;
  left: auto;
  bottom: auto;
}

.case-quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 30px;
  overflow: hidden;
  border-radius: 0 30px 30px 0;
  background: #fffffa;
}

.case-quote blockquote {
  margin: 0;
  color: var(--muted);
}

.case-quote .person {
  margin-top: auto;
  gap: 9px;
}

.case-quote .avatar {
  width: 21px;
  height: 21px;
}

.case-quote .eksempel {
  right: 12px;
  top: 10px;
  left: auto;
  bottom: auto;
}

.case-visual {
  grid-area: visual;
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
}

.case-visual > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--ink);
  opacity: 0.3;
  pointer-events: none;
}

.case-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--white);
  font-weight: 600;
  font-variation-settings: "wght" 600;
  z-index: 2;
}

.case-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.case-visual .eksempel {
  top: auto;
  right: 12px;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.case-cta {
  grid-area: cta;
  position: relative;
  min-height: 55.5px;
  background: var(--accent);
}

.case-cta[aria-disabled="true"] {
  cursor: default;
}

.case-cta::before {
  background: #f5f5e9;
}

.case-cta .eksempel {
  top: 8px;
  right: 10px;
  left: auto;
  transform: none;
  background: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.9);
}

@media (hover: hover) and (pointer: fine) {
  .case-cta:hover::before {
    transform: translateY(-50%) scale(65);
  }
}

@media (max-width: 850px) {
  .case-grid {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    gap: 10px;
    padding: 10px;
  }

  .case-left {
    grid-template-rows: 349.5px 372px;
  }

  .case-main {
    padding: 30px;
  }

  .case-title {
    font-size: 20px;
    line-height: 1.3;
  }

  .case-facts div {
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 20px;
  }

  .case-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-stats .stat {
    min-height: 186px;
    padding: 30px;
  }

  .case-stat-2 {
    border-top: 1px solid #f5f5e9;
    border-left: 0;
  }

  .case-stats .stat .stat-num {
    margin-top: 47px;
    font-size: 60px;
  }

  .case-stats .stat > .fine {
    max-width: none;
  }

  .case-side {
    grid-template-columns: 1fr;
    grid-template-areas:
      "visual"
      "top"
      "cta";
    grid-template-rows: 220px 306px 51px;
    row-gap: 10px;
  }

  .case-top {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, 153px);
    row-gap: 0;
  }

  .case-services,
  .case-quote {
    padding: 30px;
    border-radius: 30px;
  }

  .case-services {
    border-radius: 30px 30px 0 0;
  }

  .case-quote {
    border-radius: 0 0 30px 30px;
  }

  .case-cta {
    min-height: 51px;
  }

  .case-brand {
    font-size: 14px;
    text-align: center;
    gap: 9px;
  }

  .case-brand img {
    width: 38px;
    height: 38px;
  }

  .case-cta .eksempel {
    top: 6px;
    right: 8px;
    background: rgba(255, 255, 255, 0.2);
  }
}
