﻿:root {
    --clr-black: #282828;
    --clr-white: #fffef8;
    --clr-red: #f45d48;
    --clr-green: #7ac142;
    --curve: cubic-bezier(0.65, 0, 0.45, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    font-size: 1rem;
    font-family: "DM Sans", sans-serif;
    padding: 15px 20px;
}

body {
    background-color: var(--clr-white);
    color: var(--clr-black);
}

header,
main {
    max-width: 800px;
    margin: 0 auto;
}

header {
    margin-bottom: 4em;
}

p {
    white-space: pre-line;
    line-height: 1.6;
    font-size: 1.125rem;
}

    p:nth-child(2) {
        margin-bottom: 2em;
    }

    p:nth-child(3) {
        font-style: italic;
    }

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--clr-red);
    fill: none;
    animation: stroke 0.6s var(--curve) forwards;
}

.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--clr-white);
    stroke-miterlimit: 10;
    margin: 10% auto 20%;
    box-shadow: inset 0 0 var(--clr-red);
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s var(--curve) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0 0 0 30px var(--clr-red);
    }
}
