/* =========================================================
   ROOT / VARIABLES
   ========================================================= */

:root {
    --primary: hsl(180, 66%, 49%);
    --primary-ex: hsl(257, 27%, 26%);
    --secondary: hsl(0, 87%, 67%);

    --neutral-400: hsl(0, 0%, 75%);
    --neutral-500: hsl(257, 7%, 63%);
    --neutral-900: hsl(255, 11%, 22%);
    --neutral-950: hsl(260, 8%, 14%);
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}


/* =========================================================
   FONTS
   ========================================================= */

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-ExtraBoldItalic.ttf') format('truetype');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}


/* =========================================================
   GENERAL
   ========================================================= */

body {
    min-height: 100vh;
    height: 100%;
    position: relative;
    margin-top: 1.25rem;
    /* overflow-x: hidden; */
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        to bottom,
        #fff 0%,
        #fff 50rem,
        hsl(0, 0%, 75%) 0%,
        hsl(0, 0%, 75%) 100%
    );

    /* min-width: 1440px; */
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

button {
    cursor: pointer;
}

.btn {
    cursor: pointer;
    color: #fff;
    background-color: var(--primary);
}

.btn:active {
    background-color: #79dfdf;
}


/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */

header,
.nav-links,
nav {
    display: flex;
    gap: 2rem;
}

header {
    height: 3rem;
    flex: 1;
    justify-content: space-between;
    /* margin-left: 9.375rem;
    margin-right: 9.375rem; */
}

.top-left {
    display: flex;
    gap: 2rem;
}

nav {
    justify-content: space-between;
}

header .logo {
    margin-top: 1rem;
    width: 100%;
}

.logo-el{
    width: 12rem;
    height: 3.5rem;
    
}

.nav-links,
.auth-links {
    padding-top: 1rem;
}

.nav-links a {
    color: #00000064;
    font-weight: 600;
    font-size: 1rem;
}

.nav-links a:active {
    color: #000;
}

.auth-links {
    width: auto;
    gap: 1rem;
    padding-top: 1rem;
    margin-left: auto;
}

.login,
.sign-up {
    padding: 0.5rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    border: none;
}

.login {
    color: #00000064;
    cursor: pointer;
    background-color: transparent;
}

.menu {
    display: none;
}


/* =========================================================
   SECTION 1 — HERO
   ========================================================= */

.section1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-top: 5rem;

}

.section1 h1 {
    font-size: 4rem;
    font-weight: 600;
}

.section1 p {
    color: #00000064;
    font-size: 1.3rem;
    font-weight: 600;
}

.section1 .illustration {
    width: 100%;
    overflow: hidden;
    margin-right: auto;
    transform: translateX(6rem);
}

.illustration > img {
    width: 47rem;
   
    overflow: hidden;
    height: 100%;
}

.section1 .aa{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}

.section1 button {
    margin-top: 1.8rem;
    padding: 1rem 2.5rem;
    border-radius: 2rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
}


/* =========================================================
   SECTION CARD / SHORTEN FORM
   ========================================================= */

.section-card {
    margin-top: 5rem;
    margin-bottom: 2rem;
}

.section2 {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 8.5rem;
    border-radius: 0.3rem;
    background-color: black;
    background-image: url('../images/bg-shorten-desktop.svg');

}

input {
    flex: 1;
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    border: none;
    border-radius: 0.5rem;
    outline: none;
}

input:focus-visible {
    border: 2px solid rgb(10, 0, 20);
}

input.error{
    border : 4px solid rgb(253, 6, 6);
}

input.already{
    border: 2px solid rgb(6, 253, 27);
}

form{
    /* background-color: #2acfcf; */
    width: 80%;
    flex-shrink: 0;
    display: flex;
}

