/**
 * Project gallery v2 — "<project> ფოტოებში" (?v2=1 preview).
 *
 * The shared heading (base.css) with a rolling counter and long hairline
 * arrows on its right; a strip of photos from screen edge to screen edge in an
 * editorial rhythm on one baseline — big landscape, small square, tall
 * portrait, small landscape — ending on a closing tile; a hairline with a
 * Cashmere thumb under it. The strip speaks the home page's momentum rail
 * (projects-rail.css): project-gallery-v2.js drags and throws it with a mouse,
 * leans the frames with its speed and drifts each picture inside its oversized
 * frame; touch keeps native scroll-snap, which is also the no-script default.
 *
 * Colours come from the brand layer's tokens (--dk-*) when present, through the
 * --deka-g2-* set below, so nothing depends on the brand being loaded. The
 * cursor and the lightbox are moved to <body> by the script (the section is a
 * size container, which would trap a fixed element), so they carry the token
 * set themselves and their rules are not scoped to the section.
 *
 * State classes (script): deka-gallery2--js / --physics / --native / --cursor,
 * deka-gallery2-is-moving / -is-dragging / -at-end, img.is-loaded.
 */

.deka-gallery2,
.deka-gallery2-cursor,
.deka-gallery2-lb {
  --deka-g2-black: var(--dk-black, var(--deka-text));
  --deka-g2-off: var(--dk-off, var(--deka-white));
  --deka-g2-accent: var(--dk-cashmere, var(--deka-oxblood-500));
  --deka-g2-graphite: var(--dk-graphite, var(--deka-grey-700));
  --deka-g2-stone: var(--dk-stone, var(--deka-grey-300));
  --deka-g2-concrete: var(--dk-concrete, var(--deka-grey-200));
  --deka-g2-fog: var(--dk-fog, var(--deka-sand-100));
  --deka-g2-line-dark: var(--dk-line-dark, rgb(0 0 0 / 14%));
  --deka-g2-line-light: var(--dk-line, rgb(255 255 255 / 16%));
  --deka-g2-night: #171617;
  --deka-g2-mono: var(--dk-mono, var(--deka-font-body));
  --deka-g2-ease: var(--dk-ease, var(--deka-ease-out));
  --deka-g2-ease-out: var(--deka-ease-out, cubic-bezier(.22, 1, .36, 1));
}

/* The section is as wide as the page (scrollbar excluded): the measure for the
   strip's bleed (100cqi). The clip is a safety net: the bleed lands exactly on
   the page edges, but nothing in it may ever make the page scroll sideways. */
.deka-gallery2 {
  position: relative;
  container-type: inline-size;
  overflow-x: clip;
  color: var(--deka-g2-black);
}

.deka-gallery2-mono {
  font-family: var(--deka-g2-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
}

/*
 * --deka-g2-inset: from the page edge to the heading's line — the section's
 * side padding (base.css .deka-section: 2rem, 1.25rem on phones) plus, past
 * the 1800 frame, the frame's side margin.
 * --deka-g2-h: the strip's height; every frame is that tall, whatever its shape.
 */
.deka-gallery2__inner {
  --deka-g2-pad: var(--deka-space-lg, 2rem);
  --deka-g2-inset: max(var(--deka-g2-pad), (100cqi - 112.5rem) / 2 + var(--deka-g2-pad));
  --deka-g2-h: max(16rem, min(clamp(18rem, 12rem + 22vw, 34rem), 66vh));
  --deka-g2-gap: clamp(10px, .9vw, 16px);
  --deka-g2-clip: 10px;
  --deka-g2-vis: calc(100cqi - 2 * var(--deka-g2-inset));
  /* frame widths by type, all at the strip's height: big landscape 3:2, tall 4:5, square, landscape 4:3 */
  --deka-g2-wl: min(var(--deka-g2-h) * 1.5, var(--deka-g2-vis) - 2.75rem);
  --deka-g2-wt: calc(var(--deka-g2-h) * .8);
  --deka-g2-hs: var(--deka-g2-h);
  --deka-g2-ww: calc(var(--deka-g2-h) * 4 / 3);

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head nav"
    "strip strip"
    "prog prog";
  column-gap: clamp(1.5rem, 4vw, 4rem); /* a long project name wraps before it meets the counter */
  align-items: end;
}

/* Mostly small files (see the template): a lower strip. */
.deka-gallery2--compact .deka-gallery2__inner {
  --deka-g2-h: max(14rem, min(clamp(15rem, 10rem + 14vw, 24rem), 56vh));
}

.deka-gallery2__head { grid-area: head; min-width: 0; }

/* ==========================================================================
   Counter and arrows (the rail's, on the heading's right)
   ========================================================================== */

.deka-gallery2__nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  margin-bottom: clamp(1.75rem, 1rem + 2vw, 3rem); /* the heading's own bottom margin */
}

