/*** CSS Variables ***/
:root {
  /* Colors */
  --text-color: white;
  --primary-color: #19255A;
  --primary-color-rgb: 25, 37, 90;
  --secondary-color: #03CDE2;
  /* Font weights */
  --font-weight-normal: 400;
  --font-weight-bold: 700;
  /* Font family */
  --font-family-lato: 'Lato', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.2;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */
::-moz-selection {
  background: var(--secondary-color);
  text-shadow: none;
}

::selection {
  background: var(--secondary-color);
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */
hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */
audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */
textarea {
  resize: vertical;
}

/*
 * Hide visually and from screen readers
 */
.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */
.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */
.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */
.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */
.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   Custom styles.
   ========================================================================== */
body {
  background: url("../img/body-bg.png") center top no-repeat;
  background-size: cover;
  color: var(--text-color);
  font-family: var(--font-family-lato);
}
body.landing-results {
  overflow-x: hidden;
  background: #FFF;
  color: var(--primary-color);
}

.container {
  max-width: 1024px;
  margin: auto;
}

h1 {
  font-size: clamp(2em, 6vw, 4em);
  font-weight: normal;
  text-align: center;
}

h2 {
  max-width: 750px;
  margin: auto;
  font-size: clamp(2em, 4vw, 3em);
  text-align: center;
}

h1.title {
  position: relative;
  width: 62%;
  margin: 0 auto 5rem;
  padding: 0 0 2rem;
}
h1.title:before {
  content: "";
  display: block;
  position: absolute;
  right: -30px;
  bottom: 0;
  width: 51px;
  height: 48px;
  background: url("../img/quote.png") center center no-repeat;
  background-size: 100%;
}
h1.title:after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 64px;
  height: 8px;
  transform: translateX(-50%);
  background-color: var(--secondary-color);
}
body.landing-results h1.title {
  width: fit-content;
}
body.landing-results h1.title:before {
  right: 5px;
  bottom: -10px;
}

p {
  margin: 0;
}

em {
  color: var(--secondary-color);
  font-style: normal;
}

.main-wrapper {
  padding: 2rem 1.25rem 500px;
  background-image: url("../img/christmas-tree.png"), url("../img/christmas-ball.png"), url("../img/christmas-ball.png"), url("../img/christmas-ball.png");
  background-size: clamp(247px, 37vw, 760px), 68px, 86px, 105px;
  background-position: right 0 bottom -10vw, left -1% top -20px, left 7% top 0, right -1% top -80px;
  background-repeat: no-repeat;
}
body.landing-results .main-wrapper {
  background-image: none;
  background-size: initial;
  background-position: initial;
  padding: 2rem 1.25rem;
}

.main-wrapper .content {
  width: 100%;
  margin: auto;
}

.text-intro {
  max-width: 750px;
  margin-bottom: 3rem;
  font-size: 1.125em;
  font-weight: var(--font-weight-bold);
}

.edge2edge {
  position: relative;
  right: 50%;
  left: 50%;
  flex: 0 0 100vw;
  width: 100vw;
  max-width: none;
  margin-right: -50vw;
  margin-left: -50vw;
}

picture, img {
  max-width: 100%;
}

.results-images picture, img {
  width: 100%;
}

.field {
  margin: 2em 0;
}

.field label {
  display: block;
  font-weight: var(--font-weight-bold);
}
.field .label {
  margin-bottom: 0.7em;
  font-size: 1.25em;
}
.field .sublabel {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.field input {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.82rem 1rem;
  border: 1px solid var(--text-color);
  border-radius: 8px;
  background-color: rgba(var(--primary-color-rgb), 0.1);
  color: var(--text-color);
  font-size: 1.5em;
  font-family: var(--font-family-lato);
  outline-color: var(--secondary-color);
}
.field .description {
  padding-left: 20px;
  font-size: 0.875em;
  background-image: url("../img/icon-info.svg");
  background-size: 15px;
  background-position: left center;
  background-repeat: no-repeat;
}

.form-action {
  margin-top: 4rem;
}

button {
  width: 100%;
  padding: 1.2rem 3rem 1.2rem 1.5rem;
  border: none;
  border-radius: 200px;
  background-color: var(--primary-color);
  background-image: url("../img/icon-arrow-right.svg");
  background-size: 1rem;
  background-position: right 1.5em center;
  background-repeat: no-repeat;
  transition: all .25s linear;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  cursor: pointer;
}
button:hover {
  background-position: right 1em center;
}

body.landing-results .thankyou-text {
  max-width: 883px;
  margin-bottom: 5rem;
}

.thankyou-text {
  font-size: 1.25rem;
  text-align: center;
}
.thankyou-text p {
  margin-bottom: 1em;
}

.videos {
  margin-top: 6rem;
}
body.landing-results .videos .thankyou-text {
  margin-bottom: 1em;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  margin-top: 2rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
}
.flex-container .flex-item {
  flex: 0 1 auto;
  width: 100%;
  padding: 1.5rem;
}
.video iframe {
  width: 100%;
}
.video-name {
  margin-top: 1rem;
  text-align: center;
  font-size: 1.5em;
  font-weight: var(--font-weight-bold);
}
.final-text {
  margin: 5rem auto;
}

/* ==========================================================================
   Media queries
   ========================================================================== */
@media screen and (min-width: 768px) {
  .main-wrapper {
    padding: 3rem 1.25rem 6rem;
    background-size: clamp(247px, 37vw, 760px), 130px, 167px, 160px;
    background-position: right 0 bottom -10vw, left 5% top -155px, left 12% top -110px, right 3% top -190px;
  }
  .main-wrapper .content {
    max-width: 920px;
  }
  h1.title {
    width: 65%;
    max-width: 656px;
    margin: 0 auto 10rem;
    padding: 0 0 4rem;
  }
  h1.title:before {
    right: -8px;
    bottom: 10px;
    width: 100px;
    height: 96px;
  }
  h1.title:after {
    width: 96px;
    height: 12px;
  }
  body.landing-results h1.title {
    width: fit-content;
    margin-bottom: 5rem;
  }
  body.landing-results h1.title:before {
    right: initial;
    bottom: -10px;
    left: 95%;
  }
  .text-intro {
    font-size: 1.5em;
    font-weight: var(--font-weight-normal);
  }
  .field {
    max-width: 578px;
  }
  .field .label {
    font-size: 2.25em;
  }
  .field input {
    max-width: 500px;
  }
  button {
    width: auto;
  }
  .thankyou-text {
    padding-bottom: 500px;
    font-size: 2em;
  }
  body.landing-results .thankyou-text {
    padding-bottom: 0;
    font-size: 1.5rem;
  }
  .flex-container .flex-item {
    width: 50%;
  }
}

@media screen and (min-width: 1366px) {
  h1.title:before {
    right: -45px;
    bottom: -20px;
    width: 130px;
    height: 122px;
  }
  .main-wrapper {
    padding: 6rem 1.25rem;
    background-size: clamp(247px, 37vw, 760px), 263px, 334px, 320px;
    background-position: right 0 bottom -10vw, left calc(50% - 550px) top -390px, left calc(50% - 400px) top -350px, right calc(50% - 500px) top -380px;
  }
  .flex-container .flex-item {
    width: 33.333%;
  }
}

@media screen and (min-width: 1600px) {
  .flex-container .flex-item {
    width: 25%;
  }
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

