/*
	https://prog255.dev/css255/
	base.css
	0.0
*/

@layer css255.base, css255.site, css255.elements;

@layer css255.base {
	/*
		Based on Josh's Custom CSS Reset
		https://www.joshwcomeau.com/css/custom-css-reset/
	*/

	/* More-intuitive box-sizing model */
	*, *::before, *::after {
		box-sizing: border-box;
	}

	/* Remove default margin */
	*:not(dialog, [popover]) {
		margin: 0;
	}

	/* Enable keyword animations */
	@media (prefers-reduced-motion: no-preference) {
		html {
			interpolate-size: allow-keywords;
		}
	}

	/* Consistent font size */
	html {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}

	/* Improve text rendering */
	body {
		-webkit-font-smoothing: antialiased;
	}

	/* Improve media defaults */
	img, picture, video, canvas {
		display: block;
	}

	/* Stop overflowing */
	img, picture, video, canvas, svg {
		max-width: 100%;
	}

	/* keeps the aspect ratio of elements */
	img, video {
		height: auto;
	}

	/* Inherit things from parents */
	input, button, textarea, select {
		font: inherit;
		letter-spacing: inherit;
		color: inherit;
	}

	/* Avoid text overflows */
	p, h1, h2, h3, h4, h5, h6 {
		overflow-wrap: break-word;
	}

	/* Improve line wrapping */
	p, li, blockquote {
		text-wrap: pretty;
	}

	h1, h2, h3, h4, h5, h6 {
		text-wrap: balance;
	}

	[hidden]:not([hidden="until-found"]) {
		display: none !important;
	}
}
