/* ============================================================
   Gallery showcase — embeds the Standard / Bespoke / Cinematic
   Gallery components directly on trymysite.co.uk, re-skinned to
   this site's own navy/orange brand (see [[project_template_pipeline]]
   "Bespoke component library" — reuse structure, re-skin per site).
   ============================================================ */

.gallery-showcase-tier {
  margin-bottom: 64px;
}

.gallery-showcase-tier:last-child { margin-bottom: 0; }

.gallery-showcase-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.gallery-showcase-label .tier-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

.tier-badge.standard  { background: rgba(122,138,168,.14); color: var(--muted); border: 1px solid var(--border-med); }
.tier-badge.bespoke   { background: var(--orange-dim); color: var(--orange); border: 1px solid var(--orange-glow); }
.tier-badge.cinematic { background: rgba(34,211,238,.12); color: var(--teal,#22d3ee); border: 1px solid rgba(34,211,238,.3); }

.gallery-showcase-label h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.gallery-showcase-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 640px;
}

/* Standard Gallery (masonry) */
.mgallery {
  column-count: 4;
  column-gap: 8px;
  max-width: 560px;
}
.mgallery img {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  border-radius: 6px;
  break-inside: avoid;
  cursor: zoom-in;
  transition: transform .25s ease, filter .25s ease;
  filter: brightness(.94);
}
.mgallery img:hover { transform: translateY(-3px); filter: brightness(1); }
@media (max-width: 640px) { .mgallery { column-count: 3; } }

.mgallery-lightbox,
.bgallery-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3,5,10,.92);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.mgallery-lightbox[data-open="true"],
.bgallery-lightbox[data-open="true"] { opacity: 1; pointer-events: auto; }
.mgallery-lightbox figure, .bgallery-lightbox figure {
  margin: 0; max-width: min(90vw, 720px); text-align: center;
}
.mgallery-lightbox img, .bgallery-lightbox img {
  max-width: 100%; max-height: 74vh; border-radius: 10px;
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
}
.mgallery-lightbox figcaption, .bgallery-lightbox figcaption {
  margin-top: 1rem; color: var(--text); font-size: .95rem;
}
.bgallery-lightbox__close, .bgallery-lightbox__nav,
.mgallery-lightbox .bgallery-lightbox__close, .mgallery-lightbox .bgallery-lightbox__nav {
  position: absolute; border: 1px solid var(--border-med); background: rgba(255,255,255,.06);
  color: var(--text); border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bgallery-lightbox__close { top: 1.5rem; right: 1.5rem; width: 40px; height: 40px; font-size: 1.1rem; }
.bgallery-lightbox__nav { top: 50%; width: 46px; height: 46px; font-size: 1.4rem; transform: translateY(-50%); }
.bgallery-lightbox__nav--prev { left: 1.5rem; }
.bgallery-lightbox__nav--next { right: 1.5rem; }

/* Bespoke Gallery (3D coverflow) — re-skinned to navy/orange */
.bgallery {
  --bgallery-bg: transparent;
  --bgallery-text: var(--text);
  --bgallery-muted: var(--muted);
  --bgallery-accent: var(--orange);
  --bgallery-font-display: var(--font-display);
  --bgallery-font-body: var(--font-body);
  --bgallery-card-w: 210px;
  --bgallery-card-h: 290px;
  --bgallery-gap: 150px;
  --bgallery-angle: 32deg;
  --bgallery-depth: 90px;
  position: relative;
  padding: 8px 0 0;
  color: var(--bgallery-text);
  font-family: var(--bgallery-font-body);
  overflow: hidden;
}
.bgallery__stage {
  position: relative;
  height: calc(var(--bgallery-card-h) + 30px);
  perspective: 1400px;
  perspective-origin: 50% 40%;
  display: flex; align-items: center; justify-content: center;
  touch-action: pan-y; user-select: none;
}
.bgallery__track {
  position: relative;
  width: var(--bgallery-card-w); height: var(--bgallery-card-h);
  list-style: none; margin: 0; padding: 0;
  transform-style: preserve-3d;
}
.bgallery__card {
  position: absolute; top: 0; left: 0;
  width: var(--bgallery-card-w); height: var(--bgallery-card-h);
  transition: transform .6s cubic-bezier(.22,.61,.36,1), opacity .6s ease, filter .6s ease;
  will-change: transform, opacity;
}
.bgallery__card-inner {
  position: relative; width: 100%; height: 100%; border: 0; border-radius: 12px; padding: 0;
  cursor: pointer; background-size: cover; background-position: center; overflow: hidden;
  box-shadow: 0 20px 45px rgba(0,0,0,.5);
}
.bgallery__card-inner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.05) 55%, transparent 75%);
}
.bgallery__card[data-active="true"] .bgallery__card-inner { cursor: zoom-in; }
.bgallery__label { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; font-size: .9rem; font-weight: 600; }
.bgallery__expand {
  position: absolute; top: 12px; right: 12px; z-index: 1; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center; border-radius: 999px;
  background: rgba(8,13,26,.6); border: 1px solid var(--border-med); color: var(--text);
  font-size: .8rem; opacity: 0; transform: translateY(-4px); transition: opacity .3s ease, transform .3s ease;
}
.bgallery__card[data-active="true"] .bgallery__expand { opacity: 1; transform: translateY(0); }
.bgallery__nav {
  position: relative; z-index: 20; flex: none; width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--border-med); background: var(--navy-3); color: var(--text);
  font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
  margin: 0 clamp(.5rem, 3vw, 2rem);
}
.bgallery__nav:hover { background: var(--orange); border-color: var(--orange); color: #1a0d02; transform: translateY(-2px); }
.bgallery__caption { max-width: 460px; margin: 1.5rem auto 0; text-align: center; min-height: 4rem; }
.bgallery__caption h3 { font-family: var(--bgallery-font-display); font-weight: 700; font-size: 1.15rem; margin: 0 0 .35rem; color: var(--orange); }
.bgallery__caption p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.bgallery__dots { display: flex; justify-content: center; gap: .4rem; margin-top: 1.1rem; }
.bgallery__dots button { width: 7px; height: 7px; border-radius: 999px; border: 0; background: var(--border-med); cursor: pointer; padding: 0; transition: background .25s ease, transform .25s ease; }
.bgallery__dots button[aria-current="true"] { background: var(--orange); transform: scale(1.3); }
@media (max-width: 640px) {
  .bgallery { --bgallery-card-w: 156px; --bgallery-card-h: 220px; --bgallery-gap: 100px; --bgallery-angle: 30deg; --bgallery-depth: 56px; }
  .bgallery__nav { width: 36px; height: 36px; font-size: 1rem; }
}

/* Cinematic Gallery — re-skinned to navy/orange */
.cgallery {
  --cgallery-text: var(--text);
  --cgallery-muted: var(--muted);
  --cgallery-accent: var(--orange);
  --cgallery-font-display: var(--font-display);
  --cgallery-font-body: var(--font-body);
  position: relative; width: 100%; height: 46vh; min-height: 320px; max-height: 460px;
  overflow: hidden; background: #000; color: var(--cgallery-text); font-family: var(--cgallery-font-body);
  border-radius: var(--radius); isolation: isolate;
}
.cgallery:fullscreen { height: 100vh; max-height: none; border-radius: 0; }
.cgallery__stage { position: absolute; inset: 0; }
.cgallery__layer {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.12); transition: opacity 1.1s ease; z-index: 0;
}
.cgallery__layer[data-active="true"] { opacity: 1; z-index: 1; animation: cgallery-kenburns 6s ease-out forwards; }
.cgallery__layer[data-kb="out"][data-active="true"] { animation-name: cgallery-kenburns-out; }
@keyframes cgallery-kenburns { from { transform: scale(1) translate(0,0); } to { transform: scale(1.12) translate(-1.5%,-1%); } }
@keyframes cgallery-kenburns-out { from { transform: scale(1.12) translate(1.5%,1%); } to { transform: scale(1) translate(0,0); } }
.cgallery__scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.15) 42%, rgba(0,0,0,.35) 100%), linear-gradient(to right, rgba(0,0,0,.35) 0%, transparent 35%);
}
.cgallery__progress { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex; gap: 6px; padding: 16px 20px 0; }
.cgallery__progress-seg { flex: 1; height: 3px; background: rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; }
.cgallery__progress-seg-fill { height: 100%; width: 0%; background: var(--orange); border-radius: 999px; }
.cgallery__overlay { position: absolute; left: 0; right: 0; bottom: 96px; z-index: 3; padding: 0 clamp(18px, 5vw, 56px); max-width: 640px; }
.cgallery__eyebrow { display: inline-block; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); margin-bottom: .8rem; }
.cgallery__title { font-family: var(--cgallery-font-display); font-weight: 700; font-size: clamp(1.5rem, 3.6vw, 2.4rem); line-height: 1.1; margin: 0 0 .6rem; text-shadow: 0 4px 24px rgba(0,0,0,.4); }
.cgallery__desc { font-size: clamp(.86rem, 1.3vw, .98rem); color: var(--cgallery-muted); line-height: 1.6; margin: 0; max-width: 44ch; }
.cgallery__controls { position: absolute; top: 18px; right: 18px; z-index: 4; display: flex; gap: 8px; }
.cgallery__btn {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border-med);
  background: rgba(0,0,0,.35); backdrop-filter: blur(6px); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
  transition: background .2s ease, border-color .2s ease;
}
.cgallery__btn:hover { background: var(--orange); border-color: var(--orange); color: #1a0d02; }
.cgallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--border-med); background: rgba(0,0,0,.3); backdrop-filter: blur(6px);
  color: var(--text); font-size: 1.25rem; cursor: pointer; opacity: 0; transition: opacity .25s ease, background .2s ease;
}
.cgallery:hover .cgallery__nav { opacity: 1; }
.cgallery__nav:hover { background: var(--orange); color: #1a0d02; }
.cgallery__nav--prev { left: 18px; }
.cgallery__nav--next { right: 18px; }
.cgallery__filmstrip { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; gap: 8px; padding: 14px 20px 18px; overflow-x: auto; scrollbar-width: none; }
.cgallery__filmstrip::-webkit-scrollbar { display: none; }
.cgallery__thumb {
  flex: none; width: 58px; height: 38px; border-radius: 6px; border: 2px solid transparent;
  background-size: cover; background-position: center; cursor: pointer; opacity: .55; transform: scale(.94);
  transition: opacity .25s ease, transform .25s ease, border-color .25s ease;
}
.cgallery__thumb:hover { opacity: .85; }
.cgallery__thumb[data-active="true"] { opacity: 1; transform: scale(1); border-color: var(--orange); }
@media (max-width: 640px) {
  .cgallery { height: 50vh; min-height: 300px; border-radius: 10px; }
  .cgallery__overlay { bottom: 82px; }
  .cgallery__nav { opacity: 1; width: 34px; height: 34px; font-size: 1rem; }
  .cgallery__thumb { width: 42px; height: 30px; }
}