.shortenbtn {
    padding: 0.6rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.copy.copied{
    background-color: #000;
}

.error-message {
    position: absolute;
    margin-top: 3rem;
    color: red;
    font-size: 0.8rem;
    font-weight: 400;
    font-style: italic;
}

.error-message.already-ex{
    color: rgb(6, 253, 27);
}


/* =========================================================
   SHORTENED LINKS
   ========================================================= */

.shortened-links {
    margin-top: 1.5rem;
    /* margin-left: 9.375rem;
    margin-right: 9.375rem; */
}

.SHORTEN {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem;
    color: black;
    font-size: 1.2rem;
    font-weight: 500;
    background-color: #fff;
    border-radius: 0.5rem;
}

.copy {
    margin: 0.6rem;
    padding: 0.5rem 1.5rem;
    color: white;
    border: none;
    border-radius: 0.5rem;
}

.lik {
    
    color: rgb(22, 196, 222);
}


/* =========================================================
   SECTION 3 — FEATURES / CARDS
   ========================================================= */

.section3 {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    height: fit-content;
    margin-top: 5rem;
    /* margin-left: 9.375rem;
    margin-right: 9.375rem; */
}

.section3-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40%;
}

.section3-header p {
    text-align: center;
}

.section3 p {
    margin-top: 0.5rem;

    color: #00000064;
    font-size: 1rem;
}

.cards {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
}

.cards div {
    position: relative;
    width: 40%;
    height: fit-content;
    padding: 2rem;
    background-color: #fff;
    border-radius: 0.5rem;
}

.cards div img {
    position: absolute;
    top: -2rem;
    left: 2rem;
    padding: 1rem;
    background-color: #3b3054;
    border-radius: 50%;
}

.cards div h3 {
    margin-top: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.cards div:first-child {
    margin-top: 2rem;
    z-index: 2;
}

.cards div:nth-child(2) {
    margin-top: 4rem;
    z-index: 2;
}

.cards div:last-child {
    margin-top: 6rem;
    z-index: 2;
}

.line {
    position: absolute;
    top: 60%;
    left: 0;
    width: 100%;
    height: .5rem;
    background-color: #2acfcf;
    z-index: 1;
}


/* =========================================================
   SECTION 4 — BOOST
   ========================================================= */

.section4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 14rem;
    flex: 1;
}

.section4-place {
    margin-top: 5rem;
    background-color: #28143e;
    background-image: url('../images/bg-boost-desktop.svg');
    background-repeat: no-repeat;
    background-size: cover;
}

.section4 h2 {
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
}

.section4 button {
    margin-top: 1rem;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 5rem;
}

.social-icons {
    display: flex;
    flex-direction: row;
    margin-top: -7.5rem;
}

.social-icons svg {
    margin: auto 0.625rem;
    cursor: pointer;
}

.social-icons svg path:active {
    fill: rgb(6, 188, 238);
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer-place {
    color: #fff;
    background-color: #171515;
    background-size: cover;
    flex: 1;
}

footer {
    margin-left: 9.375rem;
    margin-right: 9.375rem;
}

.close{
    display: none;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 0;
}

.footer-content .logo {
    margin-top: -7.5rem;
}

.footer-content .logo path {
    width: 10rem;
    fill: white;
}

.footer-links {
    display: flex;
    gap: 5rem;
    margin-right: 5rem;
}

.footer-links div h3 {
    margin-bottom: 2rem;
    font-size: 1rem;
}

.footer-links div a {
    font-size: 0.82rem;
}

.footer-links div a:active {
    color: var(--primary);
}

.footer-content div ul li a {
    color: rgb(215, 196, 196);
    gap: 1rem;
}

#clear-links{
    background-color: rgb(213, 43, 43);
    color: #fff;
    width: 7rem;
    height: 2.5rem;
    border: none;
    border-radius: .5rem;
    margin-right: auto;
    font-size: 1.3rem;
    cursor: pointer;
}

#clear{
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    display: none;
}

.attribution {
    padding: 0.625rem;
    color: rgba(245, 237, 237, 0.692);
    font-weight: 700;
    text-align: center;
}

.attribution a {
    color: inherit;
    text-decoration: underline;
}

.attribution a:hover,
.attribution a:focus {
    opacity: 0.8;
}

.main-container{
    margin-left: 6.3rem;
    margin-right: 6.3rem;
    
}

