/**
 * Global rules that theme.json can't express. Keep this file short: anything that belongs to one block goes in
 * assets/styles/{namespace}-{block}.css instead.
 *
 * @package ip-ollie-child
 */

/* Visible focus everywhere (WCAG 2.4.7): amber reads on white, grey and navy. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--custom--focus);
	outline-offset: 3px;
}

/* The accent corner: a top-right cut at the honeycomb angle (30°). Used by the "Cut corner" block styles
   and by buttons. --ip-cut-size can be set per element. */
.has-ip-cut,
:where(.is-style-ip-cut) {
	clip-path: polygon(
		0 0,
		calc(100% - var(--ip-cut-size, var(--wp--custom--cut))) 0,
		100% calc(var(--ip-cut-size, var(--wp--custom--cut)) * var(--wp--custom--slope)),
		100% 100%,
		0 100%
	);
}

/* Anchored headings clear the sticky header. */
html {
	scroll-padding-top: calc(var(--wp--custom--header-height) + 1rem);
}

/* Motion is optional (WCAG 2.3.3). */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
