/* Globals */

:root {
    /* Colors */
    --clr-red: hsl(12, 88%, 59%);
    --clr-blue: hsl(228, 39%, 23%);
    --clr-grayish-blue: hsl(227, 12%, 61%);
    --clr-dark-blue: hsl(233, 12%, 13%);
    --clr-pale-red: hsl(13, 100%, 96%);
    --clr-palish-red: #ff9278;
    --clr-light-gray: hsl(0, 0%, 98%);
}

a,
a:visited,
a:hover {
    color: var(--clr-dark-blue);
    text-decoration: none;
    font-weight: 500;
}

html {
    font-size: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

p {
    line-height: 1.9;
    color: var(--clr-grayish-blue);
    font-family: "Be Vietnam", sans-serif;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.3;
    font-family: "Be Vietnam", sans-serif;
    font-size: 1rem;
    color: var(--clr-grayish-blue);
    position: relative;
    overflow: hidden;
}

h2,
h3 {
    font-weight: 700;
    color: var(--clr-blue);
}

h2 {
    font-size: 1.7rem;
    padding: 0 3.75rem;
}

nav {
    background-color: transparent;
}

button,
.button {
    padding: 0.9rem 1.875rem;
    background-color: var(--clr-red);
    border: 0;
    border-radius: 50px;
    cursor: pointer;
    color: var(--clr-light-gray);
    font-weight: 700;
}

button:hover,
.button:hover {
    opacity: 0.7;
    transition: all 150ms ease-in-out;
}

/* Flex */

.flex {
    display: flex;
}

.flex-jc-sb {
    justify-content: space-between;
}

.flex-jc-c {
    justify-content: center;
}

.flex-ai-c {
    align-items: center;
}

.hide-for-mobile {
    display: block;
}

.hide-for-desktop {
    display: none;
}

.container {
    padding-left: 0.9375rem;
    padding-right: 0.9375rem;
    padding-top: 2.5rem;
    padding-bottom: 2.9375rem;

    max-width: 69.375rem;
    margin: 0 auto;

    text-align: center;
}

.container--px {
    padding-left: 0.9375rem;
    padding-right: 0.9375rem;
    padding-top: 0;
    padding-bottom: 0;
}

/* Header styles */
.header nav {
    padding: 35px 18px;
}

.open .header__menu {
    display: block;
    visibility: visible;
}

.fade-in {
    animation: fade-in 200ms ease-in-out forwards;
}

.fade-out {
    animation: fade-out 200ms ease-in-out forwards;
}

.header__menu {
    visibility: hidden;
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    text-align: center;
    padding: 20px 0;
    background-color: white;
    z-index: 10;
}

.header__menu a {
    padding: 14px 0;
    display: block;
    font-weight: 500;
    color: var(--clr-dark-blue);
}

.header__menu a:hover {
    opacity: 0.5;
    transition: opacity 150ms ease-in-out;
}

.header__toggle {
    z-index: 5;
}

.header__toggle span {
    display: block;
    width: 26px;
    height: 4px;
    background-color: var(--clr-dark-blue);
}

.header__toggle span:not(:last-child) {
    margin-bottom: 3px;
}

.header__links a {
    font-size: 0.875rem;
}

.open .header__toggle > span:nth-child(2) {
    opacity: 0;
}

.open .header__toggle > span:first-child {
    transform: rotate(45deg);
}

.open .header__toggle > span:last-child {
    transform: rotate(-45deg);
}

.header__toggle > span {
    transition: all 300ms ease-in-out;
    transform-origin: 3px 1.5px;
}

.header__links a:not(:last-child) {
    margin-right: 32px;
}

.header__links a:hover {
    opacity: 0.5;
    transition: opacity 150ms ease-in-out;
}

/* Overlay */

.overlay {
    position: fixed;
    background-image: linear-gradient(0deg, #2d314d, transparent);
    width: 100%;
    height: 100%;

    z-index: 5;
}

/* Utility classes */

.disable-scroll {
    overflow: hidden;
}

.has-fade {
    visibility: hidden;
}

.shadow {
    box-shadow: 0px 12px 20px 1px #fcb7a7;
}

.shadow-dark {
    /* box-shadow: 0px 12px 20px 1px #d67b65; */
    box-shadow: 0px 3px 15px 0px #d67b65;
}

/* Hero */

.hero {
    height: 100%;
}

.bg-pattern {
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    background-image: url("../images/bg-tablet-pattern.svg");
    opacity: 0.5;
    z-index: -1;
    overflow: hidden;
}

.bg-pattern--right {
    left: 50%;
    top: -60px;
    width: 30rem;
    transform: translateX(-35%);
}

.bg-pattern--left {
    left: 50%;
    width: 30rem;
    top: 25rem;
}

.hero__image {
    background-image: url("../images/illustration-intro.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    position: relative;
    height: 15rem;
    width: 100%;
}

.hero__text h1 {
    color: var(--clr-blue);
    font-weight: 700;
    font-size: 2.4rem;
    padding: 0 0.9375rem;
}

.hero__text p {
    padding: 0 1.69rem;
}

.hero__text button {
    margin-top: 1.875rem;
    margin-bottom: 5.3125rem;
}

/* Info */

.info {
    display: block;
}

.info__desc {
    padding: 0 0.94rem;
}

.info__text {
    text-align: left;
}

.info p,
.testimonials p {
    font-size: 0.9rem;
}

.info__header {
    /*  */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    margin-top: 3.3rem;
}

.info__header span {
    color: var(--clr-light-gray);
    font-family: "Be Vietnam", sans-serif;
    font-weight: 700;
    border-radius: 25px;
    background-color: var(--clr-red);
    padding-bottom: 0.66rem;
    padding-left: 1.4375rem;
    padding-right: 1.4375rem;
    padding-top: 0.45rem;
}

.info-bg {
    height: 90%;
    width: 110%;
    position: absolute;
    background: linear-gradient(
        to right,
        transparent 5%,
        var(--clr-pale-red) 0%
    );
    top: 4px;
    padding-top: 2.1rem;
    opacity: 0.5;
    z-index: -1;
}

.info__header h3 {
    position: relative;
    font-size: 0.9rem;
    z-index: 3;
    margin-right: 2.2rem;
    padding-left: 1rem;
}

/* Simply */
.simply {
    width: 100%;
    height: 100%;
    background-color: var(--clr-red);
    position: relative;
}

.simply__container {
    max-width: 69.375rem;
    margin: 0 auto;
    padding: 4.5rem 0;
    text-align: center;
}

.simply__image {
    background-image: url("../images/bg-simplify-section-mobile.svg");
    background-repeat: no-repeat;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
}

.simply__container h2 {
    color: var(--clr-light-gray);
    z-index: 2;
    font-size: 2rem;
}

.simply__container button {
    color: var(--clr-red);
    background-color: var(--clr-light-gray);
    transition: color 200ms ease-in-out;
    z-index: 2;
}

.simply__container button:hover {
    opacity: 1;
    color: var(--clr-palish-red);
}

/* Card styles */

.card--active {
    animation: fade-in 500ms ease-in-out forwards;
}

.card--inactive {
    animation: fade-out 500ms ease-in-out forwards;
}

.testimonials {
    position: absolute;
    height: 22rem;
    margin-bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 110%;
}

.testimonials-container {
    padding-top: 1.0625rem;
    padding-bottom: 1.0625rem;
    max-width: 130rem;
    margin: 0 auto;
    width: 100%;
    text-align: center;
    position: relative;
}

.testimonials-container h2 {
    margin-bottom: 5rem;
}

.testimonials-container button {
    margin-top: 5rem;
    margin-bottom: 2.5rem;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        0deg,
        var(--clr-light-gray) 80%,
        transparent 20%
    );
}

.card img {
    height: 4.5rem;
}

.card p {
    padding-top: 0;
    padding-right: 2rem;
    padding-left: 2rem;
    padding-bottom: 1.5rem;
}

.carousel-tracker span {
    display: inline-block;
    border-radius: 50px;
    width: 10px;
    height: 10px;
    border: 1px solid var(--clr-red);
}

.carousel--active {
    background-color: var(--clr-red);
}

.carousel-tracker {
    margin-top: 28.125rem;
}

.carousel-tracker span:not(:last-child) {
    margin-right: 2px;
}

/* Footer */

footer {
    margin: 0 auto 0 auto;
    padding-top: 3rem;

    background-color: var(--clr-dark-blue);
}

.footer__links {
    display: flex;
    justify-content: center;
}

.footer__container {
    display: grid;
    margin: 0 auto 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 1.0625rem;

    max-width: 69.375rem;
}

.footer__links a {
    display: block;
    color: var(--clr-light-gray);
    font-weight: 300;
}

.footer__input {
    text-align: center;
}

.footer__input input {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    padding-right: 0.3rem;
    padding-left: 1rem;
    border-radius: 50px;
    border: 0;
}

.footer__input input:focus {
    outline: none;
    color: var(--clr-red);
    border: 1px solid var(--clr-red);
}

.footer__input button {
    margin-left: 0.2rem;
}

.footer__input button:hover {
    margin-left: 0.2rem;
    opacity: 1;
    background-color: var(--clr-palish-red);
}

.footer__input input::placeholder {
    font-family: "Be Vietnam", sans-serif;
}

footer h5 {
    text-align: center;
    font-weight: 300;
}

.footer__container a {
    transition: all 200ms ease-in-out;
}

.footer__container a:hover {
    opacity: 0.7;
    color: var(--clr-red);
}

.footer__images a:hover {
    background-color: var(--clr-red);
}

.footer__images {
    display: grid;
    text-align: center;
}

.footer__icons,
.footer__logo {
    margin: 3rem auto 0 auto;
}

.footer__icons {
    display: flex;
}

.footer__icons img {
    height: 35px;
}

.footer__icons img:not(:first-child) {
    margin-left: 1.4rem;
}

.footer--mt {
    margin-top: 2.5rem;
}

.footer__links a:not(:first-child) {
    margin-top: 1rem;
}

.footer__links a {
    font-size: 0.9rem;
}

.footer__links div:not(:first-child) {
    margin-left: 25%;
}

.attribution {
    padding: 2rem;
    color: var(--clr-light-gray);
    font-size: 11px;
    text-align: center;
}

.attribution a {
    color: var(--clr-red);
    text-decoration: none;
}

.grid {
    display: inline-grid;
}

.icon {
    display: block;
    transition: all 300ms ease-in-out;
    width: 50px;
    height: 50px;
    background-color: white;
}

.icon:hover {
    background-color: var(--clr-red);
}

.icon--facebook {
    -webkit-mask: url("../images/icon-facebook.svg") no-repeat center;
    mask: url("../images/icon-facebook.svg") no-repeat center;
}

.icon--instagram {
    -webkit-mask: url("../images/icon-instagram.svg") no-repeat center;
    mask: url("../images/icon-instagram.svg") no-repeat center;
}

.icon--pinterest {
    -webkit-mask: url("../images/icon-pinterest.svg") no-repeat center;
    mask: url("../images/icon-pinterest.svg") no-repeat center;
}

.icon--youtube {
    -webkit-mask: url("../images/icon-youtube.svg") no-repeat center;
    mask: url("../images/icon-youtube.svg") no-repeat center;
}

.icon--twitter {
    -webkit-mask: url("../images/icon-twitter.svg") no-repeat center;
    mask: url("../images/icon-twitter.svg") no-repeat center;
}

@keyframes move-outside {
    from {
        left: 100%;
        transform: translateX(-100%);
    }

    to {
        left: 150%;
    }
}

@keyframes to-left {
    from {
        left: -100%;
    }

    to {
        left: 0;
    }
}

@keyframes to-center {
    from {
        left: 0;
    }

    to {
        left: 50%;
        transform: translateX(-50%);
    }
}

@keyframes to-right {
    from {
        left: 50%;
        transform: translateX(-50%);
    }

    to {
        left: 100%;
        transform: translateX(-100%);
    }
}

@media screen and (min-width: 56.25em) {
    .has-fade > .overlay {
        visibility: hidden;
    }

    .hero {
        display: flex;
    }

    .hero .hero__image {
        order: 2;
    }

    .bg-pattern--right {
        left: 100%;
        top: -200px;
        width: 30rem;
        transform: translateX(-70%);
    }

    .bg-pattern--left {
        left: 0;
        top: 40rem;
        width: 30rem;
        transform: translateX(-60%);
    }

    .container {
        text-align: left;
    }

    .info {
        display: flex;
    }

    .info__header {
        justify-content: left;
        background-color: transparent;
    }

    .info__text {
        margin-left: 5rem;
    }

    .info-bg {
        visibility: hidden;
    }

    .info__text {
        text-align: left;
    }

    .simply__container {
        display: flex;
        text-align: left;
        justify-content: space-between;
    }

    .simply__container h2 {
        width: 50%;
        padding-left: 0;
        font-size: 2.6rem;
        margin: 1rem 0;
    }

    .simply__container button {
        max-height: 50px;
        margin: auto 0;
    }

    .footer__container img {
        height: 1.8rem;
    }

    .hero__text h1 {
        padding-right: 5rem;
        padding-top: 4rem;
        padding-left: 0;
        padding-bottom: 0;

        font-size: 3rem;
    }

    .footer__input input {
        width: 12.5rem;
        padding-right: 0;
    }

    .hero__text p {
        padding: 0;
        font-size: 0.9rem;
        max-width: 20rem;
    }

    .hero__image {
        height: auto;
    }

    .diff {
        width: 90rem;
    }

    .info__desc {
        padding: 0;
    }

    .diff h2 {
        padding: 0;
    }

    h2 {
        font-size: 2.2rem;
    }

    .info__container {
        padding: 0;
        margin-left: 6rem;
    }

    .simply__container {
        padding: 3rem 0;
    }

    .testimonials {
        height: 17rem;
    }

    .bg-pattern--left {
        top: 60rem;
    }

    .info__header span {
        padding-top: 0.4rem;
        padding-bottom: 0.5rem;
    }

    .footer__links {
        justify-content: space-between;
    }

    .card {
        width: 30%;
        left: -100%;
    }

    .testimonials-container button {
        margin-top: 25rem;
        margin-bottom: 10rem;
    }

    .simply__image {
        background-image: url("../images/bg-simplify-section-desktop.svg");
        background-size: cover;
        width: 100%;
    }

    .card--center {
        animation: to-center 1000ms linear forwards;
    }

    .card--left {
        animation: to-left 1000ms linear forwards;
    }

    .card--none {
        animation: move-outside 1000ms linear forwards;
    }

    .card--right {
        animation: to-right 1000ms linear forwards;
    }

    .footer__container {
        grid-template-columns: 1fr 1fr auto;
        align-items: center;

        padding-left: 0;
        padding-right: 0;
    }

    .footer__input {
        grid-column-start: 3;
        margin-right: 0;
    }

    .footer__links {
        grid-row-start: 1;
        grid-row-end: span 2;
        width: 25rem;
        margin-right: 6.25rem;
    }

    .footer__icons {
        grid-row-start: 2;
        grid-column-start: 1;

        margin-left: 0;
    }

    .footer__logo {
        grid-column-start: 1;
        grid-row-start: 1;

        margin-left: 0;
    }

    .bg-pattern {
        width: 40rem;
    }

    .footer__copy {
        grid-column-start: 3;

        margin-right: 0;
        margin-left: auto;
    }

    .icon {
        width: 35px;
        height: 25px;
    }
}

@media screen and (max-width: 56.25em) {
    .hide-for-mobile {
        display: none;
    }

    .hide-for-desktop {
        display: block;
    }
}

@keyframes fade-in {
    from {
        visibility: hidden;
        opacity: 0;
    }

    1% {
        visibility: visible;
        opacity: 0;
    }

    to {
        visibility: visible;
        opacity: 1;
    }
}

@keyframes fade-out {
    from {
        visibility: visible;
        opacity: 1;
    }

    90% {
        visibility: visible;
        opacity: 0;
    }

    to {
        visibility: hidden;
        opacity: 0;
    }
}

#emailSubmitFormError {
    color: var(--clr-red);
    font-family: "Be Vietnam", sans-serif;
    font-style: italic;
    font-size: 0.8rem;
}
