/******************************************************************************
UNLOCK NYC - website 2.0 2023
dev: MAB
******************************************************************************/

/** FONTS **/

@import url("https://fonts.googleapis.com/css2?family=Courier+Prime&family=Rubik:wght@300;400;500;600&display=swap");
@font-face {
  font-family: "Intro Rust";
  src: url("fonts/font-b185c63a-8d27-412b-b4cb-047ca0c8de79_IntroRust-Base.otf")
        format("truetype");
  font-display: swap;
}

:root {
  --yellow: #eebf3d;
  --orange: #ffac71;
  --cream: #f1f1e3;
  --purple: #b79dff;
  --green: #94e0a4;
  --dark-grey-text: #414141;
  --light-grey-text: #727272;
  --page-font: "Rubik";
  --courier: "Courier Prime";
}

.bg-yellow {
  background-color: var(--yellow);
}

.bg-cream {
  background-color: var(--cream);
}

.bg-orange {
  background-color: var(--orange);
}

.bg-purple {
  background-color: var(--purple);
}

.bg-green {
  background-color: var(--green);
}

/** MAIN CONTAINER **/

main {
    position: relative;
}

/** HEADER/NAV **/

nav#main {
  width: 100%;
  background-color: transparent;
  padding: 15px 6%;
  box-sizing: border-box;
  height: 80px;
  position: absolute;
  top: 0;
  z-index: 10;
}

nav * {
  vertical-align: middle;
}

nav div#nav-logo {
  font-family: "Intro Rust", "Rubik", sans-serif;
  font-size: 26px;
  min-width: 175px;
  width: 100%;
  display: inline-block;
  margin-top: 5px;
}

nav div#nav-logo a {
  color: Black;
  text-decoration: none;
}

nav div#nav-wrapper {
  display: grid;
  grid-template-columns: 175px auto;
  grid-column-gap: 35px;
  text-align: center;
}

nav ul#top {
  display: inline-block;
  font-family: "Rubik", sans-serif;
  margin: 0;
  padding-left: 0;
  text-align: right;
  margin-top: 5px;
  box-sizing: border-box;
}

nav ul#top li {
  padding: 3px 25px;
  line-height: 24px;
  font-size: 16px;
  font-weight: 500;
  text-transform: capitalize;
}

nav ul#top > li {
  display: inline-block;
}

nav ul#top li.login-button {
  background-color: White;
  color: Black;
  padding: 8px 16px;
  border-radius: 8px;
  margin-left: 8px;
  box-sizing: border-box;
}

nav ul#top li.report-button {
  background-color: Black;
  color: White;
  padding: 8px 16px;
  border-radius: 8px;
  margin-left: 8px;
  box-sizing: border-box;
}

nav ul#top > li a {
  text-decoration: none;
  color: Black;
  padding-bottom: 9px;
}

nav ul#top > li a.dropdown:active {
  pointer-events: none;
}

nav ul#top > li:not(.login-button):not(.report-button) a:hover {
  border-bottom: 2px solid Black;
  padding-bottom: 7px;
}

nav ul#top > li a.dropdown svg {
  width: 30px;
  float: right;
  margin-right: 10px;
  display: none;
}

nav ul li ul.submenu {
  background-color: White;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
  position: absolute;
  display: none;
  margin-top: 20px;
  border-radius: 8px;
  padding: 16px 0;
  text-align: left;
}

nav ul#top ul.submenu > li {
  display: block;
}

nav ul#top ul.submenu > li a:hover {
  color: #595959; /*chosen for contrast, MAB*/
  border-color: transparent;
}

nav ul#top > li.active-header > a {
  border-bottom: 2px solid Black;
  padding-bottom: 7px;
}

#hamburger {
  display: none;
  float: right;
  width: 50px;
  height: 50px;
  margin-top: -10px;
}

/** RESPONSIVE NAV **/

