.hm-bento {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: clamp(160px, 12vw, 222px);
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.hm-bento > .hm-tile:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}
.hm-bento > .hm-tile:nth-child(2),
.hm-bento > .hm-tile:nth-child(3) {
    grid-column: span 2;
}
.hm-bento--r1 > .hm-tile:last-child {
    grid-column: span 4;
}
.hm-bento--r2 > .hm-tile:nth-last-child(-n + 2) {
    grid-column: span 2;
}
.hm-bento--r3 > .hm-tile:last-child {
    grid-column: span 2;
}
.hm-bento--few {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    grid-template-columns: none;
    grid-auto-rows: 320px;
}
.hm-bento--few > .hm-tile:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
}

.hm-tile {
    position: relative;
    min-width: 0;
    border-radius: var(--hm-r);
    transform: perspective(1000px) rotateX(var(--hm-rx, 0deg)) rotateY(var(--hm-ry, 0deg));
    transform-style: preserve-3d;
    transition: transform 0.35s var(--hm-ease), box-shadow 0.35s;
}
.hm-js .hm-tile.hm-reveal {
    transform: perspective(1000px) translateY(22px);
}
.hm-js .hm-tile.hm-reveal.is-in {
    transform: perspective(1000px) rotateX(var(--hm-rx, 0deg)) rotateY(var(--hm-ry, 0deg));
}
.hm-tile:nth-child(4n + 2) {
    --hm-d: 1;
}
.hm-tile:nth-child(4n + 3) {
    --hm-d: 2;
}
.hm-tile:nth-child(4n) {
    --hm-d: 3;
}
.hm-tile:hover {
    box-shadow: var(--hm-shadow-lg);
}
.hm-tile-a {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    border-radius: inherit;
    color: #fff;
    isolation: isolate;
}
.hm-tile-a:hover,
.hm-tile-a:focus {
    color: #fff;
}
.hm-tile-a:focus-visible {
    outline: 3px solid var(--hm-red);
    outline-offset: 3px;
}
.hm-tile-ph {
    position: absolute;
    inset: 0;
    z-index: -2;
}
.hm-tile-ph > img {
    transform: scale(1.01);
    transition: transform 0.9s var(--hm-ease);
}
.hm-tile:hover .hm-tile-ph > img {
    transform: scale(1.1) translate3d(calc(var(--hm-mx, 0) * -16px), calc(var(--hm-my, 0) * -12px), 0);
    transition-duration: 0.5s;
}
.hm-tile-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(24, 21, 20, 0.38) 0%, rgba(24, 21, 20, 0) 32%),
        linear-gradient(0deg, rgba(24, 21, 20, 0.82) 0%, rgba(24, 21, 20, 0.35) 40%, rgba(24, 21, 20, 0) 66%);
    transition: opacity 0.35s;
}
.hm-tile-top {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.hm-tile-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
}
.hm-tile-badge {
    padding: 5px 11px 5px 8px;
    border-radius: 999px;
    background: var(--hm-red);
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 16px -6px rgba(216, 41, 28, 0.8);
}
.hm-tile-body {
    position: absolute;
    left: 20px;
    right: 72px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hm-tile-t {
    margin: 0;
    font-family: var(--hm-display);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #fff;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}
.hm-tile-x {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.86);
}
.hm-tile-go {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--hm-ink);
    transition: background 0.25s, color 0.25s, transform 0.35s var(--hm-ease);
}
.hm-tile:hover .hm-tile-go {
    background: var(--hm-red);
    color: #fff;
    transform: rotate(45deg);
}

/* the 2x2 lead tile and the 2x1 tiles carry bigger type */
.hm-bento > .hm-tile:nth-child(-n + 3) .hm-tile-t {
    font-size: clamp(24px, 2vw, 30px);
}
.hm-bento > .hm-tile:nth-child(1) .hm-tile-t {
    font-size: clamp(30px, 2.8vw, 42px);
}
.hm-bento > .hm-tile:nth-child(1) .hm-tile-x {
    font-size: 15.5px;
    max-width: 440px;
}
.hm-bento > .hm-tile:nth-child(1) .hm-tile-body {
    left: 28px;
    bottom: 26px;
    gap: 8px;
}
.hm-bento > .hm-tile:nth-child(1) .hm-tile-go {
    right: 26px;
    bottom: 26px;
    width: 52px;
    height: 52px;
}
.hm-bento > .hm-tile:nth-child(1) .hm-tile-top {
    top: 22px;
    left: 22px;
    right: 22px;
}
.hm-bento > .hm-tile:nth-child(1) .hm-tile-ic {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}
/* 1x1 tiles: one-line copy keeps the photo visible */
.hm-bento > .hm-tile:nth-child(n + 4) .hm-tile-x {
    -webkit-line-clamp: 1;
}

@media (max-width: 1199px) {
    .hm-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 210px;
    }
    .hm-bento > .hm-tile:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }
    .hm-bento > .hm-tile:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }
}
