/* Shared plus-sign patterned backgrounds (landing + NFC gate pages) */
:root {
    --tapus-pattern-red: var(--tapus-red, #9a1b24);
    --tapus-pattern-size: 36px;
    --tapus-pattern-duration: 140s;
}

.index-pattern {
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.index-pattern::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% + var(--tapus-pattern-size, var(--index-pattern-size, 36px)));
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-repeat: repeat;
    background-size: var(--tapus-pattern-size, var(--index-pattern-size, 36px)) var(--tapus-pattern-size, var(--index-pattern-size, 36px));
    background-position: 0 0;
    will-change: transform;
    animation: index-pattern-drift var(--tapus-pattern-duration, var(--index-pattern-duration, 140s)) linear infinite;
}

.index-pattern > * {
    position: relative;
    z-index: 1;
}

@keyframes index-pattern-drift {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(36px, 0, 0);
    }
}

.index-pattern--red {
    background-color: var(--tapus-pattern-red, var(--index-red, #9a1b24));
}

.index-pattern--red::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M16 6h4v24h-4zm-12 12h28v4H4z' fill='%23000000' fill-opacity='0.07'/%3E%3C/svg%3E");
}

.index-pattern--light {
    background-color: #fff;
}

.index-pattern--light::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M16 6h4v24h-4zm-12 12h28v4H4z' fill='%239ca3af' fill-opacity='0.08'/%3E%3C/svg%3E");
}

.index-pattern--blue {
    background-color: #5da8f5;
}

.index-pattern--blue::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M16 6h4v24h-4zm-12 12h28v4H4z' fill='%23000000' fill-opacity='0.06'/%3E%3C/svg%3E");
}

.index-pattern--green {
    background-color: #6ee7b7;
}

.index-pattern--green::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M16 6h4v24h-4zm-12 12h28v4H4z' fill='%23000000' fill-opacity='0.06'/%3E%3C/svg%3E");
}

.index-pattern--yellow {
    background-color: #ffd85f;
}

.index-pattern--yellow::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M16 6h4v24h-4zm-12 12h28v4H4z' fill='%23000000' fill-opacity='0.06'/%3E%3C/svg%3E");
}

/* Full-viewport gate / claim / lock screens */
body.tapus-gate-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body.tapus-gate-page.index-pattern {
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .index-pattern::before {
        animation: none;
    }
}
