/* ==========================================================================
   BlinkShift — Reset and element defaults
   ========================================================================== */

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

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1.5rem);
	-moz-tab-size: 4;
	tab-size: 4;
}

body {
	min-height: 100svh;
	background-color: var(--c-bg);
	color: var(--c-ink);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	font-weight: var(--fw-regular);
	line-height: var(--lh-body);
	letter-spacing: var(--ls-body);
	font-feature-settings: 'cv05' 1, 'cv11' 1, 'ss01' 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

/* --------------------------------------------------------------- headings */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	color: var(--c-ink);
	font-weight: var(--fw-bold);
	line-height: var(--lh-heading);
	letter-spacing: var(--ls-heading);
	text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--ls-display); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }
h5 { font-size: var(--fs-h5); font-weight: var(--fw-semibold); letter-spacing: -0.018em; }
h6 {
	font-size: var(--fs-xs);
	font-weight: var(--fw-semibold);
	letter-spacing: var(--ls-eyebrow);
	line-height: 1.4;
}

/* ------------------------------------------------------------------- text */

p {
	text-wrap: pretty;
}

p + p {
	margin-top: 1em;
}

a {
	color: inherit;
	text-decoration-color: var(--ac-a32);
	text-underline-offset: 0.22em;
	text-decoration-thickness: 1px;
	transition: color var(--dur-fast) var(--ease-out),
	            text-decoration-color var(--dur-fast) var(--ease-out);
}

a:hover {
	color: var(--c-accent-quiet);
	text-decoration-color: currentColor;
}

strong, b { font-weight: var(--fw-semibold); color: var(--c-ink); }
em, i { font-style: italic; }

small { font-size: var(--fs-sm); }

code, kbd, samp, pre {
	font-family: var(--font-mono);
	font-size: 0.9em;
}

code {
	background: var(--c-surface-2);
	border: 1px solid var(--c-line);
	border-radius: var(--r-xs);
	padding: 0.12em 0.4em;
}

pre {
	background: var(--n-950);
	color: var(--n-100);
	padding: var(--sp-6);
	border-radius: var(--r-md);
	overflow-x: auto;
	line-height: 1.6;
}

pre code {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
}

blockquote {
	border-left: 3px solid var(--c-accent);
	padding-left: var(--sp-6);
	font-size: var(--fs-lead);
	line-height: 1.5;
	color: var(--c-ink);
}

hr {
	border: 0;
	border-top: 1px solid var(--c-line);
	margin-block: var(--sp-10);
}

/* ------------------------------------------------------------------ lists */

ul, ol {
	padding-left: 1.15em;
}

li + li {
	margin-top: 0.4em;
}

li::marker {
	color: var(--c-accent-quiet);
}

/* ----------------------------------------------------------------- media */

img, svg, video, canvas, picture, iframe {
	display: block;
	max-width: 100%;
}

img, video {
	height: auto;
}

/* Deliberately no blanket `svg { fill: currentColor }`.
   The icon set is stroke-based and emitted with fill="none", but a CSS rule
   beats a presentation attribute — so a blanket fill turned every line icon
   into a solid blob. Icons that genuinely are filled (play, social marks)
   declare fill on their own <path>. */
svg { color: inherit; }

figure {
	margin: 0;
}

figcaption {
	font-size: var(--fs-sm);
	color: var(--c-muted);
	margin-top: var(--sp-3);
}

/* ----------------------------------------------------------------- forms */

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

button {
	background: none;
	border: 0;
	cursor: pointer;
}

textarea {
	resize: vertical;
	min-height: 8rem;
}

/* ---------------------------------------------------------------- tables */

table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-sm);
}

th, td {
	text-align: left;
	padding: var(--sp-3) var(--sp-4);
	border-bottom: 1px solid var(--c-line);
}

th {
	font-family: var(--font-display);
	font-size: var(--fs-xs);
	letter-spacing: var(--ls-eyebrow);
	color: var(--c-muted);
	font-weight: var(--fw-medium);
}

/* --------------------------------------------------- focus and a11y bits */

:focus-visible {
	outline: 2px solid var(--c-focus);
	outline-offset: 3px;
	border-radius: var(--r-xs);
}

::selection {
	background: var(--c-accent);
	color: var(--c-accent-ink);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100%;
	left: var(--sp-4);
	z-index: var(--z-modal);
	background: var(--n-950);
	color: var(--n-0);
	padding: var(--sp-3) var(--sp-5);
	border-radius: 0 0 var(--r-sm) var(--r-sm);
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	text-transform: uppercase;
	letter-spacing: var(--ls-label);
	text-decoration: none;
}

.skip-link:focus {
	top: 0;
}

/* Scrollbar — subtle, matches the industrial palette. */
@supports (scrollbar-color: auto) {
	html {
		scrollbar-color: var(--n-300) transparent;
		scrollbar-width: thin;
	}
}
