/* Work library (2026-09-29, local prototype). Immersive dark mosaic + lightbox.
   Tokens: --lux-* from styles.css .page-lux; slot/vignette grammar from css/image-fit.css.
   No categories or filters by design. */

.page-work main { background: var(--lux-bg); }

/* ---------- Hero ---------- */
.wl-hero {
  padding: 84px 0 46px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 55% at 50% 0%, rgba(201, 169, 98, 0.07) 0%, transparent 70%),
    var(--lux-bg);
}
.wl-hero__inner { max-width: 44rem; margin: 0 auto; }
.wl-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}
.wl-hero__tagline {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  color: var(--lux-gold);
}
.wl-hero__lead { margin: 0 auto; max-width: 32em; color: var(--lux-muted); font-size: 1.04rem; line-height: 1.65; }
.wl-devnote {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 22px 0 0; padding: 5px 12px;
  border: 1px dashed rgba(201, 169, 98, 0.45); border-radius: 999px;
  font: 600 0.68rem/1.3 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(201, 169, 98, 0.85);
}
.wl-devnote span { font-size: 0.6rem; }

/* ---------- Mosaic (full-bleed) ---------- */
.wl-library { padding: 10px clamp(10px, 1.6vw, 26px) 80px; }
/* No-JS fallback: CSS columns. JS swaps in explicit columns for parallax. */
.wl-grid { column-count: 4; column-gap: clamp(10px, 1.2vw, 18px); max-width: 1880px; margin: 0 auto; }
.wl-grid.is-js { column-count: initial; display: flex; gap: clamp(10px, 1.2vw, 18px); align-items: flex-start; }
.wl-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(10px, 1.2vw, 18px); }
@media (max-width: 1180px) { .wl-grid { column-count: 3; } }
@media (max-width: 760px)  { .wl-grid { column-count: 2; } }

.wl-item { margin: 0 0 clamp(10px, 1.2vw, 18px); break-inside: avoid; }
.wl-grid.is-js .wl-item { margin: 0; }

.wl-tile {
  position: relative; display: block; width: 100%; padding: 0; margin: 0;
  border: 0; border-radius: var(--img-radius, 8px); overflow: hidden;
  background: var(--lux-bg); cursor: zoom-in; isolation: isolate;
  box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.08), 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.55s cubic-bezier(.2,.7,.2,1), box-shadow 0.55s ease;
}
.wl-tile img {
  display: block; width: 100%; height: auto;
  object-fit: cover; object-position: center;
  transform: scale(1.001);
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter 0.6s ease;
  filter: saturate(0.94) brightness(0.93);
}
/* Soft vignette into page black (image-fit card strength, 25–40%) */
.wl-tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(8, 8, 10, 0.42) 100%),
    linear-gradient(to top, rgba(8, 8, 10, 0.34) 0%, transparent 26%);
  transition: opacity 0.5s ease;
}
.wl-item--contain .wl-tile img { filter: none; }
.wl-tile:hover, .wl-tile:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.6), 0 0 26px rgba(201, 169, 98, 0.12), 0 22px 44px rgba(0, 0, 0, 0.55);
}
.wl-tile:hover img, .wl-tile:focus-visible img { transform: scale(1.035); filter: saturate(1) brightness(1); }
.wl-tile:hover::after, .wl-tile:focus-visible::after { opacity: 0.6; }
.wl-tile:focus-visible { outline: 2px solid var(--lux-gold); outline-offset: 3px; }

/* Caption outside the slot (IMAGE_FIT_RULES) */
.wl-cap { padding: 10px 2px 2px; line-height: 1.4; }
.wl-cap b { display: block; font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; color: var(--lux-cream); }
.wl-cap span { display: block; margin-top: 2px; font-size: 0.86rem; color: var(--lux-muted); }

/* Reveal on scroll (only when JS marks the page ready) */
.wl-grid.is-js .wl-item { opacity: 0; transform: translateY(34px); transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.wl-grid.is-js .wl-item.is-in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .wl-hero { padding: 56px 0 30px; }
  .wl-cap b { font-size: 1rem; }
  .wl-cap span { font-size: 0.8rem; }
  .wl-tile:hover, .wl-tile:focus-visible { transform: none; }
}

/* ---------- CTA ---------- */
.wl-cta-section { border-top: 1px solid rgba(201, 169, 98, 0.1); }
.wl-cta { text-align: center; max-width: 46rem; margin: 0 auto; padding: 44px 32px 38px; }
.wl-cta h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 6px 0 12px; }
.wl-cta .lead { margin: 0 auto 8px; max-width: 34em; }
.wl-cta__row { justify-content: center; margin-top: 20px; }

