/* JBC Code Track: the wide-screen landing layout for a referral arrival.
 *
 * Someone who follows a link from another website is at a desk, so the narrow
 * phone column the Connect page uses reads as a strip down the middle of an
 * empty screen. For a block marked layout=landing, intro.js adds .jbc-landing
 * to #jbc-connect-page and these rules turn the same markup into a landing
 * page: the piece pictured beside its statement, the three ways onward in a
 * row, the signup beside its own description.
 *
 * Everything is inside the min-width query and behind .jbc-landing, so the
 * phone page and every other arrival are untouched.
 */
/* The picture of the piece, on every version of the page. On the narrow page
   it sits BELOW the two buttons, so the ways to follow stay near the top and
   the tall photograph does not push them a screen down. The markup lives
   inside the block (where the wide landing layout needs it, in the left
   column), so intro.js places a copy after the buttons and these rules show
   exactly one of the two. Full photograph, never cropped. */
#jbc-connect-page .jbc-ci-art--below { display: block; margin: 0 0 56px; }
#jbc-connect-page .jbc-ci-art img { display: block; width: 100%; height: auto; }
@media (max-width: 600px) { #jbc-connect-page .jbc-ci-art--below { margin-bottom: 40px; } }

@media (min-width: 900px) {
  #jbc-connect-page.jbc-landing {
    max-width: 1180px; padding: 56px 32px 72px; background: transparent;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px;
  }
  #jbc-connect-page.jbc-landing > * { grid-column: 1 / -1; }

  /* Masthead: the name as a byline, since the piece is the headline here.
     The two font sizes below carry !important only because the child theme
     sizes every h1 and h2 with !important, and nothing less outranks that. */
  #jbc-connect-page.jbc-landing > h1 { font-size: 15px !important; letter-spacing: 3px; margin: 0 0 6px; }
  #jbc-connect-page.jbc-landing > .subhead { font-size: 14px; margin: 0 0 40px; }

  /* The piece: photograph left, words right. The last row is flexible so that
     when the photograph is taller than the words the spare height collects
     under them instead of being shared out between the lines. */
  #jbc-connect-page.jbc-landing .jbc-ci:not([hidden]) {
    display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr; column-gap: clamp(36px, 5vw, 72px);
    margin: 0 0 64px; padding: 0;
  }
  #jbc-connect-page.jbc-landing .jbc-ci .jbc-ci-art[hidden] { display: block; }
  #jbc-connect-page.jbc-landing .jbc-ci-art--below { display: none; }
  #jbc-connect-page.jbc-landing .jbc-ci-art { grid-column: 1; grid-row: 1 / -1; margin: 0; }
  #jbc-connect-page.jbc-landing .jbc-ci-art img { display: block; width: 100%; height: auto; }
  #jbc-connect-page.jbc-landing .jbc-ci > :not(.jbc-ci-art) { grid-column: 2; }
  #jbc-connect-page.jbc-landing .jbc-ci-eyebrow { margin: 6px 0 14px; }
  #jbc-connect-page.jbc-landing .jbc-ci-title { font-size: clamp(64px, 7vw, 104px) !important; line-height: .95; margin: 0 0 36px; letter-spacing: -0.03em; }

  /* The statement is simply there. Open and close is a phone affordance, for
     keeping the form within reach of a thumb. */
  #jbc-connect-page.jbc-landing .jbc-ci-toggle { display: none; }
  #jbc-connect-page.jbc-landing .jbc-ci-statement[hidden] { display: block; }
  #jbc-connect-page.jbc-landing .jbc-ci-statement { margin: 0; max-width: 36em; }
  #jbc-connect-page.jbc-landing .jbc-ci-statement p { font-size: 18px; line-height: 1.65; margin: 0 0 1.1em; color: #d9d6d1; }
  #jbc-connect-page.jbc-landing .jbc-ci-statement p:first-child { font-size: 24px; line-height: 1.4; color: #fff; }
  #jbc-connect-page.jbc-landing .jbc-ci-statement p:last-child { margin-bottom: 0; color: #8f8c87; font-size: 15px; }
  #jbc-connect-page.jbc-landing .jbc-ci-rule { display: none; }

  /* Three ways onward, one row, equal height. */
  #jbc-connect-page.jbc-landing .button-stack { grid-column: 1 / 3; grid-row: 4; flex-direction: row; gap: 16px; margin: 0; }
  #jbc-connect-page.jbc-landing .button-stack .big-button { flex: 1 1 0; min-width: 0; }
  #jbc-connect-page.jbc-landing .jbc-ci-more:not([hidden]) { grid-column: 3; grid-row: 4; margin: 0; display: flex; }
  #jbc-connect-page.jbc-landing .jbc-ci-more .big-button { flex: 1 1 0; }
  /* Flex, so the label and its arrow share one centre line in all three.
     The arrow is floated on the phone page, and a float does not centre. */
  #jbc-connect-page.jbc-landing .big-button { font-size: 30px; padding: 40px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  #jbc-connect-page.jbc-landing .big-button .arrow { float: none; line-height: 1; }
  /* WordPress auto-formatting puts a line break inside the two buttons written
     across several lines in the page, which sat the label half a line low. */
  #jbc-connect-page.jbc-landing .big-button br { display: none; }

  /* Signup: what it is on the left, the form on the right. */
  #jbc-connect-page.jbc-landing .form-section {
    grid-row: 5; margin: 72px 0 0; padding-top: 56px; border-top: 1px solid #2a2927;
    display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr; column-gap: clamp(36px, 5vw, 72px);
  }
  #jbc-connect-page.jbc-landing .form-section > * { grid-column: 2; grid-row: 1 / -1; }
  #jbc-connect-page.jbc-landing .form-section > h2 { grid-column: 1; grid-row: 1; font-size: 40px !important; letter-spacing: -0.02em; margin: 0 0 14px; }
  #jbc-connect-page.jbc-landing .form-section > h2 + p { grid-column: 1; grid-row: 2; font-size: 17px; max-width: 26em; }
  #jbc-connect-page.jbc-landing .footer { grid-row: 6; }
}
