.qtn-gallery-root {
  --qtn-red: #D2020A;
  --qtn-ink: #0d0d10;
  --qtn-white: #ffffff;
  --qtn-grey: #666666;
  --qtn-overlay: rgba(13,13,16,0.92);
  --qtn-spotlight: rgba(210,2,10,0.03);
  --qtn-spotlight-size: 400px;
  --qtn-mouse-x: 50%;
  --qtn-mouse-y: 50%;
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
  color: var(--qtn-ink);
}

.qtn-gallery-root *,
.qtn-gallery-root *::before,
.qtn-gallery-root *::after { box-sizing: border-box; }

.qtn-gallery-section { position: relative; z-index: 1; }

.qtn-gallery-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle var(--qtn-spotlight-size) at var(--qtn-mouse-x) var(--qtn-mouse-y), var(--qtn-spotlight) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.qtn-no-spotlight .qtn-gallery-spotlight { display: none; }

.qtn-gallery-header {
  padding: 100px 56px 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.qtn-gallery-heading-wrap { min-width: 0; }

.qtn-gallery-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}
.qtn-gallery-eyebrow::before {
  content: '';
  display: block;
  flex: 0 0 auto;
  width: 32px;
  height: 2px;
  background: var(--qtn-red);
}
.qtn-gallery-eyebrow span {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--qtn-red);
}

.qtn-gallery-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 700;
  line-height: .95;
  color: var(--qtn-ink);
  margin: 0;
  text-transform: uppercase;
}
.qtn-gallery-title em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--qtn-red);
  text-transform: none;
}

.qtn-gallery-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--qtn-grey);
  max-width: 360px;
  text-align: right;
  margin: 0;
}

.qtn-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 56px;
  position: relative;
  z-index: 2;
}

.qtn-g-item {
  --qtn-base-scale: 1.05;
  --qtn-hover-scale: 1.15;
  --qtn-media-duration: 800ms;
  --qtn-brightness: 90%;
  --qtn-grayscale: 20%;
  --qtn-hover-brightness: 40%;
  --qtn-hover-grayscale: 0%;
  --qtn-overlay-stop: 60%;
  --qtn-overlay-opacity: 1;
  --qtn-corner-size: 32px;
  --qtn-caption-offset: 15px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s, transform .8s, box-shadow .4s;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  isolation: isolate;
}
.qtn-g-item:focus-visible { outline: 2px solid var(--qtn-red); outline-offset: 3px; }
.qtn-g-item.is-visible { opacity: 1; transform: translateY(0); }
.qtn-no-reveal .qtn-g-item { opacity: 1; transform: none; }

.qtn-g-item img,
.qtn-g-item video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(var(--qtn-base-scale));
  transition:
    transform var(--qtn-media-duration) cubic-bezier(.16,1,.3,1),
    filter .6s ease,
    opacity .5s ease;
  will-change: transform;
}
.qtn-g-item img {
  z-index: 1;
  filter: grayscale(var(--qtn-grayscale)) brightness(var(--qtn-brightness));
}
.qtn-g-item video {
  z-index: 0;
  opacity: 0;
}
.qtn-g-item:hover img,
.qtn-g-item:focus-visible img {
  filter: grayscale(var(--qtn-hover-grayscale)) brightness(var(--qtn-hover-brightness));
  transform: scale(var(--qtn-hover-scale));
}
.qtn-g-item.qtn-video-active video {
  opacity: 1;
  z-index: 2;
  transform: scale(var(--qtn-base-scale));
}
.qtn-g-item:hover.qtn-video-active video,
.qtn-g-item:focus-visible.qtn-video-active video {
  transform: scale(var(--qtn-hover-scale));
}

.qtn-g-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--qtn-overlay) 0%, transparent var(--qtn-overlay-stop));
  opacity: 0;
  transition: opacity .4s ease;
  z-index: 3;
  pointer-events: none;
}
.qtn-g-item:hover .qtn-g-item__overlay,
.qtn-g-item:focus-visible .qtn-g-item__overlay { opacity: var(--qtn-overlay-opacity); }

