/*
 * Base reset and global typography.
 *
 * Also carries .screen-reader-text, the skip-link, and :focus-visible
 * — foundational accessibility rules that were temporarily kept in
 * components.css before this file existed.
 *
 * @package IglooRack
 */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var( --font-sans );
	color: var( --color-graphite );
	background: var( --color-white );
	line-height: 1.5;
	overflow-x: hidden;
}

img,
svg {
	max-width: 100%;
	height: auto;
	display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 700;
	line-height: 1.15;
	margin: 0;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
	text-wrap: balance;
}

p {
	margin: 0;
}

a {
	color: inherit;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: none;
	cursor: pointer;
}

@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;
	}
}

.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;
}

/* Parked off-screen on the inline-START side: in RTL that is the right,
   where overflow is clipped. A physical left: -9999px would, under
   dir="rtl", extend the page's scrollable area ~10,000px to the left. */
.igloorack-skip-link {
	position: absolute;
	inset-inline-start: -9999px;
	top: 0;
	z-index: 100;
	background: var( --color-ink );
	color: var( --color-white );
	padding: var( --space-2 ) var( --space-4 );
	text-decoration: none;
}

.igloorack-skip-link:focus {
	inset-inline-start: var( --space-4 );
	top: var( --space-4 );
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var( --color-ice-600 );
	outline-offset: 2px;
}