/* ---------- Lightbox (comp: image stage left, info panel right) ---------- */
.wl-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-columns: minmax(0, 1fr) 380px;
  background: rgba(6, 6, 8, 0.97);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.35s ease;
  touch-action: pan-y;
}
.wl-lightbox[hidden] { display: none; }
.wl-lightbox.is-open { opacity: 1; }
.wl-lightbox__stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 48px 92px; min-height: 0; min-width: 0; }
.wl-lightbox__img {
  max-width: 100%; max-height: calc(100vh - 96px); width: auto; height: auto; object-fit: contain;
  border-radius: 6px; box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.22), 0 30px 80px rgba(0, 0, 0, 0.7);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(.2,.7,.2,1);
  user-select: none; -webkit-user-drag: none;
}
.wl-lightbox__img.is-swapping { opacity: 0; transform: scale(0.985); }
.wl-lightbox__panel {
  display: flex; flex-direction: column; justify-content: center; gap: 0;
  padding: 48px 36px; background: var(--lux-panel); border-left: 1px solid rgba(201, 169, 98, 0.18);
}
.wl-lightbox__count { margin: 0 0 10px; }
.wl-lightbox__title { margin: 0 0 12px; font-size: clamp(1.6rem, 2.4vw, 2.2rem); line-height: 1.1; color: var(--lux-cream); }
.wl-lightbox__title:empty { display: none; }
.wl-lightbox__cap { margin: 0 0 16px; color: rgba(245, 242, 235, 0.82); font-size: 1rem; line-height: 1.55; }
.wl-lightbox__cap:empty { display: none; }
.wl-lightbox__turn { margin: 0 0 20px; }
.wl-lightbox__ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.wl-lightbox__ctas [hidden] { display: none !important; }
.wl-lightbox__ctas .lux-btn-fill, .wl-lightbox__ctas .lux-btn-ghost { padding: 11px 20px; font-size: 0.92rem; }
.wl-lightbox__foot { margin: 22px 0 0; font-size: 0.78rem; color: var(--lux-muted); }
.wl-lightbox__keys { margin: 8px 0 0; font-size: 0.72rem; letter-spacing: 0.06em; color: rgba(160, 155, 148, 0.7); }
.wl-lb-btn {
  position: absolute; display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer; z-index: 2;
  border: 1px solid rgba(201, 169, 98, 0.35); background: rgba(18, 20, 26, 0.75); color: var(--lux-cream);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.wl-lb-btn:hover { border-color: var(--lux-gold); color: var(--lux-gold); background: rgba(201, 169, 98, 0.1); }
.wl-lb-btn:focus-visible { outline: 2px solid var(--lux-gold); outline-offset: 3px; }
.wl-lb-btn--prev { left: 22px; top: 50%; transform: translateY(-50%); }
.wl-lb-btn--next { right: 402px; top: 50%; transform: translateY(-50%); }
.wl-lb-btn--close { right: 16px; top: 14px; width: 44px; height: 44px; }
body.wl-locked { overflow: hidden; }
@media (max-width: 900px) {
  .wl-lightbox { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .wl-lightbox__stage { padding: 64px 10px 8px; }
  .wl-lightbox__img { max-height: calc(100vh - 330px); }
  .wl-lightbox__panel { padding: 16px 20px 24px; border-left: 0; border-top: 1px solid rgba(201, 169, 98, 0.18); text-align: center; align-items: center; }
  .wl-lightbox__title { font-size: 1.4rem; margin-bottom: 6px; }
  .wl-lightbox__cap { font-size: 0.92rem; margin-bottom: 8px; }
  .wl-lightbox__turn, .wl-lightbox__foot, .wl-lightbox__keys { display: none; }
  .wl-lightbox__ctas { justify-content: center; }
  .wl-lb-btn--prev, .wl-lb-btn--next { top: 40%; width: 42px; height: 42px; }
  .wl-lb-btn--prev { left: 8px; } .wl-lb-btn--next { right: 8px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .wl-col { will-change: auto; transform: none !important; }
  .wl-grid.is-js .wl-item, .wl-grid.is-js .wl-item.is-in { opacity: 1; transform: none; transition: none; }
  .wl-tile, .wl-tile img, .wl-lightbox, .wl-lightbox__img { transition: none; }
  .wl-tile:hover, .wl-tile:focus-visible { transform: none; }
  .wl-tile:hover img, .wl-tile:focus-visible img { transform: none; }
}

/* Curated set flags (small, visible): pending approval + render/mockup notes */
.wl-tile { position: relative; }
.wl-flag { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 2px 8px; border-radius: 4px; background: rgba(8,8,10,.82); border: 1px solid rgba(240,180,180,.5); color: #f0b4b4; font: 600 .58rem/1.6 var(--font-body); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.wl-flag--render { top: auto; bottom: 8px; border-color: rgba(245,242,235,.25); color: rgba(245,242,235,.8); }
.wl-flag + .wl-flag--render { top: auto; }
