@font-face {
	font-family: "Cooper Hewitt";
	src: url("../fonts/cooper-hewitt-book.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: "Cooper Hewitt";
	src: url("../fonts/cooper-hewitt-bold.woff2") format("woff2");
	font-weight: bold;
	font-style: normal;
}

:root {
	--color-change-positive: #0BC96E;
	--color-change-negative: #EF003C;
	--color-background: #262831;
	--font-family: "Cooper Hewitt", Roboto, sans-serif;
}

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

html {
	line-height: 1;
	-webkit-text-size-adjust: 100%;
    height: -webkit-fill-available;
}

body {
	font-family: var(--font-family);
	margin: 0;
	padding: 5vw;
	display: grid;
	place-items: center;
	min-height: 100vh;
    min-height: -webkit-fill-available;
	background-color: var(--color-background);
	background-image: url(../img/background.jpg);
    background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	color: white;
	--max-font-size: 3rem;
	font-size: clamp(1.6rem, 5vw, var(--max-font-size));
}

@media screen and (max-height: 43em) {
	body {
		--max-font-size: 2rem;
	}
}

p {
	margin: 0;
}

@media screen and (max-aspect-ratio: 3/4) {
	.stonks-container {
		padding-bottom: calc(9em - 30vw);
	}
}

.title {
	--max-font-size: 6rem;
	font-size: clamp(3rem, 13vw, var(--max-font-size));
	font-weight: bold;
	text-align: center;
}

.progress {
    position: relative;
    height: .375rem;
    background: rgba(255, 255, 255, .2);
    margin-top: 1.25rem;
    margin-right: clamp(.125rem, 1.5vw, 1rem);
    margin-bottom: clamp(3rem, 7vw, 5rem);
    margin-left: clamp(.125rem, 1.5vw, 1rem);
}

.goal-progress {
    content: "";
    position: absolute;
    inset: 0;
    right: auto;
    width: var(--goal-progress, 0);
    background: var(--color-change-positive);
    transition: width 1s ease-in-out;
}

.details {
	display: flex;
	justify-content: center;
    flex-wrap: wrap;
	gap: clamp(1rem, 4vw, 3rem);
}

.days-left {
	opacity: .4;
    white-space: nowrap;
}

.days-left::after {
    content: " days left";
}

.days-left[data-value="1"]::after {
    content: " day left";
}

.percentage {
	white-space: nowrap;
	transition: color .25s ease-in-out;
}

.percentage[data-change="positive"] {
	color: var(--color-change-positive);
}

.percentage[data-change="negative"] {
	color: var(--color-change-negative);
}

.percentage::after {
	content: " %";
}
