/* ================================================================
   ARTWORKS PAGE — artworks.css
   ================================================================ */

body.page-artworks {
  --bg: #1d4ed8;
  --fg: #fff;
  --line: rgba(255, 255, 255, 0.14);
  overflow: auto;
  /* Blueprint grid */
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-attachment: fixed;
}

/* ── CROSSHAIR CURSOR ────────────────────────────────────────── */
.cursor-crosshair {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: left, top;
}
.cc-h {
  position: absolute;
  width: 22px;
  height: 1px;
  background: rgba(255, 255, 255, 0.80);
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.cc-v {
  position: absolute;
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.80);
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.cc-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ── FIXED HEADER OVERLAY ────────────────────────────────────── */
.artworks-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding: 120px 48px 64px;
  background: linear-gradient(
    to bottom,
    rgba(29, 78, 216, 1)    0%,
    rgba(29, 78, 216, 0.98) 50%,
    rgba(29, 78, 216, 0)    100%
  );
  pointer-events: none;
}
.artworks-header .artworks-hero { pointer-events: all; }

/* ── ARTWORKS WRAP — scroll container ───────────────────────── */
.artworks-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  scrollbar-width: none;
}
.artworks-wrap::-webkit-scrollbar { display: none; }

/* ── HERO ────────────────────────────────────────────────────── */
.artworks-hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(4.5rem, 11vw, 13rem);
  text-transform: uppercase;
  line-height: 0.82;
  letter-spacing: -0.01em;
  color: #0a1929;
  margin: 0 0 18px 0;
}

.artworks-title-block {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  border: 2px solid rgba(10, 25, 60, 0.45);
  border-radius: 16px;
  padding: 13px 30px;
}
.atb-item {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(10, 25, 60, 0.85);
}
.atb-div {
  color: rgba(10, 25, 60, 0.40);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ── VERTICAL MARQUEE GRID ───────────────────────────────────── */
.artworks-grid {
  display: flex;
  gap: 96px;
  padding: 0 48px;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Bottom gradient fade */
.artworks-grid::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to top, rgba(29, 78, 216, 1), transparent);
  pointer-events: none;
  z-index: 5;
}

/* Static fallback (mobile) */
.artworks-grid.is-static {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  height: auto;
  overflow: visible;
  padding: 0 48px 80px;
}
.artworks-grid.is-static::after { display: none; }

/* Each column */
.marquee-col {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  height: 100%;
}

/* Scrolling track */
.marquee-col-track {
  display: flex;
  flex-direction: column;
  animation: colScrollUp var(--col-dur, 25s) linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
.marquee-col:hover .marquee-col-track {
  animation-play-state: paused;
}

@keyframes colScrollUp {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -50%, 0); }
}

/* ── CARD ────────────────────────────────────────────────────── */
.artwork-card {
  cursor: none;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 64px;
}

/* Portrait 7:10 via padding-bottom trick */
.artwork-img-wrap {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  height: 0;
  padding-bottom: 142.86%;
}

.artwork-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.12) brightness(0.65);
  transition: filter 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.artwork-card:hover .artwork-img {
  filter: saturate(1) brightness(1);
  transform: scale(1.04);
}

/* Blue tint overlay */
.artwork-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 40, 160, 0.45);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 1;
}
.artwork-card:hover .artwork-overlay { opacity: 0; }

/* Corner bracket marks */
.artwork-corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.corner {
  position: absolute;
  width: 10px;
  height: 10px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0.5;
}
.corner.tl { top: 8px; left: 8px; border-top: 1px solid rgba(255,255,255,0.75); border-left: 1px solid rgba(255,255,255,0.75); }
.corner.tr { top: 8px; right: 8px; border-top: 1px solid rgba(255,255,255,0.75); border-right: 1px solid rgba(255,255,255,0.75); }
.corner.bl { bottom: 8px; left: 8px; border-bottom: 1px solid rgba(255,255,255,0.75); border-left: 1px solid rgba(255,255,255,0.75); }
.corner.br { bottom: 8px; right: 8px; border-bottom: 1px solid rgba(255,255,255,0.75); border-right: 1px solid rgba(255,255,255,0.75); }
.artwork-card:hover .corner { width: 16px; height: 16px; opacity: 1; }

