@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); /*400, 600, 700*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); /*700*/

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    /* outline: 1px solid red; */
}

:root{
    --pink: hsl(322, 100%, 66%);
    --lightPink: hsl(321, 100%, 78%);
    --lightRed: hsl(0, 100%, 63%);
    --veryDarkCyan: hsl(192, 100%, 9%);

    --body: "Open Sans", sans-serif;
    --headings: "Poppins", serif;

    --paddingContainer: 3rem 0;
}

body{
    font-family: var(--body);
}

.container{
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: var(--paddingContainer);
}

/*  HEADER  */

.header{
    min-height: 100vh;
    position: relative;
    --waveBottom: url(images/bg-section-top-mobile-1.svg);
}

.header__nav{
    display: flex;
    justify-content: space-between;
    align-content: center;
    --paddingContainer: 3rem 0 2rem;
}

.nav__figure{
    width: 45%;
    max-width: 160px;
}

.nav__figure img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cta{
    text-decoration: none;
    text-align: center;
    border: var(--pink) 2px solid;
    width: 120px;
    padding: 3px 0;
    border-radius: 20px;
    color: var(--pink);
}

.header__main{
    text-align: center;
}

.header__texts{
   display: grid;
   gap: 2em;
   
   container-type: inline-size;

   & .title{
    font-family: var(--headings);
    font-size: 1.6em;
   }

   & .paragraph{
        width: 100%;
        place-self: center;
    }

   @container(width >= 600px){
        .paragraph{
            width: 50%;
        }
        .title{
            font-size: 2em;
        }
   }
}

.button__cta{
    background-color: var(--pink);
    color: white;
    border-radius: 20px;
    text-decoration: none;
    padding: 10px 30px;
    justify-self: center;
    font-weight: bold;
    box-shadow: -5px 8px 16px -8px rgba(0, 0, 0, .5);
    transition: opacity .5s;
}

.header__figure{
    margin-top: 3em;
}

