/*
* LittleLink
* https://littlelink.io
* Free to use under the MIT license
* http://www.opensource.org/licenses/mit-license.php
*/

/* Config */
:root {
	/* Allow for light and dark themes */
	color-scheme: light dark;

	/* Using a 1.25 modular scale for typography */
	font-size: 16px;
	/* 16px */
	--scale-0: 1rem;
	/* 20px */
	--scale-1: 1.25rem;
	/* 25px */
	--scale-2: 1.563rem;
	/* 31px */
	--scale-3: 1.953rem;
	/* 39px */
	--scale-4: 2.441rem;
	/* 49px */
	--scale-5: 3.052rem;

	/* Spacing units */
	/* 8px */
	--spacing-xs: 0.5rem;
	/* 16px */
	--spacing-s: 1rem;
	/* 24px */
	--spacing-m: 1.5rem;
	/* 32px */
	--spacing-l: 2rem;
	/* 48px */
	--spacing-xl: 3rem;

	/* Colors */
	/* Radix Gray 12 */
	--color-base-light: #EEEEEE;
	/* Radix Gray 1 */
	--color-base-dark: #111111;
	/* Radix Blue 4 */
	--color-accent-light: #003362;
	/* Radix Blue 5 */
	--color-accent-dark: #004074;

	/* Misc */
	--border-radius: 0.5rem;
}

/* Dark theme */
@media (prefers-color-scheme:dark) {
	:root {
		/* Colors */
		/* Radix Gray 1 */
		--color-base-light: #111111;
		/* Radix Gray 12 */
		--color-base-dark: #EEEEEE;
		/* Radix Blue 11 */
		--color-accent-light: #70B8FF;
		/* Radix Blue 10 */
		--color-accent-dark: #3B9EFF;
	}
}

/* Body styles */
body {
	background-color: var(--color-base-light);
	color: var(--color-base-dark);
	display: flex;
	flex-direction: column;
	font-family: "Roboto Flex", system-ui;
	font-size: var(--scale-1);
	font-variation-settings: "wght" 400;
	justify-content: space-between;
	line-height: 1.6;
}

/* Accessibility */
:focus-visible {
	outline: 2px solid var(--color-accent-light);
	outline-offset: 2px;
}

/* Grid system */
.container {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: var(--spacing-l);
	margin: 0 auto;
	max-width: 40rem;
	padding: var(--spacing-xl) var(--spacing-m);
	position: relative;
	text-align: center;
	width: 100%;
}

.container--left {
	text-align: left;
}

/* For devices larger than 400px */
@media (min-width:25rem) {
	.container {
		width: 85%;
		padding-left: 0;
		padding-right: 0;
	}
}

/* For devices larger than 550px */
@media (min-width:34.375rem) {
	.container {
		width: 80%;
	}
}

/* Footer */
.footer {
	filter: grayscale(1);
	flex-direction: row;
	flex-wrap: wrap;
	font-size: var(--scale-0);
	gap: var(--spacing-s);
	justify-content: center;
	row-gap: var(--spacing-xs);
}

/* Links */
a {
	color: var(--color-accent-dark);
	text-decoration: underline;
}

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

/* Buttons */
a:not(.button) {
	color: var(--color-accent-light);
}

a:not(.button):hover {
	color: var(--color-accent-dark);
}

.button-stack {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: var(--spacing-s);
	justify-content: center;
}

.button {
	align-items: center;
	border-radius: var(--border-radius);
	box-sizing: border-box;
	color: var(--button-text) !important;
	cursor: pointer;
	display: inline-flex;
	font-size: var(--scale-1);
	font-variation-settings: "wght" 600;
	gap: var(--spacing-xs);
	hyphens: auto;
	justify-content: center;
	line-height: 1.3;
	min-height: 3rem;
	padding: var(--spacing-xs) var(--spacing-s);
	text-align: center;
	text-decoration: none;
	transition: transform 0.2s ease-in-out;
	white-space: normal;
	width: 18.75rem;
}

/* Icons */
.icon {
	flex-shrink: 0;
	height: var(--scale-1);
	width: var(--scale-1);
}

/* Avatar */
.avatar {
	width: 8rem;
	height: 8rem;
	border-radius: 50%;
	object-fit: cover;
	background-position: center;
	margin-left: auto;
	margin-right: auto;
	display: block;
}

/* Typography */
h1 {
	font-size: var(--scale-5);
	font-variation-settings: "wght" 700;
	hyphens: auto;
	line-height: 1.1;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

h2 {
	font-size: var(--scale-4);
	font-variation-settings: "wght" 600;
}

h3 {
	font-size: var(--scale-3);
	font-variation-settings: "wght" 500;
}

@media (max-width:34.375rem) {
	body {
		font-size: var(--scale-0);
	}

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

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

	h3 {
		font-size: var(--scale-2);
	}

	footer {
		margin: var(--spacing-xl) 0;
	}
}

ul {
	list-style: none;
	padding: 0;
	margin: 0 0 var(--spacing-m) 0;
}

ul li {
	margin-bottom: var(--spacing-xs);
}

/* Fonts */
@font-face {
	font-family: "Roboto Flex";
	font-style: normal;
	/* Defer font loading */
	font-display: swap;
	/* Register as variable font */
	font-stretch: 25% 151%;
	font-weight: 100 1000;
	src: local("Roboto Flex"), url("../fonts/Roboto-VariableFont_wdth,wght.ttf") format("woff2-variations");
	src: local("Roboto Flex"), url("../fonts/Roboto-VariableFont_wdth,wght.ttf") format("woff2") tech("variations");
}

@font-face {
	font-family: "Roboto Flex";
	font-style: italic;
	/* Defer font loading */
	font-display: swap;
	/* Register as variable font */
	font-stretch: 25% 151%;
	font-weight: 100 1000;
	src: local("Roboto Flex"), url("../fonts/Roboto-Italic-VariableFont_wdth,wght.ttf") format("woff2-variations");
	src: local("Roboto Flex"), url("../fonts/Roboto-Italic-VariableFont_wdth,wght.ttf") format("woff2") tech("variations");
}