/* Hover label */
.artwork-hover-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 14px 14px;
  background: linear-gradient(transparent, rgba(5, 15, 60, 0.75));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.artwork-card:hover .artwork-hover-label {
  opacity: 1;
  transform: translateY(0);
}
.artwork-hover-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(0.9rem, 1.8vw, 1.4rem);
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
  flex: 1;
  margin-right: 8px;
}
.artwork-hover-view {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

/* Card ref strip — no year */
.artwork-meta {
  padding-top: 5px;
  border-top: 1px solid rgba(10, 25, 60, 0.14);
}
.artwork-ref {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(10, 25, 60, 0.48);
}

/* ── LIGHTBOX BACKGROUND CANVAS ─────────────────────────────── */
.lightbox-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* ── LIGHTBOX ────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(8, 22, 88, 0.96);
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.40s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.40s;
  backdrop-filter: blur(10px);
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox[aria-hidden="true"] { pointer-events: none; }
.lightbox[aria-hidden="false"] { pointer-events: all; }

/* Hide nav bar when lightbox is open */
body.lb-open .site-nav { opacity: 0; pointer-events: none; }

/* Lightbox title row — block on desktop, flex on mobile */
.lightbox-title-row {
  display: block;
}

/* Lightbox nav — fixed at viewport edges on desktop */
.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: none;
  display: flex;
  align-items: center;
  padding: 8px;
  transition: opacity 0.25s;
  z-index: 9960;
}
.lb-nav.is-hidden { visibility: hidden; }
.lb-nav--prev { left: 64px; }
.lb-nav--next { right: 64px; }

.lb-nav-arrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.80);
  transition: color 0.25s, transform 0.25s;
  line-height: 1;
}
.lb-nav--prev:hover .lb-nav-arrow { color: #fff; transform: translateX(-4px); }
.lb-nav--next:hover .lb-nav-arrow { color: #fff; transform: translateX(4px); }

.lightbox-close {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.32);
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  color: rgba(255, 255, 255, 0.85);
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  cursor: none;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  font-family: 'Space Grotesk', sans-serif;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox-close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.55);
}

/* Desktop: close button must sit above the CRT frame (9950) */
@media (min-width: 769px) {
  .lightbox-close {
    position: fixed;
    top: 52px;
    right: 60px;
    z-index: 9960;
  }
}

.lightbox-inner {
  display: flex;
  align-items: center;
  gap: 64px;
  padding: 0 80px;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  position: relative;
  z-index: 2;
}

.lightbox-img-wrap {
  position: relative;
  flex-shrink: 0;
  height: 80vh;
  aspect-ratio: 7 / 10;
}
.lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox corners */
.lightbox-corners {
  position: absolute;
  inset: -10px;
  pointer-events: none;
}
.lc {
  position: absolute;
  width: 22px;
  height: 22px;
}
.lc.tl { top: 0; left: 0; border-top: 1px solid rgba(255,255,255,0.45); border-left: 1px solid rgba(255,255,255,0.45); }
.lc.tr { top: 0; right: 0; border-top: 1px solid rgba(255,255,255,0.45); border-right: 1px solid rgba(255,255,255,0.45); }
.lc.bl { bottom: 0; left: 0; border-bottom: 1px solid rgba(255,255,255,0.45); border-left: 1px solid rgba(255,255,255,0.45); }
.lc.br { bottom: 0; right: 0; border-bottom: 1px solid rgba(255,255,255,0.45); border-right: 1px solid rgba(255,255,255,0.45); }

/* Lightbox panel */
.lightbox-panel {
  flex: 1;
  min-width: 0;
}
.lightbox-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  padding-left: 52px;
}
.lightbox-ref {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}
.lightbox-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 4.5rem);
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0;
}
.lightbox-medium {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.50);
  margin: 0;
}
.lightbox-rule {
  width: 36px;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}
