/* The marketing page. Moved verbatim from the inline <style> of
   app/views/site/nowqrcode.view.php (php-wapi, git HEAD~1). Unlayered, as the inline
   block was. One change: `#price-plans` became `.price-plans`, because the page
   shows the pricing twice and the second copy now has its own id. */

main {
  min-height: 75vh;
}

section {
  position: relative;

  & .bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
    z-index: -1;
  }

  .wrapper {
    width: min(1200px, 90%);
    margin-inline: auto;
  }
}

#header {
  min-height: 145px;
  background-color: black;
  isolation: isolate;

  & .wrapper {
    padding-block-start: 8em;
    padding-block-end: 2em;
    color: white;


    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;

    & h1 {
      font-size: 3rem;
    }

    & p {
      font-size: 1rem;
      max-width: 500px;
    }

    & .global-button {
      margin-block-start: 1em;
    }

    & .col-r {
      & img {
        display: block;
        max-width: 100%;
        margin-inline: auto;
      }
    }
  }
}

@media screen and (width < 768px) {
  #header {
    & .wrapper {
      grid-template-columns: 1fr;
      row-gap: 2em;
    }
  }
}

.main {
  padding-block: 4em;
  text-align: center;

  background-color: hsl(0, 0%, 100%, 0.9);
  background-blend-mode: overlay;
  background-size: cover;

  & .wrapper>h2 {
    font-size: 1.5rem;
    margin-block-end: 2em;
    margin-inline: auto;
    max-width: 65ch;
  }

  & .price-plans {
    width: min(900px, 90%);
    margin-inline: auto;

    display: flex;
    flex-flow: row wrap;
    gap: 2em;
    justify-content: center;
    align-items: stretch;
  }

  & .card {
    position: relative;
    background-color: white;
    border-radius: 4px;
    padding: 2em 3.5em;
    text-align: center;
    box-shadow: 1px 1px 2px 1px hsl(0, 0%, 0%, 0.3);

    display: flex;
    flex-flow: column nowrap;

    & p {
      margin-block-end: 1em;
    }

    & .price {
      font-weight: bold;
      font-size: 2.5rem;

      & small {
        display: inline-block;
        font-size: 0.9rem;
      }
    }

    & a {
      margin-block-start: auto;
      margin-inline: auto;
    }

    & img {
      position: absolute;
      bottom: 70%;
      left: 65%;
      width: 100%;
      max-width: 50%;
      rotate: 15deg;
    }
  }
}

#showcase {
  padding-block: 4em;

  & .wrapper>p {
    max-width: 100ch;
    margin-inline: auto;
    font-size: 1.2rem;
    margin-block-end: 4em;
    text-align: center;
  }

  & .product {

    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
    gap: 2em;
    margin-block-end: 2em;

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

    & .image,
    & .description {
      width: 400px;
      aspect-ratio: 1 / 1;
    }

    & .image {
      position: relative;

      & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
      }
    }

    & .description {
      background-color: #b8084b;
      color: white;
      padding: 2em;

      place-content: center;
      font-size: 1rem;
      text-align: center;

      & h2 {
        font-size: 2rem;
      }
    }
  }
}


#contact-form {
  padding-block: 2em;


  & h2 {
    margin-block-end: 1em;
    text-align: center;
    font-size: 2rem;

    & span {
      color: #b8084b;
    }
  }

  .form-replacement {
    font-size: 1.5rem;
    margin-inline: auto;
  }

  & form {
    --width: 1200px;
    width: min(var(--width), 90%);
    margin-inline: auto;

    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 1em;

    & input,
    & textarea,
    & button {
      padding: 1em 1.5em;
      font: inherit;
    }

    &>.c-1 {
      flex: 1 1 calc((var(--width) / 2) - 6em);
    }

    &>.c-full {
      flex: 2 1 var(--width);
    }

    & button {
      width: min(400px, 90%);
      max-width: 100%;
      cursor: pointer;
    }
  }
}

aside {
  position: fixed;
  bottom: 2em;
  right: 2em;

  padding-inline: 1.5em;
  padding-block: 1em;
  max-width: 250px;
  display: block;
  text-align: center;
  /* background-color: #b8084b; */
  background-image: linear-gradient(140deg,
      hsl(337, 91.7%, 37.6%),
      hsl(337, 91.7%, 70%),
      hsl(337, 91.7%, 37.6%));
  background-size: 500%;
  background-position: bottom right;
  color: white;
  border-radius: 4px;
  box-shadow: 1px 1px 2px 1px hsl(0, 0%, 0%, 0.3);
  font-size: 1.25rem;

  animation: appear 500ms ease-in 1s both, shine 4s ease-in-out infinite;

  & a {
    background-color: white;
    color: black;
    text-decoration: none;
    padding: 0.5em 1em;
    display: block;
    max-width: max-content;
    margin-block-start: 1em;
    margin-inline: auto;
    font-size: 1.25rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes shine {

  0%,
  70%,
  100% {
    background-position: bottom right;
  }

  90% {
    background-position: top left;
  }
}

@media screen and (width <=768px) {
  aside {
    display: none;
  }
}
