.homepage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-content: center;
    max-width: 1200px;
    margin: 2rem auto;
}

.home-card-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    /* width / height ratio */
    text-decoration: none;
    overflow: visible;
    /* allow frames to overflow */
}

.home-card {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1e1e1e;
    color: #eee;
    width: 100%;
    height: 100%;
    border-radius: 0.4rem;
    font-weight: 600;
    font-size: 1.6rem;
    text-align: center;
    transition: all 0.2s ease;

    background-size: cover;
    background-position: center;
}

.home-card:hover {
    background-color: #27272c;
    transform: translateY(-2px);
}


.all-ocs-wrapper {
    grid-column: 1 / -1;
    aspect-ratio: 8 / 1;
    margin: 1rem auto 0;
    max-width: 600px;
}

.all-ocs {
    font-size: 1rem;
    border-radius: 2.1rem;
}

/* Mobile: keep layout readable */
@media (max-width: 500px) {
    .homepage-grid {
        grid-template-columns: 1fr;
    }

    .all-ocs-wrapper {
        aspect-ratio: 4 / 1;
    }
}

.homepage-title {
    text-align: center;
    color: #eee;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.homepage-subtitle {
    text-align: center;
    color: #aaa;
    font-size: 1rem;
    margin-bottom: 2rem;
    font-weight: 400;
}


.home-card-wrapper .frame {
    position: absolute;
    top: -3%;
    right: -4%;
    width: 106%;
    height: 106%;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    image-rendering: crisp-edges;
    z-index: 2;
    transition: transform 0.2s, filter 0.2s;
    filter: brightness(0.25);
}

.home-card-wrapper:hover .frame {
    transform: scale(1.075);
    /* smaller scale on hover */
    filter: brightness(1.0);
}


.homepage-title-decor {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6em;
    /* space between text and images */
    margin-bottom: 0.5rem;
    width: 100%;
}

.homepage-title-decor .decor {
    width: 2.2em;
    /* adjust size here */
    height: 2.2em;
    background-image: url('/assets/images/UI/select.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.3;
    margin: 10px;
    /* slight transparency */
}

.homepage-title-decor .decor.right {
    transform: scaleX(-1);
}

.homepage-title-decor h1 {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}



.home-card-wrapper[data-universe="Strength Seeker"] .frame {
    background-image: url("/assets/images/frames/frame_strs_main.png");
}

.home-card-wrapper[data-universe="Progenies"] .frame {
    background-image: url("/assets/images/frames/frame_prog_main.png");
}

.home-card-wrapper[data-universe="The Long Midnight"] .frame {
    background-image: url("/assets/images/frames/frame_midnight_main.png");
}

.home-card-wrapper[data-universe="Terraria AU"] .frame {
    background-image: url("/assets/images/frames/frame_misc_terrariaau.png");
}

.home-card-wrapper[data-universe="Misc"] .frame {
    background-image: url("/assets/images/frames/frame_misc_main.png");
}

.home-card-wrapper[data-universe="Strength Seeker"] .home-card {
    background-image: url("/assets/images/UI/button_strs.png");
}

.home-card-wrapper[data-universe="Progenies"] .home-card {
    background-image: url("/assets/images/UI/button_prog.png");
}

.home-card-wrapper[data-universe="The Long Midnight"] .home-card {
    background-image: url("/assets/images/UI/button_midnight.png");
}

.home-card-wrapper[data-universe="Terraria AU"] .home-card {
    background-image: url("/assets/images/UI/button_terrariaau.png");
}