/*
Generic components that can be used in each page.
Includes:
  - Header text
  - Paragraph text
  - Buttons n stuff
  - More complicated repeated components (eg. grids of cards)
*/
/* Headers */
h1,
h2 {
  font-family: var(--font-serif);
  font-size: var(--header-font-size);
  line-height: var(--header-line-height);
  margin: 0 0 1rem 0;
}

@media (max-width: 1300px) {
  h2 {
    margin: 0 0 0.5rem 0;
  }
}

/* Paragraph / normal sized text */
p {
  margin: 0 0 1rem 0;
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  letter-spacing: 0.05em;
  color: var(--dark-4);
}
li {
  letter-spacing: 0.05em;
  line-height: var(--body-line-height);
}
p.light,
li.light {
  color: var(--dark-6);
}
p.compact {
  margin: 0;
}
.line-compact {
  line-height: 1.3;
}
p.header {
  font-weight: bold;
  font-size: var(--header-mini-font-size);
  color: var(--dark-1);
}

/* Horizontal divider */
.divider {
  width: 134px;
  height: 0px;
  border-top: 1px solid #000000;
  margin: 0 auto 75px auto;
}
@media (max-width: 1300px) {
  .divider {
    width: 76px;
    margin: 0 auto 35px auto;
  }
}

/* Desktop/mobile only line breaks */
.mobile-break {
  display: none;
}
@media (max-width: 1300px) {
  .desktop-break {
    display: none;
  }
}
@media (max-width: 600px) {
  .mobile-break {
    display: unset;
  }
}

/* Buttons */
button {
  color: var(--white);
  background: var(--blue);
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 60px;
  font-size: var(--body-font-size);
  font-family: var(--font-sans-alt-2) !important;
  border: none;
  border-radius: 29px;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0px 4px 4px rgba(67, 143, 239, 0.18);
}
@media (max-width: 600px) {
  button {
    margin: 0 auto;
    width: 270px;
    max-width: 100%;
    padding: 14px 30px;
  }
}
button.inverted {
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--blue);
}

/*
White or gold segment of page
Has vertical padding only
*/
.segment {
  padding: 75px 0 125px 0;
  text-align: center;
}
.segment.gold {
  background-color: var(--gold-light);
}
@media (max-width: 600px) {
  .segment {
    padding: 42px 0 75px 0;
  }
}

/* 
Horizontal container
Has horizontal padding only
*/
.container {
  max-width: var(--container-max-width);
  width: calc(100vw - 2 * var(--container-padding));
  margin: 0 auto;
}
.container.article {
  max-width: var(--container-article-max-width);
}

.container.wide {
  width: calc(100vw - 2 * var(--container-wide-padding));
}

/* 
Border radius on things
Eg. "round-large top-right bottom-left"
*/
.round-small.top-right {
  border-top-right-radius: calc(60px * var(--radius-multiplier));
}
.round-small.top-left {
  border-top-left-radius: calc(60px * var(--radius-multiplier));
}
.round-small.bottom-right {
  border-bottom-right-radius: calc(60px * var(--radius-multiplier));
}
.round-small.bottom-left {
  border-bottom-left-radius: calc(60px * var(--radius-multiplier));
}

.round.top-right {
  border-top-right-radius: calc(120px * var(--radius-multiplier));
}
.round.top-left {
  border-top-left-radius: calc(120px * var(--radius-multiplier));
}
.round.bottom-right {
  border-bottom-right-radius: calc(120px * var(--radius-multiplier));
}
.round.bottom-left {
  border-bottom-left-radius: calc(120px * var(--radius-multiplier));
}
.round.not-responsive.top-right {
  border-top-right-radius: calc(120px);
}
.round.not-responsive.top-left {
  border-top-left-radius: calc(120px);
}
.round.not-responsive.bottom-right {
  border-bottom-right-radius: calc(120px);
}
.round.not-responsive.bottom-left {
  border-bottom-left-radius: calc(120px);
}