@media only screen and (max-width: 1450px) {
  /* was 1400, 1 button*/
  nav#main {
    padding: 15px 3vw;
  }
  nav div#nav-wrapper {
    grid-column-gap: 20px;
  }
  nav ul#top li {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media only screen and (max-width: 1300px) {
  /*was 1200px with 1 button*/
  nav div#nav-wrapper {
    grid-column-gap: 15px;
  }
  nav ul#top li {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media only screen and (max-width: 1200px) {
  /*ADDED for 2 buttons, wider menu*/
  nav div#nav-wrapper {
    grid-column-gap: 5px;
  }
  nav ul#top li {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media only screen and (max-width: 1150px) {
  /*ADDED for 2 buttons, wider menu*/
  nav#main {
    padding: 8px 14px;
  }
}

@media only screen and (max-width: 1076px) {
  /* was 1100 for 1 button*/
  /** MOBILE MENU BREAKPOINT! **/
  nav#main {
    background-color: transparent;
    padding: 15px;
    height: auto;
    font-size: 1.2rem;
  }
  nav div#nav-wrapper {
    grid-template-columns: 100%;
  }
  nav div#nav-logo {
    width: 100%;
    text-align: left;
    border: none;
    padding: 0; /* was 20px 0, looks more like figma*/
    cursor: pointer;
  }
  nav ul#top {
    background-color: White;
    width: 100%;
    padding: 0;
    display: none;
  }
  nav ul#top.mobile-open,
  nav ul.submenu.mobile-open,
  nav#main.mobile-open {
    display: block;
    background-color: var(--cream);
    box-shadow: none;
  }
  nav#main.mobile-open div#nav-logo a {
    pointer-events: none;
  }
  nav#main.mobile-open div#nav-logo svg {
    color: Black;
  }
  nav ul#top > li {
    width: 100%;
    display: block;
    text-align: left;
    padding: 16px 0px;
    font-size: 1.4rem;
    border-top: 1px solid #c4c4c4;
  }
  nav ul#top > li a.dropdown:active {
    pointer-events: auto;
  }

  nav ul#top > li a.dropdown svg {
    display: block;
  }
  nav ul#top > li.active-header > a {
    border-bottom: 0;
    padding-bottom: 0 !important;
  }
  nav ul#top > li:nth-last-child(2) {
    border-bottom: 1px solid #c4c4c4;
  }
  nav ul#top li.report-button {
    margin-left: 0;
    text-align: center;
    margin-top: 32px;
    padding: 16px;
    margin-bottom: 16px;
    border-top: 0;
    font-size: 24px;
  }
  nav ul#top li.login-button {
    margin-left: 0;
    text-align: center;
    padding: 16px;
    border-top: 0;
    margin-bottom: 32px;
    font-size: 24px;
  }
  nav ul#top li a:hover {
    border-bottom: 0px;
    padding-bottom: 9px;
  }
  nav ul li ul.submenu {
    position: static;
    padding: 0;
    background-color: White;
    display: none;
  }
  nav ul#top li > ul.submenu > li {
    font-size: 1.1rem;
    padding: 12px 0 12px 16px;
  }
  #hamburger {
    display: block;
  }
}

/** POP-UP BANNER **/

div#pop-banner {
    width: 100%;
    background-color: var(--yellow);
    padding: 18px;
    text-align: center;
    box-sizing: border-box;
}

div#pop-banner p {
    margin: 0;
    line-height: inherit;
    color: Black;
    font-size: 17px;
    em {
        font-style:normal;
        text-decoration:underline;
    }
}


/** FOOTER/NAV **/

div#footer {
  width: 100%;
  box-sizing: border-box;
  background-color: Black;
  color: White;
  padding: 6%;
}

div#footer-wrapper {
  display: grid;
  grid-template-columns: 75% 25%;
}

div#footer-columns {
  display: grid;
  grid-template-columns: 25% 25% 25% 25%;
}

div#footer-right {
  display: inline-block;
}

div#footer p {
  color: White;
}

div#footer p.small {
  color: White;
}

div#footer p a, div#footer a {
    color: White;
    text-decoration: none;
}

div#footer a:hover {
    text-decoration: underline;
}

div#footer img.social-foot {
    width: 20px;
    vertical-align: top;
    margin-right: 3px;
}

/** MOBILE FOOTER **/

