/* Wood-and-copper buttons. Glow on hover, follows --aura. */
.wp-block-button__link,
.wp-element-button,
.sinoptra-pill {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background:
		url("../img/wood-grain.svg") center / 300px auto,
		linear-gradient(to bottom, #4a0d0b, var(--maroon) 55%, var(--maroon-deep));
	color: var(--gold);
	border: 2px solid var(--copper);
	border-radius: 14px;
	box-shadow:
		inset 0 1px 0 rgba(240, 200, 120, .25),
		inset 0 -2px 6px rgba(0, 0, 0, .55),
		0 2px 10px rgba(0, 0, 0, .5);
	text-shadow: 0 1px 0 rgba(0, 0, 0, .7);
	transition: box-shadow .35s ease, filter .35s ease, transform .35s var(--ease-out), color .35s ease, border-color .35s ease;
	cursor: pointer;
}

/* Light sweep across the wood */
.wp-block-button__link::after,
.wp-element-button::after,
.sinoptra-pill::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(110deg, transparent 30%, rgba(255, 220, 160, .22) 50%, transparent 70%);
	transform: translateX(-120%);
	transition: transform .7s var(--ease-out);
}

.wp-block-button__link:hover,
.wp-element-button:hover,
.sinoptra-pill:hover,
.wp-block-button__link:focus-visible,
.sinoptra-pill:focus-visible,
.sinoptra-pill[aria-pressed="true"],
.sinoptra-pill[aria-selected="true"] {
	color: var(--gold-light);
	border-color: color-mix(in srgb, var(--copper) 60%, var(--aura));
	box-shadow:
		inset 0 1px 0 rgba(240, 200, 120, .35),
		0 0 15px 5px color-mix(in srgb, var(--aura) 55%, transparent);
	filter: brightness(1.1);
}
.wp-block-button__link:hover::after,
.wp-element-button:hover::after,
.sinoptra-pill:hover::after { transform: translateX(120%); }

.wp-block-button__link:active,
.sinoptra-pill:active { transform: translateY(1px); }

/* Ember style: brighter, pulsing ring */
.wp-block-button.is-style-ember .wp-block-button__link {
	padding: .8em 2em;
	font-size: 1rem;
	animation: ember-breathe 3.6s ease-in-out infinite;
}
@keyframes ember-breathe {
	0%, 100% { box-shadow: inset 0 1px 0 rgba(240, 200, 120, .25), 0 0 6px 1px color-mix(in srgb, var(--aura) 30%, transparent); }
	50% { box-shadow: inset 0 1px 0 rgba(240, 200, 120, .25), 0 0 18px 4px color-mix(in srgb, var(--aura) 50%, transparent); }
}

/* Outline style, quieter secondary action */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: rgba(20, 11, 12, .55);
	backdrop-filter: blur(4px);
}

/* Old classes still on legacy content */
.glow-children .wp-block-button__link:hover { box-shadow: 0 0 15px 5px rgba(255, 128, 128, .6); }

@media (prefers-reduced-motion: reduce) {
	.wp-block-button.is-style-ember .wp-block-button__link { animation: none; }
	.wp-block-button__link::after, .wp-element-button::after, .sinoptra-pill::after { display: none; }
}