.qtn-g-item__corner {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0;
  border-color: transparent transparent transparent var(--qtn-red);
  transition: border-width .4s cubic-bezier(.16,1,.3,1);
  z-index: 4;
  pointer-events: none;
}
.qtn-g-item:hover .qtn-g-item__corner,
.qtn-g-item:focus-visible .qtn-g-item__corner { border-width: var(--qtn-corner-size) 0 0 var(--qtn-corner-size); }
.qtn-no-corner .qtn-g-item__corner { display: none; }

.qtn-g-item__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  transform: translateY(var(--qtn-caption-offset));
  opacity: 0;
  transition: all .5s cubic-bezier(.16,1,.3,1);
  z-index: 5;
  pointer-events: none;
}
.qtn-g-item:hover .qtn-g-item__caption,
.qtn-g-item:focus-visible .qtn-g-item__caption { transform: translateY(0); opacity: 1; }

.qtn-g-item__cat {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--qtn-red);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qtn-g-item__cat::before {
  content: '';
  width: 12px;
  height: 1px;
  background: var(--qtn-red);
  flex: 0 0 auto;
}
.qtn-g-item__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(16px,1.8vw,20px);
  font-style: italic;
  color: var(--qtn-white);
  line-height: 1.2;
}

.qtn-g-item__zoom {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--qtn-white);
  opacity: 0;
  transform: scale(.6);
  transition: all .4s .1s cubic-bezier(.16,1,.3,1);
  z-index: 5;
  pointer-events: auto;
}
.qtn-g-item:hover .qtn-g-item__zoom,
.qtn-g-item:focus-visible .qtn-g-item__zoom { opacity: 1; transform: scale(1); }
.qtn-g-item__zoom:hover { background: var(--qtn-red); border-color: var(--qtn-red); }
.qtn-no-zoom .qtn-g-item__zoom { display: none; }

.qtn-gallery-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: 50px 56px 80px;
  position: relative;
  z-index: 2;
}
.qtn-gallery-count {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  color: var(--qtn-grey);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 0;
}
.qtn-gallery-count strong { color: var(--qtn-ink); }
.qtn-gallery-bottom-spacer { display: block; }

.qtn-btn-view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--qtn-ink);
  color: var(--qtn-white);
  padding: 14px 32px;
  text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: all .3s cubic-bezier(.16,1,.3,1);
  border-radius: 2px;
}
.qtn-btn-view-all:hover,
.qtn-btn-view-all:focus { background: var(--qtn-red); color: var(--qtn-white); transform: translateY(-3px); }

.qtn-ds-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10,10,12,.98);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.qtn-ds-lightbox.is-open { opacity: 1; pointer-events: auto; visibility: visible; }

.qtn-lb-close,
.qtn-lb-arrow {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  color: var(--qtn-white);
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all .3s ease;
  padding: 0;
}
.qtn-lb-close:hover,
.qtn-lb-arrow:hover { background: var(--qtn-red); border-color: var(--qtn-red); color: var(--qtn-white); }
.qtn-lb-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  z-index: 2;
}
.qtn-lb-close:hover { transform: rotate(90deg); }
.qtn-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  z-index: 2;
}
.qtn-lb-prev { left: 40px; }
.qtn-lb-next { right: 40px; }

.qtn-lb-inner {
  width: 100%;
  max-width: 1000px;
  padding: 0 100px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.qtn-lb-img-container {
  width: 100%;
  max-height: 75vh;
  overflow: hidden;
  margin-bottom: 30px;
}
.qtn-lb-img-container img {
  width: 100%;
  height: 100%;
  max-height: inherit;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.qtn-lb-cat {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--qtn-red);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.qtn-lb-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--qtn-white);
}

@media (max-width:1024px) {
  .qtn-stack-header .qtn-gallery-header { flex-direction: column; align-items: flex-start; }
  .qtn-stack-header .qtn-gallery-subtitle { text-align: left; }
}

@media (max-width:767px) {
  .qtn-gallery-bottom { flex-direction: column; align-items: flex-start; }
  .qtn-lb-arrow { display: none; }
  .qtn-lb-inner { padding-left: 20px; padding-right: 20px; }
  .qtn-lb-close { top: 16px; right: 16px; width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .qtn-gallery-root *, .qtn-gallery-root *::before, .qtn-gallery-root *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .qtn-g-item { opacity: 1; transform: none; }
}
