:root {
  --space-section: clamp(64px, 6vw + 40px, 160px);
  --space-hero-top: clamp(96px, 8vw + 40px, 192px);
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
}

/* Split the gap across each boundary so a change of background does not double it. */
html #main > :is(header, section) {
  padding-block: calc(var(--space-section) / 2);
  margin-block: 0;
}

html #main > :is(header, section):first-child {
  padding-block-start: var(--space-hero-top);
}

html #main > #lens {
  padding-block: 0;
}

html #main > #lens .p2,
html #main > .cls-band {
  padding-block: calc(var(--space-section) / 2) !important;
}

/* The space above the heading matches the space between the heading and
   the film's dark window (the stage margin plus the window's 56/1600 offset inside the film). */
html #main > .hero.top:first-child {
  padding-block-start: calc(var(--s-7) + (min(100vw, var(--wrap)) - 2 * var(--gutter)) * 0.035);
}

html #main .hero.top .hero-head {
  margin-block-start: 0;
}

html #main .hero.top .hero-stage {
  margin-block-start: var(--s-7);
}

html #main .hero.top .hero-shot.v2 {
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

html #main .hero-foot:not(:has(.hero-acts > *)) {
  display: none;
}

html
  #main
  :is(.hero.top .hero-acts, .pg-ctas, .dv-hero .dv-ctas, .op1-acts, .fs-btn, .cg-media-copy .pill) {
  margin-block-start: var(--s-6);
}

html #main :is(.hero-acts, .pg-ctas, .dv-ctas, .op1-acts) {
  gap: var(--s-4);
}

html #main :is(.sec-l, .sub, .lede, .hero-lede, .cg-prose, .ey-sub, .op1 h2) {
  margin-block-start: var(--s-5);
}

html #main .gd-head .sec-l {
  margin-block-start: 0;
}

html
  #main
  :is(
    .gd-doors,
    .gx-g,
    .dv-paths,
    .dv-create,
    .dv-data,
    .dv-res,
    .pg-cards,
    .pg-sec .dt,
    .pg-sec .gates,
    .ab-facts,
    .ab-steps,
    .ab-wayg,
    .ab-proof,
    .ab-founders,
    .op1-tiles
  ) {
  margin-block-start: var(--s-7);
  gap: var(--s-5);
}

html #main #how .gd-doors {
  margin-block-start: var(--s-7) !important;
}

html #main :is(.pk-plan, .dv-cta) {
  margin-block-start: var(--s-9);
}

html #main #lens .p2-stage {
  margin-block-start: var(--s-7);
}

.js #main .rv {
  filter: none;
  transition-property: opacity, transform;
}

/* Scaling an absolutely positioned annotation also scales its translated offset. */
html #main #lens .co-annotate {
  scale: 1;
}

html #main #lens .p2-hint {
  position: static;
  transform: none;
  margin: var(--s-4) 0 0;
  text-align: center;
  white-space: normal;
}

html #main #lens .p2-hint[style*='opacity: 0'] {
  display: none;
}

html #main .w3 :is(.w3-w, .w3-tail) {
  padding-bottom: var(--s-2);
}

html #main .w3-plus {
  padding-inline: var(--s-4);
}

@media (max-width: 760px) {
  html #main .w3-plus {
    padding-inline: 0 var(--s-2);
  }

  html #main .w3 :is(.w3-w, .w3-tail) {
    padding-bottom: var(--s-1);
  }
}
