/* Hover guard — the `@media (hover: hover)` blocks below.
 *
 * A touch screen has no pointer to hover with, so the browser synthesises a
 * hover on the first tap. Every :hover rule then fires on that tap, the
 * browser counts it as "the page changed", and the click that would have
 * followed the link is swallowed: the button plays its animation and you have
 * to tap a second time to actually go anywhere. `hover: hover` matches only
 * devices with a real hovering pointer, so these rules are skipped entirely on
 * phones and tablets and one tap is enough. Desktop is unaffected — a
 * conditional group rule changes neither specificity nor source order.
 */

/* ============================================================
   ViDiPiXs — Gallery (list + detail), editorial
   ============================================================ */

:root {
  --tg-gold: #FFCC01;
  --tg-bg: #0a0a0a;
  --tg-bg-soft: #070707;
  --tg-fg: #ecebe6;
  --tg-fg-soft: #cfcdc6;
  --tg-muted: #8b8a85;
  --tg-line: #1a1a1a;
  --tg-line-strong: #2a2620;
  --tg-border: #3a3830;
}

.tg-gal {
  font-family: 'Inter', sans-serif;
  background: var(--tg-bg);
  color: var(--tg-fg);
  line-height: 1.55;
}
.tg-gal * { box-sizing: border-box; }

.tg-gal .tg-serif {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.tg-gal .tg-gold,
.tg-gal em.tg-gold {
  color: var(--tg-gold);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
}
.tg-gal .tg-muted { color: var(--tg-muted); font-size: 14px; }
.tg-gal .tg-eyebrow {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tg-gold);
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}
@property --tg-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
.tg-gal .tg-btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 0;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.tg-gal .tg-btn-gold {
  position: relative;
  border: 2px solid transparent;
  color: #0a0a0a;
  /* Solid gold interior with a WHITE highlight flowing around the border (same
     rotating --tg-angle as .tg-btn-ghost, white-on-gold). Paid pages only. */
  background:
    linear-gradient(var(--tg-gold), var(--tg-gold)) padding-box,
    repeating-conic-gradient(from var(--tg-angle),
      #B37E00 0deg, #ffffff 45deg, #B37E00 90deg) border-box;
  box-shadow:
    0 0 18px 1px rgba(255, 255, 255, 0.45),
    0 0 40px 7px rgba(255, 204, 1, 0.28);
  animation: tg-btn-spin 2.6s linear infinite;
}
@media (hover: hover) {
  .tg-gal .tg-btn-gold:hover {
    color: #0a0a0a;
    text-decoration: none;
    background:
      linear-gradient(#fff, #fff) padding-box,
      repeating-conic-gradient(from var(--tg-angle),
        #B37E00 0deg, #ffffff 45deg, #B37E00 90deg) border-box;
  }
}
.tg-gal .tg-btn-ghost {
  position: relative;
  border: 2px solid transparent;
  color: var(--tg-fg);
  /* Gold flows around the border via rotating --tg-angle; four highlights
     (90deg repeat) + strong contrast keep the flow clearly visible on the long
     flat edges of wide pills, not just the rounded ends. */
  background:
    linear-gradient(#0a0a0a, #0a0a0a) padding-box,
    repeating-conic-gradient(from var(--tg-angle),
      #6E4E00 0deg, #FFF3B0 45deg, #6E4E00 90deg) border-box;
  box-shadow:
    0 0 18px 1px rgba(255, 204, 1, 0.40),
    0 0 40px 6px rgba(255, 204, 1, 0.18);
  animation: tg-btn-spin 2.5s linear infinite;
  transition: color 0.2s ease;
}
@media (hover: hover) {
  .tg-gal .tg-btn-ghost:hover {
    color: var(--tg-fg);
    text-decoration: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tg-gal .tg-btn-ghost,
  .tg-gal .tg-btn-gold { animation: none; }
}
@keyframes tg-btn-spin { to { --tg-angle: 360deg; } }

/* ============ HERO ============ */
.tg-gal-hero {
  position: relative;
  min-height: 480px;
  height: 56vh;
  overflow: hidden;
  border-bottom: 0.5px solid var(--tg-line);
}
.tg-gal-hero-bg {
  position: absolute; inset: 0; z-index: 1;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: grayscale(0.15) brightness(0.55);
}
.tg-gal-hero .video-background {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: #0a0a0a;
}
.tg-gal-hero .hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.75s ease;
  filter: grayscale(0.15) brightness(0.55);
}
.tg-gal-hero .hero-bg-video.is-ready { opacity: 1; }
.tg-gal-hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.3) 45%, rgba(0,0,0,0.85) 100%);
}
.tg-gal-hero-inner {
  position: relative; z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 clamp(24px, 6vw, 96px) clamp(60px, 8vw, 96px);
  gap: 12px;
}
.tg-gal-issue {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--tg-gold);
}
.tg-gal-issue::before {
  content: ''; width: 28px; height: 1px; background: var(--tg-gold);
}
.tg-gal-hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(52px, 8.5vw, 116px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #f5f3ec;
  margin: 6px 0 0;
  max-width: 1100px;
}
.tg-gal-hero-title em { font-style: italic; color: var(--tg-gold); }
.tg-gal-hero-sub {
  color: var(--tg-fg-soft);
  font-size: 14px;
  max-width: 520px;
  margin-top: 14px;
}

/* ============ FILTER STRIP (visual only for now) ============ */
.tg-gal-filterbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  border-bottom: 0.5px solid var(--tg-line);
  background: var(--tg-bg-soft);
}
.tg-gal-filter-count {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tg-muted);
}
.tg-gal-filter-count strong {
  color: var(--tg-gold);
  font-weight: 500;
}
.tg-gal-filter-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tg-gal-filter-tags a {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tg-fg-soft);
  padding: 8px 14px;
  border: 0.5px solid var(--tg-line-strong);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tg-gal-filter-tags a.on {
  color: var(--tg-gold);
  border-color: var(--tg-gold);
  text-decoration: none;
}
@media (hover: hover) {
  .tg-gal-filter-tags a:hover {
    color: var(--tg-gold);
    border-color: var(--tg-gold);
    text-decoration: none;
  }
}

