/* KOPASH V48 — production-only alignment and logo containment */
.header-v2 nav > a {
  font-size: 13px;
}

.lead-fields:first-of-type {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.viz-mark {
  padding: 0;
  overflow: hidden;
  text-align: center;
}

.viz-mark b,
.viz-logo-circle.viz-mark b {
  font-size: 17cqw;
  line-height: .88;
  transform: none;
}

.viz-mark i,
.viz-logo-circle.viz-mark i {
  display: block;
  max-width: 88%;
  margin-top: -1cqw;
  font-size: 12.5cqw;
  line-height: .78;
  white-space: nowrap;
  transform: none;
}

@media (max-width: 780px) {
  .header-v2 nav > a {
    font-size: 13.5px;
  }

  .lead-fields:first-of-type {
    grid-template-columns: 1fr;
  }
}

/* KOPASH V49 — legal disclosure, fullscreen gallery and main-site transition */
.meta-platforms-notice {
  grid-column: 1 / -1;
  max-width: 980px;
  margin: 8px 0 0;
  color: rgba(238, 239, 234, .46);
  font-size: 10px;
  line-height: 1.55;
}

.portfolio-detail-gallery img {
  cursor: zoom-in;
}

.portfolio-detail-gallery img:focus-visible {
  outline: 2px solid #c5ff28;
  outline-offset: 4px;
}

html.viz-lightbox-open,
html.viz-lightbox-open body {
  overflow: hidden;
}

.viz-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  color: #f1f2ed;
  background: rgba(4, 7, 5, .97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.viz-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.viz-lightbox figure {
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
}

.viz-lightbox figure img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.viz-lightbox figcaption {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: rgba(241, 242, 237, .62);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.viz-lightbox-counter {
  color: #c5ff28;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.viz-lightbox button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(241, 242, 237, .25);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #f1f2ed;
  background: rgba(9, 13, 10, .72);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.viz-lightbox button:hover,
.viz-lightbox button:focus-visible {
  color: #c5ff28;
  border-color: #c5ff28;
  outline: 2px solid transparent;
  background: rgba(197, 255, 40, .08);
}

.viz-lightbox button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.viz-lightbox-close {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  z-index: 2;
}

.viz-lightbox-prev { justify-self: start; }
.viz-lightbox-next { justify-self: end; }

html.leaving-for-main-site body::before {
  content: "KOPASH.";
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  color: #11120f;
  background: #efefec;
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(54px, 11vw, 164px);
  font-weight: 800;
  letter-spacing: -.07em;
  animation: kopash-main-enter 180ms ease both;
}

html.leaving-for-main-site body::after {
  content: "";
  position: fixed;
  left: 50%;
  bottom: 11vh;
  z-index: 12001;
  width: min(420px, 62vw);
  height: 2px;
  background: #11120f;
  transform: translateX(-50%) scaleX(0);
  transform-origin: left;
  animation: kopash-main-progress 620ms ease-out 70ms forwards;
}

@keyframes kopash-main-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes kopash-main-progress { to { transform: translateX(-50%) scaleX(1); } }

@media (max-width: 780px) {
  .viz-lightbox {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    padding: max(72px, env(safe-area-inset-top)) 8px max(18px, env(safe-area-inset-bottom));
  }
  .viz-lightbox button { width: 44px; height: 44px; }
  .viz-lightbox figcaption { padding: 0 8px; }
  .viz-lightbox-caption { max-width: 68vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .viz-lightbox,
  html.leaving-for-main-site body::before,
  html.leaving-for-main-site body::after { animation: none !important; transition: none !important; }
  html.leaving-for-main-site body::after { transform: translateX(-50%) scaleX(1); }
}