.delete{
    background-color: transparent;
    border: none;
    color: #000;
}

.delete>svg{
    margin-bottom: -.6rem;
}

/* =========================================================
   TABLET — 601px TO 1000px
   ========================================================= */

@media screen and (min-width: 47.5625rem) and (max-width: 75rem) {

    body{
         background: linear-gradient(
        to bottom,
        #fff 0%,
        #fff 41.5rem,
        hsl(0, 0%, 75%) 0%,
        hsl(0, 0%, 75%) 100%
    );
    }

    .section1 h1 {
        font-size: 3rem;
    }

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

    /* .section1 .illustration {
        transform: translateX(-2rem);
    } */

    .illustration > img {
        width: 120%;
    }

    /* SHORTEN FORM */

    .section2 {
        width: 100%;
        padding: 2rem;
    }

    input {
        width: 100%;
        min-width: 0;
        flex: 1;
    }

    form{
        width: 100%;
        flex-shrink: 0;
        display: flex;
    }

    .shortenbtn {
        flex-shrink: 0;
    }

    /* SHORTENED LINKS */

    .SHORTEN {
        width: 100%;
        gap: 1rem;
        font-size: 1rem;
    }

    .orginal {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .cl-url {
        display: flex;
        align-items: center;
        min-width: 0;
    }


    .section3-header {
        width: 60%;
    }

    .cards {
        gap: 1rem;
    }

    .cards div {
        width: 33.33%;
        padding: 1.5rem;
    }

    .cards div h3 {
        font-size: 1.2rem;
    }


    .footer-links {
        gap: 2rem;
        margin-right: 2rem;
    }
}

/* =========================================================
   MOBILE — 760px AND BELOW
   ========================================================= */

@media screen and (max-width: 47.5625rem) {

    /* -----------------------------------------------------
       BODY
       ----------------------------------------------------- */

    body {
        width: 100%;
        min-width: 0;
        max-width: none;
        margin-top: 0;
        /* overflow-x: hidden; */
        margin: 0rem;
        background: linear-gradient(
            to bottom,
            #fff 0%,
            #fff 63.5rem,
            hsl(0, 0%, 75%) 0%,
            hsl(0, 0%, 75%) 100%
        );

    }


    /* -----------------------------------------------------
       HEADER
       ----------------------------------------------------- */

    header {
        width: 100%;
        margin: 0rem;
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .top-left {
        position: relative;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .top-left > nav > ul {
        width: 100%;
        display: flex;
        flex-direction: column;
        padding: 3rem;
        background-color: #280f44;
        border-top-left-radius: 0.5rem;
        border-top-right-radius: 0.5rem;
    }

    #auth-links{
        
        background-color: #280f44;
        margin-top: 21rem;
    }



    .top-left > nav > ul,
    #auth-links {
        display: none;
        color: white;
        align-items: center;
    }

    header.open #auth-links {
        display: flex;
    }

    header.open .top-left > nav > ul {
        display: flex;
    }

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

    .logo-el {
        width: 12rem;
    }

    .menu,
    .close {
        width: 3rem;
        margin-left: auto;
    }

    .menu {
        display: inline;
        width: 3.5rem;
        height: 3.5rem;
    }

    .menu-el.open .menu {
        display: none;
    }

    .menu-el.open .close {
        display: block;
    }
    .menu-el{
        background-color: transparent;
        border-radius: .5rem;
        border: .1rem solid rgb(158, 152, 152);

    }

    .close {
        display: none;
    }

    .auth-links {
        position: absolute;
        top: 99%;
        width: 100%;
        display: flex;
        flex-direction: column;
        margin: 0rem;
        padding: 5rem;
        border-bottom-left-radius: 0.5rem;
        border-bottom-right-radius: 0.5rem;
    }

    .auth-links button {
        width: 100%;
    }

    .mobile-line {
        width: 99%;
        height: 0.03125rem;
        margin-top: -3.125rem;
        margin-bottom: 1.875rem;
        background-color: #5f5f77 ;
    }

    .nav-links a,
    .auth-links button {
        color: #fff;
        font-size: 1.875rem;
    }


    /* -----------------------------------------------------
       SECTION 1
       ----------------------------------------------------- */

    .section1 {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .section1 .illustration {
        width: 80%;
        height: fit-content;
        overflow-x: hidden;
        grid-row: 1;

    }

    .illustration > img {
        width: 120%;
        margin-left: 0;

    }

    .section1 > .aa {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        grid-row: 2;
    }

    .section1 h1,
    .section1 p {
        text-align: center;
    }

    .section1.open .illustration {
        display: none;
    }



    .section1.open .aa {
        margin-top: 35rem;
    }


    /* -----------------------------------------------------
       SECTION CARD / SHORTEN FORM
       ----------------------------------------------------- */

    .section-card {
        width: 100%;
        margin-top: 2.5rem;
        margin-bottom: 2.5rem;
        padding: 0;
    }

    .section2 {
        width: 100%;
        height: 12rem;
        padding: 3rem;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 3rem;
        margin-left: 0;
        margin-right: 0;
        background-color: #36135c;
        background-image: url('../images/bg-shorten-mobile.svg');
        background-repeat: no-repeat;
        background-size: 18.75rem;
        background-position: right center;
    }



    form{
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .section2 button {
        width: 100%;
        height: 3rem;
        margin: 0rem;
        margin-top: 2rem;
    }


    /* -----------------------------------------------------
       SHORTENED LINKS
       ----------------------------------------------------- */

    .shortened-links {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .SHORTEN {
        flex-direction: column;
        gap: 0;
        background-color: transparent;
    }

    .cl-url {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 2rem;
        background-color: #fff;
        border-bottom-left-radius: 0.5rem;
        border-bottom-right-radius: 0.5rem;
    }

    .orginal {
        width: 100%;
        margin: 0rem;
        margin-bottom: 0.3rem;
        padding: 0.8rem 2rem;
        background-color: #fff;
        border-top-left-radius: 0.5rem;
        border-top-right-radius: 0.5rem;
        overflow-wrap: anywhere;
    }

    .lik {
        overflow-wrap: anywhere;
        
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .delete{
        display: none;
    }

    .copy {
        padding: 0.8rem 1.5rem;
        margin: 0rem;
        margin-top: 0.5rem;
        
    }


    /* -----------------------------------------------------
       SECTION 3
       ----------------------------------------------------- */

    .section3 {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        flex-direction: column;
    }

    .section3-header {
        width: 60%;
    }

    .section3-header h2 {
        width: 100%;
        text-align: center;
    }

    .section3-header p {
        font-size: 1.2rem;
    }

    .cards {
        width: 100%;

        flex-direction: column;
    }

    .cards > div {
        width: 100%;
        height: 15rem;
    }

    .cards>div>img {
        position: absolute;
        left: 40%;
        padding: 1rem;
        background-color: #3b3054;
        border-radius: 50%;
    }

    .line {
        position: absolute;
        width: 0.5rem;
        height: 60%;
        left: 45%;
        transform: translateY(-40%);
    }


    /* -----------------------------------------------------
       SECTION 4 — BOOST
       ----------------------------------------------------- */

    .section4 button {
        width: 13rem;
    }

    .section4-place {
        width: 100%;
        height: 20rem;
        margin: 0rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #36135c;
        background-image: url('../images/bg-boost-mobile.svg');
        background-repeat: no-repeat;
        background-size: 43.75rem;
        background-position: right center;
        margin-top: 5rem;
    }


    /* -----------------------------------------------------
       FOOTER
       ----------------------------------------------------- */

    footer {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .footer-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-right: 0;
        gap: 3rem;
    }

    .footer-links ul li,
    .footer-links h3 {
        text-align: center;
    }

    .footer-links h3{
        margin-bottom: 2rem;
    }

    .footer-content .logo {
        margin: 0rem;
        margin-bottom: 3rem;
        
    }

    .social-icons {
        margin: 0rem;
        margin-top: 3rem;
        margin-left: -1rem;
    }

    .main-container{
        margin-left: 3rem;
        margin-right: 3rem;
    }
}