/* ============ EDITORIAL CARD GRID ============ */
.tg-gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
}
.tg-gal-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: #111;
  overflow: hidden;
  aspect-ratio: 4/5;
}
@media (hover: hover) {
  .tg-gal-card:hover { text-decoration: none; }
}
.tg-gal-card .tg-gal-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.7s ease, filter 0.5s ease;
  filter: brightness(0.85);
}
@media (hover: hover) {
  .tg-gal-card:hover .tg-gal-img {
    transform: scale(1.05);
    filter: brightness(1);
  }
}
.tg-gal-card .tg-gal-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.85) 100%);
}
.tg-gal-card .tg-gal-meta {
  position: absolute;
  left: 22px; right: 22px; bottom: 22px;
  z-index: 2;
}
.tg-gal-card .tg-gal-tag {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tg-gold);
  font-family: 'Inter', sans-serif;
  margin-bottom: 8px;
  display: inline-block;
}
.tg-gal-card .tg-gal-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.1;
  color: #f5f3ec;
  margin: 0;
  letter-spacing: -0.01em;
}
.tg-gal-card .tg-gal-cta {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tg-fg-soft);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
@media (hover: hover) {
  .tg-gal-card:hover .tg-gal-cta {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Featured tile spans 2 cols on large screens */
.tg-gal-card.feature {
  grid-column: span 2;
  aspect-ratio: 16/10;
}

/* ============ EMPTY STATE ============ */
.tg-gal-empty {
  padding: 80px 24px;
  text-align: center;
  color: var(--tg-muted);
  font-size: 14px;
}

/* ============ CTA STRIP ============ */
.tg-gal-cta-strip {
  padding: clamp(80px, 12vw, 130px) clamp(24px, 7vw, 96px);
  background: var(--tg-bg-soft);
  border-top: 0.5px solid var(--tg-line);
  text-align: center;
}
.tg-gal-cta-strip h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 14px 0 30px;
  color: var(--tg-fg);
}
.tg-gal-cta-strip h2 em { font-style: italic; color: var(--tg-gold); }
.tg-gal-cta-strip-actions {
  display: inline-flex; gap: 12px; flex-wrap: wrap;
  justify-content: center;
}

/* ============ DETAIL: BREADCRUMB ============ */
.tg-gal-crumb {
  padding: 22px clamp(20px, 5vw, 64px);
  border-bottom: 0.5px solid var(--tg-line);
  background: var(--tg-bg-soft);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tg-muted);
}
.tg-gal-crumb a {
  color: var(--tg-fg-soft);
  text-decoration: none;
}
@media (hover: hover) {
  .tg-gal-crumb a:hover { color: var(--tg-gold); text-decoration: none; }
}
.tg-gal-crumb span { margin: 0 10px; color: var(--tg-border); }