.deka-gallery2__count {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--deka-g2-graphite);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.deka-gallery2__count-cur {
  position: relative;
  display: inline-block;
  overflow: hidden;
  height: 1.4em;
  color: var(--deka-g2-black);
}

.deka-gallery2__count-cur span { display: block; }
.deka-gallery2__count-cur span + span { position: absolute; left: 0; top: 0; }

.deka-gallery2__count-dash { width: 28px; height: 1px; background: currentColor; opacity: .5; }

.deka-gallery2__arrows { display: flex; margin-right: -10px; }

.deka-gallery2-arrow {
  --deka-g2-shaft: 60px;
  position: relative;
  width: calc(var(--deka-g2-shaft) + 20px);
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--deka-g2-black);
  cursor: pointer;
}

.deka-gallery2-arrow__in {
  position: absolute;
  top: 50%;
  right: 10px;
  width: var(--deka-g2-shaft);
  height: 11px;
  margin-top: -5.5px;
  transition: opacity .5s var(--deka-g2-ease);
}

.deka-gallery2-arrow--prev .deka-gallery2-arrow__in { right: auto; left: 10px; transform: scaleX(-1); }

.deka-gallery2-arrow__shaft {
  position: absolute;
  right: 0;
  top: 5px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: 100% 50%;
  transform: scaleX(.72);
  transition: transform .7s var(--deka-g2-ease-out);
}

.deka-gallery2-arrow__head {
  position: absolute;
  right: 0;
  top: 1.5px;
  width: 8px;
  height: 8px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateX(-1px) rotate(45deg);
}

.deka-gallery2-arrow[aria-disabled="true"] { cursor: default; }
.deka-gallery2-arrow[aria-disabled="true"] .deka-gallery2-arrow__in { opacity: .28; }
.deka-gallery2-arrow[aria-disabled="true"] .deka-gallery2-arrow__shaft { transform: scaleX(.38); }

@media (hover: hover) and (pointer: fine) {
  .deka-gallery2-arrow:not([aria-disabled="true"]):hover .deka-gallery2-arrow__shaft { transform: scaleX(1); }
}

/* Square rings (base.css rounds every focus ring by 2px). */
.deka-gallery2-arrow:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; border-radius: 0; }

/* Nothing to move: the script hides the counter and arrows. */
.deka-gallery2__nav[hidden],
.deka-gallery2__progress[hidden] { visibility: hidden; }

/* ==========================================================================
   Strip
   ========================================================================== */

/*
 * A negative margin pulls the viewport out to both page edges; the same inset
 * as start padding puts the first frame on the heading's line (scroll position
 * 0), and the track's end padding stops the last item on the right line. The
 * small vertical padding keeps focus rings and leaning corners unclipped.
 * Default (no script, touch): a native scroller with snapping.
 */
.deka-gallery2__viewport {
  grid-area: strip;
  position: relative;
  min-width: 0;
  margin: calc(-1 * var(--deka-g2-clip)) calc(-1 * var(--deka-g2-inset));
  padding: var(--deka-g2-clip) 0 var(--deka-g2-clip) var(--deka-g2-inset);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--deka-g2-inset);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  outline: none;
}

