:root {
    --red: #ee1623;
    --red-dark: #c41320;
    --blue: #1E306C;
    --grey: #D9DDE0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: system-ui, sans-serif;
    font-weight: normal;
    font-size: 19px;
    height: 54px;
    line-height: 28px;
}

body {
    margin: 0 auto;
    text-rendering: optimizeLegibility;
}

a {
    color: unset;
    text-decoration: none;
    font-weight: 500;
    border-bottom: solid 2px var(--blue);
}

[id] {
    scroll-margin-top: 2lh;
}

nav a,
footer a {
    border-bottom: none
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: auto;
    padding: 1lh;
    gap: 2lh;
    font-weight: 500;
    max-width: 100ch;
}

.logo {
    height: 100px;
    cursor: pointer;
}

input#toggleMenu,
label#toggleMenulabel {
    display: none;
}

.menu ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    column-gap: 1lh;
    align-items: center;
}

.menu ul a:after {
    display: block;
    content: '';
    border-bottom: solid 3px var(--red);
    transform: scaleX(0);
    transition: transform 200ms ease-in-out
}

.menu ul a:hover:after {
    transform: scaleX(1)
}

main {
    max-width: 100ch;
    margin: 0 auto;
    padding: 1lh 2lh;
    overflow: hidden;
}

p {
    margin-block: 1lh;
    max-width: 60ch;
}

main ul {
    max-width: 60ch;
    margin: 1lh;
}

main li {
    margin-block: 1lh;
}

main h1 {
    font-size: 2em;
    font-weight: 600;
    line-height: 1.2em;
    background: var(--blue);
    padding: .5lh 1lh;
    margin-left: -1lh;
    margin-bottom: 1lh;
    width: 100%;
    color: #fff;
    text-wrap: balance;
    text-wrap: pretty;
    max-width: fit-content;
}

main h2 {
    margin-top: 5lh;
    margin-left: -1lh;
    background: var(--red);
    border-bottom: var(--red-dark) solid 3px;
    padding: .5lh 1lh;
    max-width: fit-content;
    color: #fff;
    font-size: 1.4em;
    font-weight: 600;
    line-height: 1em;
    text-wrap: balance;
    text-wrap: pretty;
}

main h2:first-child {
    margin-top: 0;
    margin-bottom: 1.5em
}

p.up-top {
    margin-top: 5lh
}

footer {
    display: flex;
    justify-content: space-around;
    padding: 1lh;
    gap: 2lh;
    font-size: .8em;
    background: var(--blue);
    color: #fff
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 1lh;
    padding: 1lh 0;
    align-items: stretch;
}

.cards div {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    border-width: 1px 1px 3px;
    border-style: solid;
    border-color: var(--grey);
    text-align: center;
    padding: 1lh;
    gap: .5lh;
    text-wrap: balance;
    text-wrap: pretty;
    height: 100%;
}

.cards svg {
    width: 2lh;
    height: 1.5lh;
    margin: auto;
}

.cards a {
    border-bottom: none;
}

.cards a:hover {
    background: var(--blue);
    color: #fff;
}

.cards a:hover svg path,
.cards a:hover svg stroke {
    fill: #fff;
}

form {
    display: grid;
    max-width: 60ch;
}

form label {
    margin-bottom: .5lh;
    font-weight: 500
}

label[for=size] {
    display: none;
}

form input,
form textarea {
    padding: 1lh;
    margin-bottom: 2lh;
    border: 1px solid var(--grey);
    border-radius: 5px;
    font-size: 16px;
}

form button {
    background-color: var(--blue);
    color: #fff;
    border: none;
    padding: .5lh 1lh;
    border-radius: 5px;
    cursor: pointer;
    max-width: 6lh;
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 800px) {

    label#toggleMenulabel {
    display: block;
    cursor: pointer;
    text-align: right;
    margin-bottom: 1lh;
    font-weight: 600;
    }

    label#toggleMenulabel span {
    display: inline-flex;
    font-size: inherit;
    transform: rotate(0deg);
    transition: all 0.3s ease;
    }

    .menu {
    display: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    }

    #toggleMenu:checked~.menu {
    display: block;
    visibility: visible;
    opacity: 1;
    }

    #toggleMenu:checked+label#toggleMenulabel span {
    transform: rotate(90deg);
    }

    .menu ul {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    row-gap: 1lh;
    align-items: start;
    padding: 0 1em;
    border-left: var(--red) 5px solid;
    }

    p {
    padding-left: 0;
    }

    main {
    overflow: hidden;
    padding: 1lh;
    }

    main h2 {
    margin-left: -2lh;
    padding: .5lh 1lh .5lh 2lh;
    }

    main img {
    display: grid;
    padding: 1lh 0;
    }

    main ul {
    margin: .5lh;
    }

    nav {
    align-items: start;
    }


    footer {
    flex-direction: column;
    gap: 0;
    }

    .cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    padding: 0;
    }

}

@media screen and (prefers-reduced-motion: reduce) {
    html {
    scroll-behavior: auto;
    }
}