/* ============ DETAIL: MASONRY ============ */
.tg-gal-detail-wrap {
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px) clamp(40px, 6vw, 72px);
}
.tg-gal-info {
  max-width: 1500px;
  margin: 0 auto clamp(36px, 5vw, 60px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: end;
}
.tg-gal-info-stats {
  display: flex;
  gap: 36px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.tg-gal-info-stats div {
  text-align: left;
}
.tg-gal-info-stats .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3.6vw, 40px);
  color: var(--tg-gold);
  line-height: 1;
}
.tg-gal-info-stats .lab {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tg-muted);
  margin-top: 8px;
}

.tg-gal-masonry {
  column-count: 3;
  column-gap: 14px;
  max-width: 1500px;
  margin: 0 auto;
}
.tg-gal-masonry figure {
  margin: 0 0 14px;
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  background: #111;
  display: block;
}
.tg-gal-masonry figure a {
  display: block;
}
.tg-gal-masonry figure img {
  width: 100%; height: auto; display: block;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: brightness(0.92);
}
@media (hover: hover) {
  .tg-gal-masonry figure:hover img {
    transform: scale(1.04);
    filter: brightness(1);
  }
}
.tg-gal-masonry figcaption {
  position: absolute;
  left: 12px; bottom: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: #f5f3ec;
  background: rgba(0,0,0,0.55);
  padding: 4px 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
@media (hover: hover) {
  .tg-gal-masonry figure:hover figcaption { opacity: 1; }
}

.tg-gal-back {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

/* ============ GLIGHTBOX — editorial theme ============ */
.glightbox-clean .gslide-description,
.glightbox-clean .gdesc-inner { background: transparent; }
.glightbox-clean .gslide-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  color: #f5f3ec;
  letter-spacing: -0.01em;
}
.glightbox-clean .gslide-desc {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tg-gold);
}
.goverlay { background: rgba(6, 6, 6, 0.96) !important; }
.gnext, .gprev, .gclose {
  background-color: transparent !important;
  border: 0.5px solid rgba(255, 204, 1, 0.25) !important;
  border-radius: 0 !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}
@media (hover: hover) {
  .gnext:hover, .gprev:hover, .gclose:hover {
    border-color: var(--tg-gold) !important;
    background: rgba(255, 204, 1, 0.08) !important;
  }
}
.gnext svg, .gprev svg, .gclose svg {
  fill: var(--tg-gold) !important;
  width: 18px !important;
  height: 18px !important;
}
.gslide-image img { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.gcounter {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tg-fg-soft);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .tg-gal-grid { grid-template-columns: repeat(2, 1fr); }
  .tg-gal-card.feature { grid-column: span 2; aspect-ratio: 16/9; }
  .tg-gal-masonry { column-count: 2; }
}
@media (max-width: 700px) {
  .tg-gal-hero { min-height: 420px; }
  .tg-gal-hero-inner { padding-top: 120px; }
  .tg-gal-hero-title { font-size: 54px !important; }
  .tg-gal-grid { grid-template-columns: 1fr; gap: 14px; }
  .tg-gal-card,
  .tg-gal-card.feature { aspect-ratio: 4/5; grid-column: auto; }
  .tg-gal-info { grid-template-columns: 1fr; gap: 18px; }
  .tg-gal-info-stats { justify-content: flex-start; }
  /* Small multi-column thumbnails on mobile (not one image per row). */
  .tg-gal-masonry { column-count: 3; column-gap: 8px; }
  .tg-gal-masonry figure { margin-bottom: 8px; }
  .tg-gal-filterbar { gap: 14px; }
}