.deka-gallery2__viewport::-webkit-scrollbar { display: none; }

.deka-gallery2--physics .deka-gallery2__viewport {
  overflow: clip;
  scroll-snap-type: none;
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.deka-gallery2--physics.deka-gallery2-is-dragging .deka-gallery2__viewport,
.deka-gallery2--physics.deka-gallery2-is-dragging .deka-gallery2__viewport * { cursor: grabbing; }

/* (Two classes: base.css's ul[role="list"] { padding: 0 } outranks one, and the
   end padding is what stops the closing tile on the right line.) */
.deka-gallery2__viewport > .deka-gallery2__track {
  position: relative; /* offsetParent for the script's item positions */
  display: flex;
  align-items: flex-end; /* every frame is the strip's height */
  gap: var(--deka-g2-gap);
  width: max-content;
  margin: 0;
  padding: 0 var(--deka-g2-inset) 0 0;
  list-style: none;
}

.deka-gallery2--physics .deka-gallery2__track { will-change: transform; }

.deka-gallery2__item {
  flex: none;
  position: relative;
  margin: 0;
  scroll-snap-align: start;
}

.deka-gallery2__item--l { width: var(--deka-g2-wl); height: var(--deka-g2-h); }
.deka-gallery2__item--t { width: var(--deka-g2-wt); height: var(--deka-g2-h); }
.deka-gallery2__item--s { width: var(--deka-g2-hs); height: var(--deka-g2-h); }
.deka-gallery2__item--w { width: var(--deka-g2-ww); height: var(--deka-g2-h); }

/* ---------- Frame ---------- */

.deka-gallery2__frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--deka-g2-concrete);
  color: var(--deka-g2-black);
  text-decoration: none;
  cursor: zoom-in;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
  backface-visibility: hidden;
}

.deka-gallery2__frame:hover,
.deka-gallery2__frame:focus { color: var(--deka-g2-black); } /* base.css a:hover would recolour the + */

.deka-gallery2--physics .deka-gallery2__frame { cursor: inherit; will-change: transform; }

.deka-gallery2__frame:focus-visible { outline: 2px solid var(--deka-g2-black); outline-offset: 4px; border-radius: 0; }

/* The picture is drawn larger than its frame so the script can drift it
   sideways with the strip and up and down with the page. */
.deka-gallery2__media {
  position: absolute;
  inset: -7% -9%;
  will-change: transform;
}

.deka-gallery2__img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 1s var(--deka-g2-ease-out), opacity .7s var(--deka-g2-ease);
  -webkit-user-drag: none;
  pointer-events: none;
}

/* With the script, a picture fades in once it has arrived. */
.deka-gallery2--js .deka-gallery2__img:not(.is-loaded) { opacity: 0; }

/* The frame's picture is lifted into the lightbox (FLIP) and put back. */
.deka-gallery2__frame.is-lifted .deka-gallery2__media { visibility: hidden; }

.deka-gallery2__plus {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--deka-g2-accent);
  color: var(--deka-g2-black);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s var(--deka-g2-ease), transform .6s var(--deka-g2-ease-out);
}

.deka-gallery2__frame:focus-visible .deka-gallery2__plus { opacity: 1; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .deka-gallery2:not(.deka-gallery2-is-moving) .deka-gallery2__frame:hover .deka-gallery2__img { transform: scale(1.04); }
  .deka-gallery2:not(.deka-gallery2-is-moving) .deka-gallery2__frame:hover .deka-gallery2__plus { opacity: 1; transform: none; }
}

/* Touch-first devices: the button is simply there. */
@media (hover: none), (pointer: coarse) {
  .deka-gallery2__plus { right: 8px; bottom: 8px; width: 32px; height: 32px; opacity: 1; transform: none; }
}

/* ---------- Closing tile ---------- */

