/* Page layout. Mobile first: one column with the video panel on top. */
.page {
  /* Mobile video panel: 1:1 square, capped to the viewport height.
     Shared with the composer, which floats over the bottom of the panel. */
  --stage-height: min(100vw, 100svh);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.stage {
  position: relative;
  order: 0;
  height: var(--stage-height);
  background: var(--color-video-bg);
  overflow: hidden;
  container-type: size;
}

.content {
  order: 1;
  padding: 0 37px 80px;
}

.content__body {
  display: flex;
  flex-direction: column;
  gap: 54px;
  padding-top: 35px;
}

@media (max-width: 1023px) {
  .hero {
    height: calc(60vh - 260 * var(--space));
    padding-top: 23px;
  }

  .composer {
    margin-inline: -37px;
    padding: 4px 37px 0;   /* top/bottom to taste */
    background: transparent;
  }
}

.site-header {
  display: none;
}

/* On mobile the visible title lives in the video header; keep the hero
   text available to screen readers only. */
@media (max-width: 1024px) {
  .hero__intro .hero__eyebrow, .hero__intro .hero__lead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.section--shreds {
  order: -1;
}

/* Desktop: two columns side by side. Only the left column scrolls. */
@media (min-width: 1024px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .page {
    display: grid;
    /* Two equal columns: the stage always takes half the screen. The square
       stream covers the panel (see .stage__player iframe), so it is cropped
       at the sides when the panel is tall and at the top and bottom when it is wide. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    height: 100vh;
  }

  .content {
    order: 0;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Scrollable, but without a visible scrollbar between the columns. */
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: calc(60 * var(--space)) clamp(32px, 3.4vw, 65px) calc(96 * var(--space));
  }

  .content::-webkit-scrollbar {
    display: none;
  }

  .content__main {
    width: 100%;
    /* Scales with the spacing so the lines break as in Figma. */
    max-width: calc(565 * var(--space));
    margin-inline: auto;
  }

  .content__body {
    gap: calc(68 * var(--space));
    padding-top: 0;
  }

  .stage {
    order: 1;
    height: 100%;
  }

  .site-header {
    display: flex;
  }

  .site-header__brand img {
    width: calc(49 * var(--space));
    height: auto;
  }

  .hero__intro {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: calc(68 * var(--space));
    /* Fill the viewport minus the header (49 logo) and the top and bottom padding (60 + 96). */
    height: calc(100vh - 205 * var(--space));
    min-height: 550px;
  }

  .composer {
    position: static;
    transform: none;
  }

  .section--shreds {
    order: 0;
  }
}
