/**
 * Brand card — shared component.
 *
 * Used by the homepage brand grid and the About Us brand grid; both call
 * this stylesheet as a dependency so the cards stay in lockstep. The grid
 * containers (.mhg-brands__grid, .mhg-about-brands__grid) live in their
 * page-specific stylesheets — only the cards themselves are shared here.
 *
 * Layout uses a flex column with:
 *   - logo: fixed 90px, no shrink (locks the visual row)
 *   - name: no shrink
 *   - description: flex: 1 (grows so the CTAs line up at the bottom of
 *     the tallest card in the row)
 *   - CTA: margin-top: auto + align-self: flex-start (anchored bottom-left)
 *
 * Brand-specific theming sits at the bottom: Totally Numb (navy), Senseless
 * (off-white), Gold Seal (default white), Kintara (black + gold).
 *
 * @package mhg-theme
 */

/* --- Base card -------------------------------------------------- */
.mhg-brand-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: var(--mhg-space-md) var(--mhg-space-sm);
	background-color: var(--mhg-color-white);
	border: 1px solid var(--mhg-color-border-light);
	border-radius: var(--mhg-radius-md);
	text-align: center;
	transition: border-color var(--mhg-transition-base),
		box-shadow var(--mhg-transition-base),
		transform var(--mhg-transition-base);
}

.mhg-brand-card:hover,
.mhg-brand-card:focus-within {
	border-color: var(--mhg-color-teal);
	box-shadow: 0 12px 28px rgba(26, 92, 92, 0.1);
	transform: translateY(-3px);
}

/* --- Logo container + variants ---------------------------------- */
.mhg-brand-card__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	height: 90px;
	width: 100%;
	padding: 0.5rem;
	margin-bottom: var(--mhg-space-sm);
	overflow: visible;
	box-sizing: border-box;
}

.mhg-brand-card__logo-text {
	font-family: var(--mhg-font-heading);
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--mhg-color-teal);
	letter-spacing: 0.01em;
}

/* Logos use the full width of the logo box. Tall logos remain height-bound
   by max-height: 100% and shrink to fit naturally; wide-format logos (like
   the Senseless wordmark) get the horizontal room they need for visual parity
   with their taller siblings. object-fit: contain preserves aspect throughout. */
.mhg-brand-card__logo-img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Senseless logo is rebuilt as an inline asterisk SVG mark + HTML wordmark
   styled to match the Helvetica Light source — no PNG. */
.mhg-brand-card__asterisk {
	display: block;
	width: 70px;
	height: 70px;
	margin: 0 auto;
}

/* --- Name, description, CTA ------------------------------------- */
.mhg-brand-card__name {
	margin: 0 0 var(--mhg-space-xs);
	flex-shrink: 0;
	font-family: var(--mhg-font-heading);
	font-size: var(--mhg-font-size-card-name);
	color: var(--mhg-color-charcoal);
}

.mhg-brand-card__description {
	flex: 1;
	margin: 0 0 var(--mhg-space-md);
	font-size: var(--mhg-font-size-body);
	line-height: var(--mhg-line-height-body);
	color: var(--mhg-color-dark-grey);
	max-width: 22rem;
}

.mhg-brand-card__cta {
	margin-top: auto;
}

/* ============================================================
 * Brand-specific theming.
 * Modifier class derived from sanitize_title($brand_name) in PHP
 * (or an explicit 'brand_slug' / 'slug' field in the data array).
 * Base rule above provides white background + teal hover; each
 * modifier swaps colours where required.
 * ============================================================ */

/* Totally Numb — deep navy card, white text, white-outline CTA */
.mhg-brand-card--totally-numb {
	background-color: #0f2242;
	border-color: rgba(255, 255, 255, 0.08);
}

.mhg-brand-card--totally-numb .mhg-brand-card__name,
.mhg-brand-card--totally-numb .mhg-brand-card__description {
	color: var(--mhg-color-white);
}

.mhg-brand-card--totally-numb:hover,
.mhg-brand-card--totally-numb:focus-within {
	border-color: var(--mhg-color-gold);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.mhg-brand-card--totally-numb .mhg-brand-card__cta {
	background-color: transparent;
	color: var(--mhg-color-white);
	border-color: var(--mhg-color-white);
}

.mhg-brand-card--totally-numb .mhg-brand-card__cta:hover,
.mhg-brand-card--totally-numb .mhg-brand-card__cta:focus {
	background-color: var(--mhg-color-white);
	color: var(--mhg-color-charcoal);
	border-color: var(--mhg-color-white);
}

/* Senseless — warm off-white card, dark text retained, subtle border */
.mhg-brand-card--senseless {
	background-color: #f7f7f5;
	border-color: rgba(0, 0, 0, 0.05);
}

.mhg-brand-card--senseless .mhg-brand-card__name {
	font-family: var(--mhg-font-body);
	font-weight: 300;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: var(--mhg-color-charcoal);
}

/* Gold Seal Packaging — defaults to the base white card; no overrides. */

/* Kintara — black card with gold accents; logo bleeds to logo-box edges. */
.mhg-brand-card--kintara {
	background-color: #000000;
	border-color: rgba(255, 255, 255, 0.08);
}

.mhg-brand-card--kintara .mhg-brand-card__name {
	color: var(--mhg-color-gold);
}

.mhg-brand-card--kintara .mhg-brand-card__description {
	color: rgba(255, 255, 255, 0.75);
}

.mhg-brand-card--kintara:hover,
.mhg-brand-card--kintara:focus-within {
	border-color: var(--mhg-color-gold);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.mhg-brand-card--kintara .mhg-brand-card__cta {
	background-color: transparent;
	color: var(--mhg-color-gold);
	border: 1.5px solid var(--mhg-color-gold);
}

.mhg-brand-card--kintara .mhg-brand-card__cta:hover,
.mhg-brand-card--kintara .mhg-brand-card__cta:focus {
	background-color: rgba(201, 168, 76, 0.1);
	color: var(--mhg-color-gold);
	border-color: var(--mhg-color-gold);
}

.mhg-brand-card--kintara .mhg-brand-card__logo {
	padding: 0;
}