/* As wide as the rest of the visible strip once the last photo stands on the
   heading's line, so that photo can reach it — but never more than a frame and
   a bit: past that, the last photos share the final stop. */
.deka-gallery2__item--end {
  --deka-g2-last: var(--deka-g2-wl);
  width: clamp(15rem, var(--deka-g2-vis) - var(--deka-g2-last) - var(--deka-g2-gap), var(--deka-g2-h) * 1.15);
  height: var(--deka-g2-h);
}

.deka-gallery2__item--after-t { --deka-g2-last: var(--deka-g2-wt); }
.deka-gallery2__item--after-s { --deka-g2-last: var(--deka-g2-hs); }
.deka-gallery2__item--after-w { --deka-g2-last: var(--deka-g2-ww); }

.deka-gallery2__end {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: clamp(16px, 1.55vw, 24px);
  overflow: hidden;
  border: 1px solid var(--deka-g2-line-dark);
  color: var(--deka-g2-black);
  text-decoration: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
  backface-visibility: hidden;
}

.deka-gallery2__end:hover,
.deka-gallery2__end:focus { color: var(--deka-g2-black); }

.deka-gallery2--physics .deka-gallery2__end { cursor: inherit; will-change: transform; }

.deka-gallery2__end::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--deka-g2-black);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform .8s var(--deka-g2-ease-out);
}

.deka-gallery2__end > * { position: relative; }

.deka-gallery2__end-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.deka-gallery2__end-label { color: var(--deka-g2-graphite); transition: color .6s var(--deka-g2-ease); }

.deka-gallery2__end-mark {
  flex: none;
  width: min(38%, 9rem);
  height: auto;
  color: var(--deka-g2-accent);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s var(--deka-g2-ease-out);
}

.deka-gallery2__end-mark polygon { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }

.deka-gallery2:not(.deka-gallery2-at-end) .deka-gallery2__end-mark { clip-path: inset(100% 0 0 0); transition-duration: .4s; }

.deka-gallery2__end-foot { display: flex; flex-direction: column; gap: 14px; margin-top: auto; }

.deka-gallery2__end-note { color: var(--deka-g2-graphite); transition: color .6s var(--deka-g2-ease); }

.deka-gallery2__end-title {
  display: block;
  padding-bottom: .04em;
  font-family: var(--deka-font-display);
  font-stretch: 72%;
  font-weight: 700;
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
  line-height: 1.06;
  letter-spacing: 0;
  transition: color .6s var(--deka-g2-ease);
}

.deka-gallery2__end-arrow { position: relative; display: block; width: 96px; height: 11px; margin-top: 4px; }
.deka-gallery2__end-arrow .deka-gallery2-arrow__shaft { transform-origin: 0 50%; transform: scaleX(.6); }
.deka-gallery2__end-arrow .deka-gallery2-arrow__head { transform: translateX(-39.4px) rotate(45deg); transition: transform .7s var(--deka-g2-ease-out); }

.deka-gallery2__end:focus-visible { outline: 2px solid var(--deka-g2-black); outline-offset: 4px; border-radius: 0; }

@media (hover: hover) and (pointer: fine) {
  .deka-gallery2:not(.deka-gallery2-is-moving) .deka-gallery2__end:hover::before { transform: scaleY(1); }
  .deka-gallery2:not(.deka-gallery2-is-moving) .deka-gallery2__end:hover { color: var(--deka-g2-off); }
  .deka-gallery2:not(.deka-gallery2-is-moving) .deka-gallery2__end:hover :is(.deka-gallery2__end-label, .deka-gallery2__end-note) { color: var(--deka-g2-accent); }
  .deka-gallery2:not(.deka-gallery2-is-moving) .deka-gallery2__end:hover .deka-gallery2-arrow__shaft { transform: scaleX(1); }
  .deka-gallery2:not(.deka-gallery2-is-moving) .deka-gallery2__end:hover .deka-gallery2-arrow__head { transform: translateX(-1px) rotate(45deg); }
}

