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

html,
body {
    height: 100%;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    color: #1a1a1a;
    background: #f3f3f1;
}

/* Gradient lives on its own composited layer so text repaints never
   re-rasterize it. Fixed position keeps it out of the flex flow. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 30% 20%, #fdfdfd 0%, #f3f3f1 100%);
    transform: translateZ(0);
    will-change: transform;
}

main {
    max-width: 34rem;
    padding: 2rem;
    text-align: center;
}

p {
    font-size: 1.75rem;
    line-height: 1.6;
    letter-spacing: -0.01em;
    /* Reserve the finished height so the centered block doesn't jump
       upward as each typed line is added. 3 lines x 1.75rem x 1.6 */
    min-height: 8.4rem;
}

.line {
    display: block;
}

strong {
    font-weight: 600;
}

/* inline-block: inline boxes can't be promoted to a compositor layer,
   so opacity/transform on them repaint instead of blending. */
.was,
.now-bold,
.now {
    display: inline-block;
}

.was {
    font-weight: 300;
    color: #a8a8a8;
    text-decoration: line-through;
    text-decoration-color: #c7392b;
    text-decoration-thickness: 1.5px;
}

.now-bold {
    font-weight: 700;
    color: #1a1a1a;
}

.now {
    font-weight: 400;
    color: #1a1a1a;
    text-decoration: underline;
    text-decoration-color: #f6d24d;
    text-decoration-thickness: 5px;
    text-underline-offset: 4px;
}

.links {
    margin-top: 1.75rem;
    opacity: 0;
    transform: translateY(14px);
    will-change: opacity, transform;
}

.links.is-visible {
    animation: rise 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.links a {
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px solid #ccc;
    padding-bottom: 2px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.links a:hover {
    color: #c7392b;
    border-color: #c7392b;
}

@keyframes rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typed-cursor {
    font-weight: 300;
    color: #c7392b;
    opacity: 1;
    animation: blink 1s step-end infinite;
}

.typed-cursor.is-done {
    animation: none;
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .links,
    .links.is-visible {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        will-change: auto !important;
    }

    .typed-cursor {
        display: none;
    }
}
