.root-landing-page {
  h3.landing-container-label {
    text-align: center;
  }

  .root-action-btn {
    display: block;
    max-width: 30em;
    width: 80%;
    margin: (3 * $vertical-height) auto 0;
  }
}

.root-landing-banner-header {
  width: 100%;
  margin-bottom: 0;
}

.root-landing-banner-subheader {
  width: 100%;
  margin: 0;

  .subheader-tile-link {
    color: #fff;
    text-decoration: none;
  }

  .subheader-tile:first-of-kind {
    padding-right: 5px;
  }

  .subheader-tile:last-of-kind {
    padding-left: 5px;
  }

  .subheader-tile {
    margin: 10px auto;
    padding-left: 5px;
    padding-right: 5px;
  }

  .subheader-image {
    height: 275px;
  }

  .subheader-image-caption {
    background-color: black;
    color: #fff;
    font-weight: bold;
    padding: 10px 15px;
    text-decoration: none;
  }
}

.center-navbar-signup-link-container {
  display: inline-block;
  margin: 20px auto 10px auto;
  position: absolute;
  text-align: center;
  width: 75%;
}

.center-navbar-signup-link {
  background-color: black;
  border-radius: 4px;
  border: 1px solid #3498db;
  width: 85px;
  color: #fff;
  cursor: pointer;
  display: inline;
  font-size: 12px;
  height: 37px;
  line-height: 18px;
  padding: 8px 15px;
  text-align: center;
  text-decoration: none;

  &:hover {
    background: rgba(white, 0.1);
    text-decoration: none;
    color: #fff;
  }

  &.active,
  &:active {
    background: rgba(white, 0.1);
    text-decoration: none;
    color: #fff;
  }
}

@media screen and (min-width: 991px) {
  .center-navbar-signup-link-container {
    display: none;
  }
}

@media screen and (max-width: 1099px) {
  .root-landing-banner-subheader {
    .subheader-tile {
      margin: 10px auto;
    }
  }
}

@media screen and (max-width: 500px) {
  .root-landing-banner-subheader {
    .subheader-tile {
      margin: 0 auto;
      min-width: 100%;
    }
  }

  .subheader-image {
    display: none;
  }

  .subheader-image-caption {
    margin: 5px auto;
  }
}

