﻿/* PresentTool™ Storytelling — section: renders (production, v3.7.0)
   ──────────────────────────────────────────────────────────────── */

.story-renders {
  position: relative;
  width: 100%;
  background: var(--pt-surface-1);
  color: var(--pt-text);
}

/* ─── First-render full-bleed hero (always) ──────────────────── */
.renders-first-hero {
  position: relative;
  display: block;
  width: 100%;
  height: 80vh;
  min-height: 520px;
  max-height: 900px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  background: #14120E;
  cursor: zoom-in;
  outline: none;
}
.renders-first-hero:focus-visible { outline: 2px solid var(--pt-secondary); outline-offset: -4px; }
.renders-first-hero-img {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.0);
  transition: transform 1.6s cubic-bezier(.22,.61,.36,1);
}
.renders-first-hero-img > img {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.renders-first-hero:hover .renders-first-hero-img { transform: scale(1.02); }

.renders-first-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.18) 0%,
    rgba(0,0,0,0.0)   30%,
    rgba(0,0,0,0.18) 70%,
    rgba(0,0,0,0.62) 100%);
  z-index: 2;
}
.renders-first-hero-meta {
  position: absolute;
  left: 56px;
  bottom: 40px;
  right: 56px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #fff;
}
.renders-first-hero-index {
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}
.renders-first-hero-title {
  font-family: var(--pt-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.40);
}

/* ─── Body header (kicker + h2) ──────────────────────────────── */
.renders-body {
  padding: 96px 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.renders-head {
  margin-bottom: 56px;
  max-width: 720px;
}
.renders-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-family: var(--pt-mono);
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--pt-primary);
}
.renders-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pt-primary);
}
.renders-title {
  font-family: var(--pt-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--pt-text);
  margin: 0;
  text-wrap: balance;
}

