/* Shared structure for the portfolio mock-ups; each page sets its own theme. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* poster with an optional preview loop on top */
[data-loop] { position: relative; overflow: hidden; }
[data-loop] > img, [data-loop] > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-loop] > video { opacity: 0; transition: opacity .4s; }
[data-loop].is-playing > video { opacity: 1; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 100; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 16px 24px; background: rgba(8, 8, 10, .94); }
.lb.is-open { display: flex; }
.lb__stage { width: min(1200px, 100%); aspect-ratio: 16 / 9; max-height: calc(100svh - 130px); }
.lb__stage.is-v { width: auto; height: min(78svh, 860px); aspect-ratio: 9 / 16; max-width: 100%; }
.lb__stage video { width: 100%; height: 100%; background: #000; object-fit: contain; }
.lb__cap { margin: 0; color: #ddd; font-size: 14px; }
.lb__x { position: absolute; top: 8px; right: 12px; width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
