/* Collection wall — fuckit + side grid, mosaic, page-wide rug finale only */

html:has(body.collection-page--wall) {
  background: #000;
  scroll-behavior: auto;
  overflow-x: clip;
}

body.collection-page--wall {
  background: #000;
  color: #111;
  overflow-x: clip;
  overscroll-behavior-x: none;
  /* Keep content below fixed nav */
  padding-top: var(--nav-height) !important;
}

body.collection-page--wall .site-nav {
  background: #000;
}

.collection-wall-main {
  padding-top: 0;
  padding-bottom: 0;
  background: #000;
}

.collection-wall-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  margin: 0;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(2rem, 4.5vw, 3.25rem);
  background:
    radial-gradient(circle at 20% 30%, rgba(200, 182, 255, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(26, 75, 255, 0.06) 0%, transparent 40%),
    linear-gradient(165deg, var(--grey-light) 0%, var(--grey-mid) 100%);
}

body.collection-page--wall .collection-wall-intro .sparkle-bg__dot {
  animation-name: collection-sparkle-twinkle;
  box-shadow: 0 0 12px rgba(26, 75, 255, 0.65), 0 0 5px rgba(26, 75, 255, 0.45);
}

.collection-wall-intro__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  box-sizing: border-box;
  text-align: left;
}

.collection-wall-intro__title {
  margin: 0;
  font-family: "Pirata One", "UnifrakturMaguntia", serif;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.04em;
  font-size: clamp(2.75rem, 6vw, 3.75rem);
  line-height: 1;
  color: var(--blue);
  text-transform: lowercase;
}

@media (min-width: 900px) {
  .collection-wall-intro__title {
    font-size: clamp(3.75rem, 5vw, 5rem);
  }
}

.collection-wall-empty {
  margin: 2rem clamp(1.25rem, 4vw, 2rem) 4rem;
  color: rgba(0, 0, 0, 0.55);
}

.collection-wall {
  --wall-stroke: 5px;
  --wall-cursor: url("/assets/img/cursor-zoom.svg") 22 22, zoom-in;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #000;
  overflow: hidden;
  cursor: var(--wall-cursor);
}

/* —— Top: fuckit + grid beside it (NOT page-wide) —— */
.collection-wall-lead {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0;
  width: 100%;
  height: min(68vh, 38rem);
  max-height: 38rem;
  background: #000;
  border-bottom: var(--wall-stroke) solid #000;
  align-items: stretch;
}

.collection-wall-lead .collection-wall__item--hero {
  float: none;
  clear: none;
  width: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  align-self: stretch;
  border-width: var(--wall-stroke);
  border-right: var(--wall-stroke) solid #000;
  overflow: hidden;
}

.collection-wall-lead .collection-wall__item--hero .collection-wall__img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* framed fuckit crop — word readable */
  object-position: center;
  background: #000;
}

.collection-wall-lead__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.collection-wall-lead__grid .collection-wall__item {
  float: none;
  width: auto;
  height: auto;
  min-height: 0;
  border-width: var(--wall-stroke);
  overflow: hidden;
}

.collection-wall-lead__grid .collection-wall__item .collection-wall__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* —— Middle mosaic (clear floats so finale stays at the bottom) —— */
.collection-wall-mosaic {
  position: relative;
  width: 100%;
  font-size: 0;
  overflow: hidden;
}

.collection-wall-mosaic::after {
  content: "";
  display: table;
  clear: both;
}

