/* Page CSS: only what sits inside a visual and the kit lacks (system.md). */

.nav__logo { gap: var(--s-3); }
.logo-icon { width: 28px; height: 28px; border-radius: 7px; flex: none; }

/* Hero: the product film loops inside the centred hero's window: the real
   app, recorded, in a soft frame on the brand's stone ground. */
.film-window { --ground-bg: #e9e1d3; background: linear-gradient(180deg, #ece5d8, #e3d9c8); }
.film-piece { border-radius: var(--r-md); overflow: hidden; background: var(--g-main);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--ink) 9%, transparent), 0 30px 60px -30px color-mix(in oklab, var(--ink) 50%, transparent); }
.hero--centred .hero__window > .film-piece { width: min(1040px, calc(100% - 2 * var(--s-6))); }
.film-piece video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.film-pause { position: absolute; z-index: 2; right: var(--s-4); bottom: var(--s-4); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer; color: var(--p-inv-ink); background: color-mix(in oklab, var(--p-inv-bg) 78%, transparent); }
.film-pause svg { width: 16px; height: 16px; }
.film-pause .i-play, .film-pause[aria-pressed="true"] .i-pause { display: none; }
.film-pause[aria-pressed="true"] .i-play { display: block; }
.film-len { margin-left: var(--s-2); font-variant-numeric: tabular-nums; }
.film-dialog { width: min(1200px, 94vw); padding: 0; border: 0; border-radius: var(--r-lg); background: #000; overflow: visible; }
.film-dialog::backdrop { background: color-mix(in oklab, #000 72%, transparent); }
.film-dialog video { display: block; width: 100%; height: auto; border-radius: var(--r-lg); }
.film-dialog__close { position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--p-inv-ink); color: var(--p-inv-bg); font-size: 16px; }

/* Real screenshots in one frame style. */
.shot-frame {
  margin: var(--s-7) 0 0; min-height: 0; overflow: hidden; border-radius: var(--r-lg);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--ink) 10%, transparent);
  background: var(--g-alt);
}
.shot-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.grid > .shot-frame { margin-top: 0; aspect-ratio: 1600 / 1040; height: auto; }
.shot-frame--low { height: 300px; }
@media (max-width: 639px) { .shot-frame--low { height: 200px; } }
.muted-lede { margin: 0; color: var(--muted); font-size: var(--t-lead); line-height: 1.5; }

/* Download cards */
.dl-card { display: flex; flex-direction: column; gap: var(--s-4); }
.dl-card__icon { width: auto; height: 56px; }
.dl-card h3 { margin: 0; }
.dl-card p { margin: 0; }
.dl-card .btn-row { margin-top: auto; }
.dl-foot { margin-top: var(--s-6); }

/* Changelog list */
.change-list { display: grid; gap: var(--s-6); }
.change-group h3 { margin: 0 0 var(--s-3); font-size: var(--t-card); }
.change-group ul { margin: 0; padding-left: 1.1em; display: grid; gap: var(--s-2); }
.change-group li { line-height: 1.6; }

/* Inner pages (changelog, privacy): long text, natural height. */
.page { padding: calc(var(--nav) + var(--s-9)) 0 var(--s-9); }
.page .measure > * + * { margin-top: var(--s-4); }
.release { padding: var(--s-8) 0; border-top: 1px solid color-mix(in oklab, var(--ink) 12%, transparent); }
.release:first-of-type { border-top: 0; }
.release__head { display: flex; gap: var(--s-4); align-items: baseline; flex-wrap: wrap; }
.release__head h2 { margin: 0; font-size: var(--t-h3); }

@media (min-width: 640px) and (max-width: 799px) { #changes .shot-frame--low { display: none; } }

/* Tablet and phone: the chapters' still layout keeps the section at two
   screens so every later section starts on its own screen. */
@media (max-width: 1023px) {
  main > #features[data-moment]:not(.is-live) { min-height: calc(2 * 100svh); }
  #privacy .shot-frame { grid-column: 1 / -1; width: 100%; aspect-ratio: auto; height: 300px; }
}
@media (max-width: 639px) {
  main > #features[data-moment]:not(.is-live) { min-height: calc(2 * 100lvh); }
  #privacy .shot-frame { display: none; }
  #download .section-head p { display: none; }
  .dl-card__icon { height: 44px; }
  #changes .change-group + .change-group { display: none; }
  #questions .faq__item:last-child { display: none; }
}

/* GitHub's own mark in the nav, a 44px target. */
.nav__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); color: var(--ink); transition: background-color .2s var(--ease), color .2s var(--ease); }
.nav__icon:hover { background: color-mix(in oklab, var(--ink) 7%, transparent); }

/* Two-line headline and a tighter lead so the film gets the screen. */
.hero--centred h1 { max-width: 20ch; }
.hero--centred .hero__lead { max-width: 60ch; }
.hero--centred .hero__c { gap: var(--s-3); }
@media (min-width: 1024px) { .hero--centred .hero__window { min-height: clamp(300px, 46svh, 520px); } }

/* Six chapters in the still layout (tablet, phone): smaller pictures so
   the section stays at two screens. */
@media (max-width: 1023px) {
  main > #features[data-moment]:not(.is-live) .mo-pc__visual > img { max-height: 17svh; }
  main > #features[data-moment]:not(.is-live) .mo-pc__step p { margin-block: var(--s-1); }
}
@media (max-width: 639px) {
  main > #features[data-moment]:not(.is-live) .mo-pc__visual > img { max-height: 15lvh; }
}
@media (max-width: 639px) {
  main > #features[data-moment]:not(.is-live) .mo-pc__visual > img { max-height: 9lvh; }
}

/* The pause control sits inside the hero's first screen. */
.film-pause { bottom: var(--s-7); }
/* Release notes start on the column line, without list indents. */
.change-group ul { padding-left: 0; list-style: none; }
.change-group li { padding-left: 0; }
/* Phone: privacy keeps a short picture; privacy and download grow with
   their content instead of filling a fixed screen. */
@media (max-width: 639px) {
  #privacy .shot-frame { display: block; grid-column: 1 / -1; height: 200px; aspect-ratio: auto; }
  :is(#privacy, #download) .grid.fill { flex: none; min-height: auto; }
}

/* Closing: the app icon over the heading; the big word keeps room for its
   tall letters. */
.close-icon { width: 96px; height: 96px; display: block; margin-bottom: var(--s-5); border-radius: 22px; }
.q-shot { margin-top: var(--s-5); aspect-ratio: 16 / 10; }
@media (max-width: 639px) { .close-icon { width: 64px; height: 64px; } .q-shot { aspect-ratio: auto; height: 150px; } #questions .faq__item:nth-last-child(2) { display: none; } }

/* Inner pages hold long text: they grow with it instead of one screen. */
main > section.page { height: auto; min-height: 100svh; }
main > section.page > .wrap { height: auto; }
/* The closing word's tall letters stay inside its own line box. */
.close__word { line-height: .98; }

/* Download: a short look at the app under the two cards. */
.dl-shot { margin-top: var(--s-6); flex: 1 1 0; min-height: 120px; height: auto; }
@media (max-width: 639px) { .dl-shot { flex: none; height: 260px; } #download .dl-card > p.t-small { display: none; } }
/* Pinned chapters: the heading starts at the page's one section padding
   (the moment centres its grid, which made a larger gap above it). */
/* Pinned chapters: a taller picture so the section's space above and below
   matches the page's other gaps. */
main > #features[data-moment].is-live .mo-pc__visuals { aspect-ratio: 1 / 1; }
main > #features[data-moment].is-live .mo-pc__visual > img { object-position: 0 0; }
