/**
 * Warstwa bazowa: fonty, reset, typografia globalna, dostępność.
 *
 * @package wzwiazku
 */

/* ---------------------------------------------------------------- Fonty -- */

/* Fraunces — zmienny, opsz 9..144, wght 400..900. OFL 1.1. */
@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
	src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
	src: url("../fonts/fraunces-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Instrument Sans — zmienny, wght 400..700. OFL 1.1. */
@font-face {
	font-family: "Instrument Sans";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/instrument-sans-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Instrument Sans";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ----------------------------------------------------------------- Reset -- */

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

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

html,
body {
	margin: 0;
	padding: 0;
}

body {
	background: var(--wzw-surface);
	color: var(--wzw-ink);
	font-family: var(--wzw-font-ui);
	font-size: var(--wzw-fs-15);
	line-height: var(--wzw-lh-relaxed);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img,
svg,
video {
	height: auto;
}

figure {
	margin: 0;
}

hr {
	border: 0;
	border-top: var(--wzw-hair) solid var(--wzw-rule);
	margin: var(--wzw-s5) 0;
}

/* ------------------------------------------------------------- Typografia -- */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-weight: var(--wzw-fw-semibold);
	letter-spacing: var(--wzw-ls-title);
	line-height: var(--wzw-lh-title);
	text-wrap: pretty;
}

p {
	margin: 0;
}

a {
	color: var(--wzw-ink);
	text-decoration: none;
	transition: color var(--wzw-dur) var(--wzw-ease);
}

a:hover {
	color: var(--wzw-accent);
}

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

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

/* ------------------------------------------------------------ Dostępność -- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wzw-toc-bar) solid var(--wzw-accent);
	outline-offset: var(--wzw-s-2);
	border-radius: var(--wzw-r-btn);
}

.wzw-skip-link {
	position: absolute;
	top: var(--wzw-s1);
	left: var(--wzw-s1);
	z-index: 100;
	transform: translateY(calc(-100% - var(--wzw-s3)));
	display: inline-block;
	padding: var(--wzw-s-12) var(--wzw-s2);
	border-radius: var(--wzw-r-btn);
	background: var(--wzw-ink);
	color: var(--wzw-on-ink);
	font-size: var(--wzw-fs-14);
	font-weight: var(--wzw-fw-medium);
	transition: transform var(--wzw-dur) var(--wzw-ease);
}

.wzw-skip-link:focus-visible {
	transform: translateY(0);
	color: var(--wzw-on-ink);
}

.screen-reader-text {
	position: absolute;
	width: var(--wzw-hair);
	height: var(--wzw-hair);
	margin: calc(-1 * var(--wzw-hair));
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip-path: none;
	white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms;
		animation-iteration-count: 1;
		transition-duration: 0.01ms;
		scroll-behavior: auto;
	}
}
