/* header */

.header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--navy-850);
    padding: var(--space-md);
    height: 600px;
    position: relative;
}

.header-section {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
}

.logo {
    width: 120px;
    transition: all 0.2s ease-in;
}

.logo:hover {
    transform: scale(1.05) translateX(10px);
}

.navigation-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-lg);
    height: 35px;
    margin-right: 20px;
}

.navigation-list li {
    list-style: none;
}

.link {
    text-decoration: none;
    color: var(--white);
    font-weight: var(--fw-light);
    font-size: var(--fs-xs);
    transition: all 0.2s ease-in;
}

.header .link:hover,
.header .link:focus {
    font-size: 1.1em;
}

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

.curvy {
    position: absolute;
    width: 100%;
    height: 20%;
    max-height: 475px;
    left: 0;
    bottom: -10px;
}

/* hero */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 364px);
    text-align: center;
    margin: 0 auto;
    z-index: 2;
}

.subtitle {
    font-size: var(--fs-lg);
    width: 90%;
    max-width: 330px;
    margin-bottom: var(--space-sm);
    line-height: var(--space-lg);
}

.hero .card-desc {
    width: 90%;
    margin-bottom: var(--space-lg)
}

.cta-btn {
    width: 70%;
    height: 60px;
    border-radius: var(--radius-half);
    border: none;
    color: var(--white);
    font-weight: var(--fw-bold);
    font-size: var(--fs-md);
    background: var(--cta-gradient);
    cursor: pointer;
    transition: all 0.2s ease-in;
}

.cta-btn:hover {
    transform: scale(1.01) translateY(-5px);
    box-shadow: 0px 0px 10px black;
}


.illustration-intro {
    width: 80%;
    margin-bottom: var(--space-lg);
    transition: all 0.2s ease-in-out;
}

.illustration-intro:hover {
    transform: scale(1.05);
}

/* main */

.main {
    background-color: var(--navy-900);
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    position: relative;
    align-items: center;
}


/* feature cards */

.feature-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg);
    text-align: center;
    gap: var(--space-lg)
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 420px;
}

.feature-card .icon {
    width: 70px;
    margin-bottom: var(--space-lg);
}

.feature-card .card-title {
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    margin-bottom: var(--space-md);
}

.feature-card .card-desc {
    width: auto;
}

/* main card */

.main-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    align-items: flex-start;
    max-width: 480px;
    margin: 140px 0;
}

.illustration-mid {
    width: 80%;
    align-self: center;
    margin-bottom: var(--space-lg);
    transition: all 0.2s ease-in-out;
}

.illustration-mid:hover {
    transform: scale(1.05);
}

.main-card .card-title {
    text-align: left;
    font-size: var(--fs-md);
    margin-bottom: var(--space-md);
}

.main-card .card-desc {
    margin-bottom: var(--space-md);
    font-size: var(--fs-sm);
    line-height: var(--fs-lg);
}

.main-card .card-link {
    text-decoration: none;
    color: var(--teal-200);
    cursor: pointer;
    align-content: center;

}

.icon-wrapper {
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid var(--teal-200);
    padding-bottom: 6px;
    width: 177px;
    gap: var(--space-sm);
    height: auto;
    position: relative;
}

.icon-wrapper .icon {
    position: absolute;
    right: -4px;
    top: -2px;
    width: 26px;
}

/* comments */

.comments-section {
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: 450px;
}

.comment {
    background-color: var(--navy-800);
    padding: var(--space-lg);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-md);
    max-width: 400px;
    transition: all 0.2s ease-in;
}

.comment:hover {
    transform: scale(1.01) translateY(-5px);
    box-shadow: 0 0 16px black;
}

.comment-text {
    line-height: var(--fs-lg);
}

.profile-wrapper {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-xxs)
}

.profile-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment:first-child {
    position: relative;
}

.quotation-mark {
    position: absolute;
    top: -45px;
    left: 8px;
}

.commenter-name {
    font-size: var(--fs-sm);
}

/* end card */

.end-card {
    position: absolute;
    bottom: -220px;
    padding: var(--space-xl) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--navy-850);
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease-in;
}