.collection-wall__item {
  display: block;
  float: left;
  width: 33.333%;
  margin: 0;
  padding: 0;
  border: var(--wall-stroke) solid #000;
  outline: none;
  background: #000;
  cursor: var(--wall-cursor);
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.collection-wall-mosaic .collection-wall__item--sm { width: 24%; }
.collection-wall-mosaic .collection-wall__item--md { width: 36%; }
.collection-wall-mosaic .collection-wall__item--lg { width: 48%; }
.collection-wall-mosaic .collection-wall__item--xl { width: 56%; }

.collection-wall__item:hover {
  z-index: 8;
  transform: scale(1.02);
}

.collection-wall-lead .collection-wall__item:hover,
.collection-wall__item--last:hover {
  transform: none;
}

.collection-wall__item:focus-visible {
  z-index: 8;
  border-color: #ff5722;
}

.collection-wall__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  vertical-align: middle;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.collection-wall-mosaic .collection-wall__item:hover .collection-wall__img {
  transform: scale(1.04);
}

.collection-wall-mosaic .collection-wall__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* —— ONLY page-wide tile: wide rug crop at the bottom —— */
.collection-wall__item--last {
  float: none;
  clear: both;
  display: block;
  width: 100%;
  height: auto;
  border-width: 6px;
  border-left: 0;
  border-right: 0;
}

.collection-wall__item--last .collection-wall__img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* CTA zigzag sits on the last wall row — no black strip between */
.collection-wall-footer-band {
  position: relative;
  z-index: 10;
  margin-top: 0;
  padding-top: 0;
  background: var(--lavender, #c8b6ff);
}

.collection-wall-footer-band .cta-band {
  position: relative;
  margin-top: 0;
  background: var(--lavender, #c8b6ff);
}

.collection-wall-footer-band .cta-band.cta-band--lavender .section-divider--top {
  /* pull zigzag onto the finale image */
  margin: 0;
}

.collection-wall-footer-band .section-divider,
.collection-wall-footer-band .section-divider--top {
  pointer-events: none !important;
}

.collection-wall-footer-band .cta-band .section-divider--top {
  z-index: 3;
}

.collection-wall-footer-band .cta-band__inner,
.collection-wall-footer-band .cta-band__actions,
.collection-wall-footer-band .cta-band a,
.collection-wall-footer-band .cta-band button,
.collection-wall-footer-band .quote-signup a,
.collection-wall-footer-band .quote-signup button,
.collection-wall-footer-band .quote-signup input,
.collection-wall-footer-band .quote-signup select,
.collection-wall-footer-band .quote-signup label {
  pointer-events: auto;
}

.collection-wall-layout-root {
  background: #000;
}

.collection-wall--layout {
  width: 100%;
  background: #000;
}

.collection-wall-row {
  width: 100%;
  gap: 0;
  background: #000;
}

.collection-wall--layout .collection-wall__item--cell {
  float: none;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  border-width: var(--wall-stroke);
  overflow: hidden;
  align-self: stretch;
}

.collection-wall--layout .collection-wall__item--cell.collection-wall__item--last {
  height: 100%;
  width: 100%;
  border-left: 0;
  border-right: 0;
}

.collection-wall--layout .collection-wall__item--cell .collection-wall__img,
.collection-wall--layout .collection-wall__item--cell.collection-wall__item--last .collection-wall__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-wall-row__sidegrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 0;
  min-width: 0;
  height: 100%;
  background: #000;
}

.collection-wall-row__sidegrid--stack2 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
}

.collection-wall-row__sidegrid .collection-wall__item--cell {
  min-height: 0;
}

.collection-wall--desktop {
  display: block;
}

.collection-wall--mobile {
  display: none;
}

@media (max-width: 767px) {
  .collection-wall--desktop {
    display: none;
  }

  .collection-wall--mobile {
    display: block;
  }

  /* If mobile layout empty, show desktop as fallback */
  .collection-wall-layout-root:not(:has(.collection-wall--mobile .collection-wall-row)) .collection-wall--desktop {
    display: block;
  }
}

.collection-wall-footer-band .cta-band .section-divider--top {
  z-index: 3;
}

.collection-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top, 0px))
    max(0.75rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px))
    max(0.75rem, env(safe-area-inset-left, 0px));
  cursor: zoom-out;
  box-sizing: border-box;
}

.collection-lightbox[hidden] {
  display: none !important;
}

.collection-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}

.collection-lightbox__shell {
  --lb-pad: clamp(0.75rem, 2vw, 1.25rem);
  --lb-chrome: 3.25rem;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: fit-content;
  max-width: min(100%, calc(100vw - 1.5rem));
  max-height: min(100%, calc(100dvh - 1.5rem));
  max-height: min(100%, calc(100svh - 1.5rem));
  display: flex;
  flex-direction: column;
  background: #000;
  border: 4px solid #111;
  cursor: default;
  animation: collection-lightbox-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes collection-lightbox-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.collection-lightbox__top {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  padding: 0.35rem;
  pointer-events: none;
}

.collection-lightbox__close,
.collection-lightbox__nav {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.collection-lightbox__close {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
}

.collection-lightbox__icon {
  width: 1.35rem;
  height: 1.35rem;
}

.collection-lightbox__stage {
  position: relative;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  max-width: 100%;
  max-height: inherit;
}

.collection-lightbox__figure {
  margin: 0;
  line-height: 0;
  max-width: 100%;
  max-height: inherit;
}

.collection-lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, calc(100vw - 1.5rem));
  max-height: min(92dvh, calc(100dvh - 1.5rem));
  max-height: min(92svh, calc(100svh - 1.5rem));
  margin: 0 auto;
  border: 0;
  object-fit: contain;
}

.collection-lightbox__nav--prev { position: absolute; left: 0.15rem; top: 50%; transform: translateY(-50%); z-index: 2; }
.collection-lightbox__nav--next { position: absolute; right: 0.15rem; top: 50%; transform: translateY(-50%); z-index: 2; }
.collection-lightbox__bottom { display: none; }

@media (max-width: 767px) {
  .collection-lightbox {
    padding: 0.5rem;
    align-items: center;
  }

  .collection-lightbox__shell {
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    max-height: calc(100svh - 1rem);
    width: auto;
  }

  .collection-lightbox__img {
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    max-height: calc(100svh - 1rem);
  }

  .collection-lightbox__close,
  .collection-lightbox__nav {
    width: 2.5rem;
    height: 2.5rem;
  }
}

body.collection-page--wall .site-footer {
  background: var(--black);
  color: var(--lavender);
  margin-top: 0;
}

