@font-face {
    font-family: "Suisse Int'l";
    src: url("./SuisseIntl-Regular.ttf") format("opentype");
}

:root {
    --card-count: 10;
    --card-width: 600px;
    --card-height: 400px;
    --card-border-radius: 0;
    --theme-body-bg-1: #386641;
    --theme-body-bg-2: #6a994e;
    --theme-body-bg-3: #a7c957;
    --theme-body-bg-4: #f2e8cf;
    --theme-body-bg-5: #bc4749;
}

/* * {
    box-sizing: border-box;
} */

body,
html {
    margin: 0;
    padding: 0;
    /* Prevent scrolling */
}

canvas {
    width: 100%;
    height: 100%;
}

.logo {
    margin-bottom: 42px;
}

p {
    margin: 0 0 20px;
    color: #FFF;
    font-family: "Suisse Int'l";
    font-size: var(--font-size-kilo, 17px);
    font-style: normal;
    font-weight: 450;
    line-height: 24px;
    letter-spacing: var(--letter-spacing-kilo, 1px);
}

span,
a {
    color: #FFF;
    font-family: "Suisse Int'l";
    font-size: var(--font-size-milli, 14px);
    font-style: normal;
    font-weight: 450;
    line-height: 19px;
    letter-spacing: var(--letter-spacing-kilo, 1px);
}

body {
    display: flex;
    justify-content: center;
    background-color: var(--theme-body-bg-1);
    height: 100vh;
    min-height: 900px;
}

main {
    /* width: 900px; */
    width: 100%;
    height: 100vh;
    min-height: 900px;
    perspective: 1500px;
    /* Increased perspective */
    position: relative;
    overflow: visible;
    touch-action: pan-y;
    background-image: url(./background.jpg);
    background-size: contain;
    /* Prevent horizontal scrolling */
}

/* button {
    position: absolute;
    top: 0;
    left: 0;
} */

a {
    border: none;
    outline: none;
    border-radius: 4px;
    padding: 4px 21px;
    cursor: pointer;
}

.card-stack {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    pointer-events: none;
}

video {
    height: var(--card-width);
    width: var(--card-height);
}

.card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--card-width);
    height: var(--card-height);
    margin: calc(-1 * var(--card-height) / 2 - 40px) 0 0 calc(-1 * var(--card-width) / 2);
    /* Center the card */
    transform-style: preserve-3d;
    backface-visibility: hidden;
    cursor: grab;
    pointer-events: auto;
    will-change: transform;
    /* Hint for better performance */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.vert {
    width: var(--card-height);
    height: var(--card-width);
    margin: calc(-1 * var(--card-width) / 2 - 40px) 0 0 calc(-1 * var(--card-height) / 2);
}

.card img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    /* Keep overflow hidden here for reflection clipping */
}

/* Reflection pseudo-element */
.card-content::after {
    content: '';
    position: absolute;
    width: 200%;
    /* Increased size for more dramatic effect */
    height: 200%;
    top: -50%;
    left: -50%;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), transparent);
    transform: var(--reflection-transform, rotate(0deg));
    opacity: var(--reflection-opacity, 0);
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

.card-content p {
    position: fixed;
    bottom: -25px;
    margin: 0;
    color: red;
    z-index: 100;
}

.attr {
    position: absolute;
    bottom: 30;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 93px;
}

.attr p,
.attr h3 {
    color: #000;
    margin: 0;
    white-space: nowrap;
}

.attr h3 {
    font-family: var(--font-suisseintl, "Suisse Int'l");
    font-size: var(--font-size-giga, 26px);
    font-style: normal;
    font-weight: 300;
    line-height: 35px;
    letter-spacing: var(--letter-spacing-kilo, 1px);
}

.attr p {
    font-family: "Suisse Int'l";
    font-size: var(--font-size-milli, 14px);
    font-style: normal;
    font-weight: 450;
    line-height: 19px;
    /* 135.714% */
    letter-spacing: var(--letter-spacing-kilo, 1px);
}

.dragging {
    cursor: grabbing;
}

.grid {
    /* display: block;
    align-items: center;
    justify-content: center; */
    background-color: var(--theme-body-bg-1);
    height: 100vh;
    min-height: 900px;
}

.container {
    height: 100%;
    display: flex;
    align-items: center;
}

.grid .container {
    margin: 0 auto;
    padding: 50px 50px 0;
    height: 100%;
    max-width: 1860px;

}

.grid .card-stack {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 30px;
    height: fit-content;
    row-gap: 60px;
    grid-template-rows: auto;
    margin: 0 auto;
}

.grid .card {
    min-width: 0;
    min-height: 0;
    position: unset;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 6 / 4;
    max-height: 400px;
    margin: 0;
    cursor: default;
    height: unset;
}

.grid img {
    aspect-ratio: 6 / 4;
    object-fit: fill;
}

nav {
    z-index: 10000;
    top: 0;
    right: 0;
    width: 284px;
    height: 100vh;
    background-color: #0249D9;
    padding: 55px 30px;
    flex-shrink: 0;
    min-height: 900px;
    box-sizing: border-box;
}

iframe {
    border-radius: 12px;
    position: absolute;
    bottom: 30px;
    width: 224px;
}

@media (max-width: 950px) {
    :root {
        --card-width: 450px;
        --card-height: 300px;
    }

    body {
        min-height: 1100px;
    }

    main {
        min-height: 1100px;
    }

    .grid .card-stack {
        grid-template-columns: 1fr 1fr;
        column-gap: 30px;
        row-gap: 60px;
    }

    body {
        flex-direction: column;
    }

    nav {
        min-height: unset;
        height: fit-content;
        width: 100vw;
    }

    .card {
        top: 65%;
    }

    iframe {
        position: inherit;
        bottom: 30px;
        width: 100%;
    }

    /* .attr {
        width: 100%;
        top: 150;
        left: 30;
        bottom: unset;
    }

    .attr p,
    .attr h3 {
        white-space: normal;
    } */

    .card {
        margin: calc(-1 * var(--card-height) / 2 - 50px) 0 0 calc(-1 * var(--card-width) / 2);
    }

    .vert {
        margin: calc(-1 * var(--card-width) / 2 - 50px) 0 0 calc(-1 * var(--card-height) / 2);
    }
}

@media (max-width: 550px) {
    :root {
        --card-width: 300px;
        --card-height: 200px;
    }

    body {
        min-height: 900px;
        height: 900px;
    }

    main {
        min-height: 900px;
        height: 900px;
    }

    .card {
        margin: calc(-1 * var(--card-height) / 2 - 40px) 0 0 calc(-1 * var(--card-width) / 2);
    }

    .vert {
        margin: calc(-1 * var(--card-width) / 2 - 40px) 0 0 calc(-1 * var(--card-height) / 2);
    }

    .attr {
        bottom: 80;
        left: 30;
        transform: unset;
    }

    .attr p,
    .attr h3 {
        white-space: unset;
    }

}