/* homepage.brands.css - brand tiles on the homepage (includes/homepage.brands.cfm).
   Built on css/foundations.css tokens - no invented values. */

.hbr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: var(--oct-space-3);
    margin: var(--oct-space-4) 0 0;
}

.hbr-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--oct-space-2);
    min-height: 116px;
    padding: var(--oct-space-4);
    text-decoration: none;
    color: inherit;
    /* the brand's own colour, supplied inline per tile from
       Octane_Brands_Cache.primaryColour; falls back to the ink token */
    --hbr-brand: var(--oct-ink);
}
.hbr-tile:hover {
    border-color: var(--hbr-brand);
    box-shadow: var(--oct-shadow);
}

.hbr-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    width: 100%;
}
.hbr-logo img {
    max-height: 46px;
    max-width: 100%;
    object-fit: contain;
}

/* Brand name: normally a quiet caption under the logo. When the logo file is
   missing the tile gets .no-logo and the name becomes the tile instead, so
   nothing ever renders as an empty box. */
.hbr-name {
    font-size: var(--oct-text-sm);
    color: var(--oct-ink-mute);
    text-align: center;
    line-height: 1.3;
}
.hbr-tile.no-logo .hbr-logo { height: 0; }
.hbr-tile.no-logo .hbr-name {
    font-size: var(--oct-text-lg);
    font-weight: 700;
    color: var(--hbr-brand);
}

@media (max-width: 640px) {
    .hbr-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--oct-space-2); }
    .hbr-tile { min-height: 92px; padding: var(--oct-space-3); }
    .hbr-logo { height: 36px; }
    .hbr-logo img { max-height: 36px; }
}