.round-large.top-right {
  border-top-right-radius: calc(240px * var(--radius-multiplier));
}
.round-large.top-left {
  border-top-left-radius: calc(240px * var(--radius-multiplier));
}
.round-large.bottom-right {
  border-bottom-right-radius: calc(240px * var(--radius-multiplier));
}
.round-large.bottom-left {
  border-bottom-left-radius: calc(240px * var(--radius-multiplier));
}

/* Little blue ball that goes ontop of images */
.blue-ball {
  position: relative;
}
.blue-ball:before {
  content: "";
  position: absolute;
  top: -41px;
  left: 23%;
  width: 82px;
  height: 82px;
  background: var(--blue);
  border-radius: 50%;
}
.blue-ball.right:before {
  left: 66%;
}
@media (max-width: 1300px) {
  .blue-ball:before {
    width: 41px;
    height: 41px;
    top: -20.5px;
  }
}

/*
Grid of cards
Used for grids of images or icons.
Each image/icon can have some descriptive test below it.
*/
.card-grid {
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 70px 140px;
}
.card-grid.tight {
  gap: 70px 100px;
}
.card-grid .card {
  max-width: 344px;
}
.card-grid .card.tight {
  max-width: 280px;
}
.card-grid .card img {
  max-width: 100%;
  margin-bottom: 30px;
  width: 100%;
  max-height: 229.33px;
  object-fit: cover;
  filter: saturate(0.8);
}
.card-grid .card img.icon {
  width: unset;
  height: 70px;
}
.card-grid .card img.headshot {
  max-height: unset;
}
.card-grid .card img.headshot.grey {
  filter: grayscale(0.4);
}

.card-grid .card .metric {
  font-family: var(--font-sans-alt-2);
  color: var(--blue-dark);
  margin-bottom: 27px;
  font-size: 50px;
  font-weight: 700;
}
.card-grid .card .metric-text {
  color: var(--dark-0);
  font-size: 22px;
  font-weight: 600;
}
.card-grid .card .header {
  margin-bottom: 6px;
}

@media (max-width: 1300px) {
  .card-grid {
    gap: 50px 70px;
  }
  .card-grid .card .header {
    margin-top: 6px;
    margin-bottom: 6px;
  }
  .card-grid .card .metric {
    margin-bottom: 5px;
    font-size: 35px;
  }
  .card-grid .card .metric-text {
    font-size: var(--body-font-size);
  }
}
@media (max-width: 600px) {
  .card-grid .card {
    max-width: 100%;
  }
  .card-grid .card img {
    width: calc(100vw - 2 * var(--container-padding));
    max-height: 130px;
    object-fit: cover;
    margin-bottom: 6px;
  }
  .card-grid .card img.icon {
    width: 50px;
    height: 50px;
    object-fit: cover;
  }
}

/* Blog card */
.card-grid .card.blog img {
  height: 273px;
  margin-bottom: 24px;
  box-shadow: 0px 4px 41px rgba(0, 55, 123, 0.15);
}

/* Profile card  */
.card-grid .card.profile {
  text-align: left;
  color: var(--dark-4);
  background: var(--white);
}
.card-grid .card.profile.blue {
  background: var(--blue-light);
}
.card-grid .card.profile .content {
  padding: 5px 33px 33px 33px;
}
.card-grid .card.profile .content p {
  font-size: 0.8rem;
}

.card-grid .card.profile .content .name {
  font-size: var(--header-mini-font-size);
  color: var(--dark-1);
  margin-bottom: 0px;
  font-weight: 700;
}
.card-grid .card.profile .content .title {
  font-size: calc(0.9 * var(--body-font-size));
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark-6);
  line-height: 1.2;
}
.card-grid .card.profile .content ul {
  padding-left: 18px;
  margin: 0;
}
.card-grid .card.profile .content ul li + li {
  margin-top: 10px;
}
@media (max-width: 1300px) {
  .card-grid .card.profile .content {
    padding: 5px 21px 33px 21px;
  }
}
@media (max-width: 600px) {
  .card-grid .card.profile .content p {
    font-size: 1rem;
  }

  .card-grid .card.profile img {
    max-height: unset;
  }
}

