/* --------- Base Reset --------- */
html,
body {
    margin: 0;
    min-height: 100%;
    background: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #111;
    flex-direction: column;
    font-size: 1.1rem;
    line-height: 1.6;
    font-family: "EB Garamond", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* Initial state: invisible and shifted down */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* When it becomes visible */
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(var(--i, 0) * 0.35s);
}

a {
    color: #e4e4e4;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 8px;
}

.back a {
    color: #111;
    text-decoration: none;
}

.CTA {
    border: 0.3px solid #f7f7f7;
    color: #e4e4e4;
    padding: 14px 28px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
}

/* --------- Layout --------- */
.app-wrapper {
    perspective: 1200px;
    -webkit-perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    height: 80vh;
    max-width: 100vw;
    padding: 0 5vw; /* ensures left/right space on mobile */
}

/* --------- Card Container --------- */
.card {
    width: clamp(400px, 30vw, 450px);
    aspect-ratio: 16/9;
    position: relative;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    will-change: transform;
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: #e0e0e0;
}

/* --------- Animation States --------- */
.card.spin {
    animation: spin 3s linear forwards;
    -webkit-animation: spin 3s linear forwards;
    pointer-events: none;
}

.card.flipped {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

/* --------- Faces --------- */
.face {
    position: absolute;
    inset: 0;
    /* display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; */
    padding: 16px;
    border-radius: 4px;
    font-size: 14px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: #fff;
}

a,
h1,
p,
ul,
div {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    letter-spacing: 3%;
}

.front {
    background: #f7f7f7;
}

.back {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

/* --------- Keyframes --------- */
@keyframes spin {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(720deg);
    } /* 3 spins */
}

@-webkit-keyframes spin {
    from {
        -webkit-transform: rotateY(0deg);
    }
    to {
        -webkit-transform: rotateY(720deg);
    }
}

table {
    color: #e4e4e4;
    /* padding: 0 clamp(400px, 4vw, 550px); */
    width: 60vw;
    align-self: center;
}

.spaced {
    border-collapse: separate; /* Important! Default is "collapse" */
    border-spacing: 3rem 4rem; /* horizontal, vertical spacing */
}

td {
    line-height: 2;
    vertical-align: top;
}

.social {
    display: flex;
    gap: 100px;
    align-items: center;
    height: 500px;
}

.nowrap {
    white-space: nowrap;
}

footer {
    color: #4e4e4e;
    margin-bottom: 24px;
    display: flex;
    gap: 1.3rem;

    a,
    p {
        font-size: 0.9rem !important;
    }
}

.imprint {
    text-decoration: none;
    color: #4e4e4e;
}

.article {
    color: #e4e4e4;
    padding: 10rem 0;
    width: 60vw;
}

section p {
    margin-top: 1.3rem;
}

ul {
    margin: 0;
    padding: 0;
    list-style: decimal;
    list-style-position: inside;

    li {
        margin-top: 1.3rem;
    }
}

@media (max-width: 900px) {
    .app-wrapper {
        height: 70vh;
    }

    article,
    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    article {
        width: 100% !important;
    }

    section {
        padding: 0 24px;
    }

    table {
        padding: 0 24px;
    }

    tr {
        margin-bottom: 4rem;
    }

    td {
        display: flex;
        justify-content: space-between;
        margin: 0 0.1rem;
        border: none;
    }
}