/* ─── Render-card base ───────────────────────────────────────── */
.render-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--pt-surface-3);
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.3s cubic-bezier(.22,.61,.36,1),
              box-shadow 0.3s cubic-bezier(.22,.61,.36,1),
              opacity 0.6s ease;
  box-shadow: 0 1px 2px rgba(20,18,14,0.05);
  opacity: 0;
  transform: translateY(8px);
  outline: none;
}
.render-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(20,18,14,0.10),
              0 16px 40px rgba(20,18,14,0.08);
  text-decoration: none;
}
.render-card:focus-visible { outline: 2px solid var(--pt-secondary); outline-offset: 2px; }
.render-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.render-card-img {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.render-card-img-pre {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.render-card-caption {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  font-size: 10.5px;
  font-family: var(--pt-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: 4px;
  z-index: 2;
  max-width: max-content;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CSS-only fallback when IntersectionObserver is unavailable */
.story-renders.is-no-observer .render-card,
.story-renders.is-no-observer .renders-first-hero {
  opacity: 1;
  transform: none;
}

.renders-first-hero {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.22,.61,.36,1);
}
.renders-first-hero.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Layout · grid (4-9 renders) ────────────────────────────── */
.renders-gallery--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.renders-gallery--grid .render-card {
  aspect-ratio: 3 / 2;
}

@media (max-width: 1100px) {
  .renders-gallery--grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
@media (max-width: 640px) {
  .renders-gallery--grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ─── Layout · masonry (10+ renders) ─────────────────────────── */
.renders-gallery--masonry {
  column-count: 3;
  column-gap: 20px;
  display: block;
}
.renders-gallery--masonry .render-card {
  margin: 0 0 20px;
  width: 100%;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: block;
  aspect-ratio: auto;
}
.renders-gallery--masonry .render-card.h-1 { height: 320px; }
.renders-gallery--masonry .render-card.h-2 { height: 480px; }
.renders-gallery--masonry .render-card.h-3 { height: 280px; }
.renders-gallery--masonry .render-card.h-4 { height: 380px; }
.renders-gallery--masonry .render-card.h-5 { height: 540px; }
.renders-gallery--masonry .render-card.h-6 { height: 360px; }
.renders-gallery--masonry .render-card.h-7 { height: 240px; }

@media (max-width: 1100px) {
  .renders-gallery--masonry { column-count: 2; column-gap: 16px; }
  .renders-gallery--masonry .render-card { margin-bottom: 16px; }
}
@media (max-width: 640px) {
  .renders-gallery--masonry { column-count: 1; column-gap: 0; }
  .renders-gallery--masonry .render-card {
    height: auto !important;
    aspect-ratio: 3 / 2;
  }
}

/* ─── Layout · fullbleed stack (1-3 renders) ─────────────────── */
.renders-gallery--fullbleed {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 -24px; /* extend beyond max-width body padding to be truly full-width */
}
.renders-gallery--fullbleed .render-card.render-card--fullbleed {
  height: 80vh;
  min-height: 520px;
  max-height: 800px;
  border-radius: 0;
  aspect-ratio: auto;
  width: 100%;
}

/* In fullbleed mode the body container caps width but cards must
   visually extend wider; pull the gallery itself out of the body. */
.story-renders[data-layout="fullbleed"] .renders-body {
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
}
.story-renders[data-layout="fullbleed"] .renders-head {
  padding: 0 56px;
  max-width: 1280px;
  margin: 0 auto 56px;
}
.story-renders[data-layout="fullbleed"] .renders-gallery--fullbleed {
  margin: 0;
}
.story-renders[data-layout="fullbleed"] .render-card-caption {
  bottom: 24px; left: 24px;
}

@media (max-width: 768px) {
  .renders-gallery--fullbleed .render-card.render-card--fullbleed {
    height: 70vh;
    min-height: 360px;
  }
}

/* ─── Mobile body layout ─────────────────────────────────────── */
@media (max-width: 768px) {
  .renders-body { padding: 56px 22px; }
  .renders-head { margin-bottom: 28px; }
  .renders-first-hero {
    height: 60vh;
    min-height: 360px;
  }
  .renders-first-hero-meta {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }
  .story-renders[data-layout="fullbleed"] .renders-head {
    padding: 0 22px;
  }
}

/* ─── Lightbox ───────────────────────────────────────────────── */
.renders-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 8, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.renders-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.renders-lightbox[hidden] { display: none; }

.renders-lightbox-figure {
  position: relative;
  margin: 0;
  max-width: min(1200px, 92vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.renders-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #14120E;
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.renders-lightbox-caption {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  max-width: 720px;
}

.renders-lightbox-close,
.renders-lightbox-arrow {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 210;
  transition: background 0.18s ease, transform 0.18s ease;
  font-family: var(--pt-sans);
}
.renders-lightbox-close:hover,
.renders-lightbox-arrow:hover { background: rgba(255, 255, 255, 0.18); }
.renders-lightbox-close:focus-visible,
.renders-lightbox-arrow:focus-visible { outline: 2px solid var(--pt-secondary); outline-offset: 2px; }

.renders-lightbox-close {
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.renders-lightbox-arrow {
  top: 50%;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-50%);
}
.renders-lightbox-arrow--prev { left: 32px; }
.renders-lightbox-arrow--next { right: 32px; }

.renders-lightbox-counter {
  position: absolute;
  top: 28px;
  left: 32px;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.70);
}

body.is-lightbox-open { overflow: hidden; }

@media (max-width: 768px) {
  .renders-lightbox-arrow {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .renders-lightbox-arrow--prev { left: 12px; }
  .renders-lightbox-arrow--next { right: 12px; }
  .renders-lightbox-close { top: 14px; right: 14px; width: 38px; height: 38px; font-size: 20px; }
  .renders-lightbox-counter { top: 18px; left: 14px; font-size: 10px; }
  .renders-lightbox-img { max-height: 70vh; }
}
