/**
 * Kanubar Base Styles
 * Modern CSS Reset + Foundation
 */

/* === RESET === */

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

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

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

/* === BODY === */

body {
	font-family: var(--font-body);
	font-size: var(--text-body);
	line-height: var(--leading-body);
	color: var(--color-foreground);
	background-color: var(--color-background);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY === */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 600;
	line-height: 1.2;
	color: var(--color-foreground);
}

h1 {
	font-size: var(--text-h1);
	font-weight: 700;
	line-height: var(--leading-h1);
}

h2 {
	font-size: var(--text-h2);
	line-height: var(--leading-h2);
}

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

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

p {
	margin-bottom: var(--space-md);
}

p:last-child {
	margin-bottom: 0;
}

/* === LINKS === */

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color var(--transition-fast);
}

a:hover {
	color: var(--color-primary-dark);
}

/* === IMAGES === */

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

/* === LISTS === */

ul, ol {
	list-style: none;
}

/* === FOCUS STATES === */

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

:focus:not(:focus-visible) {
	outline: none;
}

/* === LAYOUT === */

.container {
	width: 100%;
	max-width: var(--container-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-padding);
	padding-right: var(--container-padding);
}

.site-main {
	padding-top: var(--space-xl);
	padding-bottom: var(--space-xl);
}

/* Account for sticky mobile CTA */
@media (max-width: 767px) {
	body {
		padding-bottom: calc(var(--sticky-cta-height) + var(--space-md));
	}
}

/* Account for sticky nav */
body {
	padding-top: var(--nav-height-mobile);
}

@media (min-width: 1024px) {
	body {
		padding-top: var(--nav-height-desktop);
	}
}

/* === SELECTION === */

::selection {
	background-color: var(--color-primary);
	color: var(--color-on-primary);
}

/* === UTILITIES === */

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

.text-muted {
	color: var(--color-muted-foreground);
}

.text-center {
	text-align: center;
}

.section {
	padding-top: var(--space-3xl);
	padding-bottom: var(--space-3xl);
}

.section--muted {
	background-color: var(--color-muted);
}

.section__title {
	text-align: center;
	margin-bottom: var(--space-2xl);
}