.lightbox-buy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: #fff;
  padding: 14px 28px;
  text-decoration: none;
  border-radius: 1px;
  align-self: flex-start;
  transition: background 0.25s, color 0.25s;
}
.lightbox-buy:hover { background: rgba(255, 255, 255, 0.88); }
.buy-arrow {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.lightbox-buy:hover .buy-arrow { transform: translate(3px, -3px); }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  padding: 56px 48px 48px;
  background: #1c1917;
  margin-top: 80px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-nav-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  color: rgba(255, 255, 255, 0.40);
  text-decoration: none;
  transition: color 0.25s;
}
.footer-nav-link:hover { color: #fff; }
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.footer-location {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 20px;
  text-align: center;
}
.footer-copy {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.63rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.16);
}

/* ── MULTI-IMAGE COUNTER ─────────────────────────────────────── */
.lb-img-counter {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: none;
  background: rgba(0, 0, 0, 0.50);
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── MULTI-IMAGE DOTS ────────────────────────────────────────── */
.lb-img-dots {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
}
.lb-img-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.30);
  transition: background 0.25s, transform 0.25s, border-color 0.25s;
  flex-shrink: 0;
  display: block;
  cursor: pointer;
}
.lb-img-dot.is-active {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(255, 255, 255, 0.90);
  transform: scale(1.15);
}

/* Image wrap shows pointer when multi-image */
.lightbox-img-wrap.is-multi { cursor: pointer; }

/* ── FOOTER ENTRANCE ANIMATION ──────────────────────────────── */
.footer-anim {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-anim.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   MOBILE RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  /* Push header below nav */
  .artworks-header {
    padding: 76px 20px 40px;
  }
  .artworks-hero-title { font-size: clamp(3rem, 14vw, 5rem); margin-bottom: 14px; }

  /* Mobile: static grid, clears header */
  .artworks-grid {
    padding: 0 16px;
    height: 100vh;
    gap: 8px;
  }
  .artworks-grid.is-static {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 16px 60px;
    height: auto;
  }

  /* Mobile lightbox nav — flanks the title */
  .lightbox-title-row {
    display: flex;
    align-items: flex-start;
    width: 100%;
  }
  .lb-nav {
    position: static;
    top: auto;
    transform: none;
    flex-shrink: 0;
    padding: 4px 0;
  }
  .lb-nav--prev { left: auto; }
  .lb-nav--next { right: auto; }
  .lightbox-title-row .lightbox-title {
    flex: 1;
    text-align: center;
    padding: 0 8px;
  }
  .lb-nav-arrow { font-size: 2rem; }

  /* Artworks hero title — slightly bigger on mobile */
  .artworks-hero-title { font-size: clamp(3.5rem, 16vw, 6rem); }

  /* Artworks header — full-width box, left/right items */
  .artworks-title-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }
  .atb-item:last-child { text-align: right; }
  .atb-div { display: none; }

  /* Lightbox mobile — override global max-height/align constraints */
  .lightbox-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 60px 24px 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
  }
  .lightbox-img-wrap {
    flex: 1 1 0%;
    width: 100%;
    min-height: 0;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    padding-bottom: 0;
  }
  .lb-img-dots {
    bottom: -32px;
  }
  .lb-img-counter {
    position: fixed;
    top: 56px;
    left: 32px;
    right: auto;
    transform: translateY(-50%);
  }
  .lightbox-img { width: 100%; height: 100%; object-fit: contain; display: block; }
  .lightbox-panel {
    flex: 0 0 auto;
    width: 100%;
    padding-bottom: 48px;
  }
  .lightbox-panel-inner {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255,255,255,0.10);
    padding-top: 20px;
    margin-top: 16px;
    gap: 10px;
    align-items: center;
    text-align: center;
  }
  .lightbox-buy { align-self: center; }

  .site-footer { padding: 44px 20px 36px; margin-top: 48px; }
  .footer-main { flex-direction: column; gap: 24px; }
  .footer-right { align-items: flex-start; }
  .footer-nav-link { font-size: clamp(1rem, 5vw, 1.5rem); }
}

@media (max-width: 420px) {
  .artworks-grid.is-static { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
