/* ------------------------------------------------------------------
   Portfolio refresh — layout overrides
   Loaded last on every page. Shows the real artwork instead of
   presentation boards, tightens the archive grid and lets project
   galleries keep each image's natural proportions.
------------------------------------------------------------------- */

/* ---------- Project cards (home "selected work" + archive) ---------- */
.grid:has(> .real-project) {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 56px 26px !important;
}

.real-project .real-cover {
  aspect-ratio: 5 / 3;
  background: #1c1411 !important;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(34, 19, 14, .06), 0 18px 40px -28px rgba(34, 19, 14, .55);
}

.real-project .real-cover img {
  width: 100%;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  transition: transform .9s cubic-bezier(.2, .8, .2, 1), filter .5s;
}

.real-project .real-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 10, 6, .35));
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}

.real-project:hover .real-cover img,
.real-project:focus-visible .real-cover img { transform: scale(1.045); }
.real-project:hover .real-cover::after,
.real-project:focus-visible .real-cover::after { opacity: 1; }

.real-project .project-open {
  z-index: 2;
}

.real-project .project-meta {
  padding-top: 16px;
}

.real-project .project-meta h3 {
  font-size: 16px !important;
  line-height: 1.6 !important;
  margin: 0 0 4px !important;
}

.real-project .project-meta p {
  font-size: 11px !important;
  letter-spacing: .2px;
}

@media (max-width: 1100px) {
  .grid:has(> .real-project) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 44px 22px !important;
  }
}

@media (max-width: 680px) {
  .grid:has(> .real-project) {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
}

/* ---------- Project page galleries: masonry, real proportions ---------- */
.new-project-gallery .raw-art-grid {
  display: block !important;
  column-count: 2;
  column-gap: 24px;
}

.new-project-gallery .raw-art-grid figure {
  break-inside: avoid;
  display: block;
  margin: 0 0 24px !important;
}

.new-project-gallery .raw-art-grid .asset-button {
  padding: 0 !important;
  background: transparent !important;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 40px -30px rgba(34, 19, 14, .6);
}

.new-project-gallery .raw-art-grid img,
.new-project-gallery .raw-art-grid .full-row img,
.new-project-gallery .raw-art-grid .rollup-source img,
.new-project-gallery .raw-art-grid .production-sheet img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block;
}

/* very wide strips (stickers, banners) read better across the full width */
.new-project-gallery .raw-art-grid .print-strip,
.new-project-gallery .raw-art-grid .wide-strip {
  column-span: all;
}

.new-project-gallery .raw-art-grid figcaption {
  padding: 10px 2px 0 !important;
}

@media (max-width: 760px) {
  .new-project-gallery .raw-art-grid { column-count: 1; }
}
