/* Showcase project pages (a project with "Showcase page" checked): a bigger top, then sections
   (assets/inc/project-sections.php). Loaded after articles.css and projects.css, only on those pages.
   Colours come from the style.css tokens, so light and dark mode both work. */

/* ---------- Top: title first, then the large image ---------- */
.pj-showcase .pj-top { grid-template-columns: 1fr; gap: 28px; }
.pj-showcase .pj-meta { order: -1; max-width: 820px; }
.pj-showcase .pj-meta h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.pj-showcase .pj-hero { border-radius: 24px; }
.pj-cta-top { margin: 22px 0 0; }
.pj-showcase .pj-body { margin-top: 48px; }
.pj-showcase .pj-body.art-text { font-size: 1.16rem; }

/* ---------- Sections ---------- */
.ps { margin: 80px 0 0; }
.ps-h { margin: 0 0 14px; font-size: clamp(1.5rem, 3.2vw, 2.05rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.ps-text > :last-child { margin-bottom: 0; }
.ps-plain, .ps-intro { max-width: 720px; margin-left: auto; margin-right: auto; }
.ps-intro { margin-bottom: 28px; }
.ps-plain .ps-text, .ps-intro .ps-text { margin: 0; }

/* Images: rounded, with a soft frame; click to enlarge */
.ps-shot { margin: 0; }
.ps-shot img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--glass-shadow); }
.ps-shot figcaption { margin: 10px 2px 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.ps-zoom { display: block; border-radius: 16px; cursor: zoom-in; transition: transform 0.25s ease; }
.ps-zoom:hover { transform: translateY(-2px); }
.ps-zoom:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

/* Image and text, side by side from 900 px (image on the right with .is-right) */
.ps-media { display: grid; gap: 26px; align-items: center; }
.ps-media .ps-text { max-width: none; margin: 0; }
@media (min-width: 900px) {
  .ps-media { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 52px; }
  .ps-media.is-right .ps-shot { order: 2; }
  .ps-media.is-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .ps-media.no-img { grid-template-columns: 1fr; max-width: 720px; margin-left: auto; margin-right: auto; }
}

/* Screenshots grid */
.ps-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 24px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .ps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .ps-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Video: a 16:9 frame; YouTube / Vimeo only load after "Play" */
.ps-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 75%, #0f1626), #0f1626); box-shadow: var(--glass-shadow); }   /* a player: dark in both modes */
.ps-frame iframe, .ps-frame video, .ps-facade > img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.ps-frame video { background: #000; }
.ps-facade > img { object-fit: cover; }
.ps-play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, rgba(15, 22, 38, 0.05), rgba(15, 22, 38, 0.45)); }
.ps-play-btn { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.22); border: 1px solid rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 30px rgba(0, 0, 0, 0.3); transition: transform 0.2s ease; }
.ps-play-btn svg { width: 30px; height: 30px; margin-left: 4px; fill: #fff; }
.ps-play:hover .ps-play-btn { transform: scale(1.06); }
.ps-play:focus-visible { outline: 3px solid var(--focus); outline-offset: -6px; border-radius: 20px; }
.ps-play-label { font-weight: 700; font-size: 1rem; text-align: center; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }
.ps-play-label small { display: block; font-weight: 500; font-size: 0.78rem; opacity: 0.85; margin-top: 2px; }

/* Key figures: glass cards with big numbers */
.ps-figures { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.ps-figures li { padding: 24px 24px 22px; border-radius: 20px; background: linear-gradient(160deg, var(--glass-top), var(--glass-bottom)), color-mix(in srgb, var(--card) 40%, transparent);
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow); }
.ps-figures strong { display: block; font-size: clamp(2.1rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.ps-figures span { display: block; margin-top: 10px; color: var(--muted); font-size: 0.95rem; line-height: 1.4; }

/* ---------- Enlarged image (dialog made by project-showcase.js) ---------- */
.ps-lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
.ps-lightbox::backdrop { background: rgba(10, 15, 28, 0.88); }
.ps-lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ps-lightbox img { display: block; max-width: 92vw; max-height: 82vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.ps-lightbox figcaption { color: #e6ebf3; font-size: 0.95rem; text-align: center; max-width: 70ch; }
.ps-lb-btn { position: fixed; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.14); color: #fff; font: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ps-lb-btn:hover { background: rgba(255, 255, 255, 0.26); }
.ps-lb-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ps-lb-close { top: 18px; right: 18px; }
.ps-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.ps-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.ps-lb-btn[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ps-zoom, .ps-play-btn { transition: none; }
  .ps-zoom:hover, .ps-play:hover .ps-play-btn { transform: none; }
}