/* 
Story sections
A story has a big image on one side, and some content on the other.
*/
.story {
  display: flex;
  text-align: left;
}
.story img {
  width: 594px;
  object-fit: cover;
}
.story.right img {
  margin-right: 75px;
}
.story.left img {
  margin-left: 75px;
}
.story.right .content,
.story.left .content {
  padding-top: 32px;
}
.story.center .content {
  padding: 63px 44px 0 44px;
}
.story.center {
  flex-direction: column;
  align-items: center;
}
.story.center img {
  width: 100%;
}

@media (max-width: 1300px) {
  .story {
    flex-direction: column;
    align-items: center;
  }
  .story.left {
    flex-direction: column-reverse;
  }
  .story.right img,
  .story.left img {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }
  .story.center .content {
    padding: 32px 0 0 0;
  }
}

/* 
Hero story
Very similar to a story.
*/
.hero-story {
  width: 100vw;
  max-width: 100%;
  height: 635px;
  position: relative;
}
.hero-story.tall {
  margin: 60px 0 100px 0;
}

.hero-story .inner {
  position: absolute;
  display: flex;
  align-items: stretch;
  text-align: left;
  height: 100%;
  left: max(
    var(--container-wide-padding),
    calc((100vw - var(--container-max-width)) / 2)
  );
  right: 0;
  overflow: hidden;
}
.hero-story .inner img {
  object-fit: cover;
  flex-grow: 1;
}
.hero-story .inner .content {
  padding-right: 100px;
  align-self: center;
  min-width: 342px;
}
@media (max-width: 600px) {
  .hero-story {
    width: 100vw;
    height: unset;
  }
  .hero-story.tall {
    margin: 28px 0 20px 0;
  }

  .hero-story .inner {
    position: static;
    height: unset;
    flex-direction: column-reverse;
    align-items: center;
    width: 100vw;
  }
  .hero-story .inner .content {
    padding: var(--container-wide-padding);
  }
  .hero-story .inner img {
    width: 100%;
    border-top-left-radius: 0 !important;
  }
}

/*
A panel is a big yellow section of the page
with a image on one side and text on the other.
Very similar to a story.
Assumed to be in a wide container.
*/
.panel {
  width: min(calc(900px + 600px), calc(100vw - var(--container-wide-padding)));
  display: flex;
  align-items: stretch;
  text-align: left;
  margin-top: 30px;
  margin-bottom: 85px;
  background: var(--gold-light);

  --content-width: 700px;
}
.panel.left {
  justify-content: flex-start;
}
.panel.right {
  margin-left: auto;
  justify-content: flex-end;
}
.panel h2 {
  font-size: 38px;
  color: var(--dark-0);
  font-weight: 600;
  line-height: 1;
}
.panel ul {
  padding-left: 25px;
}
.panel p,
.panel li {
  color: var(--dark-0);
}
.panel img {
  object-fit: cover;
  width: min(900px, calc(100% - var(--content-width)));
}
.panel .content {
  align-self: center;
  box-sizing: border-box;
  width: var(--content-width);
  padding: 80px 100px 80px 100px;
}
@media (max-width: 1300px) {
  .panel .content {
    padding: 75px 75px 75px 75px;
  }
}
@media (max-width: 600px) {
  .panel .content {
    padding: var(--container-wide-padding);
    width: 100%;
  }
  .panel-container {
    width: 100vw;
    height: unset;
    margin-top: 0;
    margin-bottom: 0px;
  }
  .panel-container + .panel-container {
    margin-top: 35px;
  }
  .panel h2 {
    font-size: 28px;
    line-height: 1.2;
  }
  .panel.left,
  .panel.right {
    position: static;
    height: unset;
    flex-direction: column;
    align-items: center;
    width: 100vw;
  }
  .panel.left {
    flex-direction: column-reverse;
  }
  .panel.right img,
  .panel.left img {
    max-height: 300px;
    width: 100%;
  }
}

/* Big text section */
.brag {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  padding: 200px 0;
}
.brag.short {
  padding: 120px 0;
}
.brag.gold {
  background: var(--gold-light);
}
.brag p {
  color: var(--dark-0);
}
.brag .divider {
  margin: 0;
}
.brag .callout {
  color: var(--blue);
}
@media (max-width: 1300px) {
  .brag,
  .brag.short {
    padding: 62px 12px;
  }
}