/* ==========================================================================
   Progress hairline
   ========================================================================== */

.deka-gallery2__progress {
  grid-area: prog;
  position: relative;
  height: 1px;
  margin-top: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem);
  background: var(--deka-g2-line-dark);
}

.deka-gallery2__progress-thumb {
  position: absolute;
  left: 0;
  top: -1px;
  width: 30%;
  height: 3px;
  background: var(--deka-g2-accent);
  will-change: transform;
}

/* ==========================================================================
   Drag cursor (fine pointers; lives in <body>)
   ========================================================================== */

.deka-gallery2-cursor { display: none; }

@media (hover: hover) and (pointer: fine) {
  .deka-gallery2--cursor .deka-gallery2__viewport,
  .deka-gallery2--cursor .deka-gallery2__viewport * { cursor: none; }

  .deka-gallery2-cursor.is-enabled {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 250; /* over the page, under the header (300) */
    display: block;
    width: 96px;
    height: 96px;
    margin: -48px 0 0 -48px;
    pointer-events: none;
    will-change: transform;
  }
}

.deka-gallery2-cursor__body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--deka-g2-black);
  color: var(--deka-g2-off);
  opacity: 0;
  transform: scale(.3);
  transition: transform .5s var(--deka-g2-ease-out), opacity .35s var(--deka-g2-ease), background-color .4s var(--deka-g2-ease), color .4s var(--deka-g2-ease);
}

.deka-gallery2-cursor:not(.is-on) .deka-gallery2-cursor__body { transition-duration: .3s, .2s; }
.deka-gallery2-cursor.is-on .deka-gallery2-cursor__body { opacity: 1; transform: scale(1); }
.deka-gallery2-cursor.is-alt .deka-gallery2-cursor__body { background: var(--deka-g2-accent); color: var(--deka-g2-black); }
.deka-gallery2-cursor.is-alt .deka-gallery2-cursor__ring text { fill: var(--deka-g2-black); }
.deka-gallery2-cursor.is-on.is-drag .deka-gallery2-cursor__body { transform: scale(.6667); }

.deka-gallery2-cursor__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity .3s var(--deka-g2-ease);
}

.deka-gallery2-cursor__ring text { font-family: var(--deka-g2-mono); font-size: 11px; font-weight: 500; fill: var(--deka-g2-off); transition: fill .4s var(--deka-g2-ease); }

.deka-gallery2-cursor.is-drag .deka-gallery2-cursor__ring { opacity: 0; }

.deka-gallery2-cursor__plus,
.deka-gallery2-cursor__arrows {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .3s var(--deka-g2-ease), transform .45s var(--deka-g2-ease-out);
}

.deka-gallery2-cursor__plus svg { width: 16px; height: 16px; }
.deka-gallery2-cursor__arrows { gap: 6px; }
.deka-gallery2-cursor__arrows svg { width: 14px; height: 9px; transition: transform .45s var(--deka-g2-ease-out), color .3s var(--deka-g2-ease); }

/* Over a photo: "+" (a click enlarges it); elsewhere and while dragging: ← →. */
.deka-gallery2-cursor.is-zoom:not(.is-drag) .deka-gallery2-cursor__arrows { opacity: 0; transform: scale(.6); }
.deka-gallery2-cursor:not(.is-zoom) .deka-gallery2-cursor__plus,
.deka-gallery2-cursor.is-drag .deka-gallery2-cursor__plus { opacity: 0; transform: rotate(45deg) scale(.6); }

.deka-gallery2-cursor.is-drag .deka-gallery2-cursor__arrows svg:first-child { transform: translateX(-3px); }
.deka-gallery2-cursor.is-drag .deka-gallery2-cursor__arrows svg:last-child { transform: translateX(3px); }
.deka-gallery2-cursor.is-left .deka-gallery2-cursor__arrows svg:first-child,
.deka-gallery2-cursor.is-right .deka-gallery2-cursor__arrows svg:last-child { color: var(--deka-g2-accent); }

