@import url("https://use.typekit.net/atx3iyq.css");
@import url("https://fonts.googleapis.com/css?family=Dosis:300,400");

:root {
  --color-teal: #00c3a9;
  --color-teal-light: #ceece8;
  --color-blue: #65BEF6;
  --color-grey: #f7f7f7;
  --page-width: 64rem;
}

/* Reset
ref. https://piccalil.li/blog/a-more-modern-css-reset/
---------------------------------------------------------------- */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: pretty;
}

h2 + p {
  margin-block-start: .5em;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}


/* Styles
---------------------------------------------------------------- */

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-grey);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  font-family: "interface", sans-serif;
  color: #636363;
}

header {
  background-color: var(--color-teal);
  padding: 1em 1em 0;
  width: 100%;
  height: 20em;

  @media screen and (min-width: 64rem) {
    display: grid;
    grid-template-columns: auto var(--page-width) auto;
  }
}
.logo {
  grid-column: 2/3;
}

main {
  padding-inline: 1em;

  @media screen and (min-width: 830px) {
    background: transparent url(images/chevrons-down.svg) 50% 0 repeat-y;
  }

  > * {
    max-width: var(--page-width);
    margin-inline: auto;
  }
}

a {
  color: var(--color-blue);
  transition: all .2s;
}

.button {
  text-align: center;
  padding: .5em 2em;
  border-radius: .25em;
  color: var(--color-teal);
  border: 1px solid var(--color-teal);
  background-color: #fff;
  text-decoration: none;
  font-size: 0.9em;

  &:hover {
    background-color: #e4f8f5;
  }
}

/* Banner
---------------------------------------------------------------- */

.banner {
  --banner-content-width: 70ch;

  background: #fff;
  box-shadow: 0 5px 6px 0 rgba(0,0,0,0.20);
  border-radius: 6px;
  margin-block: -15em 3em;
  overflow: hidden;
}
.banner-image {
  background-color: var(--color-teal-light);

  img {
    margin-inline: auto;
    max-width: 85%;
    transform: translateY(15%);
    margin-block-start: -3%;
  }
}
.banner-intro {
  max-width: var(--banner-content-width);
  margin-inline: auto;
  margin-block-end: 1em;
  padding-inline: 1em;
}

h1 {
  font-family: 'Dosis', sans-serif;
  /* font-size: 2.75em; */
  font-size: clamp(2.25rem, 1.775rem + 2.375vw, 3.4375rem);
  font-weight: 400;
  text-align: center;

  &::after {
    content: '';
    display: block;
    width: 4ch;
    height: 2px;
    background-color: var(--color-blue);
    margin-block: .5em;
    margin-inline: auto;
  }
}

.scroll-to-watch {
  text-decoration: none;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  font-size: 0.9em;
  font-weight: bold;

  &::after {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cpath fill='%2398D8FF' fill-rule='nonzero' d='M8.08 10.045a1.12 1.12 0 0 0 1.59 0l6.75-6.75a1.125 1.125 0 1 0-1.59-1.59L8.874 7.66 2.921 1.705a1.125 1.125 0 1 0-1.591 1.59l6.75 6.75Zm6.75-1.59-5.955 5.956-5.954-5.956a1.125 1.125 0 1 0-1.591 1.591l6.75 6.75c.218.22.507.329.795.329.288 0 .576-.11.795-.33l6.75-6.75a1.125 1.125 0 1 0-1.59-1.59Z'/%3E%3C/svg%3E");
    transition: all .2s;
  }

  &:hover::after {
    transform: translateY(.5em);
  }

  p:has(&) {
    text-align: center;
  }
}


/* Video Blocks
---------------------------------------------------------------- */

.video-block {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2em;

  @media screen and (min-width: 830px) {
    flex-direction: row;

    &:nth-child(odd) {
      flex-direction: row-reverse;
    }
  }

  & + .video-block {
    margin-block-start: 8em;
  }

  .content {
    flex: 1;

    @media screen and (max-width: 830px) {
      padding-inline: 1em;
    }
  }

  .video {
    width: 100%;
    flex: 2;
    background: #fff;
    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20),
                0 15px 21px 3px rgba(0,0,0,0.20);
    aspect-ratio: 16/9;
  }
  iframe,
  .wistia_embed {
    width: 100%;
    height: 100%;
    max-width: 683px; /* to avoid Safari growing video bug */
    aspect-ratio: 16 / 9;
    display: block;
  }

  h2 {
    color: var(--color-teal);
    text-transform: uppercase;
    font-size: 1em;
    margin-block-start: 0;

    &::after {
      content: '';
      display: block;
      width: 8ch;
      height: 2px;
      background-color: var(--color-blue);
      margin-block: .75em;
    }
  }

  p {
    text-wrap: pretty;
  }
  p:first-child {
    margin-block-start: 0;
  }

  .coming-soon {
    background: #d9d9d9 url(images/video-clock.png) 50% 50% / contain no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Dosis', sans-serif;
    color: #12243A;
    text-align: center;
    text-wrap: balance;
    font-size: clamp(1.875rem, 1.525rem + 1.75vw, 2.75rem);
    line-height: 1.2;
    padding: 1.5em;
    text-shadow: #d9d9d9 0 0 6px ;
  }
}


/* CTA Blocks
---------------------------------------------------------------- */

.video-block-cta {
  background-color: var(--color-teal);
  color: #fff;
  max-width: 30em;
  margin-inline: auto;
  border-radius: 6px;
  padding: 2em;
  text-align: center;
  margin-block: 6em;

  h2 {
    font-family: 'Dosis', sans-serif;
    margin: 0;
    line-height: 1.2;
  }
  p {
    color: var(--color-teal-light);
  }
  .button {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.20)
  }
}


/* Footer
---------------------------------------------------------------- */
html, footer {
  background-color: #25578b;
}
footer {
  margin-block-start: 6em;
  padding-block: 1em;
  padding-inline: 1em;
  color: #fff;
  text-align: center;

  h2 {
    font-family: 'Dosis', sans-serif;
    font-size: 2.5em;
    font-weight: 400;
    margin-block-end: 1em;
  }

  .button {
    background-color: #ffd738;
    color: #222;
    border: none;
    font-size: 1.25em;
    box-shadow: 0 5px 8px rgba(0,0,0,.2) ;

    &:hover {
      background-color: #ffeeab;
    }
  }

  .legal {
    font-size: 0.75em;
    opacity: .65;
    margin-block-start: 4em;
  }
}