/* Message to a user */
.message {
  padding: 20px;
  border-radius: 14px;
  line-height: 100%;
  margin-top: 20px;
  color: var(--gold);
  font-weight: bold;
  background: var(--gold-light);
  border: 2px solid var(--gold);
}

/* Checkbox form input */
.checkbox {
  display: block;
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  user-select: none;
  line-height: var(--body-line-height);
  font-size: var(--body-font-size);
  letter-spacing: 0.05em;
  color: var(--dark-4);
}
.checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.checkmark {
  position: absolute;
  margin-top: 5px;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  border: 1.5px solid var(--dark-6);
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
.checkbox input:checked ~ .checkmark:after {
  display: block;
}
.checkbox .checkmark:after {
  left: 6px;
  top: -13px;
  width: 8px;
  height: 22px;
  border: solid var(--blue);
  border-width: 0 7px 7px 0;
  transform: rotate(45deg);
}

/* Link list */
.link-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  gap: 52px;
}
.link-list .card {
  width: 100%;
  background: var(--white);
  box-shadow: 0px 4px 41px rgba(0, 55, 123, 0.15);
  border-radius: 22px;
  padding: 55px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.link-list.two .card {
  max-width: 594px;
}
.link-list.three .card {
  max-width: 378px;
}
.link-list .card img {
  width: 70px;
  height: 70px;
  margin-bottom: 25px;
}

.link-list .card a {
  margin-top: auto;
}
.link-list .card button {
  margin: auto auto 0 auto;
}

.link-list .card h2 {
  font-weight: 600;
  font-family: var(--font-sans-alt-2);
  letter-spacing: 0.05em;
  font-size: var(--header-mini-font-size);
  color: var(--dark-1);
  line-height: 1.3;
}

.link-list .card h2,
.link-list .card .header {
  margin-bottom: 30px;
}
.link-list .card h2 + p,
.link-list .card .header + p {
  margin-top: -20px;
}

@media (max-width: 1300px) {
  .link-list {
    grid-gap: 30px;
  }
  .link-list .card {
    padding: 46px 42px 56px 42px;
  }
  .link-list .card h2 {
    font-size: 25px;
  }

  .link-list .card h2,
  .link-list .card .header {
    margin-bottom: 20px;
  }
  .link-list .card h2 + p,
  .link-list .card .header + p {
    margin-top: -10px;
  }
  .link-list .card img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }
}
@media (max-width: 1300px) {
  .link-list .card h2 {
    font-size: var(--header-mini-font-size);
  }
}

/*
Grey block with an upwards curve that appears
before the final footer.
*/
.pre-footer {
  position: relative;
  background: var(--grey);
  padding-top: 180px;
}
.pre-footer:before {
  content: "";
  background: white;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 180px;
  border-radius: 0 0 0 25%/ 0 0 0 100%;
}

/* Hero containers */
.hero-gold {
  position: relative;
  background: var(--gold-light);
  padding: 90px 0 0 0;
}
.hero-gold::before {
  content: "";
  position: absolute;
  top: calc(-1 * var(--header-height-total));
  left: 0;
  right: 0;
  height: var(--header-height-total);
  background: var(--gold-light);
}
@media (max-width: 1300px) {
  .hero-gold {
    padding: 45px 0;
  }
}

/* A little gold bit sticking out  */
.hero-gold .external-radius.outer {
  z-index: -1;
  content: "";
  position: absolute;
  height: var(--hero-external-radius);
  width: var(--hero-external-radius);
  background: var(--gold-light);
  bottom: calc(-1 * var(--hero-external-radius));
  left: 0;
}
.hero-gold .external-radius.inner {
  z-index: -1;
  content: "";
  position: absolute;
  height: var(--hero-external-radius);
  width: var(--hero-external-radius);
  background: var(--white);
  top: 0;
  left: 0;
  border-top-left-radius: 100%;
}
@media (max-width: 1300px) {
  .hero-gold .external-radius.outer,
  .hero-gold .external-radius.inner {
    width: calc(0.66 * var(--hero-external-radius));
  }
}

