html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: black;
    background-image: url("../img/background.jpg");
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

img#title_name {
    width: 100%;
    max-width: 400px;
    display: block;
    position: fixed;
    top: 50px;
    left: 50px;
}

/* Centered 15em square — acts as the coordinate origin for the orbit */
#links {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15em;
    height: 15em;
}

/* Each group covers the same 15em square; JS translates it to its orbit slot */
.logo_group {
    width: 15em;
    height: 15em;
    position: absolute;
}

/*
 * Die button: the <a> tag.
 * Die sprite is a CSS background so the logo <img> inside renders on top.
 * JS applies the float transform and fades opacity in each frame.
 */
.die-button {
    display: block;
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0;
    text-decoration: none;
    pointer-events: all;
    background-image: url('../img/die_template.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Center the die inside the logo_group square */
    margin: auto;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.die-button:hover {
    background-image: url('../img/die_template_pressed.png');
}

/* Logo centered inside the die */
.die-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 75px;
    height: auto;
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
    transition: transform 0.08s;
}

/* Logo drops on press to simulate the die being pushed down */
.die-button:hover .die-logo {
    transform: translate(-50%, calc(-50% + clamp(3px, 1.3vw, 3px)));
}

.logo_group,
.die-button {
    will-change: transform, opacity;
}
