@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,500;0,700;1,700&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url(reset.css);
@import url(typography.css);

:root {
  --color-black: #101427;
  --color-blue-dark: #1d2441;
  --color-blue: #5268ca;
  --color-blue-light: #cfd2e1;
  --color-gray: #f0f0f0;
  --color-white: #fefef5;
  --color-red: #af565a;

  --accent-1: var(--color-red);
  --accent-2: var(--color-blue);

  --anchor-color: var(--color-blue-red);
  --background-color: var(--color-white);
  --background-color-2: var(--color-gray);
  --border-color: var(--color-blue-light);
  --text-color: var(--color-blue-dark);

  --rounded-sm: 4px;

  --font-sans: "Montserrat", sans-serif;
  --font-serif: "PT Serif", serif;
  --font-size-h1: 32px;
  --font-size-h2: 24px;
  --font-size-h3: 20px;
  --font-size-h4: 18px;
  --font-size-body: 16px;
  --font-size-sm: 14px;
  --font-size-xs: 12px;

  --gutter: 1.25rem;

  --head-height: 7.8125rem;
  --foot-height: 5rem;

  --stack-top: 3000;
  --stack-middle: 2000;
  --stack-bottom: 1000;

  /* --smooth-curve: cubic-bezier(.4, 0, .2, 1); */
  --smooth-curve: cubic-bezier(.19, 1, .22, 1);
  --transition-normal: all 250ms ease;
  --transition-smooth: all 1000ms var(--smooth-curve);
  --transition-smooth-delayed: all 1000ms var(--smooth-curve) 500ms;
  --transition-smooth-delayed-2: all 1000ms var(--smooth-curve) 1000ms;

  --del-icon: polygon( 0% 79.139%,29.168% 49.989%,.023% 20.82%,20.861% 0%,50.006% 29.174%,79.185% .029%,100% 20.861%,70.826% 50.006%,99.977% 79.185%,79.139% 100%,49.989% 70.826%,20.82% 99.977%,0% 79.139% );
}

@media only screen and (min-width: 1000px) {
  :root {
    --gutter: 1.875rem;
  }
}

@media only screen and (max-width: 999px) {
  :root {
    --font-size-h1: 24px;
    --font-size-h2: 20px;
    --font-size-h3: 18px;
    --font-size-h4: 16px;
  }
}

/* Helpers
-----------------------------------------------------*/
.list-reset {
  list-style: none;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Accessibility
-----------------------------------------------------*/
/* TODO: Hook up skip to links */
.skip {
  display: none;
}

/* Global
-----------------------------------------------------*/
body {
  background: var(--background-color);
  font-family: var(--font-serif);
  font-weight: 500;
  -webkit-font-smoothing: antialiased; /* Safari and Chrome */
  -moz-osx-font-smoothing: grayscale; /* Firefox on macOS */
}

.wrap {
  margin: 0 auto;
  max-width: calc(80rem + var(--gutter) * 2);
  padding: var(--gutter);
}

/* Buttons
-----------------------------------------------------*/
.btn {
  background: var(--color-red);
  border: none;
  border-radius: var(--rounded-sm);
  color: var(--color-white);
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 12px 20px;
  transition: all .25s ease;

  &:hover {
    background: color-mix(in oklab, var(--color-red), black 10%);
    color: var(--color-white);
  }
}

/* Forms
-----------------------------------------------------*/
input,
textarea {
  background: var(--color-gray);
  border: 1px solid var(--border-color);
  border-radius: var(--rounded-sm);
  color: var(--text-color);
  font-family: var(--font-sans);
  font-weight: 400;
  height: 2.5rem;
  padding: 0 0 0 15px;
  width: 100%;
}

textarea {
  height: 12.5rem;
  padding: 15px 0 0 15px;
}

form {
  margin: 0 auto;
  max-width: 45rem;
}

.field--hp {
  display: none;
}

.field__label {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  margin-bottom: .5rem;
}

.field__label--required {
  &::after {
    color: var(--color-red);
    content: " *";
  }
}

/* Header
-----------------------------------------------------*/
.head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: var(--gutter);
}

@media only screen and (max-width: 999px) {
  .head {
    margin-bottom: var(--gutter);
  }
}

/* Brand
-----------------------------------------------------*/
.brand {
  display: block;
}

.brand__logo {
  pointer-events: none;
}

/* Nav
-----------------------------------------------------*/
.nav-btn {
  background: var(--accent-1);
  border-radius: var(--rounded-sm);
  height: 40px;
  position: absolute;
  right: var(--gutter);
  top: var(--gutter);
  width: 40px;
  z-index: var(--stack-top);

  --padding: 8px;

  &::before,
  &::after {
    background: var(--color-gray);
    content: "";
    height: 3px;
    left: var(--padding);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition-smooth);
    right: var(--padding);
  }

  &::before {
    margin-top: -4px;
  }

  &::after {
    margin-top: 4px;
  }

  .nav-open & {
    &::before,
    &::after {
      margin: 0;
    }

    &::before {
      transform: translateY(-50%) rotate(-45deg) ;
    }

    &::after {
      transform: translateY(-50%) rotate(45deg);
    }
  }
}

