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

body {
    font-family: "Courier New", monospace;
    display: flex;
    justify-content: center;
    padding: 80px 0;
    color: #111;

    background-color: #eeeae3;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.035) 1px,
            transparent 1px),
        linear-gradient(90deg,
            rgba(0, 0, 0, 0.035) 1px,
            transparent 1px);
    background-size: 32px 32px;
}

body {
    animation: backgroundShift 60s linear infinite;
}

@keyframes backgroundShift {
    from {
        background-position: 0 0, 0 0;
    }

    to {
        background-position: 64px 64px, 64px 64px;
    }
}

/* Receipt */
.receipt {
    width: 360px;
    background: #fffdf8;
    padding: 28px 20px 60px;
    position: relative;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.12),
        inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

/* Paper grain */
.receipt::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Typography */
h1 {
    text-align: center;
    letter-spacing: 3px;
    font-size: 30px;
}

.subtitle {
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
}

.order {
    text-align: center;
    font-size: 11px;
    opacity: 0.6;
    margin-bottom: 6px;
}

h2 {
    font-size: 14px;
    margin-bottom: 8px;
}

p {
    font-size: 13px;
    line-height: 1.45;
}

/* Items */
.item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
}

.note {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
}

/* Sections */
.line {
    margin-bottom: 22px;
}

/* Dividers */
.divider {
    text-align: center;
    font-size: 12px;
    margin: 20px 0;
    opacity: 0.7;
    letter-spacing: 1px;
}

/* Printing animation */
.print {
    animation: printLine 0.6s steps(20) forwards;
}

@keyframes printLine {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* Thank you */
.thankyou {
    text-align: center;
    font-size: 13px;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Subtle printer jitter */
.receipt {
    animation: jitter 6s infinite;
}

@keyframes jitter {

    0%,
    100% {
        transform: translateY(0);
    }

    98% {
        transform: translateY(0);
    }

    99% {
        transform: translateY(0.5px);
    }
}

/* Mobile */
@media (max-width: 420px) {
    .receipt {
        width: 92%;
    }
}