@font-face {
    font-family: OCRB;
    src: url(fonts/OCRB.ttf);
}

@font-face {
    font-family: Bahnschrift;
    src: url(fonts/bahnschrift.ttf);
}

:root {
    --body-bg: #fff;
    --card-shadow: rgba(0, 0, 0, 0.5);

    --flip-fg: black;
    --flip-fg-hover: gray;

    --card-bg: #f7ebe8;
    --card-fg: #000;
    --card-fg-field: #508484;
    --card-fg-watermark: #d143294d;

    --watermark-marquee-duration: 120s;
    --flip-perspective: 1000px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --body-bg: #141414;
        --card-shadow: rgba(255, 255, 255, 0);
        --flip-fg: white;
        --flip-fg-hover: #ccc;
    }
}

@media (min-width: 1000px) {
    .bzd-card {
        font-size: 18pt;
        max-width: 800px;
    }

    .bzd-card-side {
        border-radius: 20px;
    }
}

@media (max-width: 1000px) {
    .bzd-card {
        font-size: 2.4vw;
    }

    .bzd-card-side {
        border-radius: 2vw;
    }
}

@media (max-width: 1000px) and (orientation: landscape) {
    .bzd-card {
        width: unset !important;
        height: 80vh;
    }
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    background: var(--body-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bzd-flipper-label {
    user-select: none;
}

.bzd-flipper:hover {
    border-color: var(--flip-fg-hover);
    color: var(--flip-fg-hover);
}

.bzd-card {
    width: 80vw;
    aspect-ratio: 85.6 / 53.98;
    position: relative;
    transition: transform 0.3s ease-in-out;
    color: var(--card-fg);
    overflow: visible;
}

.bzd-card a {
    color: var(--card-fg);
    text-decoration: none;
}

.bzd-card a:hover {
    text-decoration: underline;
}

.bzd-card:hover {
    transform: perspective(var(--flip-perspective)) translateY(-0.2em);
}

.bzd-card-side {
    width: 100%;
    height: 100%;

    background-color: var(--card-bg);

    position: absolute;
    display: block;
    overflow: hidden;

    box-shadow: var(--card-shadow) 0 20px 30px;

    /* flipping */
    backface-visibility: hidden;
    transition: transform 1s cubic-bezier(.68,-0.5,.06,1) 0s;
}

.bzd-card-front.active {
    transform: perspective(var(--flip-perspective)) rotateY(0);
}

.bzd-card-back {
    transform: perspective(var(--flip-perspective)) rotateY(-180deg);
}

.bzd-card-front:not(.active) {
    transform: perspective(var(--flip-perspective)) rotateY(180deg);
}

.bzd-card-back.active {
    transform: perspective(var(--flip-perspective)) rotateY(0);
}

.bzd-card-face {
    position: relative;
    background-size: 100%;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bzd-card-face-front {
    background-image: url(images/card-v1-front.png);
}

.bzd-card-face-back {
    background-image: url(images/card-v1-back.png);
}

.bzd-card-pfp-image {
    z-index: 2;
    border-radius: 35px;
    width: 35.4%;
    height: auto;
    position: absolute;
    top: 9%;
    left: 5.6%;
}

.bzd-card-fish {
    z-index: 2;
    position: absolute;
    background-image: url(images/puff.png);
    background-size: 100%;
    width: 15%;
    aspect-ratio: 1;
    bottom: 3%;
    left: 35%;
    animation: fish-bob 3s ease-in-out infinite;
}

@keyframes fish-bob {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

.bzd-card-field {
    color: var(--card-fg-field);
    font-family: OCRB;
    font-size: 100%;
}

.bzd-card-text {
    font-family: Bahnschrift;
    font-size: 1em;
}

.bzd-card-name {
    z-index: 2;
    position: absolute;
    top: 17.4%;
    left: 46%;
}

.bzd-card-memberid {
    z-index: 2;
    position: absolute;
    top: 37.2%;
    left: 46%;
}

.bzd-card-status {
    z-index: 2;
    position: absolute;
    top: 57%;
    left: 46%;
}

.bzd-card-barcode {
    background-size: 100%;
    z-index: 2;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.bzd-watermark {
    position: absolute;
    z-index: 0;
    color: var(--card-fg-watermark);
    font-family: Bahnschrift;
    font-size: 1.5em;
    line-height: 1.3;
}

.bzd-watermark-front {
    transform: translateX(-50%) rotate(-60deg) translate(50%, -40%);
}

.bzd-watermark-back {
    transform: translate(-24.5%, -160%) rotate(-60deg);
}

.bzd-watermark-line {
    white-space: nowrap;
    user-select: none;
    word-spacing: 1em;
    display: flex;
    flex-direction: row;
}

.bzd-watermark-scroll {
    padding-right: 1em;
}

.bzd-watermark-line:nth-child(even) .bzd-watermark-scroll {
    animation: marquee-left var(--watermark-marquee-duration) linear infinite;
}

.bzd-watermark-line:nth-child(odd) .bzd-watermark-scroll {
    animation: marquee-right var(--watermark-marquee-duration) linear infinite;
}

@keyframes marquee-left {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes marquee-right {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(0%);
    }
}

.bzd-card-socials {
    position: absolute;
    text-align: right;
    top: 21%;
    right: 14%;
    z-index: 2;
}

.bzd-card-matrix::before,
.bzd-card-fedi::before
{
    content: "";
    background-size: 100%;
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    position: relative;
    top: 0.3em;
    right: 0.3em;
}

.bzd-card-matrix::before {
    background-image: url(icons/matrix.svg);
}

.bzd-card-fedi::before {
    background-image: url(icons/fedi.svg);
}