@media only screen and (min-width: 1000px) {
  .nav-btn {
    display: none;
  }
}

.nav__list {
  align-items: center;
  display: flex;
  gap: var(--gutter);
}

.nav__item {
  color: var(--color-white);
  display: block;
  overflow: hidden;
  padding: 8px 0;
  position: relative;
  z-index: 1;

  &::after {
    border-bottom: 4px solid var(--accent-1);
    content: "";
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    transition: all .25s ease;
    width: 0;
    z-index: -1;
  }

  &:hover,
  &[aria-current="page"] {
    color: var(--color-white);

    &::after {
      left: auto;
      right: 0;
      width: 100%;
    }
  }
}

@media only screen and (max-width: 999px) {
  .nav {
    background: rgba(29, 36, 65, .9);
    backdrop-filter: blur(5px);
    height: 100vh;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    transition: var(--transition-smooth);
    visibility: hidden;
    width: 100vw;
    z-index: var(--stack-middle);

    .nav-open & {
      opacity: 1;
      visibility: visible;
    }
  }

  .nav__list {
    flex-direction: column;
    height: 100vh;
    justify-content: center;
  }
}

/* Hero
-----------------------------------------------------*/
.hero {
  color: var(--color-white);
  height: calc(100vh - var(--head-height) - var(--foot-height));
  position: relative;

  &::before,
  &::after {
    background: url(../img/hero.jpg);
    background-size: cover;
    content: "";
    height: calc(100% + var(--head-height));
    position: absolute;
    top: calc(-1 * var(--head-height));
    width: 100%;
    z-index: -1;
  }

  &::after {
    background: rgba(47, 61, 122, .9);
  }
}

.hero--full {
  align-items: center;
  display: flex;

  .wrap {
    max-width: 56.25rem;
    margin-top: calc(-1 * var(--head-height));
    text-align: center;
  }

  h1 {
    font-size: 4rem;
    line-height: 1.125;
  }

  p {
    font-size: 1.5rem;
    line-height: 1.5;
  }
}

@media only screen and (max-width: 999px) {
  .hero--full {

    h1 {
      font-size: 2rem;
    }

    p {
      font-size: 1rem;
    }
  }
}

/* Intro
-----------------------------------------------------*/
.intro {
  align-items: center;
  display: flex;
  height: auto;
  justify-content: center;
  min-height: 15rem;
}

.intro__content {
  margin-top: calc(var(--head-height) / -2);
  max-width: calc(45rem + var(--gutter) * 2);
  padding: 0 var(--gutter);

  p {
    font-size: var(--font-size-h4);
  }
}

@media only screen and (max-width: 999px) {
  .intro {
    min-height: 0;
  }

  .intro__content {
    margin-top: 0;
  }
}

/* Main content
-----------------------------------------------------*/
.content {
  margin: calc(var(--gutter) * 2) auto;
}

.section--full {
  padding: calc(var(--gutter) * 2) 0;
  text-align: center;
}

/* Grids
-----------------------------------------------------*/
.grid {
	display: grid;
	grid-column-gap: var(--gutter);
	grid-row-gap: var(--gutter);
	grid-template-columns: repeat(auto-fill, minmax(18.75rem, 1fr));
  list-style: none;
	margin: 0 0 var(--gutter);
}

.grid--cols-2 {
  grid-template-columns: repeat(2, minmax(1px, 1fr));
}

.grid--cols-3 {
  grid-template-columns: repeat(3, minmax(1px, 1fr));
}

.grid__item--span-2 {
  grid-column-end: span 2;
}

.grid__item--span-3 {
  grid-column-end: span 3;
}

@media only screen and (max-width: 999px) {
  .grid--cols-2,
  .grid--cols-3 {
    grid-template-columns: repeat(1, minmax(1px, 1fr));
  }

  .grid__item--span-2,
  .grid__item--span-3 {
    grid-column-end: span 1;
  }
}

/* Boxes
-----------------------------------------------------*/
.box-list {
  display: flex;
  flex-flow: row wrap;
  list-style: none;
  margin: 0;

  > li {
    flex-basis: 100%;

    + li {
      margin-top: calc(var(--gutter) * 2);
    }

    &:nth-child(even) {
      .box {
        margin-left: 50%;
      }

      .box__graphic {
        left: -100%;
      }
    }

    .box {
      width: 50%;
    }
  }
}

.box {
  border: 1px solid var(--border-color);
  border-radius: var(--rounded-sm);
  box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .05);
  padding: var(--gutter);
  position: relative;

  > *:last-child {
    margin-bottom: 0;
  }
}

