* {
    box-sizing: border-box;
}

:root {
    --color-background: #ffe3ee;
    --color-link: #ba4977;
    --color-link-border: #8c1b49;
    --color-text: #8c1b49;
    --color-card-border: #c4b1fb;
    --color-card-background: #ead9fc;
    --color-button-background: #a82157;
    --color-button-background-hover: #b43065;
    --color-button-text: #fff;
    --footer-height: 3rem;
    --footer-color-background: rgba(255, 138, 186, 0.45);
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #461026;
        --color-link: #e9679c;
        --color-link-border: #8c1b49;
        --color-text: #ffcfe2;
        --color-card-border: #4b3e69;
        --color-card-background: #281f3c;
        --footer-color-background: rgba(0, 0, 0, 0.5);
    }
}

html {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: 'DM Sans', sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-weight: 300;
    margin: 0;
    padding: 0;
}

body {
    color: var(--color-text);
    margin: 0 auto;
    padding: 0;
}

a {
    border-bottom: 2px solid var(--color-link-border);
    color: var(--color-link);
    display: inline-block;
    font-weight: bold;
    line-height: 1.2;
    text-decoration: none;
}

a:hover {
    border-bottom: 2px dotted var(--color-link-border);
}

body {
    margin: 0 auto;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0rem;
    margin-top: 2rem;
    text-align: center;
}

.c-content {
    font-family: 'Outfit', sans-serif;
    height: calc(100vh - var(--footer-height));
    margin: 0 auto;
    max-width: 70rem;
    min-height: calc(100vh - var(--footer-height));
}

.c-content__inner {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100%;
    margin: 0 auto;
    overflow: scroll;
    padding: 1.5rem;
    padding-bottom: 2.5rem;
}

.c-heading:has(.c-heading-word--is-hidden) {
    max-width: 25rem;
}

.c-heading:not(:has(.c-heading-word--is-hidden)) {
    max-width: 28rem;
}

.c-heading-wrapper {
    background-color: var(--footer-color-background);
    border-radius: 36px;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    width: 100%;
}

.c-heading {
    margin: 0 auto;
    transition: max-width 0.5s ease;
}

.c-heading-word {
    opacity: 1;
    position: relative;
    transform: translateX(0);
    transition: opacity 1s ease, transform 0.7s linear;
    will-change: transform;
}

.c-heading-word.c-heading-word--is-hidden {
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0.5rem;
    transform: translateX(-100%);
}

.c-list {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(2, 1fr);
}

.c-list.c-list--is-hidden {
    display: none;
}

.c-list__item {
    align-items: center;
    background-color: var(--color-card-background);
    border: 1px solid var(--color-card-border);
    border-radius: 8px;
    display: flex;
    font-size: 1.25rem;
    height: 20vh;
    justify-content: center;
    padding: 1rem 1.25rem;
    text-align: center;
}

.c-button {
    background: none;
    background-color: var(--color-button-background);
    border: none;
    border-radius: 24px;
    color: var(--color-button-text);
    font-family: inherit;
    font-size: 1.2rem;
    line-height: 1;
    margin: 0;
    padding: 0.65rem 1.5rem;
    transition: background-color 0.25s ease;
}

.c-button:hover {
    background-color: var(--color-button-background-hover);
}

.c-footer {
    align-items: center;
    background-color: var(--footer-color-background);
    display: flex;
    font-size: 0.85rem;
    height: var(--footer-height);
    inset: auto 0 0 0;
    justify-content: center;
    padding: 1rem 1.5rem 1rem;
    position: fixed;
    width: 100%;
}

@media (min-width: 780px) {
    h1 {
        font-size: 2.25rem;
    }

    .c-content__inner {
        justify-content: center;
        padding-bottom: 1.5rem;
    }

    .c-heading-wrapper {
        background-color: transparent;
        padding: 0;
        padding-top: 1.5rem;
        position: relative;
        width: auto;
    }

    .c-heading {
        position: relative;
    }

    .c-heading-word.c-heading-word--is-hidden {
        top: 0;
    }

    .c-list {
        grid-template-columns: repeat(4, 1fr);
    }
}
