/* EmacEArt - pack subpages (/packs/<slug>.html). Loaded after ../style.css, uses its variables and buttons. */

.pk-crumb { margin: 0; display: flex; align-items: center; gap: 10px; font: 700 12px var(--f-mono); letter-spacing: 0.2em; }
.pk-crumb a { color: var(--yellow); text-decoration: none; }
.pk-crumb a:hover, .pk-crumb a:focus-visible { color: var(--cyan); }
.pk-crumb > span:not(.ed-chip) { color: var(--muted); }
.pk-head { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 48px; padding-bottom: 48px; }
.pk-h1 { font-size: clamp(32px, 4.4vw, 56px); }
.pk-head .lead { max-width: 760px; color: var(--cream); }
.pk-head .btns, .pk-side .btns { display: flex; flex-wrap: wrap; gap: 14px; }
/* clip, not hidden (.sec): hidden turns the section into a scroll box and the gallery stops following the scroll */
.pk-sec { padding: 56px 0 72px; overflow: clip; }
.pk-h2 { margin: 0 0 14px; font: 900 26px/1.1 var(--f-display); color: var(--cream); }

.pk-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 36px 44px; }
.pk-gal { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.pk-info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pk-info .pk-h2 { margin-bottom: 0; }

/* description text taken from the release page */
.pk-desc { font-size: 16px; line-height: 1.65; color: var(--muted); }
.pk-desc p { margin: 0 0 14px; }
.pk-desc h3 { margin: 26px 0 10px; font: 700 13px var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--yellow); }
.pk-desc h4 { margin: 20px 0 8px; font: 700 12px var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); }
.pk-desc ul { margin: 0 0 14px; padding-left: 20px; }
.pk-desc li { margin-bottom: 6px; }
.pk-desc strong { color: var(--cream); }
.pk-desc a { overflow-wrap: anywhere; }

/* film and main picture */
.pk-film, .pk-main { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; background: #000; border: 3px solid var(--cream); box-shadow: 8px 8px 0 var(--ink); }
.pk-film { cursor: pointer; }
.pk-film[hidden], .pk-main[hidden] { display: none; }
.pk-film img { width: 100%; height: 100%; object-fit: cover; }
.pk-main img { width: 100%; height: 100%; object-fit: contain; }
.pk-film iframe { display: block; width: 100%; height: 100%; border: 0; }
.pk-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 900 15px/1 var(--f-display); letter-spacing: 0.04em; color: var(--navy); background: var(--yellow); border: 3px solid var(--navy); box-shadow: 5px 5px 0 var(--ink); padding: 14px 20px; white-space: nowrap; transition: transform .18s ease, background-color .18s ease; }
.pk-film:hover .pk-play, .pk-film:focus-visible .pk-play { background: var(--cyan); transform: translate(-50%, -50%) scale(1.05) rotate(-1.5deg); }

/* variant A: thumbnails under the main picture - three in a row, no scroll bar. More than nine: three rows in view,
   the ninth tile carries "+N" and unfolds the rest below (pack.js). Without scripts (<html> has no .js) all are shown. */
.pk-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.js .pk-strip:not(.is-open) > :nth-child(n+10) { display: none; }
.pk-strip .pk-more::after { content: attr(data-more); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 900 30px/1 var(--f-display); color: var(--yellow); background: rgba(18, 20, 42, .74); }
.pk-gal.is-long { position: static; }
.pk-strip a, .pk-tfilm { position: relative; display: block; padding: 0; aspect-ratio: 16 / 9; background: var(--ink); border: 2px solid var(--line2); overflow: hidden; cursor: pointer; }
.pk-strip img { width: 100%; height: 100%; object-fit: cover; }
.pk-strip a:hover, .pk-strip a:focus-visible, .pk-tfilm:hover, .pk-strip .sel { border-color: var(--yellow); }
.pk-tfilm span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--yellow); background: rgba(18, 20, 42, .45); }

/* variant B: picture across the page under the title, grid of screenshots, lightbox */
.pk-hero { position: relative; overflow: hidden; background: var(--deep); }
.pk-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pk-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 20, 42, .94) 0%, rgba(18, 20, 42, .72) 45%, rgba(18, 20, 42, .15) 100%); }
.pk-hero .pk-head { position: relative; z-index: 1; padding-top: 88px; padding-bottom: 88px; }
.pk-cols-b .pk-info { flex: 1 1 560px; max-width: 760px; }
.pk-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 24px; background: var(--deep); border: 3px solid var(--line2); box-shadow: 8px 8px 0 var(--ink); }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pk-grid a { display: block; aspect-ratio: 16 / 9; background: var(--ink); border: 3px solid var(--cream); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; transition: transform .18s ease, border-color .18s ease; }
.pk-grid img { width: 100%; height: 100%; object-fit: cover; }
.pk-grid a:hover, .pk-grid a:focus-visible { border-color: var(--yellow); transform: scale(1.03) rotate(-1deg); }
.pk-b .pk-film { max-width: 1040px; }

.pk-lb { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 12, 32, .92); }
.pk-lb[hidden] { display: none; }
.pk-lb img { max-width: 100%; max-height: calc(100vh - 110px); border: 3px solid var(--cream); box-shadow: 8px 8px 0 var(--ink); }
.pk-lb button { position: absolute; width: 48px; height: 48px; font: 900 18px var(--f-display); color: var(--navy); background: var(--yellow); border: 3px solid var(--navy); cursor: pointer; transition: transform .18s ease, background-color .18s ease; }
.pk-lb button:hover, .pk-lb button:focus-visible { background: var(--cyan); transform: scale(1.05) rotate(-1.5deg); }
.pk-lb .x { right: 0; top: 0; }   /* close: top right corner of the picture */
/* arrows on the left and right edge of the picture: .fig is exactly as wide as the picture */
.pk-lb .fig { position: relative; display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; line-height: 0; }
.pk-lb .prev { left: 0; top: 50%; margin-top: -24px; }
.pk-lb .next { right: 0; top: 50%; margin-top: -24px; }
/* phone: the buttons sit on a small picture, so they are smaller */
@media (max-width: 600px) {
  .pk-lb button { width: 36px; height: 36px; font-size: 15px; }
  .pk-lb .prev, .pk-lb .next { margin-top: -18px; }
}
.pk-lb.one .prev, .pk-lb.one .next { display: none; }
/* counter "n / all" under the picture, as on the release pages */
.pk-lb .cap { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font: 700 13px var(--f-mono); letter-spacing: 0.2em; font-variant-numeric: tabular-nums; color: var(--yellow); pointer-events: none; }
.pk-main { cursor: zoom-in; }

/* two columns side by side from 1072px (560 + 44 + 420 + 2 x 24 padding). The gallery follows the scroll there,
   so it is kept no taller than the window: picture + three rows of thumbnails = width * 9/8 + 21px. */
@media (min-width: 1072px) {
  .pk-gal { max-width: max(420px, calc((100vh - 56px) * 8 / 9)); }
}
@media (max-width: 1071px) {
  .pk-gal { position: static; }
}
@media (max-width: 900px) {
  .pk-hero::after { background: rgba(18, 20, 42, .82); }
}