/* ==========================================================================
   Lightbox (lives in <body>)
   ========================================================================== */

.deka-gallery2-lb {
  --deka-g2-lb-bar: 4.5rem;
  --deka-g2-lb-film: 7.25rem;
  --deka-g2-lb-gutter: var(--deka-gutter, 2rem);
  --deka-g2-lb-shaft: clamp(56px, 2rem + 3vw, 84px);
  /* the photo keeps clear of the arrows: gutter, arrow, then air */
  --deka-g2-lb-side: calc(var(--deka-g2-lb-gutter) + var(--deka-g2-lb-shaft) + clamp(1.5rem, 2.5vw, 2.75rem));

  position: fixed;
  inset: 0;
  z-index: var(--deka-z-modal, 600); /* over the header (300) and the picker bar (400) */
  overflow: hidden;
  color: var(--deka-g2-off);
  font-family: var(--deka-font-body);
  visibility: hidden;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}

.deka-gallery2-lb.is-active { visibility: visible; }
.deka-gallery2-lb:focus { outline: none; }

.deka-gallery2-lb__shade {
  position: absolute;
  inset: 0;
  background: var(--deka-g2-night);
  opacity: 0;
  transition: opacity .45s var(--deka-g2-ease);
}

.deka-gallery2-lb.is-open .deka-gallery2-lb__shade { opacity: 1; }

/* The stage only measures the room the photo may take; slides sit on top. */
.deka-gallery2-lb__stage {
  position: absolute;
  top: var(--deka-g2-lb-bar);
  bottom: var(--deka-g2-lb-film);
  left: 0;
  right: 0;
  padding: 1rem var(--deka-g2-lb-side) 1.25rem;
  touch-action: pinch-zoom; /* swipes and drags are the script's; a pinch is the browser's */
  cursor: grab;
}

.deka-gallery2-lb.is-dragging .deka-gallery2-lb__stage { cursor: grabbing; }

.deka-gallery2-lb__slide {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  background: rgb(250 247 246 / 4%);
  transform-origin: 0 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.deka-gallery2-lb__slide[hidden] { display: none; }

.deka-gallery2-lb__lo,
.deka-gallery2-lb__hi {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover; /* the slide already has the photo's own proportions */
  -webkit-user-drag: none;
  user-select: none;
}

.deka-gallery2-lb__hi { opacity: 0; transition: opacity .45s var(--deka-g2-ease); }
.deka-gallery2-lb__slide.is-sharp .deka-gallery2-lb__hi { opacity: 1; }

/* A slow full-size file: a Cashmere sliver runs along a hairline under it. */
.deka-gallery2-lb__load {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 1px;
  overflow: hidden;
  background: var(--deka-g2-line-light);
  opacity: 0;
  transition: opacity .3s var(--deka-g2-ease);
}

.deka-gallery2-lb__load::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 28%;
  height: 100%;
  background: var(--deka-g2-accent);
  transform: translateX(-100%);
}

.deka-gallery2-lb__slide.is-loading .deka-gallery2-lb__load { opacity: 1; }
.deka-gallery2-lb__slide.is-loading .deka-gallery2-lb__load::after { animation: deka-g2-load 1.15s var(--deka-g2-ease) infinite; }

@keyframes deka-g2-load {
  to { transform: translateX(360%); }
}

/* --- Chrome: bar, arrows, filmstrip ---------------------------------------- */

.deka-gallery2-lb__bar,
.deka-gallery2-lb__arrow,
.deka-gallery2-lb__film {
  opacity: 0;
  transition: opacity .25s var(--deka-g2-ease), transform .25s var(--deka-g2-ease);
}

.deka-gallery2-lb.is-open :is(.deka-gallery2-lb__bar, .deka-gallery2-lb__arrow, .deka-gallery2-lb__film) {
  opacity: 1;
  transform: none;
  transition: opacity .6s var(--deka-g2-ease) .18s, transform .8s var(--deka-g2-ease-out) .18s;
}