.box__graphic {
  height: auto;
  left: 100%;
  padding: 0 calc(var(--gutter) * 2);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
}

@media only screen and (max-width: 999px) {
  .box-list {
    > li,
    > li:nth-child(even) {
      .box {
        margin: 0;
        width: 100%;
      }
    }
  }

  .box__graphic {
    display: block;
    position: static;
    transform: none;
  }
}

/* Checklists
-----------------------------------------------------*/
.checklist {
  column-count: 2;
  line-height: 1.875;
  list-style: none;
  margin-left: 0;

  > li {
    break-inside: avoid;
    padding-left: 1.5rem;
    position: relative;

    svg {
      color: var(--accent-2);
      left: 0;
      position: absolute;
      top: .5rem;
    }
  }
}

@media only screen and (max-width: 999px) {
  .checklist {
    columns: auto;
  }
}

/* Step lists
-----------------------------------------------------*/
.step-list {
  counter-reset: steps;
  list-style: none;
  margin: 0 auto;
  max-width: 37.5rem;
}

.step {
  padding-left: calc(7.5rem + var(--gutter));
  position: relative;

  > *:last-child {
    margin-bottom: 0;
  }

  + .step {
    margin-top: 6.25rem;

    &::before {
      background: var(--border-color);
      mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iNjkiIHZpZXdCb3g9IjAgMCAyNCA2OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkuMzYyODkgMi41OTMzNEM5LjM2Mjg5IDEuMTYxMDggMTAuNTMxMyAwIDExLjk3MjYgMEMxMy40MTM5IDAgMTQuNTgyMyAxLjE2MTA4IDE0LjU4MjMgMi41OTMzNFY1Ny4wNTM1QzE0LjU4MjMgNTguNDg1OCAxMy40MTM5IDU5LjY0NjkgMTEuOTcyNiA1OS42NDY5QzEwLjUzMTMgNTkuNjQ2OSA5LjM2Mjg5IDU4LjQ4NTggOS4zNjI4OSA1Ny4wNTM1VjIuNTkzMzRaIiBmaWxsPSIjQ0ZEMkUxIi8+CjxwYXRoIGQ9Ik0wLjc2OTYwMSA1OC45MTQzQy0wLjg3NDQzIDU3LjI4MDYgMC4yODk5MzkgNTQuNDg3MiAyLjYxNDk1IDU0LjQ4NzJIMjEuMzg1QzIzLjcxMDEgNTQuNDg3MiAyNC44NzQ0IDU3LjI4MDYgMjMuMjMwNCA1OC45MTQzTDEzLjg0NTQgNjguMjQwNEMxMi44MjYyIDY5LjI1MzIgMTEuMTczOCA2OS4yNTMyIDEwLjE1NDcgNjguMjQwNEwwLjc2OTYwMSA1OC45MTQzWiIgZmlsbD0iI0NGRDJFMSIvPgo8L3N2Zz4K");
      content: "";
      height: 4.3125rem;
      left: 50%;
      position: absolute;
      top: 0;
      transform: translateX(-50%) translateY(calc(-100% - 1rem));
      width: 1.5rem;
    }
  }
}

.step__title {
  &::before {
    content: counter(steps)". ​";
    counter-increment: steps;
    position: absolute;
    transform: translateX(-100%);
  }
}

.step__icon {
  left: var(--gutter);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* Slideshows
-----------------------------------------------------*/
.slideshow {
  font-family: var(--font-sans);
  overflow: hidden;
  position: relative;
}

.slideshow__item {
  display: block;
  line-height: 1.5;
  opacity: 0;
  padding: var(--gutter) 0;
  position: absolute;
  transition: var(--transition-normal);
  visibility: hidden;
  width: 100%;

  &.active {
    opacity: 1;
    position: relative;
    visibility: visible;
  }
}

.slideshow__nav {
  display: flex;
  gap: calc(var(--gutter) * .5);
  justify-content: center;
  list-style: none;
  margin: 0;

  a {
    background: var(--border-color);
    border-radius: 50%;
    display: block;
    height: 20px;
    overflow: hidden;
    text-indent: -999px;
    width: 20px;

    &.active {
      background: var(--accent-1);
    }
  }
}

/* CTAs
-----------------------------------------------------*/
.cta {
  background: var(--background-color-2);
  border-radius: var(--rounded-sm);
  padding: calc(var(--gutter) * 2) var(--gutter);
  margin-top: calc(var(--gutter) * 2);
  text-align: center;
}

.cta__title {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--font-size-h2);
  margin-bottom: 1em;
}

/* Footer
-----------------------------------------------------*/
.foot {
  background: var(--color-white);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  padding: var(--gutter);

  span + span::before {
    border-left: 1px solid var(--border-color);
    content: "";
    display: inline-block;
    height: 100%;
    margin: 0 1em;
    vertical-align: text-bottom;
  }
}