@media only screen and (max-width: 900px) {
  div#footer-wrapper {
    grid-template-columns: 100%;
  }

  div#footer-columns {
    grid-template-columns: 50% 50%;
    grid-row-gap: 25px;
  }
  div#footer-columns h5 {
    margin-bottom: 1rem;
  }
}

/* Page structure */
html {
  font-size: 16px;
}
body {
  font-family: var(--page-font);
  background-color: White;
  margin: 0;
}

/* Typography */
p {
  margin: 0 0 1rem 0;
  line-height: 1.45 !important;
  font-size: 1rem;
  color: var(--light-grey-text); /*MAB: revisit? everywhere?*/
}
h1,
h2,
h3,
h4,
h5 {
  margin: 2rem 0 1rem;
  line-height: 1.1;
}
h1 {
  font-size: 2.25rem;
  margin-top: 1rem;
  margin-bottom: 1.75rem;
  font-weight: 600;
}
h2 {
  font-family: var(--courier);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}
h3 {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.5;
}
h3.center-title {
  /*how it works, etc. */
  margin-top: 60px;
  margin-bottom: 60px;
  text-align: center;
}
h3.center-title.top {
  margin-top: -50px;
}
h3.quote {
  margin: auto;
  text-align: center;
  max-width: 80%;
  line-height: 1.2em;
  margin-top: 100px;
}
h4 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin-top: 0;
  margin-bottom: 0.5rem;
}
h5 {
  font-size: 1.2rem;
  margin-top: 0;
}
small,
p.small {
  font-size: 0.85rem;
  color: var(--light-grey-text);
}

p.grey {
  color: var(--light-grey-text);
}

p.black {
  color: Black;
}

p.subtitle {
  color: Black;
}

div.content a, p a {
  text-decoration: underline;
  color: Black;
}

a {
    color: Black;
}

@media only screen and (max-width: 800px) {
  h3 {
    line-height: 1.2;
    margin-bottom: 20px;
    font-size: 1.4rem;
  }
  h3.center-title {
    margin-top: 40px;
    margin-bottom: 40px;
  }
  h3.center-title.top {
    margin-top: 30px;
    margin-bottom: 60px;
  }
  /*div.grid {
    grid-template-columns: 1fr;
    grid-row gap: 1.25rem;
  }*/ /* MAB could find a way to make this more global ... */
}

/* BUTTONS */
button {
  height: 48px;
  padding: 8px 16px;
  display: inline-block;
  border-radius: 8px;
  border: 1px solid Black;
  font-family: var(--page-font);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 5px;
  margin-right: 8px;
  background-color: transparent;
  color: Black;
}

button.yellow {
  background-color: var(--yellow);
  color: Black;
}

button.black {
  background-color: Black;
  color: White;
}

button.white {
  background-color: White;
  color: Black;
}

/* BANNERS */

div.top-banner {
  width: 100%;
  height: 50vh;
  min-height: 450px;
  display: table;
  padding-top: 80px;
  box-sizing: border-box;
  overflow: hidden;
}

div.top-banner.fill-image {
    height: auto;
    min-height: revert;
}

div.banner-wrapper {
  display: table-cell;
  vertical-align: middle;
}

div.banner-content {
  text-align: center;
  width: 50%;
  margin: auto;
}

div.banner-wrapper.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 50vh;
}


div.top-banner.fill-image div.banner-wrapper.split {
    height: auto;
}

div.banner-split-text {
  padding: 12%;
  box-sizing: border-box;
}

div.banner-split-text p.subtitle {
  font-weight: 500;
  font-size: 1.2rem;
}
div.banner-full {
  padding: 6% 12%;
  box-sizing: border-box;
  width: 100%;
  text-align: center;
}

