/* Host adaptation for the Overview design. Two rules, and nothing about the design itself.
 *
 * The page was written to own the browser window. In the app it renders inside the workspace
 * pane, which is the window less the 52px header row, so the hero's sticky scene - a 100vh stage
 * held at top: 0 - would stand 52px taller than the thing scrolling it and drift upward as you
 * read. These re-point the two viewport heights that matter at the pane instead. Everything else
 * in styles.css is the original.
 */
.sg-ov {
  --sg-pane: calc(100svh - 52px);
}
.sg-ov .hero-sticky {
  height: var(--sg-pane);
}
.sg-ov .orbit {
  width: min(760px, calc(100vw - 32px), calc((var(--sg-pane) - 230px) * 1.25));
}

/* `body { overflow-x: hidden }` in the design's stylesheet hides the scene's off-screen pieces
 * without making the body a scroll container, because overflow set on the body element is
 * handed to the viewport. On an ordinary div it is not: it would make the overview's own
 * wrapper a scroller, and the hero's sticky stage would then have nothing to stick to - it
 * scrolls away instead of holding. So the wrapper gives that one declaration back, and the
 * clipping moves to the app's pane, which is the scroller already (`.sg-ov-pane`, set by
 * OverviewRuntime while the overview is in the page).
 */
.sg-ov {
  overflow-x: visible;
}
.sg-ov-pane {
  overflow-x: hidden;
}

/* A pane that is short rather than narrow.
 *
 * The design places the hero copy 190px from the top and pins the crew row to the bottom at a
 * fixed 236px card. Both are right in a tall window, and the stylesheet already shrinks the
 * cards twice on the way down to a phone - but every one of those breakpoints is on width. A
 * wide laptop with little height (1920x780, 1512x700) meets none of them, so a 242px row of
 * cards climbs into the last line of the subtitle and sits on top of it.
 *
 * So the same two numbers follow the pane's height here, clamped at the design's own values:
 * once the window is tall enough, this rule does nothing at all and the page is the supplied
 * one. The crew row keeps its aspect ratio; it is the width that gives, which is how the
 * design's own breakpoints shrink it.
 */
@media (max-height: 880px) {
  .sg-ov .hero-copy {
    top: clamp(88px, calc(var(--sg-pane) - 538px), 190px);
  }
  .sg-ov .crew-row .spot {
    width: clamp(116px, calc((var(--sg-pane) - 420px) * 0.62), 236px);
  }
}
