.tbc-brutalist-tile {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    container-type: inline-size;
    isolation: isolate;
    overflow: hidden;
    border-radius: 20px;
    background: var(--tile-bg, #B7A8C0);
    text-decoration: none !important;
    transition:
        transform 400ms cubic-bezier(.2,.8,.2,1),
        background-color 400ms ease,
        box-shadow 400ms ease;
}

.tbc-brutalist-letter {
    position: absolute;
    top: -15%;
    left: -18%;
    z-index: 0;
    font-family: 'Archivo Black', sans-serif;
    font-size: 145cqw;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.075em;
    white-space: nowrap;
    color: var(--tile-letter, #796687);
    pointer-events: none;
    user-select: none;
    transition:
        transform 450ms cubic-bezier(.2,.8,.2,1),
        color 400ms ease;
}

.tbc-brutalist-name {
    position: absolute;
    right: 7%;
    bottom: 7%;
    left: 7%;
    z-index: 1;
    text-align: right;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--tile-name, #000000);
    overflow-wrap: normal;
    transition: color 400ms ease;
}

.tbc-title-archivo .tbc-brutalist-name {
    font-family: 'Archivo Black', sans-serif;
}

.tbc-title-latimer .tbc-brutalist-name {
    font-family: 'CSLatimer', serif;
}

.tbc-title-mono .tbc-brutalist-name {
    font-family: 'IBM Plex Mono', monospace;
}

.tbc-tile-motion:focus-visible {
    outline: 2px solid #9B1D2C;
    outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {

    .tbc-tile-motion:hover {
        transform: translate(
            calc(-1 * var(--tile-motion, 5px)),
            calc(-1 * var(--tile-motion, 5px))
        );
        background: var(--tile-hover-bg, #9B1D2C);
        box-shadow: 5px 7px 16px rgba(108,117,107,.15);
    }

    .tbc-tile-motion:hover .tbc-brutalist-letter {
        transform: translate(4%, -2%) scale(1.08);
        color: var(--tile-hover-letter, #65111C);
    }

    .tbc-tile-motion:hover .tbc-brutalist-name {
        color: var(--tile-hover-name, #F5F5F4);
    }
}

@media (hover: none) {

    .tbc-tile-motion:active {
        transform: translate(-2px, -2px);
        background: var(--tile-hover-bg, #9B1D2C);
    }

    .tbc-tile-motion:active .tbc-brutalist-letter {
        color: var(--tile-hover-letter, #65111C);
    }

    .tbc-tile-motion:active .tbc-brutalist-name {
        color: var(--tile-hover-name, #F5F5F4);
    }
}

@media (prefers-reduced-motion: reduce) {

    .tbc-brutalist-tile,
    .tbc-brutalist-letter,
    .tbc-brutalist-name {
        transition: none !important;
        transform: none !important;
    }
}


/* Automatic Lettering Color */

.tbc-brutalist-tile.tbc-letter-auto .tbc-brutalist-letter {
    color: var(--tile-bg, #B7A8C0);
    filter: brightness(
        calc(100% - var(--tile-letter-darkening, 31%))
    );
}

@media (hover: hover) and (pointer: fine) {
    .tbc-letter-auto.tbc-tile-motion:hover .tbc-brutalist-letter {
        color: var(--tile-hover-letter, #65111C);
        filter: none;
    }
}

@media (hover: none) {
    .tbc-letter-auto.tbc-tile-motion:active .tbc-brutalist-letter {
        color: var(--tile-hover-letter, #65111C);
        filter: none;
    }
}


/* Monumental Lettering Typefaces */

@font-face {
    font-family: 'Garet Heavy';
    src: url('fonts/Garet-Heavy.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Hidalgo';
    src: url('fonts/Hidalgo.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.tbc-letter-font-garet .tbc-brutalist-letter {
    font-family: 'Garet Heavy', sans-serif;
    font-weight: 900;
}

.tbc-letter-font-hidalgo .tbc-brutalist-letter {
    font-family: 'Hidalgo', sans-serif;
    font-weight: 400;
}