.deka-gallery2-lb__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  height: var(--deka-g2-lb-bar);
  padding: 0 var(--deka-g2-lb-gutter);
  border-bottom: 1px solid var(--deka-g2-line-light);
  transform: translateY(-10px);
}

.deka-gallery2-lb__title {
  margin: 0;
  overflow: hidden;
  color: rgb(250 247 246 / 72%);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.deka-gallery2-lb__count {
  margin: 0;
  color: var(--deka-g2-accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.deka-gallery2-lb__close {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  margin-right: -10px;
  padding: 0 10px 0 12px;
  border: 0;
  background: none;
  color: var(--deka-g2-off);
  cursor: pointer;
}

.deka-gallery2-lb__close-x { position: relative; width: 20px; height: 20px; transition: transform .6s var(--deka-g2-ease-out); }

.deka-gallery2-lb__close-x::before,
.deka-gallery2-lb__close-x::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -2px;
  right: -2px;
  height: 1px;
  background: currentColor;
  transform: rotate(45deg);
}

.deka-gallery2-lb__close-x::after { transform: rotate(-45deg); }

.deka-gallery2-lb__close-label { transition: color .35s var(--deka-g2-ease); }

@media (hover: hover) and (pointer: fine) {
  .deka-gallery2-lb__close:hover .deka-gallery2-lb__close-x { transform: rotate(90deg); }
  .deka-gallery2-lb__close:hover .deka-gallery2-lb__close-label { color: var(--deka-g2-accent); }
}

.deka-gallery2-lb :focus-visible { outline: 2px solid var(--deka-g2-accent); outline-offset: 2px; border-radius: 0; }

/* Long hairline arrows, the rail's, in Off-white. */
.deka-gallery2-lb__arrow {
  --deka-g2-shaft: var(--deka-g2-lb-shaft);
  position: absolute;
  top: calc(var(--deka-g2-lb-bar) + (100% - var(--deka-g2-lb-bar) - var(--deka-g2-lb-film)) / 2 - 32px);
  color: var(--deka-g2-off);
  height: 64px;
}

.deka-gallery2-lb__arrow.deka-gallery2-arrow--prev { left: calc(var(--deka-g2-lb-gutter) - 10px); transform: translateX(-10px); }
.deka-gallery2-lb__arrow.deka-gallery2-arrow--next { right: calc(var(--deka-g2-lb-gutter) - 10px); transform: translateX(10px); }

/* Filmstrip */
.deka-gallery2-lb__film {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--deka-g2-lb-film);
  display: flex;
  align-items: center;
  border-top: 1px solid var(--deka-g2-line-light);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-x;
  transform: translateY(10px);
}

.deka-gallery2-lb__film::-webkit-scrollbar { display: none; }

.deka-gallery2-lb__film > .deka-gallery2-lb__film-track { /* two classes: see the strip's track */
  display: flex;
  gap: 10px;
  width: max-content;
  margin: 0 auto;
  padding: 6px var(--deka-g2-lb-gutter);
  list-style: none;
}

.deka-gallery2-lb__thumb {
  position: relative;
  display: block;
  flex: none;
  width: 5.5rem;
  height: 3.75rem;
  padding: 0;
  border: 0;
  background: rgb(250 247 246 / 6%);
  opacity: .42;
  cursor: pointer;
  outline: 1px solid transparent;
  outline-offset: 3px;
  transition: opacity .4s var(--deka-g2-ease), outline-color .4s var(--deka-g2-ease);
}

.deka-gallery2-lb__thumb img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  pointer-events: none;
}

.deka-gallery2-lb__thumb[aria-current="true"] { opacity: 1; outline-color: var(--deka-g2-accent); }

@media (hover: hover) and (pointer: fine) {
  .deka-gallery2-lb__thumb:not([aria-current="true"]):hover { opacity: .8; }
}

.deka-gallery2-lb__thumb:focus-visible { outline: 2px solid var(--deka-g2-accent); outline-offset: 3px; border-radius: 0; }

