/**
 * Barbut theme styles that theme.json cannot express:
 * block style variations, header/footer chrome and the hero panel.
 * Colours always come from theme.json presets.
 */

/* ---------- Block style variations ---------- */

p.is-style-badge {
	display: inline-block;
	width: fit-content;
	margin-block: 0;
	padding: 0.375rem 0.75rem;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-transform: uppercase;
}

p.is-style-kicker {
	margin-block: 0;
	color: var(--wp--preset--color--secondary);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.06em;
}

.wp-block-group.is-style-card {
	overflow: hidden;
	border: 1px solid var(--wp--custom--border--subtle);
	border-radius: var(--wp--custom--radius--card);
	background: #fff;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.wp-block-button.is-style-ghost > .wp-block-button__link {
	padding-inline: 0.25rem;
	background: transparent;
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-ghost > .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* ---------- Header ---------- */

/* Header, main and footer sit flush; sections handle their own spacing. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	z-index: 50;
	top: 0;
}

.admin-bar .wp-site-blocks > header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 0);
}

.barbut-header {
	border-bottom: 1px solid var(--wp--custom--border--subtle);
}

.barbut-logo,
.barbut-logo img {
	display: block;
	margin: 0;
}

.barbut-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--60);
}

.barbut-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}

/* ---------- Hero ---------- */

.barbut-hero .wp-block-columns {
	gap: 4rem;
}

.barbut-hero__visual {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1.26;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--panel);
	background-color: var(--wp--preset--color--primary);
	/* Contour rings: original motif, echoes the logo's circular mark. */
	background-image:
		radial-gradient(circle at 50% 42%, transparent 0 54.6%, rgb(255 255 255 / 0.12) 54.8% 55.1%, transparent 55.3%),
		radial-gradient(circle at 50% 42%, transparent 0 84.6%, rgb(255 255 255 / 0.12) 84.8% 85.1%, transparent 85.3%),
		radial-gradient(circle at 50% 42%, transparent 0 119.6%, rgb(255 255 255 / 0.12) 119.8% 120.1%, transparent 120.3%);
}

.barbut-hero__mark {
	width: 62%;
	margin: 0 0 8% !important;
}

.barbut-hero__mark img {
	width: 100%;
	height: auto;
}

.barbut-hero__caption {
	position: absolute;
	bottom: 1.75rem;
	left: 2rem;
	margin: 0;
	color: rgb(255 255 255 / 0.8);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.06em;
}

@media (max-width: 781px) {
	/* Mobile hero is text-only by design. */
	.barbut-hero__visual-col {
		display: none;
	}
}

/* ---------- Cards ---------- */

.barbut-card__media {
	display: grid;
	place-items: center;
	aspect-ratio: 1.618 / 1;
	margin: 0;
	background: var(--wp--preset--color--surface);
}

/* ---------- Footer ---------- */

.barbut-footer a {
	color: inherit;
	text-decoration: none;
}

.barbut-footer a:hover,
.barbut-footer a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.barbut-footer__links p {
	margin: 0;
	opacity: 0.8;
}

.barbut-footer__bottom {
	padding-top: 1.5rem;
	border-top: 1px solid rgb(255 255 255 / 0.16);
}

/* Short button labels never break mid-phrase. */
.wp-block-button__link {
	white-space: nowrap;
}
