/*
Theme Name: South Pacific for Christ
Author: Brett Donald
*/

@font-face {
    font-family: 'Blenda Script';
    src: url('font/blenda-script.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
:root {
  --clr-adventist-fire: #ff8200;
  --clr-dark-blue: #2b556a;
  --clr-light-grey: #efefef;
  --content-width-limit: 1200px;
  --side-margin-width: 5vw;
  --tra-short: 250ms;
  font-size: 16px;
  scroll-behavior: smooth;
}

body, input, select, textarea, button {
  font-family: Poppins, sans-serif;
  font-size: 16px;
}

body {
  margin: 0;
}

section {
  padding: 2em max(var(--side-margin-width), calc((100vw - var(--content-width-limit)) / 2));
}

.rounded {
  border-radius: 1.5em;
}

.continue {
  color: #888;
  font-style: italic;
}

.card {
  margin-left: -1em;
  margin-right: -1em;
  padding: 1em;
  display: grid;
  gap: 0 1em;
  align-items: center;
  @media (min-width: 740px) {
    grid-template-columns: 1fr 2fr;
    border-radius: 0.25em;
  }
  position: relative;
  transition: var(--tra-short);
  &:hover {
    background: var(--clr-light-grey);
  }
  .image {
    width: 100%;
    height: 100%;
    min-height: 200px;
    @media (min-width: 1200px) {
      height: auto;
      aspect-ratio: 16/9;
    }
    position: relative;
    img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  /*
  img {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
  }
  */
  .title {
    margin-bottom: 0;
    a {
      color: inherit;
      text-decoration: none;
      &::before {                       /* style the link to cover the whole card — refer to this SO answer: https://stackoverflow.com/a/61714604/2518285 */
        content: '';
        position: absolute;
        inset: 0;
      }
    }
  }
  .date {
    font-size: 0.75em;
    font-style: italic;
    color: #888;
  }
  p a, .wp-block-button__link {
    position: relative;
    z-index: 1;
  }
}

img.featured {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

button, .button, .wpcf7-submit {
  display: inline-block;
  background: var(--clr-adventist-fire);
  color: white;
  border: 0;
  border-radius: 6px;
  padding: 0.4em 1.5em;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--tra-short);
  &:hover {background: #e6a800;}
}

.archive-nav .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #888;
  .page-numbers {
    padding: 4px 5px;
  }
  .current {
    color: red;
  }
  a {
    border-radius: 4px;
    transition: var(--tra-short);
    &:hover {
      color: white;
      background: red;
    }
  }
  .prev, .next {
    font-size: 24px;
    padding: 1px 6px 0; 
    border-radius: 50%;
  }
  .prev {margin-right: 0.5em;}
  .next {margin-left: 0.5em;}
}

/* contact form 7 */

.wpcf7 form {
  width: 600px;
  max-width: 100%;
  margin: 0 auto;
}

.wpcf7 label {
  color: rgb(255 255 255 / 0.75);
}

input[type=text], input[type=email], select, textarea {
  border: 1px solid rgb(0 0 0 / 0.2);
  padding: 3px 10px;
  border-radius: 6px;
  background: white;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  margin-top: 0.25em;
}

input[type=text], input[type=email], select {
  width: 300px;
}

textarea {
  width: 600px;
}

select {
  appearance: none;
  cursor: pointer;
}

.wpcf7-turnstile > div {
  display: inline-block;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
}

/* contact form 7 messages */

.wpcf7 form .wpcf7-response-output {
  margin: 2em 0 1em;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1em;
}
.wpcf7 form.init .wpcf7-response-output {
  display: none;
}
.wpcf7 form.sent .wpcf7-response-output {
  border: 0;
}
.wpcf7 form.sent .wpcf7-response-output::before {
  content: ' ';
  background-image: url(img/icon-ok.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 3em;
  height: 3em;
}
.wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.aborted .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output {
  border: 0;
}
.wpcf7 form.failed .wpcf7-response-output::before, .wpcf7 form.aborted .wpcf7-response-output::before, .wpcf7 form.spam .wpcf7-response-output::before {
  content: ' ';
  background-image: url(img/icon-error.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 3em;
  height: 3em;
}
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output {
  border: 0;
}
.wpcf7 form.invalid .wpcf7-response-output::before, .wpcf7 form.unaccepted .wpcf7-response-output::before {
  content: ' ';
  background-image: url(img/icon-warn.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 3em;
  height: 3em;
}
.wpcf7-not-valid-tip {
  color: #e6a800;
  margin-top: 2px;
}

/* layout */

header {
  background: black;
  color: white;
  padding: 1em 2em;
  display: flex;
  justify-content: space-between;
  a {
    color: inherit;
    text-decoration: none;
  }
}

/* single post page */

.single {
  .title {
    margin: 0;
    line-height: 1.2;
  }
  .date {
    margin: 0.25em 0 0.75em;
    font-size: 0.8em;
    font-style: italic;
    color: #888;
  }
}

/* home page */

.intro {
  background-image: url(img/banner.webp);
  background-size: cover;
  background-position: 80% 20%;
  color: white;
  padding-top: 5em;
  padding-bottom: 5em;
  display: flex;
  flex-direction: column;
  gap: 1em;
  h1 {
    img {
      width: clamp(60%, calc(100% * -2 / 5 + 550px), 100%);
    }
  }
  p {
    margin: 0 0 0 5vw;
    font-family: 'Blenda Script';
    font-size: clamp(24px, 2.5vw, 35px);
    width: clamp(60%, calc(100% * -2 / 5 + 550px), 100%);
    text-wrap: balance;
  }
}
.about {
  display: grid;
  gap: 2em;
  @media (min-width: 740px) {
    grid-template-columns: 8fr 5fr;
  }
  figure {
    margin: 0;
    position: relative;
    width: 100%;
    height: 100%;
    img {
      position: absolute;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center 20%;
    }
  }
}
.journey {
  background-color: #f2f2f2;
  padding-bottom: 0;
  @media (min-width: 740px) {
    padding-top: 0;
    padding-left: 0;
    background-image: linear-gradient(90deg,rgba(232, 232, 232, 1) 0%, rgba(255, 255, 255, 1) 50%);
  }
  display: grid;
  @media (min-width: 740px) {
    grid-template-columns: 1fr 1fr;
  }
  @media (min-width: 1000px) {
    grid-template-columns: 3fr 5fr;
  }
  @media (min-width: 1500px) {
    grid-template-columns: 1fr 1fr;
  }
  gap: 2em;
  > :first-child {
    grid-column: 1;
    grid-row: 2;
    @media (min-width: 740px) {
      grid-column: initial;
      grid-row: initial;
    }
    position: relative;
    img {
      width: 80%;
      display: block;
      margin: 0 auto;
      @media (min-width: 740px) {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 53% bottom;
      }
      @media (min-width: 1500px) {
        object-fit: contain;
        object-position: right bottom;
      }
    }
    > div {
      position: absolute;
      background: var(--clr-adventist-fire);
      padding: 0.5em 0 0.5em 1em;
      color: white;
      bottom: 0;
      width: 12.5em;
      left: 50%;
      transform: translateX(-50%);
      @media (min-width: 1600px) {
        left: initial;
        transform: initial;
        right: 100px;
      }
      p {
        margin: 0;
        line-height: 1.2;
        &:first-child {font-weight: bold;}
        &:last-child {font-size: 0.75em; font-style: italic;}
      }
    }
  }
  > :last-child {
    @media (min-width: 740px) {
      padding-top: 2em;
      padding-bottom: 2em;
    }
  }
}
.the-movement {
  padding-top: 3em;
  text-align: center;
  .inner {
    background: var(--clr-light-grey);
    padding: 2em;
    > :first-child {margin-top: 0;}
    > :last-child {margin-bottom: 0;}
    h2 {
      color: var(--clr-adventist-fire);
      text-transform: uppercase;
      font-size: clamp(1.75em, 5vw, 2em);
      margin-bottom: 0;
      line-height: 1;
    }
    h3 {
      color: var(--clr-dark-blue);
      font-family: 'Blenda Script';
      font-weight: normal;
      font-size: clamp(24px, 2.5vw, 35px);
      margin: 0.4em 0 0.75em;
    }
    p {
      margin: 0;
      text-wrap: balance;
      &:nth-last-child(2) {font-weight: 500;}
      &:last-child {font-style: italic; font-weight: 300;}
    }
  }
}
.get-involved {
  color: white;
  text-align: center;
  @media (max-width: 500px) {
    padding-left: 0;
    padding-right: 0;
  }
  > :first-child {
    padding: 1.5em 2em;
    background: var(--clr-adventist-fire);
    h2 {
      margin-top: 0;
      text-transform: uppercase;
      font-size: clamp(1.75em, 5vw, 2em);
    }
    .ways {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-evenly;
      align-items: start;
      gap: 2em;
      > div {
        flex: 1 1 0;
        min-width: 7em;
      }
      p {
        margin: 0;
        &:nth-last-child(2) {font-weight: bold; font-style: italic;}
        &:last-child {font-size: 0.75em; line-height: 1.3;}
      }
      figure {
        margin: 0 auto;
        width: 75px;
        aspect-ratio: 1;
        border-radius: 99em;
        background-color: white;
        background-repeat: no-repeat;
        background-size: 60%;
        background-position: center;
      }
    }
  }
  > :last-child {
    text-align: left;
    padding: 1em max(1em, 5vw);
    background: var(--clr-dark-blue);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    @media (min-width: 740px) {
      flex-wrap: nowrap;
      text-wrap: balance;
    }
    gap: 1em;
    align-items: center;
    > * {margin: 0;}
    button, .button {
      background: var(--clr-light-grey);
      color: var(--clr-dark-blue);
      padding: 0.2em 1.5em;
      white-space: nowrap;
      &:hover {background: white;}
      /*
      @media (max-width: 1000px) {display: block; width: fit-content; margin: 1em auto 0;}
      */
    }    
  }
}
.timeline-and-launch {
  display: grid;
  gap: 2em;
  @media (min-width: 1000px) {
    grid-template-columns: 3fr 8fr;
  }
  > :first-child {
    padding: 2em 1em;
    background-image: linear-gradient(180deg, rgb(0 0 0 / 0) 0%, rgb(0 0 0 / 0.3) 100%), url(img/beach.webp);
    background-size: cover;
    color: white;
    text-align: center;
    font-weight: bold;
    h2 {
      font-family: 'Blenda Script';
      font-size: 3em;
      font-weight: normal;
      margin-top: 0;
    }
    h4 {
      background-color: var(--clr-adventist-fire);
      font-size: 1.25em;
      margin: 0 auto;
      width: 10em;
    }
    > :last-child {margin-bottom: 0;}
  }
  > :last-child {
    h2 {
      color: var(--clr-adventist-fire);
      text-transform: uppercase;
      font-size: clamp(1.75em, 5vw, 2em);
      & + h4 {
        font-weight: 600;
        font-size: 1.1em;
        color: var(--clr-dark-blue);
      }
    }
    .presenters-h4 {
      color: var(--clr-adventist-fire);
      text-align: center;
      text-transform: uppercase;
    }
    .presenters {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: start;
      gap: 1em;
      > * {
        min-width: 12em;
        text-align: center;
      }
      p {
        margin: 0;
        &:nth-last-child(2) {font-weight: 500; margin-top: 0.25em;}
        &:last-child {font-size: 0.75em; line-height: 1.3;}
      }
    }
    figure {
      width: 140px;
      aspect-ratio: 1;
      border-radius: 99em;
      margin: 0 auto;
    }
    .soon {
      margin-top: 2em;
      margin-bottom: 0;
      color: var(--clr-adventist-fire);
      font-style: italic;
      font-weight: 500;
      text-transform: uppercase;
    }
  }
}
.news {
  h2 {
    color: var(--clr-adventist-fire);
    text-transform: uppercase;
    font-size: clamp(1.75em, 5vw, 2em);
  }
}
.contact {
  background-color: var(--clr-dark-blue);
  color: white;
  min-height: 200px;
  h2 {
    color: var(--clr-adventist-fire);
    text-transform: uppercase;
    font-size: clamp(1.75em, 5vw, 2em);
    text-align: center;
  }
  h2 + p {
    text-align: center;
    text-wrap: balance;
  }
}
.text-center {text-align: center;}
.mt0 {margin-top: 0;}
.mb0 {margin-bottom: 0;}
.full-width-on-mobile {
  @media (max-width: 500px) {
    margin-left: min(calc(var(--side-margin-width) * -1), calc((100vw - var(--content-width-limit)) / -2));    
    margin-right: min(calc(var(--side-margin-width) * -1), calc((100vw - var(--content-width-limit)) / -2));    
  }
}
