@import url('https://fonts.googleapis.com/css2?family=Erica+One&display=swap');

:root {
    --gradient: linear-gradient(225deg, transparent, black);
    --gradient2: linear-gradient(to right,
        /* This combination makes the animation look continuous. */
        purple,
        red, orange, yellow, green, blue, purple,
        red, orange, yellow, green, blue, purple);
}

* { box-sizing: border-box; }

body {
    font-family: sans-serif;
}

.notice {
    background-color: lightblue;
    padding: 1rem;
    position: fixed;
    top: 2rem;
    right: 2rem;
    border-radius: 1rem;
    width: 25rem;
    z-index: 100;
    box-shadow: 1px 1px 3px silver;

    display: grid;
    gap: 1rem;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    grid-template-areas:
        "title title"
        "description links";
}

.notice h1 {
    grid-area: title;
    margin: 0;
}

.notice p {
    grid-area: description;
    margin: 0;
}

.notice ul {
    margin: 0;
    padding: 0;
    grid-area: links;

    align-self: center;
}

@media (max-width: 30rem) {
    .notice { display: none; }
}

p {
    max-width: 35rem;
}

header, main {
    margin: 0 2rem;
}

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

main section + section {
    border-top: 3px groove silver;
}

.mdnlink {
    font-family: monospace;
}

.demo {
    font-family: 'Erica One', 'Arial Black', cursive;
    font-size: 8vw;
    width: 8ch;
    font-variant: small-caps;
    line-height: 1;
    -webkit-text-stroke: 1px black;
    white-space: nowrap;
    overflow: hidden;
}

.mask-image .demo {
    mask-image: var(--gradient);
    -webkit-mask-image: var(--gradient);
}

.background-clip .demo {
    background: var(--gradient2);
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
    background-position: left;
    color: transparent;
    margin: 0;
    padding: 0;
}

.animate {
    margin-right: 1rem;
}

.background-clip .animate:checked ~ .demo {
    animation: animate 5s infinite linear;
}

.background-clip-gif .demo {
    background-image: url('https://vaggrippino.github.io/text-gradient-and-fill/images/flag.gif');
    background-clip: text;
    background-size: 25%;
    background-position: left;
    -webkit-background-clip: text;
    color: transparent;

    /* This can be wider than the others because the background is handled differently. */
    width: auto;
}

@keyframes animate {
    to {
        background-position: right;
    }
}