*,
::after,
::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    --red: #c51f27;
    --red-glow: rgba(197, 31, 39, 0.15);
    --red-light: rgba(197, 31, 39, 0.07);
    --bg: #f5f5f5;
    --card: #ffffff;
    --step-bg: #fafafa;
    --border: rgba(197, 31, 39, 0.35);
    --text: #333333;
    --muted: #888888;
    --heading: #111111
}

html {
    scroll-behavior: smooth
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Poppins, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 40px 24px 80px
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(197, 31, 39, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(197, 31, 39, .06) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0
}

@keyframes gridMove {
    0% {
        transform: translateY(0)
    }

    100% {
        transform: translateY(60px)
    }
}

body::after {
    content: "";
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(197, 31, 39, .08) 0, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: ambientPulse 6s ease-in-out infinite
}

@keyframes ambientPulse {

    0%,
    100% {
        opacity: .6;
        transform: translateX(-50%) scale(1)
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.1)
    }
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
    z-index: 1
}

.top-logo {
    width: 150px;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeDown .7s ease forwards .2s
}

.top-logo img {
    width: 100%;
    display: block;
    aspect-ratio: 245/97
}

@keyframes fadeDown {
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.workflow-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: start
}

.workflow {
    background: var(--card);
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .07);
    border-radius: 2px;
    padding: 36px 28px 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease
}

.workflow::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    transform: scaleX(0);
    transition: transform .6s ease
}

.workflow:hover::before {
    transform: scaleX(1)
}

.workflow:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .12), 0 0 40px var(--red-glow);
    border-color: rgba(197, 31, 39, .3)
}

.workflow.visible {
    animation: cardReveal .7s cubic-bezier(.22, 1, .36, 1) forwards
}

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.workflow:first-child {
    animation-delay: .1s
}

.workflow:nth-child(2) {
    animation-delay: .25s
}

.workflow:nth-child(3) {
    animation-delay: .4s
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--red-light);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 16px;
    width: fit-content
}

.card-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    animation: blink 1.5s ease-in-out infinite
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .2
    }
}

.workflow h2 {
    font-family: Poppins, sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--heading);
    line-height: 1.2;
    margin-bottom: 28px
}

.workflow h2 span {
    display: block;
    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .5px;
    color: var(--muted);
    margin-top: 4px;
    text-transform: none
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 32px;
    flex: 1
}

.step-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity .5s ease, transform .5s ease
}

.step-wrap.visible {
    opacity: 1;
    transform: translateX(0)
}

.step-wrap.right {
    transform: translateX(20px)
}

.step-wrap.right.visible {
    transform: translateX(0)
}

.step {
    position: relative;
    width: 100%;
    border: 1px solid var(--border);
    background: var(--step-bg);
    min-height: 56px;
    display: flex;
    align-items: center;
    padding: 12px 16px 12px 52px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text);
    border-radius: 2px;
    cursor: default;
    transition: background .3s, border-color .3s, box-shadow .3s, transform .3s;
    overflow: hidden
}

.step::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--red-light) 0, transparent 60%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none
}

.step:hover {
    background: #fff5f5;
    border-color: var(--red);
    box-shadow: 0 0 20px var(--red-glow);
    transform: scale(1.02)
}

.step:hover::after {
    opacity: 1
}

.step-number {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 0 10px var(--red-glow);
    flex-shrink: 0;
    z-index: 2
}

.connector {
    width: 2px;
    height: 22px;
    background: linear-gradient(to bottom, var(--red), rgba(197, 31, 39, .2));
    position: relative;
    margin: 0 auto;
    flex-shrink: 0
}

.connector::after {
    content: "▼";
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--red);
    animation: bounceArrow 1.5s ease-in-out infinite
}

@keyframes bounceArrow {

    0%,
    100% {
        transform: translateX(-50%) translateY(0)
    }

    50% {
        transform: translateX(-50%) translateY(3px)
    }
}

.w2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%
}

.w2-grid .step {
    padding: 12px 10px 12px 52px;
    font-size: 12px;
    min-height: 64px
}

.check-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 28px auto 0;
    box-shadow: 0 0 30px var(--red-glow);
    animation: checkPulse 3s ease-in-out infinite;
    position: relative
}

.check-circle::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(197, 31, 39, .4);
    animation: ringExpand 2s ease-in-out infinite
}

@keyframes checkPulse {

    0%,
    100% {
        box-shadow: 0 0 20px var(--red-glow)
    }

    50% {
        box-shadow: 0 0 40px rgba(197, 31, 39, .4)
    }
}

@keyframes ringExpand {
    0% {
        transform: scale(1);
        opacity: .8
    }

    100% {
        transform: scale(1.5);
        opacity: 0
    }
}

.result {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, .08);
    text-align: center
}

.result h3 {
    font-family: Poppins, sans-serif;
    font-size: 18px;
    letter-spacing: 3px;
    color: var(--muted);
    margin-bottom: 10px
}

.result p {
    font-size: 16px;
    font-weight: 500;
    color: var(--heading);
    line-height: 1.4;
    display: inline-block
}

.result p::after {
    content: "";
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    margin-top: 10px
}

.workflow-index {
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: Poppins, sans-serif;
    font-size: 80px;
    color: rgba(197, 31, 39, .06);
    line-height: 1;
    user-select: none;
    pointer-events: none;
    transition: color .4s
}

.workflow:hover .workflow-index {
    color: rgba(197, 31, 39, .12)
}

.spark {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--red);
    pointer-events: none;
    opacity: 0
}

@media(max-width:1100px) {
    .workflow-wrapper {
        grid-template-columns: 1fr;
        gap: 40px
    }

    .workflow {
        max-width: 600px;
        margin: 0 auto;
        width: 100%
    }
}

@media(max-width:600px) {
    body {
        padding: 24px 16px 60px
    }

    .workflow {
        padding: 28px 20px 32px
    }

    .w2-grid .step {
        font-size: 11px
    }
}

/* ===================== */
/* Footer + Back to QR   */
/* ===================== */

.site-footer {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, .08);
    text-align: center;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    animation: cardReveal .7s cubic-bezier(.22, 1, .36, 1) forwards .5s
}

.footer-logo {
    width: 130px;
    margin: 0 auto 20px;
    aspect-ratio: 245/97;
}

.footer-logo img {
    width: 100%;
    display: block
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 24px
}

.footer-contact a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: color .3s
}

.footer-contact a:hover {
    color: var(--red)
}

.footer-contact .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0
}

.back-to-qr-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--red);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 14px 28px;
    border-radius: 2px;
    box-shadow: 0 0 20px var(--red-glow);
    transition: transform .3s, box-shadow .3s, background .3s
}

.back-to-qr-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--red-glow);
    background: #a91922
}

.back-to-qr-btn .arrow {
    transition: transform .3s
}

.back-to-qr-btn:hover .arrow {
    transform: translateX(-4px)
}

.footer-copy {
    margin-top: 24px;
    font-size: 11px;
    letter-spacing: .5px;
    color: var(--muted)
}

.footer-copy b {
    color: var(--red)
}

@media(max-width:600px) {
    .site-footer {
        margin-top: 48px;
        padding-top: 32px
    }

    .footer-contact {
        flex-direction: column;
        gap: 14px
    }
}