/* While the lightbox is open the page behind it stands still. */
html.deka-gallery2-locked { overflow: hidden; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1023px) {
  .deka-gallery2__inner { --deka-g2-gap: 10px; }
  .deka-gallery2-arrow { --deka-g2-shaft: 52px; }
}

@media (max-width: 760px) {
  .deka-gallery2__inner {
    --deka-g2-h: min(66cqi, 24rem);
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "head head"
      "strip strip"
      "nav prog";
    column-gap: 1.5rem;
    align-items: center;
  }

  .deka-gallery2--compact .deka-gallery2__inner { --deka-g2-h: min(56cqi, 20rem); }

  .deka-gallery2__nav { margin: 1.5rem 0 0; }
  .deka-gallery2__arrows { display: none; }
  .deka-gallery2__progress { margin-top: 1.5rem; }

  .deka-gallery2__end-title { font-size: 1.5rem; }

  .deka-gallery2-lb {
    --deka-g2-lb-bar: 3.5rem;
    --deka-g2-lb-film: 5.5rem;
    --deka-g2-lb-side: 0px;
    --deka-g2-lb-gutter: 1.25rem;
  }

  .deka-gallery2-lb__stage { padding: .75rem 0 1.25rem; }
  .deka-gallery2-lb__arrow { display: none; }
  .deka-gallery2-lb__thumb { width: 4.25rem; height: 2.875rem; }
  .deka-gallery2-lb__film > .deka-gallery2-lb__film-track { gap: 8px; }
  .deka-gallery2-lb__close-label { display: none; }
}

@media (max-width: 40rem) {
  .deka-gallery2__inner { --deka-g2-pad: 1.25rem; } /* base.css narrows the section padding here */
}

/* Short landscape screens: keep the photo the tallest thing in the lightbox. */
@media (max-height: 560px) {
  .deka-gallery2-lb { --deka-g2-lb-bar: 3rem; --deka-g2-lb-film: 4.5rem; }
  .deka-gallery2-lb__thumb { width: 3.75rem; height: 2.5rem; }
}

/* ==========================================================================
   Reduced motion: no zoom, no slides, no lean; simple fades only
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .deka-gallery2__img,
  .deka-gallery2__plus,
  .deka-gallery2-arrow__shaft,
  .deka-gallery2__end::before,
  .deka-gallery2__end-arrow .deka-gallery2-arrow__head,
  .deka-gallery2-lb__close-x { transition: none; }

  .deka-gallery2:not(.deka-gallery2-is-moving) .deka-gallery2__frame:hover .deka-gallery2__img { transform: none; }
  .deka-gallery2__plus { transform: none; }
  .deka-gallery2__end::before { transform: none; opacity: 0; transition: opacity .3s linear; }
  .deka-gallery2:not(.deka-gallery2-is-moving) .deka-gallery2__end:hover::before { opacity: 1; }
  .deka-gallery2__end-mark,
  .deka-gallery2:not(.deka-gallery2-at-end) .deka-gallery2__end-mark { clip-path: none; transition: none; }

  .deka-gallery2-lb :is(.deka-gallery2-lb__bar, .deka-gallery2-lb__arrow, .deka-gallery2-lb__film),
  .deka-gallery2-lb.is-open :is(.deka-gallery2-lb__bar, .deka-gallery2-lb__arrow, .deka-gallery2-lb__film) { transform: none; transition: opacity .2s linear; }
  .deka-gallery2-lb__shade { transition: opacity .2s linear; }
  .deka-gallery2-lb__slide.is-loading .deka-gallery2-lb__load::after { animation: deka-g2-pulse 1.4s linear infinite alternate; transform: none; width: 100%; }
  @media (hover: hover) and (pointer: fine) {
    .deka-gallery2-lb__close:hover .deka-gallery2-lb__close-x { transform: none; }
  }
}

@keyframes deka-g2-pulse {
  from { opacity: .25; }
  to { opacity: 1; }
}