/* A segment that can live inside hero-gold */
.hero-segment {
  padding: 25px 0 85px 0;
  text-align: center;
}
@media (max-width: 1300px) {
  .hero-segment {
    padding: 0;
  }
}

.article {
  --body-font-size: 18px;
  --body-line-height: 1.6;
}

/* Blog post articles */
.article .block-image img {
  max-width: 100% !important;
  height: unset;
  border-top-left-radius: calc(120px * var(--radius-multiplier));
  border-bottom-right-radius: calc(120px * var(--radius-multiplier));
  max-height: 550px;
  object-fit: cover;
  box-shadow: 0px 4px 41px rgba(0, 55, 123, 0.15);
}
.article .block-image {
  margin-bottom: 1.5rem;
}
.article .block-paragraph li {
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  letter-spacing: normal;
}

.article .block-paragraph,
.article .block-paragraph p {
  color: var(--dark-0) i !important;
  text-align: left;
  margin-bottom: 1.5rem;
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  letter-spacing: normal;
}
.article .block-paragraph p + ul {
  margin-top: -0.5rem;
}

/* zero width space */
.article .block-paragraph p:empty {
  display: none;
}
.article .block-paragraph p:last-child {
  margin: 0 !important;
}

.article.arabic .block-paragraph,
.article.arabic .block-paragraph li,
.article.arabic .block-paragraph p,
.article.arabic .block-paragraph p + ul,
.article.arabic .block-paragraph p:empty,
.article.arabic .block-paragraph p:last-child,
.article.arabic .block-paragraph h2,
.article.arabic .block-paragraph h3,
.article.arabic .block-heading {
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
}

.article .block-heading,
.article .block-paragraph h2 {
  text-align: left;
  margin: 3rem 0 0.8rem 0;
  line-height: 1.1;
  font-family: var(--font-serif);
  font-size: 40px;
}
.article .block-paragraph h3 {
  text-align: left;
  margin: 1.5rem 0 0.3rem 0;
  line-height: 1;
  font-size: var(--body-font-size);
  font-weight: bold;
  opacity: 0.85;
}

.article .block-quote,
.article .block-attributed_quote {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4rem 0;
}
.article .block-attributed_quote {
  flex-direction: column;
}

.article .block-quote blockquote,
.article .block-attributed_quote blockquote {
  margin: 0;
  text-align: center;
  font-family: var(--font-serif);
  line-height: 46px;
  font-size: 34px;
}
.article .block-quote::before,
.article .block-attributed_quote::before {
  content: "“";
  font-family: var(--font-serif);
  font-size: 96px;
  color: var(--blue);
  line-height: 46px;
  padding-right: 12px;
  vertical-align: bottom;
  transform: translateY(24px);
}

@media (max-width: 1300px) {
  .article {
    --body-font-size: 16px;
  }

  .article .block-heading {
    font-size: 30px;
  }
  .article .block-quote {
    flex-direction: column;
  }
  .article .block-quote blockquote,
  .article .block-attributed_quote blockquote {
    font-size: 26px;
    line-height: 32px;
  }
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem 5rem;
  max-width: 800px;
  margin: 0 auto;
}

.partner-logos img {
  object-fit: contain;
  max-width: 100%;
}
@media (max-width: 600px) {
  .partner-logos {
    gap: 5rem;
    flex-direction: column;
    align-items: center;
  }
}

/* Forms */

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

form button {
  align-self: baseline;
}

form input,
form select,
form textarea {
  width: 100%;
}
form input,
form select {
  line-height: var(--body-line-height);
  font-size: var(--body-font-size);
  border: none;
  outline: none;
  color: var(--dark-6);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--dark-6);
  padding: 8px 8px 8px 8px;
  background-color: var(--white);
}
form select {
  opacity: 0.8;
}

@media (max-width: 1300px) {
  form input,
  form select,
  form .checkbox {
    margin-bottom: 44px;
  }
}
@media (max-width: 800px) {
  form {
    width: calc(100vw);
    margin-left: calc(-1 * var(--container-padding));
    margin-right: calc(-1 * var(--container-padding));
    margin-bottom: -63px;
    padding: 50px 38px 48px 38px;
    z-index: 1;
  }
}
