/*
 * The three surface pages: desktop.html, terminal.html and vscode.html.
 *
 * Loaded after styles.css and built from its parts (.hero, .feature, .frame,
 * .quickstart, .closer). This file adds only what those pages need beyond them:
 * the current-page mark in the nav, a hero that ends in one large still, feature
 * rows with the media given more room, and a click-to-play player. Nothing here
 * restyles a class the home page uses on the home page.
 */

/* The site is dark only: every capture on it is a dark window. Saying so makes
   the browser's own parts (scrollbars, the video controls) dark as well, rather
   than a light scrollbar beside a dark page under a light OS theme. */
:root { color-scheme: dark; }

/* ---------- nav ---------- */

/* The same mark download.html gets from styles.css once the landing lands;
   repeated here so these pages carry it either way. */
.nav-links a[aria-current="page"] { color: var(--fg); }

/* ---------- hero ---------- */

.page-hero { padding-bottom: 5.5rem; }
.page-hero .hero-head { max-width: 860px; }
/* The secondary action is a link down the page, so it reads as one. */
.hero-cta .btn-quiet { border-color: transparent; color: var(--fg-dim); }
.hero-cta .btn-quiet:hover { color: var(--fg); background: transparent; border-color: var(--line-strong); }
/* On a phone it wraps under the primary button; without its padding it lines
   up with the text above instead of floating a step in. */
@media (max-width: 480px) { .hero-cta .btn-quiet { padding-inline: 0; } }
.hero-shot { margin-top: 3.75rem; }
/* No fixed ratio: the desktop still is 16:10 and the terminal one about 2:1,
   and each img's width and height attributes already reserve its box. */
.hero-shot .frame { background: var(--bg-inset); }
.hero-shot .frame img { width: 100%; }
.hero-shot figcaption { margin-inline: auto; text-align: center; }
/* The VS Code hero is two panel captures, at their own size, side by side. */
.hero-shots { margin-top: 3.75rem; }
.hero-shots + .page-note { text-align: center; }

/* ---------- one idea per band ---------- */

/* Each feature is its own band, so a screen holds one claim and the still that
   backs it. The media gets the larger share: the stills are whole windows, and
   at half the row their type is too small to read. */
.band { padding: 7rem 0; }
@media (max-width: 700px) { .band { padding: 4.25rem 0; } }
.band .feature { margin-top: 0; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 3.5rem; }
.band .feature.flip { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); }
@media (max-width: 900px) {
  .band .feature,
  .band .feature.flip { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}
.feature-copy h2 { font-size: clamp(1.6rem, 2.8vw, 2.15rem); margin-bottom: 1.1rem; text-wrap: balance; }
.feature-copy p { font-size: 1.04rem; line-height: 1.7; }
.feature-copy p + p { margin-top: 0.9rem; }
.feature-copy .more { margin-top: 1.4rem; font-size: 0.92rem; }
/* `.feature p` would set the label in body type; it stays the small cyan
   eyebrow every other section opens with. */
.feature-copy p.eyebrow { font-size: 0.72rem; line-height: inherit; color: var(--cyan); }
.feature-media .frame { aspect-ratio: 1280 / 800; background: var(--bg-inset); }
.feature-media .frame img { height: 100%; object-fit: cover; }

/* A section heading set apart from its content, used where a band leads with
   a heading rather than a feature row. */
.band-head { max-width: 760px; }
.band-head h2 { text-wrap: balance; }
.band-head .lede { margin-top: 1rem; }
.band .details { margin-top: 3rem; }
.cli-code { max-width: 900px; }
/* Six keys at the page's full width fill four columns and leave a short row;
   at the heading's width they fill three, as two even rows. */
.band .keys { max-width: 760px; }
/* site.js puts its copy button over the right of the head; a long label wraps
   short of it rather than running underneath. */
.code-head { padding-right: 4.75rem; }

/* ---------- click-to-play video ---------- */

/* The box is reserved from the width and height attributes before the poster
   arrives, and nothing past the poster loads until the reader presses play
   (preload="none"). */
.player { margin-top: 3rem; }
.player .frame { background: var(--bg-inset); }
.player video { width: 100%; height: auto; }
.player figcaption { margin-inline: auto; text-align: center; max-width: 68ch; }
/* The VS Code take is a sidebar-wide panel: shown at its own CSS size, centred,
   rather than stretched across the page. */
.player-narrow .frame { width: min(100%, 490px); margin-inline: auto; }

/* ---------- small pieces ---------- */

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}
.doc-links a::after { content: " →"; }
.closer .doc-links { justify-content: center; }

.page-note { margin-top: 1.25rem; color: var(--fg-dim); font-size: 0.9rem; }

/* ---------- motion ---------- */

/* A band's content rises into place as it scrolls in: calm, short, once per
   pass, and driven by the scroll itself, so it needs no script and never runs
   for a reader who asked for less motion. A browser without scroll-driven
   animations shows everything in place. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rise {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
