/* Tilt card shell — used by gallery grids, collection tiles, featured works */
.tilt-card {
  perspective: var(--tilt-perspective);
}
.tilt-card__inner {
  transform-style: preserve-3d;
  will-change: transform;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-frame);
}
[data-motion="off"] .tilt-card__inner {
  will-change: auto;
}

.tilt-card figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.tilt-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-lux);
}
.tilt-card:hover img {
  transform: scale(1.04);
}
/* Reset when a tilt-card is a <button> (gallery lightbox triggers) */
button.tilt-card {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.tilt-card figcaption {
  padding: var(--space-2) var(--space-3) var(--space-3);
}
.tilt-card .card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.tilt-card .card-subtitle {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* Collections nav — shared wrapper on Home + Portfolio index */
.collections-nav { padding-block: var(--space-7); }
.portfolio-intro { padding-block: var(--space-8) var(--space-5); text-align: center; }
.portfolio-lede { color: var(--color-text-muted); max-width: 44ch; margin-inline: auto; }

/* Collection tiles */
.collection-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 860px) {
  .collection-tiles { grid-template-columns: 1fr; }
}
.collection-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: var(--space-4);
}
.collection-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  transition: transform var(--dur-slow) var(--ease-lux);
}
.collection-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,11,10,.85), rgba(11,11,10,.1) 60%);
  z-index: -1;
}
.collection-tile:hover img { transform: scale(1.06); }
.collection-tile h3 { font-size: 1.5rem; }
.collection-tile p { color: var(--color-text-muted); margin-top: var(--space-1); }

/* No cover image yet — tasteful bordered fallback instead of a barely-visible placeholder */
.collection-tile--noimg {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.collection-tile--noimg::after { display: none; }
.collection-tile--noimg h3 { font-size: 1.15rem; color: var(--color-text-muted); }

/* Buttons / links */
.btn {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-gold-dim);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  transition: background var(--dur-fast) var(--ease-lux), color var(--dur-fast) var(--ease-lux);
}
.btn:hover {
  background: var(--color-gold);
  color: var(--color-bg);
}

/* Pull quote */
blockquote.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-h3);
  color: var(--color-gold);
  border-left: 2px solid var(--color-gold-dim);
  padding-left: var(--space-3);
  margin-block: var(--space-5);
}

/* Custom magnetic cursor */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  /* Hidden until cursor.js confirms a real pointer moved (see cursor.js) —
     otherwise this sits visibly at the viewport's top-left corner by default. */
  opacity: 0;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--color-gold);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid var(--color-border-strong);
}
.has-custom-cursor .cursor-dot,
.has-custom-cursor .cursor-ring {
  opacity: 1;
}
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}
/* Only hide the native cursor once cursor.js confirms it's actually running —
   fail-open, same reasoning as the reveal gate in animations.css. */
.has-custom-cursor,
.has-custom-cursor a,
.has-custom-cursor button {
  cursor: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 10, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-lux);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; box-shadow: var(--shadow-frame); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: 0;
  color: var(--color-text);
  cursor: pointer;
  font-size: 1.5rem;
}
.lightbox-close { top: var(--space-3); right: var(--space-3); }
.lightbox-prev { left: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox-caption {
  position: absolute;
  bottom: var(--space-3);
  left: 0; right: 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

/* Video facade — click-to-load YouTube embed, thumbnail + play button only
   until clicked so the heavy iframe never costs LCP/TBT. */
.video-facade .tilt-card__inner {
  position: relative;
  aspect-ratio: 16 / 9;
}
.video-facade picture,
.video-facade img,
.video-facade iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}
.video-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1px solid var(--color-gold-dim);
  background: rgba(11, 11, 13, 0.55);
  backdrop-filter: blur(4px);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-lux), background var(--dur-fast) var(--ease-lux);
}
.video-play-btn svg { transform: translateX(2px); }
.video-facade:hover .video-play-btn {
  background: var(--color-gold);
  color: var(--color-bg);
  transform: scale(1.08);
}