.bg-image-bike-hero {
  background-image: url("landing_pages/header_bg_root-full.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-image-bike-shops {
  background-image: url("landing_pages/bike-shop.jpg");
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
}

.bg-image-bike-cities {
  background-image: url("landing_pages/cities.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-image-bike-schools {
  background-image: url("landing_pages/schools.jpg");
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
}

.bg-image-bike-groups {
  background-image: url("landing_pages/groups.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@include media-breakpoint-up(lg) {
  .bg-image-bike-hero {
    background-position: bottom;
  }

  .bg-image-bike-shops {
    background-position: center top;
  }

  .bg-image-bike-cities {
    background-position: right center;
  }

  .bg-image-bike-schools {
    background-position: right top;
  }

  .bg-image-bike-groups {
    background-position: center center;
  }
}

// TODO: Optimize images
@media screen and (min-device-width: 1000px) {
  .root-landing-banner-header {
    background-image: url("landing_pages/header_bg_root-full.jpg");
  }
}

@media screen and (min-device-width: 1000px) and (-webkit-min-device-pixel-ratio: 2) and (min-resolution: 192dpi) {
  .root-landing-banner-header {
    background-image: url("landing_pages/header_bg_root-full.jpg");
  }
}

.upcase {
  text-transform: uppercase;
}

.root-landing-banner-header {
  .root-landing-header-text {
    h1,
    h2,
    h3,
    p {
      color: $white;
      display: block;
      text-align: center;
      margin: 15px auto 0;
    }

    p {
      font-size: 28px;

      strong {
        color: $green;
      }
    }

    h1 {
      text-shadow: 0 2px 5px rgba(17, 46, 78, 0.72);
      font-size: 60px;
      font-weight: 300;
      margin-bottom: 15px;
    }

    h2,
    h3 {
      color: $white;
      font-size: 24px;
      font-weight: 600;
      letter-spacing: 0.5px;
      line-height: 67px;
      text-align: center;
      text-shadow: 0 2px 5px rgba(17, 46, 78, 0.72);
      text-transform: none;

      a {
        color: #ffffff;
        text-decoration: none;
      }
    }

    h3 {
      font-weight: $normal-font-weight;
      opacity: 0.8;
    }

    .root-action-btn {
      display: none;
    }
  }

  .root-landing-signup {
    display: none;

    $signup-form-border-radius: 4px;

    form {
      background: rgba(249, 249, 249, 0.6);
      padding: (3 * $vertical-height) (2 * $vertical-height);
    }

    form,
    .form-control,
    .btn {
      border-radius: $signup-form-border-radius;
    }

    .btn {
      width: 100%;
    }

    label,
    .or-block {
      color: white;
    }

    // There needs to be a little bit less spacing between the form controls
    .form-group.col-md-6:nth-of-type(1) {
      padding-right: 7px;
    }

    .form-group.col-md-6:nth-of-type(2) {
      padding-left: 7px;
    }

    .or-block {
      line-height: 1em;
      margin: $vertical-height 0;
      text-transform: uppercase;
      text-align: center;
      position: relative;

      &:before,
      &:after {
        display: block;
        position: absolute;
        content: "";
        top: $body-font-size / 2 - 1px;
        height: 0;
        width: 44%;
        border-top: 1px solid white;
      }

      &:before {
        left: 0;
      }

      &:after {
        right: 0;
      }
    }
  }

  input {
    border-color: transparent;
  }

  // so we don't overpower the active border
  @include media-breakpoint-down(sm) {
    padding-top: 10 * $vertical-height;

    .root-landing-header-text {
      p {
        font-size: 20px;
      }

      h1 {
        font-size: 45px;

        span {
          display: block;
        }
      }
    }
  }

  @include media-breakpoint-up(lg) {
    padding-top: 10 * $vertical-height;
    padding-bottom: 12 * $vertical-height;

    .root-landing-header-text {
      p {
        line-height: 1.3em;
      }
    }

    .root-landing-signup {
      display: block;

      @include make-col-ready;

      @include make-col(5);
    }
  }
}

// Prevent overflow on tiny screens
@media (max-width: $grid-breakpoint-md) {
  .root-landing-banner-header .root-landing-header-text {
    h1 {
      font-size: 2.3rem;
    }

    h2 {
      line-height: 35px;
    }
    h3 {
      display: none; // it gets crowded with the register a stolen bike in there too
    }
  }
}

.root-landing-how-it-works {
  background-color: #f9f9f9;
  padding: 4 * $vertical-height 0;

  h3.landing-container-label,
  h4 {
    color: $header-font-nocolor;
  }

  .row {
    margin-top: 5 * $vertical-height;

    @include media-breakpoint-up(lg) {
      margin-top: 7 * $vertical-height;

      &:nth-of-type(2n) .root-landing-how-icon {
        @include make-col-offset(3);

        .root-icon-connector {
          right: 120%;
          transform: rotate(45deg);
        }
      }

      &:nth-of-type(3) .root-landing-how-icon .root-icon-connector {
        top: 72%;
      }
    }

    @include media-breakpoint-down(sm) {
      &:last-of-type .root-landing-explanation {
        padding-top: 0;
      }
    }
  }

  .root-landing-how-icon {
    padding-right: 0;

    svg,
    img {
      width: 100%;
      height: auto;
      display: block;
    }

    @include media-breakpoint-down(sm) {
      width: 50%;
      margin: 0 auto;
    }

    .root-icon-connector {
      display: none;

      @include media-breakpoint-up(lg) {
        display: block;
        height: 17 * $vertical-height;
        width: auto;
        position: absolute;
        right: -32%;
        top: 66%;
        transform: rotate(-45deg);
      }
    }
  }

  .root-landing-explanation {
    .root-landing-explanation-wrap {
      padding-top: 2 * $vertical-height;

      // position: relative;
      // top: 50%;
      // transform: translateY(-50%);
      padding-left: 15px;
    }

    h4 {
      font-size: 21px;
      margin-bottom: $vertical-height;
    }

    p {
      color: darken(
        $less-strong-font-color,
        1%
      ); // darkened for accessibility contrast
      font-size: 18px;
      margin-bottom: 0;
    }

    @include media-breakpoint-down(sm) {
      padding-top: 4 * $vertical-height;

      h4,
      p {
        text-align: center;
      }
    }
  }
}

.root-landing-who {
  padding-bottom: 6 * $vertical-height;

  h3.landing-container-label {
    color: $gray-darker;
    margin: (2 * $vertical-height) 0;

    @include media-breakpoint-up(lg) {
      margin: (4 * $vertical-height) 0;
    }
  }

  .root-landing-who-wrap {
    display: none;
    flex-wrap: wrap;
    justify-content: center; // When things overflow onto additional lines
  }

  &.scrolled .root-landing-who-wrap {
    display: flex;

    img {
      display: block;
    }
  }

  .root-landing-who-square,
  .root-landing-who-rectangle {
    padding: $vertical-height (0.5 * $vertical-height) (2 * $vertical-height);

    img {
      display: none;
      width: 100%;
      height: auto;
      position: relative;
    }
  }

  .css-convert-opacity {
    opacity: 0.8;
    // filter: grayscale(1); Might need this if there are color images
  }

  .root-landing-who-square {
    flex: 0 0 10%;
  }

  .root-landing-who-rectangle {
    flex: 0 0 20%;
  }

  @include media-breakpoint-down(sm) {
    .root-landing-who-square {
      flex: 0 0 20%;
    }

    .root-landing-who-rectangle {
      flex: 0 0 40%;
    }
  }
}

.root-by-the-numbers {
  background-image: url("landing_pages/bike_pattern_bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  color: rgb(172, 172, 172);
  text-align: center;
  overflow: scroll; // Fix overflow issue

  h3.landing-container-label {
    color: #fff;
    padding-top: (2 * $vertical-height);
    margin: 0 0 (2 * $vertical-height);

    @include media-breakpoint-up(lg) {
      margin: 0 0 (4 * $vertical-height);
      padding-top: (4 * $vertical-height);
    }
  }

  .chart-label {
    @extend .header-font-uncap;
    font-style: italic;
    color: rgba(172, 172, 172, 0.7);
    font-size: 20px;
  }

  .count-block {
    margin-top: 2rem;

    @include media-breakpoint-up(lg) {
      text-align: right;
      &:first-of-type {
        // on big screens, ensure it doesn't break from the chart
        margin-top: 0;
      }
    }

    h4 {
      @extend .header-font-uncap;
      font-size: 20px;
      color: rgb(172, 172, 172);
    }
    .count-display {
      display: block;
      font-weight: $strong-font-weight;
      margin-top: 0.5rem;
      font-size: 22px;
    }
  }
}