img.baseline-banner {
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* rich-text banners */
div.banner-content h2.richtext-banner p {
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

@media only screen and (max-width: 800px) {
  div.top-banner {
    height: auto;
    min-height: unset;
    padding-top: 120px;
    padding-bottom: 80px;
  }
  div.top-banner.fill-image {
      padding-bottom: 0;
  }
  div.banner-wrapper.split {
    grid-template-columns: 1fr;
    height: auto;
  }
  div.banner-split-text {
    padding: 20px;
    text-align: center;
  }
  div.banner-split-text h2 {
    width: 100%;
  }
}

/* PAGE LAYOUTS */

div.content {
  width: 100%;
  padding: 6% 12%;
  box-sizing: border-box;
  /*large monitors ?*/
  /* then deal with different bg*/
  /*or do with padding, below ...
  /*max-width: 1550px;
  margin: auto;*/
}

div div.half-wide {
  max-width: 70%;
  margin: auto;
  text-align: center;
}

div.page-content-50-50 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 50px;
}

div.center-stage {
  width: 65%;
  min-width: 600px;
  margin: auto;
  overflow: hidden;
}

@media only screen and (min-width: 1650px) {
  div.content,
  div.banner-full {
    padding: 6% 18%;
  }
}
@media only screen and (max-width: 1100px) {
  div.banner-content {
    width: 80%;
  }
  div.bg-cream div.page-content-50-50 {
      grid-template-columns: 1fr;
      grid-row-gap: 20px;
  }
}

@media only screen and (max-width: 800px) {
  div.content {
    padding: 20px;
  }
  div.banner-full {
    padding: 20px;
  }
  div.banner-full.bg-orange.last-banner {
      /*padding: 10% 18% 15% 18%;*/
      padding: 18% 3%;
  }
  div div.half-wide {
    max-width: 100%;
  }
  div.page-content-50-50 {
    grid-template-columns: 1fr;
    grid-row-gap: 20px;
  }
  div.center-stage {
    width: 100%;
    min-width: unset;
    height: auto;
  }
}

/* COMPONENTS */

/* 50-50 image/text, blocks50 template */
div.blocks-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 40px;
  grid-row-gap: 60px;
  margin-bottom: 60px;
}

div.blocks-wrapper div.block {
  padding: 5%;
  padding-top: 0;
}

div.blocks-wrapper div.block.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left;
}

/* default: text first, alternates each row */
div.blocks-wrapper:nth-of-type(even) div.block.image {
  order: 1;
}
div.blocks-wrapper:nth-of-type(even) div.block {
  order: 2;
}

/* if component labeled image-first */
div.blocks-wrapper.image-first:nth-of-type(odd) div.block.image {
  order: 1;
}
div.blocks-wrapper.image-first:nth-of-type(odd) div.block {
  order: 2;
}

div.blocks-wrapper.image-first:nth-of-type(even) div.block.image {
  order: 2;
}
div.blocks-wrapper.image-first:nth-of-type(even) div.block {
  order: 1;
}

/* blocks with icon/infographics, blocks-icons template */
div.blocks-icons-wrapper {
  display: grid;
  grid-template-columns: 33% auto;
  grid-column-gap: 20px;
  grid-row-gap: 20px;
  margin-bottom: 40px;
}

div.blocks-icons-wrapper h4 {
  margin-top: 1rem;
  margin-bottom: 12px;
}

/* FAQ blocks */

div.question {
  border-top: 2px solid #d9d9d9;
  padding: 30px 0 20px 0;
  width: 100%;
}
div.question h4 {
    cursor: pointer;
}

