:root {
    --light: #f9f8f7;
    --darker-light: #e9e8e7;
    --text-on-light: hsl(207, 17%, 23%);
    --pale-text-on-light: #ccc;
    --accent-on-light: hsl(24, 100%, 43%);
    --pale-accent-on-light: hsl(32, 85%, 80%);
    --darker-pale-accent-on-light: hsl(32, 70%, 65%);

    --dark: hsl(189, 27%, 29%);
    --text-on-dark: var(--light);
    --pale-text-on-dark: hsl(189, 17%, 40%);
    --accent-on-dark: hsl(30, 100%, 70%);
    --pale-accent-on-dark: hsl(40, 17%, 40%);
}

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

body {
    font-family: Montserrat, Inter, Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.6;
}

a {
    text-decoration: underline;
    text-decoration-thickness: 3px;
}

a:hover {
    color: var(--pale-accent-on-light);
}

#nav-container,
#footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}
#main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem 2rem;
}

@media (max-width: 359px) {
    #nav-container > div {
        display: inline-block;
    }
}
@media (min-width: 360px) {
    #nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}
#nav-container h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

main {
    min-height: calc(100vh - 72.8px - 60.2px);
    background: linear-gradient(to bottom, #e4e4e4 0, var(--light) 7rem)
        no-repeat;
    color: var(--text-on-light);
    border-top: solid 0.2rem var(--pale-text-on-light);
    border-bottom: solid 1px var(--pale-text-on-light);
}
main,
footer {
    & a {
        color: var(--text-on-light);
        text-decoration-color: #ccc;
    }
    & a:hover {
        color: var(--accent-on-light);
        text-decoration-color: var(--pale-accent-on-light);
    }
}
header {
    background-color: var(--dark);
    color: var(--text-on-dark);
    & a {
        color: var(--text-on-dark);
        text-decoration-color: var(--pale-text-on-dark);
    }
    & a:hover {
        color: var(--accent-on-dark);
        text-decoration-color: var(--pale-accent-on-dark);
    }
}
header {
    border-bottom: solid 0.8rem var(--pale-text-on-dark);
}
footer {
    background-color: var(--darker-light);
}

#footer-container {
    text-align: right;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: min(2rem, 2.5vw);
}

/* Language switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.lang-current {
    font-weight: 700;
}

.separator {
    color: var(--pale-text-on-dark);
}
.lang-disabled {
    color: var(--pale-text-on-dark);
    cursor: not-allowed;
    text-decoration: line-through;
}

/* -------------------------------------- */

#main-container {
    & h1 {
        margin: 3rem 0;
    }
    & h1.huge {
        font-size: min(
            6rem,
            20vw /* Tuned to avoid line break on landing page */
        );
        line-height: 6.5rem;
        font-weight: normal;
        margin: 5rem 0 0 0;
    }
    & .subtitle {
        font-size: 1.2rem;
        margin: 1rem 0 8rem 0;
    }
    & h1.detailed {
        margin-bottom: 0.3rem;
        & + p.details {
            color: var(--pale-text-on-light);
            font-weight: bold;
            margin-bottom: 3rem;
        }
    }

    h2,
    & h3,
    & h4,
    & .in-your-face {
        margin-top: 3rem;
        margin-bottom: 0.3rem;
    }
    & p,
    & ul,
    & blockquote {
        margin-bottom: 1rem;
    }

    & li {
        margin-left: 3rem;
        margin-bottom: 0.5rem;
    }

    .highlight {
        display: inline-block;
        background-color: var(--pale-accent-on-light);
        padding: 0.2rem 2rem;
        border-radius: 0.1rem;
        transform: skewX(-20deg);
        & span {
            display: inline-block;
            transform: skewX(20deg);
            font-size: min(
                1.2rem,
                4.5vw /* Tuned to avoid line break on landing page */
            );
        }
    }
}

/* -------------------------------------- */
.flex-columns {
    display: flex;
    flex-direction: row;
    gap: 2rem;

    & div {
        flex: 1;
    }
}

.in-your-face div {
    padding: 1.2rem 1.2rem 0.4rem 1.2rem;
    border-radius: 1rem;

    background: linear-gradient(
        to bottom,
        var(--pale-accent-on-light),
        var(--darker-pale-accent-on-light)
    );
    box-shadow: rgba(0, 0, 0, 20%) 0 3px 8px;

    text-align: center;
    line-height: 1.1;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 2rem;
}

blockquote {
    margin-left: 2rem;
    font-style: italic;
}

@media (min-width: 768px) {
    .two-columns {
        column-count: 2;
        column-gap: 4rem;
        & > h2:first-child {
            margin-top: 0 !important;
        }
        & > p {
            break-inside: avoid-column;
        }
    }
    .same-column {
        break-inside: avoid-column;
    }
}

dl {
    display: grid;
    grid-template-columns: max-content auto;
    gap: 1rem;
}

dt {
    grid-column-start: 1;
}

dd {
    grid-column-start: 2;
}
