/* ==========================================================================
   OTN theme: Home page layout (DESIGN.md section 7), ported from the
   mockups' assets/css/pages/home.css. Only version A is built (admin plan
   9.2), so versions B, C and D's rules are left out.
   Page layout only: the parts come from components.css and blocks.css.
   Every page's CSS loads on every page, so each rule hangs off a class
   only Home uses:
     .otn-billboard     the homepage top (6.14): billboard specifics
     .otn-involved      Get involved, the two cards (7.5, 6.22)
     .otn-homeabout     About Us (7.5)
   ========================================================================== */


/* ==========================================================================
   Billboard specifics
   ========================================================================== */

/* Below 900px the picture runs edge to edge, so the lines under it (the
   player's captions note and Transcript, from otn-video-facade) need the
   page gutter */
.otn-billboard__media .otn-player__note,
.otn-billboard__media .otn-transcript {
  padding-inline: var(--otn-gutter);
}

/* Everything drawn inside the picture (play button, channel bug) stays in
   the picture's own layer */
.otn-billboard__media .otn-player__frame {
  isolation: isolate;
}

/* The outage message (otn-settings' otn/outage-notice), when it shows,
   sits between the introduction and the buttons */
.otn-billboard__panel > :not(.otn-billboard__headline, .otn-billboard__dek, .otn-actions, .wp-block-site-title):not(:empty) {
  margin-top: var(--otn-space-5);
}

@media (min-width: 900px) {
  /* The panel sits beside the picture, so the lines under the picture
     line up with the picture's left edge */
  .otn-billboard__media .otn-player__note,
  .otn-billboard__media .otn-transcript {
    padding-inline: 0;
  }
}


/* ==========================================================================
   Get involved: two cards (6.22), side by side from 900px, gap 24px
   ========================================================================== */

.otn-involved__cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--otn-space-5);
}

/* Each card's button sits at its foot, so the two buttons line up when
   the cards sit side by side (also while the hiring line is hidden) */
.otn-involved__cards :is(.otn-card, .is-style-card) > p {
  margin-bottom: 0;
}

:root .otn-involved__cards :is(.otn-card, .is-style-card) > :is(.otn-btn, .otn-actions, .wp-block-buttons) {
  margin-top: auto;
  padding-top: var(--otn-space-5);
}

@media (min-width: 900px) {
  .otn-involved__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ==========================================================================
   About Us (7.5): photo first; from 900px photo | text (5fr 7fr, gap 48px)
   ========================================================================== */

.otn-homeabout__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--otn-space-5);
}

.otn-homeabout__media,
.otn-homeabout__text {
  min-width: 0;
}

/* The photo at its own shape on a black mat (the mockups' wrapper, or the
   image block with the class otn-mat) */
.otn-homeabout__mat {
  overflow: hidden;
  background-color: var(--otn-screen);
  border-radius: var(--otn-radius-m);
}

.otn-homeabout__mat img {
  width: 100%;
}

/* aboutText[2] in Sherman Serif lead; the button follows 24px below */
.otn-homeabout__lead,
:root p.otn-homeabout__lead {
  margin-bottom: var(--otn-space-5);
  font-family: var(--otn-font-serif);
  font-size: var(--otn-fs-lead);
  font-weight: var(--otn-fw-book);
  line-height: var(--otn-lh-lead);
}

@media (min-width: 900px) {
  .otn-homeabout__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: var(--otn-space-7);
  }
}
