/* Try My Site Component Library — page chrome (not part of the reusable component) */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap');

:root {
  --page-bg: #0b0d10;
  --page-text: #e9e7e1;
  --page-muted: #9a9a94;
  --page-accent: #d9a441;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--page-text);
  font-family: 'Inter', system-ui, sans-serif;
  scroll-behavior: smooth;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header__brand {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--page-text);
  text-decoration: none;
}

.site-header__brand span { color: var(--page-accent); }

.site-header__tag {
  font-size: 0.78rem;
  color: var(--page-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro {
  max-width: 760px;
  margin: 3rem auto 1rem;
  padding: 0 2rem;
  text-align: center;
}

.intro__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--page-accent);
  border: 1px solid rgba(217, 164, 65, 0.4);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.25rem;
}

.intro h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.intro p {
  color: var(--page-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  max-width: 700px;
  margin: 1.75rem auto 0;
  padding: 0 2rem;
}

.meta-strip span {
  font-size: 0.76rem;
  color: var(--page-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

.page-footer {
  text-align: center;
  color: var(--page-muted);
  font-size: 0.82rem;
  padding: 3rem 2rem 2.5rem;
}

.page-footer a { color: var(--page-accent); text-decoration: none; }

/* Standard Gallery comparison block (masonry + lightbox) */

.mgallery-section {
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem 2rem 2rem;
}

.mgallery-section .bgallery__heading { margin-bottom: 1.25rem; }

.mgallery {
  column-count: 4;
  column-gap: 8px;
}

.mgallery img {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  border-radius: 6px;
  break-inside: avoid;
  cursor: zoom-in;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: brightness(0.94);
}

.mgallery img:hover {
  transform: translateY(-3px);
  filter: brightness(1);
}

@media (max-width: 720px) {
  .mgallery { column-count: 3; }
}

.upgrade-divider {
  text-align: center;
  padding: 0.5rem 0 1rem;
}

.upgrade-divider span {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--page-accent);
  border-top: 1px solid rgba(217, 164, 65, 0.3);
  border-bottom: 1px solid rgba(217, 164, 65, 0.3);
  padding: 0.5rem 1.5rem;
}

.mgallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 7, 9, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mgallery-lightbox[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.mgallery-lightbox figure {
  margin: 0;
  max-width: min(90vw, 720px);
  text-align: center;
}

.mgallery-lightbox img {
  max-width: 100%;
  max-height: 74vh;
  border-radius: 10px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.mgallery-lightbox figcaption {
  margin-top: 1rem;
  color: rgba(242, 240, 234, 0.85);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
}

/* ============================================================
   BESPOKE GALLERY — reusable component
   Structural CSS below is meant to travel unmodified between
   templates. Only the variables in the --bgallery-* block should
   be re-skinned per site (colours, fonts, spacing).
   ============================================================ */

.bgallery {
  --bgallery-bg: #0b0d10;
  --bgallery-text: #f2f0ea;
  --bgallery-muted: rgba(242, 240, 234, 0.62);
  --bgallery-accent: #d9a441;
  --bgallery-font-display: 'Fraunces', serif;
  --bgallery-font-body: 'Inter', system-ui, sans-serif;
  --bgallery-card-w: 230px;
  --bgallery-card-h: 320px;
  --bgallery-gap: 168px;
  --bgallery-angle: 32deg;
  --bgallery-depth: 90px;

  position: relative;
  padding: 4rem 0 3rem;
  background: var(--bgallery-bg);
  color: var(--bgallery-text);
  font-family: var(--bgallery-font-body);
  overflow: hidden;
}

.bgallery__heading {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.bgallery__heading h2 {
  font-family: var(--bgallery-font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin: 0 0 0.6rem;
  line-height: 1.15;
}

.bgallery__heading p {
  color: var(--bgallery-muted);
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.bgallery__stage {
  position: relative;
  height: calc(var(--bgallery-card-h) + 40px);
  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 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.6s ease,
              filter 0.6s ease;
  will-change: transform, opacity;
}

.bgallery__card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  -webkit-tap-highlight-color: transparent;
}

.bgallery__card-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 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: 0.95rem;
  font-weight: 600;
  text-align: left;
  letter-spacing: 0.01em;
}

.bgallery__expand {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(11, 13, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--bgallery-text);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.bgallery__card[data-active="true"] .bgallery__expand {
  opacity: 1;
  transform: translateY(0);
}

.bgallery__nav {
  position: relative;
  z-index: 20;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--bgallery-text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  margin: 0 clamp(0.5rem, 3vw, 2.5rem);
}

.bgallery__nav:hover {
  background: var(--bgallery-accent);
  border-color: var(--bgallery-accent);
  color: #1a1408;
  transform: translateY(-2px);
}

.bgallery__caption {
  max-width: 480px;
  margin: 2.25rem auto 0;
  padding: 0 1.5rem;
  text-align: center;
  min-height: 4.5rem;
}

.bgallery__caption h3 {
  font-family: var(--bgallery-font-display);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
  color: var(--bgallery-accent);
}

.bgallery__caption p {
  margin: 0;
  color: var(--bgallery-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.bgallery__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.bgallery__dots button {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.bgallery__dots button[aria-current="true"] {
  background: var(--bgallery-accent);
  transform: scale(1.3);
}

@media (max-width: 640px) {
  .bgallery {
    --bgallery-card-w: 168px;
    --bgallery-card-h: 240px;
    --bgallery-gap: 108px;
    --bgallery-angle: 30deg;
    --bgallery-depth: 60px;
  }
  .bgallery__nav { width: 38px; height: 38px; font-size: 1.1rem; }
}

/* Lightbox */

.bgallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 7, 9, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.bgallery-lightbox[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.bgallery-lightbox figure {
  margin: 0;
  max-width: min(90vw, 720px);
  text-align: center;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}

.bgallery-lightbox[data-open="true"] figure { transform: scale(1); }

.bgallery-lightbox img {
  max-width: 100%;
  max-height: 74vh;
  border-radius: 10px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.bgallery-lightbox figcaption {
  margin-top: 1rem;
  color: rgba(242, 240, 234, 0.85);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
}

.bgallery-lightbox__close,
.bgallery-lightbox__nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #f2f0ea;
  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; }

@media (max-width: 640px) {
  .bgallery-lightbox__nav { width: 38px; height: 38px; }
  .bgallery-lightbox__nav--prev { left: 0.5rem; }
  .bgallery-lightbox__nav--next { right: 0.5rem; }
  .bgallery-lightbox__close { top: 0.75rem; right: 0.75rem; }
}