/* Same lavender CTA as the previous collection page */
body.collection-page--wall .page--quote .cta-band--lavender {
  background: var(--lavender);
  color: var(--white);
}

body.collection-page--wall .page--quote .cta-band--lavender .cta-band__title {
  font-family: "Shrikhand", "Cooper Black", "Pirata One", serif;
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(3.25rem, 10vw, 120px);
  line-height: 0.95;
  color: var(--neon-yellow);
}

body.collection-page--wall .page--quote .cta-band--lavender .cta-band__text {
  color: var(--black);
}

body.collection-page--wall .page--quote .cta-band--lavender .cta-band__actions .btn--primary {
  background: var(--blue);
  color: var(--white);
  border: 3px solid var(--blue);
  box-shadow: none;
}

body.collection-page--wall .page--quote .cta-band--lavender .cta-band__actions .btn--yellow {
  background: transparent;
  color: var(--blue);
  border: 3px solid var(--blue);
  box-shadow: none;
}

body.collection-page--wall .page--quote .cta-band--lavender .cta-band__actions .btn--primary:hover:not(:disabled),
body.collection-page--wall .page--quote .cta-band--lavender .cta-band__actions .btn--primary:focus-visible:not(:disabled),
body.collection-page--wall .page--quote .cta-band--lavender .cta-band__actions .btn--primary:active:not(:disabled),
body.collection-page--wall .page--quote .cta-band--lavender .cta-band__actions .btn--yellow:hover:not(:disabled),
body.collection-page--wall .page--quote .cta-band--lavender .cta-band__actions .btn--yellow:focus-visible:not(:disabled),
body.collection-page--wall .page--quote .cta-band--lavender .cta-band__actions .btn--yellow:active:not(:disabled) {
  background: var(--neon-yellow);
  color: var(--blue);
  border-color: var(--neon-yellow);
  box-shadow: none;
}

@media (min-width: 900px) {
  body.collection-page--wall .page--quote .cta-band--lavender .cta-band__title {
    font-size: 120px;
  }
}

@media (min-width: 1100px) {
  .collection-wall {
    --wall-stroke: 6px;
  }

  .collection-wall-lead {
    grid-template-columns: 1.45fr 1fr;
  }

  .collection-wall__item--last {
    border-width: 7px;
  }
}

@media (max-width: 767px) {
  .collection-wall {
    --wall-stroke: 4px;
  }

  .collection-wall-intro {
    padding: 1.25rem 0 1.1rem;
  }

  /*
   * CTA size model (no negative-margin shrink hacks):
   * - height: auto → grow with content
   * - min-height → keep a readable band
   * - padding-top → space under top zigzag
   * - padding-bottom → clear the pony-up zigzag that overlaps upward
   */
  .collection-wall-footer-band {
    margin-top: 0;
  }

  body.collection-page--wall .page--quote .cta-band--lavender,
  .collection-wall-footer-band .cta-band.cta-band--lavender {
    box-sizing: border-box;
    height: auto;
    min-height: 22rem;
    padding-top: clamp(1.75rem, 5vw, 2.5rem);
    padding-bottom: clamp(4.5rem, 14vw, 6rem);
  }

  body.collection-page--wall .page--quote .cta-band--lavender .cta-band__title {
    margin-top: 0;
    margin-bottom: 0.75rem;
  }

  body.collection-page--wall .page--quote .cta-band--lavender .cta-band__text {
    margin-bottom: 1.5rem;
  }

  body.collection-page--wall .page--quote .cta-band--lavender .cta-band__actions {
    position: relative;
    z-index: 2;
  }

  /* Stack fuckit then 2×2 — keep lead short so the rug finale sits higher */
  .collection-wall-lead {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }

  .collection-wall-lead .collection-wall__item--hero {
    min-height: 48vw;
    height: 48vw;
    border-right: 0;
  }

  .collection-wall-lead__grid {
    height: 52vw;
    min-height: 52vw;
  }

  /* Fallback before JS: never more than 2 across */
  .collection-wall-mosaic .collection-wall__item,
  .collection-wall-mosaic .collection-wall__item--sm,
  .collection-wall-mosaic .collection-wall__item--md,
  .collection-wall-mosaic .collection-wall__item--lg,
  .collection-wall-mosaic .collection-wall__item--xl {
    width: 50%;
  }

  .collection-wall__item--last {
    width: 100%;
    border-width: 5px;
  }
}

/* Tablet: still max 2 across until desktop mosaic packer takes over */
@media (min-width: 768px) and (max-width: 899px) {
  .collection-wall-mosaic .collection-wall__item,
  .collection-wall-mosaic .collection-wall__item--sm,
  .collection-wall-mosaic .collection-wall__item--md,
  .collection-wall-mosaic .collection-wall__item--lg,
  .collection-wall-mosaic .collection-wall__item--xl {
    width: 50%;
  }
}

@media (hover: none) {
  .collection-wall__item:hover { transform: none; }
  .collection-wall-mosaic .collection-wall__item:hover .collection-wall__img { transform: none; }
}
