.real-works {
  background: var(--mar-dk);
  color: var(--paper);
  isolation: isolate;
}

.real-works__filters { position: absolute; pointer-events: none; }
.real-works__heading { max-width: 45rem; margin-bottom: clamp(1.6rem, 4vw, 2.8rem); }
.real-works__heading h2 { font-size: clamp(2.7rem, 7vw, 5rem); }
.real-works__heading p { margin-top: .85rem; color: #e3d8c9; }
.real-works__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2.3vw, 1.45rem); }

.real-works__card {
  display: flex;
  flex-direction: column;
  border: 1px solid #4a5256;
  border-radius: .65rem;
  overflow: hidden;
  background: #1c3449;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease;
}

.real-works__card:hover, .real-works__card:focus-visible { border-color: #dfbd89; background: #284058; }
.real-works__card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #101f2d; }
.real-works__caption { display: flex; flex-direction: column; padding: .95rem 1rem 1.05rem; line-height: 1.3; gap: .4rem; font-weight: 650; }
.real-works__open { color: #f1cf9e; font-size: .875rem; font-weight: 600; }

.real-works__card--feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); align-items: center; background: #203b50; }
.real-works__card--feature img { height: auto; }
.real-works__card--feature .real-works__caption { padding: clamp(1.1rem, 4vw, 3rem); gap: 1rem; font: 400 clamp(1.55rem, 4vw, 2.85rem)/1.12 var(--serif); }
.real-works__card--feature .real-works__open { font-family: var(--sans); }

.real-works__viewer {
  width: min(94vw, 76rem);
  max-height: 94dvh;
  padding: clamp(.8rem, 2.5vw, 1.5rem);
  background: #101f2d;
  color: var(--paper);
  border: 1px solid #626765;
  border-radius: .75rem;
}

.real-works__viewer::backdrop { background: rgb(5 13 23 / 84%); }
html:has(.real-works__viewer[open]) { overflow: hidden; }
.real-works__viewer-head, .real-works__viewer-nav { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.real-works__viewer-head { margin-bottom: .6rem; }
.real-works__viewer-head p { font-weight: 650; }
.real-works__viewer-nav { margin-top: .6rem; }
.real-works__viewer-nav span { color: #e3d8c9; font-variant-numeric: tabular-nums; }
.real-works__viewer img { width: 100%; height: min(69dvh, 56rem); object-fit: contain; }
.real-works__viewer button { padding: .5rem .8rem; border: 1px solid #858582; background: #263f55; border-radius: .35rem; cursor: pointer; min-height: 2.75rem; }
.real-works__viewer button:hover { background: #37556b; }

@media (max-width: 54rem) {
  .real-works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 34rem) {
  .real-works__grid, .real-works__card--feature { grid-template-columns: minmax(0, 1fr); }
  .real-works__card--feature .real-works__caption { gap: .45rem; }
  .real-works__viewer img { height: 65dvh; }
}

@media (prefers-reduced-motion: reduce) {
  .real-works__card { transition: none; }
}
