/**
 * AVDP Gallery — value chain journey.
 * Self-contained; works with any theme.
 */

.avdp-gal{
  --g-ink:#0A1A12; --g-ink-2:#12291D; --g-paper:#F3F5F0; --g-paper-2:#E7EBE2;
  --g-line:#C9D2C4; --g-green:#1B6B44; --g-green-l:#8FD3AC; --g-ochre:#C98A19;
  --g-muted:#5C6D63; --g-blue:#0B4E9B;
  --g-mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --g-disp:'Bricolage Grotesque',Georgia,serif;
  --g-body:'Public Sans',system-ui,-apple-system,sans-serif;
  font-family:var(--g-body);color:var(--g-ink);
}
.avdp-gal *{box-sizing:border-box}

.avdp-gal__heading{
  font-family:var(--g-disp);font-size:clamp(26px,3.6vw,42px);letter-spacing:-.03em;margin:0 0 22px;
}

/* Chain selector — cards, not pills, because the count matters */
.avdp-gal__chains{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:30px}
.avdp-gal__chain{
  display:flex;align-items:baseline;gap:10px;background:transparent;cursor:pointer;
  border:1px solid var(--g-line);border-radius:2px;padding:12px 16px;
  font-family:var(--g-body);font-size:15px;font-weight:600;color:var(--g-ink);
  transition:background .16s ease,color .16s ease,border-color .16s ease;
}
.avdp-gal__chain em{
  font-family:var(--g-mono);font-style:normal;font-size:11px;letter-spacing:.08em;color:var(--g-muted);
}
.avdp-gal__chain:hover{border-color:var(--g-green)}
.avdp-gal__chain.is-on{background:var(--g-ink);color:#fff;border-color:var(--g-ink)}
.avdp-gal__chain.is-on em{color:var(--g-green-l)}

/* Stage rail — the journey, numbered */
.avdp-gal__rail{
  position:sticky;top:0;z-index:5;background:var(--g-paper);
  border-block:1px solid var(--g-line);margin-bottom:38px;
}
.avdp-gal__rail ol{
  list-style:none;margin:0;padding:0;display:flex;gap:0;overflow-x:auto;
  scrollbar-width:thin;-webkit-overflow-scrolling:touch;
}
.avdp-gal__rail li{flex:0 0 auto;border-right:1px solid var(--g-line)}
.avdp-gal__rail li:last-child{border-right:0}
.avdp-gal__rail a{
  display:flex;flex-direction:column;gap:6px;padding:14px 20px;text-decoration:none;
  color:var(--g-ink);min-width:140px;transition:background .16s ease;
}
.avdp-gal__rail a:hover{background:var(--g-paper-2)}
.avdp-gal__num{
  font-family:var(--g-mono);font-size:10.5px;letter-spacing:.14em;color:var(--g-green);
}
.avdp-gal__rail-label{font-size:14px;font-weight:600;line-height:1.25}
.avdp-gal__rail li.is-active a{background:var(--g-ink);color:#fff}
.avdp-gal__rail li.is-active .avdp-gal__num{color:var(--g-green-l)}

/* Stage sections */
.avdp-gal__stage{margin-bottom:clamp(34px,5vw,58px);scroll-margin-top:90px}
.avdp-gal__stage-head{
  display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap;
  padding-bottom:12px;margin-bottom:18px;border-bottom:2px solid var(--g-ink);
}
.avdp-gal__stage-head h3{
  font-family:var(--g-disp);font-size:clamp(21px,2.6vw,29px);letter-spacing:-.025em;margin:0;
}
.avdp-gal__count{
  font-family:var(--g-mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--g-muted);
}

/* Mosaic: first image of each stage runs wide, the rest tile */
.avdp-gal__grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
  gap:10px;grid-auto-flow:dense;
}
.avdp-gal__item{margin:0;position:relative}
.avdp-gal__item:first-child{grid-column:span 2;grid-row:span 2}
@media(max-width:620px){.avdp-gal__item:first-child{grid-column:span 2;grid-row:auto}}

.avdp-gal__open{
  display:block;width:100%;padding:0;border:0;background:var(--g-paper-2);cursor:zoom-in;
  position:relative;overflow:hidden;border-radius:2px;
}
.avdp-gal__open img{
  display:block;width:100%;height:100%;aspect-ratio:4/3;object-fit:cover;
  transition:transform .55s cubic-bezier(.2,.7,.2,1),filter .3s ease;
}
.avdp-gal__item:first-child .avdp-gal__open img{aspect-ratio:1/1}
.avdp-gal__open:hover img{transform:scale(1.04)}
.avdp-gal__open:focus-visible{outline:3px solid var(--g-ochre);outline-offset:3px}
.avdp-gal__chip{
  position:absolute;left:8px;bottom:8px;background:rgba(10,26,18,.86);color:#fff;
  font-family:var(--g-mono);font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;
  padding:5px 9px;border-radius:2px;opacity:0;transform:translateY(4px);transition:.2s;
}
.avdp-gal__open:hover .avdp-gal__chip,
.avdp-gal__open:focus-visible .avdp-gal__chip{opacity:1;transform:none}
.avdp-gal__item figcaption{
  font-size:13.5px;line-height:1.45;color:var(--g-muted);margin-top:8px;
}

.avdp-gal__empty,.avdp-gal__none{
  border:1px dashed var(--g-line);padding:40px;text-align:center;color:var(--g-muted);border-radius:2px;
}

/* Lightbox */
.avdp-lightbox{
  position:fixed;inset:0;z-index:99999;background:rgba(6,16,11,.96);
  display:flex;align-items:center;justify-content:center;padding:clamp(16px,4vw,56px);
}
.avdp-lightbox[hidden]{display:none}
.avdp-lightbox__figure{margin:0;max-width:1200px;width:100%;display:flex;flex-direction:column;gap:16px}
.avdp-lightbox__figure img{
  max-width:100%;max-height:74vh;object-fit:contain;margin:0 auto;display:block;border-radius:2px;
}
.avdp-lightbox figcaption{color:#C7D6CC;max-width:70ch;margin:0 auto;text-align:center}
.avdp-lightbox__meta{
  display:block;font-family:var(--g-mono);font-size:10.5px;letter-spacing:.14em;
  text-transform:uppercase;color:#8FD3AC;margin-bottom:8px;
}
.avdp-lightbox__caption{display:block;font-size:17px;line-height:1.5;color:#fff}
.avdp-lightbox__note{display:block;font-size:14.5px;line-height:1.6;margin-top:8px;color:#A9BDB1}
.avdp-lightbox button{
  position:absolute;background:transparent;border:1px solid rgba(255,255,255,.25);color:#fff;
  cursor:pointer;border-radius:2px;transition:background .16s ease,color .16s ease;
}
.avdp-lightbox button:hover{background:#fff;color:var(--g-ink)}
.avdp-lightbox__close{top:18px;right:18px;width:44px;height:44px;font-size:26px;line-height:1}
.avdp-lightbox__nav{top:50%;transform:translateY(-50%);width:46px;height:64px;font-size:30px;line-height:1}
.avdp-lightbox__nav.is-prev{left:14px}
.avdp-lightbox__nav.is-next{right:14px}
.avdp-lightbox button:focus-visible{outline:3px solid var(--g-ochre);outline-offset:2px}

@media(max-width:600px){
  .avdp-gal__rail a{min-width:118px;padding:12px 14px}
  .avdp-gal__grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
  .avdp-lightbox__nav{width:40px;height:52px;font-size:24px}
}
@media(prefers-reduced-motion:reduce){
  .avdp-gal__open img,.avdp-gal__chip{transition:none}
  .avdp-gal__open:hover img{transform:none}
}

/* ---------- iconography (v1.2.0) ---------- */
.avdp-icon{display:block;flex:0 0 auto}

.avdp-gal__chain{align-items:center}
.avdp-gal__chain .avdp-icon{color:var(--g-green);transition:color .16s ease}
.avdp-gal__chain.is-on .avdp-icon{color:var(--g-green-l)}
.avdp-gal__chain span{flex:1}

.avdp-gal__rail-inner{display:flex;align-items:center;gap:9px}
.avdp-gal__rail .avdp-icon{color:var(--g-muted);transition:color .16s ease}
.avdp-gal__rail li.is-active .avdp-icon{color:var(--g-green-l)}
.avdp-gal__rail a:hover .avdp-icon{color:var(--g-green)}

.avdp-gal__stage-head h3{display:flex;align-items:center;gap:12px}
.avdp-gal__stage-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;border:1px solid var(--g-line);border-radius:2px;
  background:var(--g-paper-2);color:var(--g-green);flex:0 0 auto;
}
@media(max-width:600px){
  .avdp-gal__stage-icon{width:38px;height:38px}
  .avdp-gal__chain{padding:10px 13px;font-size:14px}
}

/* =========================================================================
   Layout, formatting and motion (v3.0.0)
   ========================================================================= */

/* ---- spacing ---- */
.avdp-gal.gap-tight .avdp-gal__grid{gap:6px}
.avdp-gal.gap-normal .avdp-gal__grid{gap:10px}
.avdp-gal.gap-airy .avdp-gal__grid{gap:20px}

/* ---- corners ---- */
.avdp-gal.corner-soft .avdp-gal__open,
.avdp-gal.corner-soft .avdp-gal__open img{border-radius:10px}

/* ---- default crop, overridable per photo ---- */
.avdp-gal.ratio-4-3 .avdp-gal__open img{aspect-ratio:4/3}
.avdp-gal.ratio-3-2 .avdp-gal__open img{aspect-ratio:3/2}
.avdp-gal.ratio-1-1 .avdp-gal__open img{aspect-ratio:1/1}
.avdp-gal.ratio-16-9 .avdp-gal__open img{aspect-ratio:16/9}

.avdp-gal__item.ratio-4-3 .avdp-gal__open img{aspect-ratio:4/3}
.avdp-gal__item.ratio-3-2 .avdp-gal__open img{aspect-ratio:3/2}
.avdp-gal__item.ratio-16-9 .avdp-gal__open img{aspect-ratio:16/9}
.avdp-gal__item.ratio-1-1 .avdp-gal__open img{aspect-ratio:1/1}
.avdp-gal__item.ratio-3-4 .avdp-gal__open img{aspect-ratio:3/4}
.avdp-gal__item.ratio-orig .avdp-gal__open img{aspect-ratio:auto;height:auto}

/* ---- focal point: what survives the crop ---- */
.avdp-gal__item.focal-top .avdp-gal__open img{object-position:50% 12%}
.avdp-gal__item.focal-bottom .avdp-gal__open img{object-position:50% 88%}
.avdp-gal__item.focal-left .avdp-gal__open img{object-position:12% 50%}
.avdp-gal__item.focal-right .avdp-gal__open img{object-position:88% 50%}

/* ---- treatments ---- */
.avdp-gal__item.treat-lift .avdp-gal__open img{filter:contrast(1.06) saturate(1.08) brightness(1.02)}
.avdp-gal__item.treat-mono .avdp-gal__open img{filter:grayscale(1) contrast(1.05)}
.avdp-gal__item.treat-mono:hover .avdp-gal__open img{filter:grayscale(0)}
.avdp-gal__item.treat-duotone .avdp-gal__open{background:var(--chain,var(--g-green))}
.avdp-gal__item.treat-duotone .avdp-gal__open img{
  filter:grayscale(1) contrast(1.15);mix-blend-mode:luminosity;opacity:.92;
}

/* ---- layouts ---- */

/* mosaic: first photo of each stage runs large (the default) */
.avdp-gal.layout-mosaic .avdp-gal__item:first-child{grid-column:span 2;grid-row:span 2}
.avdp-gal.layout-mosaic .avdp-gal__item:first-child .avdp-gal__open img{aspect-ratio:1/1}

/* even grid */
.avdp-gal.layout-grid .avdp-gal__item:first-child{grid-column:auto;grid-row:auto}

/* per-photo spans work in mosaic and grid */
.avdp-gal.layout-mosaic .avdp-gal__item.is-wide,
.avdp-gal.layout-grid .avdp-gal__item.is-wide{grid-column:span 2}
.avdp-gal.layout-mosaic .avdp-gal__item.is-tall,
.avdp-gal.layout-grid .avdp-gal__item.is-tall{grid-row:span 2}
.avdp-gal.layout-mosaic .avdp-gal__item.is-tall .avdp-gal__open img,
.avdp-gal.layout-grid .avdp-gal__item.is-tall .avdp-gal__open img{aspect-ratio:3/4;height:100%}
.avdp-gal.layout-mosaic .avdp-gal__item.is-feature,
.avdp-gal.layout-grid .avdp-gal__item.is-feature{grid-column:span 2;grid-row:span 2}
.avdp-gal.layout-mosaic .avdp-gal__item.is-feature .avdp-gal__open img,
.avdp-gal.layout-grid .avdp-gal__item.is-feature .avdp-gal__open img{aspect-ratio:1/1;height:100%}

/* masonry: original proportions, CSS columns */
.avdp-gal.layout-masonry .avdp-gal__grid{
  display:block;column-count:4;column-gap:10px;
}
.avdp-gal.layout-masonry .avdp-gal__item{break-inside:avoid;margin-bottom:10px;display:block}
.avdp-gal.layout-masonry .avdp-gal__open img{aspect-ratio:auto;height:auto}
@media(max-width:1100px){.avdp-gal.layout-masonry .avdp-gal__grid{column-count:3}}
@media(max-width:760px){.avdp-gal.layout-masonry .avdp-gal__grid{column-count:2}}
@media(max-width:460px){.avdp-gal.layout-masonry .avdp-gal__grid{column-count:1}}

/* filmstrip: each stage scrolls sideways, with snap */
.avdp-gal.layout-filmstrip .avdp-gal__grid{
  display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:10px;
  scrollbar-width:thin;
}
.avdp-gal.layout-filmstrip .avdp-gal__item{
  flex:0 0 clamp(240px,32vw,360px);scroll-snap-align:start;
}
.avdp-gal.layout-filmstrip .avdp-gal__item:first-child{grid-column:auto;grid-row:auto}

/* ---- hover behaviour ---- */
.avdp-gal.hover-none .avdp-gal__open:hover img{transform:none}
.avdp-gal.hover-zoom .avdp-gal__open:hover img,
.avdp-gal.hover-both .avdp-gal__open:hover img{transform:scale(1.05)}

.avdp-gal.hover-reveal .avdp-gal__item figcaption,
.avdp-gal.hover-both .avdp-gal__item figcaption{
  position:absolute;left:0;right:0;bottom:0;margin:0;padding:34px 14px 12px;
  background:linear-gradient(to top,rgba(6,16,11,.92),rgba(6,16,11,0));
  color:#fff;font-size:13px;line-height:1.4;
  opacity:0;transform:translateY(8px);transition:opacity .28s ease,transform .28s ease;
  pointer-events:none;
}
.avdp-gal.hover-reveal .avdp-gal__item,
.avdp-gal.hover-both .avdp-gal__item{overflow:hidden}
.avdp-gal.hover-reveal .avdp-gal__item:hover figcaption,
.avdp-gal.hover-both .avdp-gal__item:hover figcaption,
.avdp-gal.hover-reveal .avdp-gal__item:focus-within figcaption,
.avdp-gal.hover-both .avdp-gal__item:focus-within figcaption{opacity:1;transform:none}

/* ---- entrance animation ---- */
.avdp-gal[data-motion] .avdp-gal__item{will-change:opacity,transform}
.avdp-gal[data-motion="rise"] .avdp-gal__item.is-pending{opacity:0;transform:translateY(22px)}
.avdp-gal[data-motion="fade"] .avdp-gal__item.is-pending{opacity:0}
.avdp-gal[data-motion="scale"] .avdp-gal__item.is-pending{opacity:0;transform:scale(1.04)}
.avdp-gal .avdp-gal__item.is-in{
  opacity:1;transform:none;
  transition:opacity .62s cubic-bezier(.2,.7,.2,1),transform .62s cubic-bezier(.2,.7,.2,1);
  transition-delay:var(--delay,0ms);
}

/* stage headings drift in with their photographs */
.avdp-gal[data-motion]:not([data-motion="none"]) .avdp-gal__stage-head.is-pending{opacity:0;transform:translateY(14px)}
.avdp-gal .avdp-gal__stage-head.is-in{
  opacity:1;transform:none;transition:opacity .5s ease,transform .5s ease;
}

/* ---- lightbox motion ---- */
.avdp-lightbox{animation:avdp-fade .24s ease}
.avdp-lightbox__figure img{animation:avdp-zoom .32s cubic-bezier(.2,.7,.2,1)}
.avdp-lightbox.is-sliding-next .avdp-lightbox__figure img{animation:avdp-slide-next .3s ease}
.avdp-lightbox.is-sliding-prev .avdp-lightbox__figure img{animation:avdp-slide-prev .3s ease}
@keyframes avdp-fade{from{opacity:0}to{opacity:1}}
@keyframes avdp-zoom{from{opacity:0;transform:scale(.965)}to{opacity:1;transform:none}}
@keyframes avdp-slide-next{from{opacity:0;transform:translateX(28px)}to{opacity:1;transform:none}}
@keyframes avdp-slide-prev{from{opacity:0;transform:translateX(-28px)}to{opacity:1;transform:none}}

@media(prefers-reduced-motion:reduce){
  .avdp-gal .avdp-gal__item,
  .avdp-gal .avdp-gal__stage-head{opacity:1!important;transform:none!important;transition:none!important}
  .avdp-lightbox,.avdp-lightbox__figure img{animation:none!important}
  .avdp-gal .avdp-gal__open img{transition:none!important}
  .avdp-gal .avdp-gal__open:hover img{transform:none!important}
}

/* =========================================================================
   Albums and video (v3.1.0)
   The browsable front door: choose a chain, then walk its stages.
   ========================================================================= */

.avdp-albums{
  --g-ink:#0A1A12; --g-paper:#F3F5F0; --g-paper-2:#E7EBE2; --g-line:#C9D2C4;
  --g-green:#1B6B44; --g-green-l:#8FD3AC; --g-muted:#5C6D63;
  --g-mono:'IBM Plex Mono',ui-monospace,monospace;
  --g-disp:'Bricolage Grotesque',Georgia,serif;
  --g-body:'Public Sans',system-ui,sans-serif;
  font-family:var(--g-body);color:var(--g-ink);
}
.avdp-albums *{box-sizing:border-box}
.avdp-albums__heading{
  font-family:var(--g-disp);font-size:clamp(24px,3.2vw,36px);letter-spacing:-.03em;margin:0 0 24px;
}

.avdp-albums .album-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:clamp(16px,2.2vw,24px);
}
.avdp-albums a.album{
  display:block;position:relative;text-decoration:none;color:var(--g-ink);
  border-radius:2px;overflow:hidden;background:var(--g-ink);
}
.avdp-albums a.album:focus-visible{outline:3px solid #C98A19;outline-offset:3px}

.avdp-albums .album__stack{position:relative;aspect-ratio:4/3;overflow:hidden;display:block}
.avdp-albums .album__stack img{
  width:100%;height:100%;object-fit:cover;display:block;
  transition:transform .55s cubic-bezier(.2,.7,.2,1);
}
.avdp-albums a.album:hover .album__stack img{transform:scale(1.05)}
.avdp-albums .album__shade{
  position:absolute;inset:0;
  background:linear-gradient(to top,rgba(6,16,11,.9) 0%,rgba(6,16,11,.15) 55%,transparent 100%);
}

.avdp-albums .album__meta{position:absolute;left:0;right:0;bottom:0;padding:18px}
.avdp-albums .album__icon{
  display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;
  border:1px solid rgba(255,255,255,.45);border-radius:2px;
  color:var(--chain,var(--g-green-l));margin-bottom:12px;background:rgba(6,16,11,.35);
}
.avdp-albums .album__name{
  display:block;font-family:var(--g-disp);font-size:20px;line-height:1.14;
  letter-spacing:-.025em;color:#fff;
}
.avdp-albums .album__count{
  display:block;font-family:var(--g-mono);font-size:10px;letter-spacing:.12em;
  text-transform:uppercase;color:#A9BDB1;margin-top:8px;
}

/* Film */
.avdp-albums .album--video .album__play{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:58px;height:58px;border-radius:50%;background:rgba(243,245,240,.92);
  display:flex;align-items:center;justify-content:center;color:var(--g-ink);
  transition:transform .2s ease,background .2s ease;
}
.avdp-albums .album--video .album__play::after{
  content:"";border-left:15px solid currentColor;border-top:9px solid transparent;
  border-bottom:9px solid transparent;margin-left:4px;
}
.avdp-albums a.album--video:hover .album__play{transform:translate(-50%,-50%) scale(1.08);background:#fff}

.avdp-albums__empty{
  border:1px dashed var(--g-line);padding:32px;text-align:center;color:var(--g-muted);border-radius:2px;
}

@media(max-width:520px){
  .avdp-albums .album-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
  .avdp-albums .album__stack img,.avdp-albums .album--video .album__play{transition:none}
  .avdp-albums a.album:hover .album__stack img{transform:none}
}
