/* ==========================================================================
   SaaS NG — reset and element defaults
   ========================================================================== */

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

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Keep in-page anchor targets clear of the sticky header. */
	scroll-padding-top: 6rem;
}

body {
	background-color: var(--page-bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	/* Nothing on this site should ever scroll sideways. */
	overflow-x: hidden;
}

/* --- Typography ----------------------------------------------------------- */

h1,
h2,
h3,
h4 {
	font-weight: var(--weight-bold);
	line-height: var(--leading-tight);
	letter-spacing: var(--tracking-tight);
	text-wrap: balance;
	color: var(--ink);
}

h1 {
	font-size: var(--text-4xl);
}

h2 {
	font-size: var(--text-3xl);
}

h3 {
	font-size: var(--text-2xl);
	line-height: var(--leading-snug);
}

h4 {
	font-size: var(--text-xl);
	line-height: var(--leading-snug);
	font-weight: var(--weight-semibold);
}

p,
li {
	text-wrap: pretty;
}

p {
	max-width: var(--measure);
}

strong {
	font-weight: var(--weight-semibold);
	color: var(--ink);
}

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

/* --- Links ---------------------------------------------------------------- */

a {
	color: var(--link);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
	color: var(--ink-strong);
}

/* --- Focus: one treatment, visible on every ground the site uses ---------- */

:focus-visible {
	outline: var(--focus-width) solid var(--focus-ring);
	outline-offset: var(--focus-offset);
	border-radius: var(--radius-sm);
}

/* --- Media ---------------------------------------------------------------- */

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

svg {
	height: auto;
}

/* --- Lists ---------------------------------------------------------------- */

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

li + li {
	margin-top: var(--space-2);
}

/* --- Tables (privacy/terms only) ------------------------------------------ */

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

th,
td {
	text-align: left;
	padding: var(--space-3);
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}

th {
	font-weight: var(--weight-semibold);
}

/* --- Accessibility utilities ---------------------------------------------- */

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: 0;
	left: var(--space-4);
	z-index: 100;
	transform: translateY(-150%);
	background-color: var(--panel);
	color: var(--panel-ink);
	padding: var(--space-3) var(--space-5);
	border-radius: 0 0 var(--radius-md) var(--radius-md);
	font-weight: var(--weight-semibold);
	text-decoration: none;
	transition: transform var(--duration-base) var(--ease-out);
}

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

/* --- Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* --- Print ---------------------------------------------------------------- */

@media print {
	.site-header,
	.site-footer,
	.cta-band,
	.skip-link {
		display: none;
	}

	body {
		color: #000;
		background: #fff;
	}

	/* Make link destinations readable on paper. */
	main a[href^="http"]::after,
	main a[href^="mailto"]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
		color: #444;
	}
}
