/* Project popup. The clicked tile flies into place as .case-flyer (case.js), then the details fade in around it. */
.case { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--text); overflow: auto; overscroll-behavior: contain; }
/* The page stays visible but blurred behind the popup, so only the popup reads sharp. Clicking the blurred area closes it (case.js). */
.case::backdrop { background: rgba(0, 0, 0, 0.35); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.case-panel { width: min(1240px, 86vw); min-height: 100%; margin-inline: auto; background: var(--ink-2); overflow: hidden; }
.case-stage { position: relative; height: min(78vh, 48vw); min-height: 300px; background: #000; }
@media (max-width: 760px) { .case-panel { width: 100%; } }
@media (max-width: 720px) { .case-stage { height: 62vh; } }
.case-main { width: 100%; height: 100%; object-fit: contain; }
.case-close { position: fixed; z-index: 3; top: 14px; right: 14px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--text); color: var(--ink); font-size: 26px; line-height: 1; transition: transform 0.25s var(--ease); }
.case-close:hover { transform: rotate(90deg) scale(1.06); }
.case-flyer { position: fixed; z-index: 2; left: 0; top: 0; object-fit: cover; transform-origin: 50% 50%; will-change: transform; pointer-events: none; }
.case-thumbs { display: flex; gap: 10px; padding: 14px 20px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.case-thumb { flex: none; width: 120px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; opacity: 0.55; outline-offset: 2px; transition: opacity 0.2s; }
.case-thumb img { width: 100%; height: 100%; object-fit: cover; }
.case-thumb:hover, .case-thumb[aria-current='true'] { opacity: 1; }
.case-thumb[aria-current='true'] { box-shadow: 0 0 0 2px var(--text); }
.case-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); gap: 40px; padding: clamp(24px, 4vw, 44px); }
@media (max-width: 760px) { .case-body { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.case-name { font-size: clamp(32px, 5vw, 76px); line-height: 0.98; font-weight: 800; text-transform: uppercase; }
.case-blurb { margin-top: 16px; max-width: 62ch; color: var(--muted); font-size: 19px; }
.case-facts { margin: 0; display: grid; gap: 16px; align-content: start; }
.case-facts dt { font-size: 14px; color: var(--muted); }
.case-facts dd { margin: 2px 0 0; font-size: 17px; }
.case-tags { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.case-refs { padding: 0 clamp(24px, 4vw, 44px) clamp(24px, 4vw, 44px); }
.case-refs h3 { font-size: 20px; font-weight: 500; margin-bottom: 14px; }
.case-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.case-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.case-video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--ink); }
.case-video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: opacity 0.2s, transform 0.4s var(--ease); }
.case-video:hover img { opacity: 1; transform: scale(1.04); }
.case-video iframe { width: 100%; height: 100%; border: 0; }
.case-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--text); clip-path: none; display: grid; place-items: center; }
.case-play::after { content: ''; margin-left: 4px; border-left: 16px solid var(--ink); border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.case-video-title { margin-top: 8px; font-size: 15px; color: var(--muted); }