.header__figure img{
    display: block;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.header__cards{
    margin-top: 3em;
    display: flex;
    flex-direction: column;
    gap: 3em;
    align-items: center;
    padding-bottom: 100px;
}

.card__figure img{
    display: block;
}

.card__title{
    font-family: var(--headings);
    font-size: 3.5em;
}

.card__paragraph{
    font-size: .8em;
    color: gray;
}

.wave{
    position: absolute;
    width: 100%;
    height: 100px;
    background-repeat: no-repeat;
    background-size: 100% 100px;
}

.wave--botton{
    bottom: 0;
    left: 0;
    background-image: var(--waveBottom);
}

.wave--top{
    top: 0;
    left: 0;
    background-image: var(--waveTop);
}

/*  MAIN    */

.section{
    --paddingContainer: 6rem 0;
    background-color: hsl(207, 100%, 98%);
}

.section--white{
    position: relative;
    background-color: #fff;
    --paddingContainer: 11rem 0;
    --waveTop: url(images/bg-section-bottom-mobile-1.svg);
    --waveBottom: url(images/bg-section-top-mobile-2.svg);
}

.section--white:last-of-type{
    --waveBottom: url(images/bg-footer-top-mobile.svg);
    --paddingContainer: 11rem 0 13rem;
}

.section .container{
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.section__texts{
    text-align: center;
    font-family: var(--headings);
}

.subtitle{
    font-size: 1.4em;
}

.section__texts .paragraph{
    padding: initial;
    margin-top: 20px;
}

.section__texts .button__cta{
    display: inline-block;
    font-weight: initial;
    margin-top: 30px;
}

.section__figure img{
    width: 100%;
    max-width: 400px;
    display: block;
    margin: 0 auto;
}

/*  FOOTER*/
.footer{
    color: #fff;
    background-color: var(--veryDarkCyan);
    overflow: hidden;
    --colorInput: crimson;
}

.footer__item{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer__item:last-of-type{
    gap: 2.5em;
}

.footer__item:first-of-type{
    margin-bottom: 6em;
}

.footer__subtitle{
    text-transform: uppercase;
}

.footer__form{
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* --display-estado-gmail: none; */

    & div{
        flex-grow: 1;
    }
}

.footer__input{
    padding: 10px;
    border-radius: 10px;
    outline: none;
    font-family: var(--body);
    width: 100%;

    &:valid{
        border: 3px solid green;
    }

    &:invalid{
        border: 3px solid crimson;
    }

    &:placeholder-shown{
        border: 2px solid;
    }
}

.estados__gmail{
    color: crimson;
    font-size: .8rem;
    margin-top: 5px;
    height: 18px;
    width: 100%;

    & p{
        display: none;
    }

    & p:last-of-type{
        color: green;
    }
}

.footer__input.invalid ~ .estados__gmail :first-child,
.footer__input.valid ~ .estados__gmail :last-child{
    display: block;
}

.footer__form .button__cta{
    display: block;
    border: none;
    margin-left: auto;
    position: relative;
    overflow: hidden;
    
    &::before{
        content: '';
        display: block;
        width: 0;
        height: 100%;
        border-radius: 10px;
        background-color: rgba(255, 255, 255, 0.3);
        position: absolute;
        top: 0;
        left: 0;
        transition: width .5s;
    }
}

.button__cta--borderRadius{
    border-radius: 10px;
    padding: unset;
    width: 126px;
    height: 36px;
}

.footer__contac::after{
    content: 'Phone: +1-543-123-4567';
    margin-left: 1em;
}

.footer__contac:nth-of-type(2):after{
    content: 'example@hunddle.com';
    margin-left: 1em;
}

.logo-white{
    width: 80%;
    max-width: 320px;
    margin-bottom: 10px;
}

.footer__contac:first-child{
    margin-bottom: 10px;
}

.footer__redes{
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 50px;
}

i{
    color: #fff;
    font-size: 1.5em;
    transition: color .5s;
    width: 100%;
}

/*  Active states   */
.button__cta:not([type="submit"]):hover{
    opacity: .7;
}

[type="submit"]:hover{
    cursor: pointer;
    
    &::before{
        width: 100%;
    }
}

i:hover{
    color: aqua;
}

@media screen and (width >= 600px){
    .header{
        --waveBottom: url(images/bg-section-top-desktop-1.svg);
    }
    .title{
        font-size: 2rem;
    }
    .header__cards{
        flex-direction: row;
        justify-content: space-evenly;
    }
    .section--white{
        --waveTop: url(images/bg-section-bottom-desktop-1.svg);
        --waveBottom: url(images/bg-section-top-desktop-2.svg);
    }
    
    .section--white:last-of-type{
        --waveBottom: url(images/bg-footer-top-desktop.svg);
    }
    .section .container{
        flex-direction: row;
        justify-content: space-between;
    }
    .section__texts{
        flex-basis: 45%;
        text-align: unset;
    }
    .section--white:last-of-type .container .section__texts{
        flex-basis: unset;
    }
    .section__texts .subtitle{
        margin-bottom: 30px;
    }
    .section__texts .button__cta{
        display: block;
        width: 218px;
        margin: 0 auto;
    }
    .subtitle{
        font-size: 1.6rem;
    }
    .section__figure{
        flex-basis: 45%;
    }
    .section--white:last-of-type .container{
        justify-content: center;
    }

    .footer .container{
        display: flex;
        justify-content: space-between;
    }

    .footer__item{
        flex-basis: 40%;
    }

    .footer__item:first-of-type{
        margin: unset;
    }
    .footer__item:last-of-type{
        order: -1;
    }

    .footer__form{
        flex-direction: row;
        /* gap: 10px; */
        flex-wrap: wrap;

        & .button__cta{
            margin-left: unset;
        }
    }
}

