/* Embedded lightbox demo — case study only */

/* Whole block sits above the site-wide .lol-grain noise overlay (z-index 50) */
.randy-lb-section {
  position: relative;
  z-index: 60;
  isolation: isolate;
}

.randy-lb-demo {
  --lb-bg: #121216;
  --lb-surface: #1a1a20;
  --lb-border: #2e2e36;
  --lb-text: #f4f4f6;
  --lb-muted: #a1a1aa;
  --lb-dim: #71717a;
  --lb-accent: #8b9eff;
  --lb-ease: cubic-bezier(0.4, 0, 0.2, 1);

  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: min(68vh, 600px);
  padding: 2rem 1rem;
  background-color: var(--lb-bg);
  background-image: none;
  border: 1px solid var(--lb-border);
  border-radius: 14px;
  overflow: hidden;
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.randy-lb-demo:focus {
  outline: 2px solid var(--lb-accent);
  outline-offset: 3px;
}

.randy-lb-demo__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: min(96%, 960px);
  text-align: center;
}

.randy-lb-demo__img {
  display: block;
  max-width: 100%;
  max-height: min(48vh, 460px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--lb-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transition: opacity 0.25s var(--lb-ease);
}

.randy-lb-demo__img.is-fading {
  opacity: 0.4;
}

.randy-lb-demo__date {
  margin: 1.1rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lb-dim);
}

.randy-lb-demo__caption {
  margin: 0.45rem 0 0;
  max-width: 36rem;
  padding: 0 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--lb-muted);
}

.randy-lb-demo__share {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding: 0.5rem 0.95rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lb-text);
  background: var(--lb-surface);
  border: 1px solid var(--lb-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s var(--lb-ease), border-color 0.2s var(--lb-ease);
}

.randy-lb-demo__share:hover {
  background: #24242c;
  border-color: #3f3f48;
}

.randy-lb-demo__share:focus-visible {
  outline: 2px solid var(--lb-accent);
  outline-offset: 2px;
}

.randy-lb-demo__share .ui-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.randy-lb-demo__hint {
  margin: 0.75rem 0 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #52525b;
}

.randy-lb-demo__nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  background: var(--lb-surface);
  border: 1px solid var(--lb-border);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s var(--lb-ease), border-color 0.2s var(--lb-ease);
}

.randy-lb-demo__nav:hover {
  background: #24242c;
  border-color: #3f3f48;
}

.randy-lb-demo__nav:focus-visible {
  outline: 2px solid var(--lb-accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .randy-lb-demo {
    min-height: 400px;
    padding: 1.25rem 0.5rem;
    gap: 0.35rem;
  }

  .randy-lb-demo__nav {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.4rem;
  }

  .randy-lb-demo__img {
    max-height: 38vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .randy-lb-demo__img {
    transition: none;
  }
}
