.case-panel {
  --case-bg: #e5ecec;
  --case-ink: #14272c;
  --case-muted: #3c5359;
  --case-rule: #14272c38;
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: clamp(3rem, 8svh, 6.5rem);
  background: var(--case-bg);
  color: var(--case-ink);
}
.case-hydraulic {
  --case-bg: #212824;
  --case-ink: #f4f4e9;
  --case-muted: #c4cec2;
  --case-rule: #f4f4e94d;
}
.case-aava {
  --case-bg: #f5e8d9;
  --case-ink: #39261c;
  --case-muted: #665144;
  --case-rule: #39261c40;
}
.case-peda {
  --case-bg: #e8e7f1;
  --case-ink: #262139;
  --case-muted: #514960;
  --case-rule: #26213938;
}
.case-ocio {
  --case-bg: #1c302f;
  --case-ink: #f1f7f4;
  --case-muted: #bdd2c9;
  --case-rule: #f1f7f44d;
}
.case-metsatoita {
  --case-bg: #e6ebdc;
  --case-ink: #262e1e;
  --case-muted: #4d5944;
  --case-rule: #262e1e40;
}
.case-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  grid-template-rows: auto auto;
  grid-template-areas: "summary video" "feedback video";
  column-gap: clamp(2rem, 6vw, 7rem);
  row-gap: clamp(1.25rem, 3.5svh, 2.25rem);
  width: min(100%, 100rem);
  margin-inline: auto;
  padding-inline: clamp(2rem, 6.4vw, 8rem);
}
.case-reverse .case-inner {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  grid-template-areas: "video summary" "video feedback";
}
.case-summary {
  grid-area: summary;
  min-width: 0;
  align-self: end;
}
.case-client {
  font-size: .875rem;
  font-weight: 680;
  letter-spacing: .09em;
  line-height: 1.4;
  text-transform: uppercase;
}
.case-title {
  max-width: 14ch;
  margin-block: .32em .3em;
  font-size: clamp(2.75rem, 4.45vw, 5.2rem);
  font-weight: 680;
  line-height: 1;
  letter-spacing: -.058em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.case-description {
  max-width: 37ch;
  color: var(--case-muted);
  font-size: clamp(1rem, 1.28vw, 1.2rem);
  line-height: 1.5;
}
.case-video {
  grid-area: video;
  align-self: center;
  display: block;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: clamp(.7rem, 1.35vw, 1.25rem);
  background: #141917;
  box-shadow: 0 1.1rem 3.4rem -1.7rem #07101188;
}
.case-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.case-video::after {
  position: absolute;
  inset: 54% 0 0;
  z-index: 1;
  background: linear-gradient(transparent, #08100c8c);
  pointer-events: none;
  content: "";
}
@media (hover: hover) {
  .case-video:hover img { transform: scale(1.025); }
}
.case-panel a:focus-visible, .case-panel summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}
.case-play {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  bottom: clamp(.75rem, 2vw, 1.45rem);
  left: clamp(.75rem, 2vw, 1.45rem);
  min-height: 2.75rem;
  padding-inline: .98rem 1.12rem;
  border: 1px solid #ffffff80;
  border-radius: 100vmax;
  background: #101712e6;
  color: #fff;
  font-size: .875rem;
  font-weight: 620;
  line-height: 1;
}
.case-play svg { flex: 0 0 1rem; width: 1rem; height: 1rem; }
.case-feedback {
  grid-area: feedback;
  min-width: 0;
  align-self: start;
  padding-top: clamp(1rem, 2.8svh, 1.6rem);
  border-top: 1px solid var(--case-rule);
}
.case-quote {
  max-width: 30ch;
  font: italic 400 clamp(1.25rem, 1.9vw, 1.8rem) / 1.26 Georgia, serif;
  letter-spacing: -.015em;
}
.case-attribution {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .65rem;
  margin-top: .7rem;
  font-size: .875rem;
  line-height: 1.4;
}
.case-attribution strong { font-weight: 680; }
.case-attribution span { color: var(--case-muted); }
.case-full-quote { margin-top: .25rem; }
.case-full-quote summary {
  display: list-item;
  width: fit-content;
  padding-block: .65rem;
  color: var(--case-muted);
  cursor: pointer;
  font-size: .875rem;
  line-height: 1.3;
}
.case-full-quote summary:hover { text-decoration: underline; text-underline-offset: .2em; }
.case-full-quote blockquote { max-width: 49ch; margin-top: .5rem; font-size: 1rem; line-height: 1.6; }
.case-full-quote blockquote p + p { margin-top: .75rem; }
.reference-dialog {
  width: min(58rem, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #ffffff38;
  border-radius: 1rem;
  background: #171c19;
  color: #f8faf8;
}
.reference-dialog::backdrop { background: #080b09dd; }
.reference-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 1rem .65rem 1.25rem;
}
.reference-dialog-header h2 { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.dialog-close {
  flex: 0 0 2.75rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #ffffff3d;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.dialog-close svg { width: 1.15rem; height: 1.15rem; }
.dialog-close:hover { background: #ffffff21; }
.reference-dialog a:focus-visible, .reference-dialog button:focus-visible { outline-color: #fff; }
.reference-dialog-screen { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.reference-dialog-screen iframe { width: 100%; height: 100%; display: block; border: 0; }
.reference-dialog-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin: .2rem 1.25rem;
  color: #e2ebe4;
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}
body.dialog-open { overflow: hidden; }
@media (max-width: 850px) {
  .case-panel { padding-block: clamp(1.25rem, 2.75svh, 2.75rem); }
  .case-inner, .case-reverse .case-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "summary" "video" "feedback";
    row-gap: clamp(.9rem, 2.7svh, 1.65rem);
    max-width: 39rem;
    padding-inline: clamp(1.2rem, 5.6vw, 2.25rem);
  }
  .case-client { font-size: .8125rem; }
  .case-title {
    max-width: 17ch;
    font-size: clamp(2rem, min(9.25vw, 7svh), 3.6rem);
  }
  .case-video { max-height: 37svh; }
  .case-attribution { margin-top: .55rem; }
  .reference-dialog { width: calc(100vw - 1.25rem); }
}
@media (max-width: 470px) and (min-height: 740px) {
  .case-video { aspect-ratio: 4 / 3; }
}
@media (max-width: 850px) and (max-height: 620px) {
  .case-panel { padding-block: 1rem; }
  .case-inner, .case-reverse .case-inner { row-gap: .8rem; }
  .case-title { font-size: clamp(1.8rem, 7.8vw, 2.55rem); }
  .case-feedback { padding-top: .7rem; }
  .case-full-quote summary { padding-block: .45rem; }
}
@media (orientation: landscape) and (min-width: 600px) and (max-height: 530px) {
  .case-inner, .case-reverse .case-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-rows: auto auto;
    grid-template-areas: "summary video" "feedback video";
    gap: .8rem 1.5rem;
    max-width: 100%;
  }
}
@media print {
  .case-panel { min-height: 0; padding-block: 1.5rem; color: #111; background: #fff; break-inside: avoid; }
  .case-panel { --case-muted: #333; --case-rule: #888; }
  .case-title { font-size: 2rem; }
  .case-quote { font-size: 1.25rem; }
  .case-play { display: none; }
}