.end-card:hover {
    transform: scale(1.02);
    box-shadow: 8px 8px 21px rgba(0, 0, 0, 0.5);
}

.end-card .card-title {
    margin-bottom: var(--space-lg);
}

.end-card .card-desc {
    margin-bottom: var(--space-lg);
    line-height: var(--fs-lg);
    width: 80%;
}

.email {
    height: 60px;
    width: 90%;
    margin-bottom: var(--space-md);
    border-radius: var(--radius-half);
    padding: var(--space-md);
    transition: all 0.2s ease-in-out;
}

.email::placeholder {
    opacity: 0.4;
}

.email:focus,
.email:hover {
    outline: 2px solid var(--teal-200);
    background-color: var(--creamy-white);
}

.end-card .cta-btn {
    width: 90%;
    margin-bottom: 2px;
}

/* footer */

.footer {
    background-color: var(--navy-950);
    padding: var(--space-lg);
    margin: 300px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    font-size: var(--fs-md)
}

.footer-main {
    display: flex;
    flex-direction: column;
}

.footer-section:first-child {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--space-md);
}

.wrapper {
    display: flex;
}

.wrapper p {
    max-width: 330px;
}

.footer-section .logo {
    margin-left: 10px;
    margin-bottom: var(--space-lg);
    width: 200px;
}

.footer-section .icon {
    vertical-align: bottom;
    margin-right: var(--space-lg);
    max-width: 18px;
    max-height: 18px;
}

.address {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    width: fit-content;
}

.footer-links {
    margin-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    font-size: var(--fs-lg);
    gap: var(--space-lg);
}

.footer-links .link {
    font-size: var(--fs-sm)
}

.social-icons {
    display: flex;
    flex-direction: row;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    align-self: center;
    flex-wrap: wrap;
}

.social-icons .icon {
    width: 48px;
    height: 48px;
    padding: 10px;
    border-radius: 50%;
    border: 1px solid var(--white);
}

.credits {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    place-items: center;
}

.credit {
    align-items: center;
    color: var(--teal-200);
    text-align: center;
}

/* desktop layout */
/* 62rem = 992px based on default 16px HTML root font size */
@media screen and (min-width: 62rem) {

    .header {
        height: 950px;
    }

    .header .logo {
        margin: var(--space-md);
        width: 80%;
        max-width: 220px;
    }

    .navigation-list {
        margin: var(--space-md);
        margin-right: var(--space-lg);
    }

    .curvy {
        height: 50%;
        max-height: 475px;
    }

    .hero {
        font-size: var(--fs-lg);
        width: 100%;
        max-width: 800px;
    }

    .hero .subtitle {
        font-size: var(--fs-lg2);
        max-width: 650px;
    }

    .feature-cards {
        width: 80%;
        max-width: 1000px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .feature-card .icon {
        width: auto;
    }

    .main-card {
        max-width: 100%;
        flex-direction: row;
        align-items: center;
    }

    .illustration-mid {
        width: 100%;
        max-width: 600px;
        margin-right: 60px;
    }

    .main-card div:last-child {
        display: flex;
        flex-direction: column;
        max-width: 500px;
    }

    .main-card .card-title {
        font-size: var(--fs-xl);
    }

    .comments-section {
        flex-direction: row;
        margin-bottom: 300px;
    }

    .end-card {
        width: 90%;
        max-width: 1000px;
        height: 300px;
        bottom: -110px;
    }

    .btn-wrapper {
        display: flex;
        flex-direction: row;
        width: 100%;
    }

    .email {
        width: 130%;
        margin-right: var(--space-md);
    }

    .footer-main {
        width: 100%;
        max-width: 1600px;
        flex-direction: row;
        justify-content: space-between;
        gap: 200px;
    }

    .wrapper p {
        max-width: 420px;
    }

    .footer-section:nth-child(2) {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    .address {
        justify-self: flex-end;
        margin-bottom: 20px;
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .footer-links div {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
    }

    .social-icons {
        align-self: auto;
    }
}

/* transition fix */

@media (prefers-reduced-motion: reduce) {
    * {
        transition: all 0.01ms linear;
    }
}