div.question svg {
  float: right;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

div.faq-answer {
  display: none;
  column-count: 2;
  margin-top: 1.25rem;
}

/* 3 stats */
div.three-stats {
  display: grid;
  padding: 40px;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
  margin-top: 60px;
  margin-bottom: 60px;
}

div.three-stats div.stat {
  border-right: 1px solid Black;
  padding: 40px;
}

div.three-stats div.stat:first-child {
  padding-left: 0px;
}

div.three-stats div.stat:last-child {
  padding-right: 0px;
  border-right: 0;
}

div.three-stats div.stat h1 {
  font-size: 2.5rem;
}

div.three-stats div.stat p {
  max-width: 80%;
  margin: auto;
}

/* 2 stats */

div.two-stats {
  display: grid;
  padding: 40px;
  grid-template-columns: 1fr 1fr;
  text-align: center;
  margin-top: 60px;
  margin-bottom: 60px;
  width: 100%;
  box-sizing: border-box;
}

div.two-stats div.stat {
  border-right: 1px solid Black;
  padding: 30px;
  box-sizing: border-box;
}

div.two-stats div.stat:last-child {
  border-right: 0;
}

span.tag {
  border: 1px solid Black;
  border-radius: 1.25rem;
  padding: 6px 8px 4px 8px;
  margin-right: 6px;
  font-size: 0.8rem;
}

/* article collection */

div.article-collection {
  margin-top: 60px;
}
div.article-item {
  margin-bottom: 60px;
}
div.article-summary {
  display: table;
}
div.article-summary > div {
  display: table-cell;
  vertical-align: middle;
}
div.article-summary div.article-tags {
  margin-bottom: 20px;
}
div.article-summary h4 {
  font-size: 1.5rem;
  line-height: 2.2rem;
}

/* press collection */
div.press-item {
  display: grid;
  grid-template-columns: 1fr 3fr;
  grid-column-gap: 20px;
  margin-bottom: 20px;
}
div.press-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
div.press-summary-wrap {
    display: table;
}
div.press-summary {
    display: table-cell;
    vertical-align: middle;
    padding: 1.25rem 0.5rem;
}
a.press-link {
  color: Black;
  text-decoration: underline;
}

/* report cards */

div.report-card {
  /*height: 22vw;*/
  min-height: 350px;
  display: grid;
  grid-template-rows: 60px auto;
}
div.report-card div {
  padding: 20px;
}
div.report-card div:first-child {
  border-bottom: 1px solid Black;
}

/* funder grid */

div.funder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-column-gap: 1rem;
  grid-row-gap: 1rem;
  margin-bottom: 60px;
}
div.funder-grid div {
  height: 150px; /*MAB was 100px*/
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  align-items: center;
}

div.funder-grid div img {
    width: 100%;
    height: 100%;
    object-fit:contain;
    /*max-width: 200px;*/
    margin: auto;
}

/* tablet components */

@media only screen and (min-width: 801px) and (max-width: 1200px) {
    div.blocks-wrapper {
      grid-column-gap: 10px;
    }
    div.blocks-icons-wrapper h4 {
      margin-top: initial;
      line-height: initial;
    }
}

/* mobile components */
@media only screen and (max-width: 800px) {
  div.blocks-wrapper {
    grid-template-columns: 1fr;
    grid-row-gap: 10px;
    margin-bottom: 10px;
  }
  div.blocks-wrapper div.block.image {
    order: 1;
  }
  div.blocks-wrapper div.block {
    padding-left: 0;
    padding-right: 0;
    order: 2;
  }
  div.blocks-wrapper.image-first div.block.image {
    order: 1 !important;
  }
  div.blocks-wrapper.image-first div.block {
    order: 2 !important;
  }
  div.blocks-icons-wrapper {
    grid-template-columns: 1fr;
  }
  div.faq-container h4 {
    max-width: 80%;
  }
  div.faq-answer {
    column-count: 1;
  }
  div.three-stats {
    grid-template-columns: 1fr;
  }
  div.three-stats div.stat {
    border-right: 0;
    border-bottom: 1px solid Black;
    padding: 40px;
  }
  div.three-stats div.stat:first-child {
    padding-top: 0;
    padding-left: 40px;
  }

  div.three-stats div.stat:last-child {
    padding-left: 0px;
    border-bottom: 0;
  }
  div.two-stats {
    grid-template-columns: 1fr;
    padding: 30px 10px 30px 10px;
  }
  div.two-stats div.stat {
    border-right: 0;
    border-bottom: 1px solid Black;
    padding: 30px 10px 30px 10px;
    grid-template-columns: 1fr;
  }
  div.two-stats div.stat:last-child {
    border-bottom: 0;
  }
  div.article-item {
    margin-bottom: 20px;
  }
  div.press-item {
    grid-template-columns: 1fr;
    grid-row-gap: 20px;
  }
  div.card-wrapper {
    display: block;
    padding-left: 0;
  }
  div.report-card {
    margin: auto;
  }
  div.funder-grid {
    grid-template-columns: 1fr 1fr;
  }
}
