:root {
    --pale-blue: hsl(225, 100%, 94%);
    --bright-blue: hsl(245, 75%, 52%);
    --very-pale-blue: hsl(225, 100%, 98%);
    --desaturated-blue: hsl(224, 23%, 55%);
    --dark-blue: hsl(223, 47%, 23%);
    --hover-state: hsl(245, 75%, 70%);
}

* {
    margin: 0;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 500;
    color: var(--dark-blue);
}

body {
    background-color: var(--pale-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
}

.container {
    margin-top: auto;
    width: min(450px, 90%);
    min-height: 710px;
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
}

main {
    padding: 1em 3em;
}

main > * {
    margin: 1.5em auto 2em;
}

.plan-box {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.2em;
    align-items: center;
    padding: 1.5em;
    background-color: var(--very-pale-blue);
    border-radius: 15px;
}

.plan-box > * {
    line-height: 1.5;
}

.change-plan-btn,
footer > a {
    color: var(--bright-blue);
    text-decoration: underline;
}


.cta-btn {
    padding: 1em;
    color: white;
    background-color: var(--bright-blue);
    border-radius: 15px;
    box-shadow: 0 15px 20px hsl(225, 100%, 90%);
}

.change-plan-btn:hover,
footer > a:hover {
    color: var(--hover-state);
    cursor: pointer;
    transition: 0.4s;
}

.cta-btn:hover {
    background-color: var(--hover-state);
    cursor: pointer;
    transition: 0.4s;
}

.cancel-btn:hover {
    color: var(--dark-blue);
    cursor: pointer;
    transition: 0.4s;
}

h1,
h2 {
    font-weight: 900;
}

h1 {
    margin-top: 0;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 1.2em;
}

.bold {
    font-weight: 700;
}

.center {
    text-align: center;
}

p,
.cancel-btn {
    color: var(--desaturated-blue);
}

footer {
    margin-top: auto;
    padding-top: 1em;
    padding-bottom: 1em;
    font-size: 0.8em;
}

img.pattern-background-desktop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

img.pattern-background-mobile {
    display: none;
    z-index: -1;
}

@media only screen and (max-width: 500px) {
    body {
        height: max(auto, 100vh);        
    }
    
    .container {
        margin: 1em;
    }

    img.pattern-background-desktop {
        display: none;
    }

    img.pattern-background-mobile {
        display: inline;
        position: fixed;
        top: 0;
        z-index: -1;
        width: 100%;
    }
}

@media only screen and (max-width: 407px) {  
    .container {
        min-height: 740px;
    }
    
    main {
        padding: 1em 2em;
    }

    .plan-box {
        grid-template-columns: auto 1fr;
        grid-template-rows: 1fr auto;
        padding: 1.3em;
    }

    .change-plan-btn {
        grid-column-start: 2;
    }
}
