/**
 * AM Blog - Global Neobrutal Styles & Variables
 */

:root {
	--neo-border-width: 3px;
	--neo-border-color: var(--wp--preset--color--border-dark, #000000);
	--neo-border: var(--neo-border-width) solid var(--neo-border-color);
	--neo-shadow: var(--wp--preset--shadow--hard, 4px 4px 0px #000000);
	--neo-shadow-sm: var(--wp--preset--shadow--hard-sm, 2px 2px 0px #000000);
	--neo-shadow-lg: var(--wp--preset--shadow--hard-lg, 6px 6px 0px #000000);
	--neo-shadow-active: 0px 0px 0px #000000;
	--neo-radius: 4px;
	--neo-bg-base: var(--wp--preset--color--base, #ffffff);
	--neo-bg-surface: var(--wp--preset--color--tertiary, #f7f7f8);
	--neo-transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Text Selection */
::selection {
	background-color: var(--wp--preset--color--primary, #5294ff);
	color: #ffffff;
}

/* Base Body & Typography */
html,
body {
	max-width: 100%;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Subtle Neobrutal Blueprint Grid */
main,
.editor-styles-wrapper {
	background-color: var(--wp--preset--color--primary-accent, #e9ecf2);
	background-image:
		linear-gradient(90deg, #80808033 1px, transparent 0),
		linear-gradient(#80808033 1px, transparent 0);
	background-size: 70px 70px;
	background-position: 0 0;
	min-height: 80dvh;
}

.wp-block-post-content {
	background: transparent !important;
}

/* Links */
a {
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
	color: var(--wp--preset--color--primary, #5294ff);
	text-decoration-color: var(--wp--preset--color--primary, #5294ff);
}

/* Accessible High-Contrast Keyboard Focus Rings */
:focus-visible {
	outline: var(--neo-border-width, 3px) solid var(--neo-border-color, #000000) !important;
	outline-offset: 3px !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: var(--neo-border-width, 3px) solid var(--neo-border-color, #000000) !important;
	outline-offset: 3px !important;
}

/* Accessible Motion Reduction */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
		transform: none !important;
	}
}

/* Screen Reader Text & Skip Link Utility */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus,
.skip-link:focus,
.skip-to-content-link:focus {
	background-color: var(--wp--preset--color--primary, #5294ff) !important;
	color: #ffffff !important;
	border: var(--neo-border-width, 3px) solid var(--neo-border-color, #000000) !important;
	border-radius: var(--neo-radius, 4px) !important;
	box-shadow: var(--neo-shadow, 4px 4px 0px #000000) !important;
	clip: auto !important;
	clip-path: none !important;
	display: block !important;
	font-family: var(--wp--preset--font-family--heading, "Space Grotesk", sans-serif) !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	height: auto !important;
	left: 1.5rem !important;
	line-height: normal !important;
	padding: 0.75rem 1.5rem !important;
	position: fixed !important;
	text-decoration: none !important;
	top: 1.5rem !important;
	width: auto !important;
	z-index: 100000 !important;
}