/* CSS reset */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	font-size: 16px;
}

body {
	font-family: "Inters", sans-serif;
	line-height: 1.5;
	color: #14181C;
	background: white;
}

/* Nav */


.nav-container {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	padding: 28px 20px;
	border-bottom: 1px solid #f2f1f1;

}

.brand {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	font-weight: 600;
}

.logo {
	width: 22px;
	height: auto;
}


.logo-circle-mid {
	animation: logo-pulse 2.4s ease-in-out infinite;
	animation-delay: 0.2s;
}

.logo-circle-outer {
	animation: logo-pulse 2.4s ease-in-out infinite;
	animation-delay: 0.8s;
}

@keyframes logo-pulse {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.3;
	}
}

.nav-links {
	display: flex;
	flex-direction: row;
	gap: 32px;
	list-style-type: none;
}

a {
	text-decoration: none;
	color: #14181C;
	font-weight: 500;
}

a:hover {
	color: #1B7A43;
}

.nav-disabled {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
	user-select: none;
}

.main {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	text-align: left;
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 20px 90px;
	gap: 40px;
}

.left-container {
	flex: 1;
	padding: 20px;
	text-align: left;
}

.left-container h1 {
	font-size: 3rem;
	line-height: 1.08;
	font-weight: 700;
	letter-spacing: -0.01em;
	max-width: 15ch;
}

.left-container h2 {
	font-size: 1.15rem;
	font-weight: 400;
	color: #5B6B63;
	max-width: 42ch;
	margin-top: 20px;
}

.button {
	display: inline-block;
	background-color: #2ec666;
	color: #fff;
	padding: 14px 26px;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	margin-top: 32px;
	transition: background-color 0.2s ease;
}

.button:hover {
	background-color: #1B7A43;
}

.left-container>p {
	margin-top: 14px;
	font-size: 0.9rem;
	color: #5B6B63;
}

hr {
	border: none;
	border-top: 1px solid #E3E7E1;
	margin: 28px 0;
}

.information {
	display: flex;
	flex-direction: row;
	gap: 40px;
}

.stat {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.stat-number {
	font-family: "IBM Plex Mono", monospace;
	font-size: 1.15rem;
	font-weight: 600;
	color: #14181C;
}

.stat-label {
	font-size: 0.85rem;
	color: #5B6B63;
}

/* Right container: receipt visual */
.right-container {
	flex: 1;
	padding: 20px;
	display: flex;
	justify-content: center;
}

.receipt-card {
	background: #fff;
	width: 100%;
	max-width: 320px;
	padding: 28px 24px;
	border-radius: 4px;
	box-shadow: 0 20px 40px rgba(20, 24, 28, 0.08);
	transform: rotate(2deg);
	font-family: "IBM Plex Mono", monospace;
	font-size: 0.85rem;
}

.receipt-title {
	font-size: 0.75rem;
	color: #9AA79E;
	padding-bottom: 16px;
	border-bottom: 1px dashed #E3E7E1;
	margin-bottom: 16px;
}

.receipt-line {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #F1F3EF;
}

.receipt-line--highlight {
	background: #FDF3F3;
	margin: 0 -12px;
	padding: 10px 12px;
	border-radius: 6px;
	border-bottom: none;
}

.tag {
	font-size: 0.65rem;
	font-family: "Instrument Sans", sans-serif;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 20px;
	white-space: nowrap;
}

.tag-low {
	background: #E4F5EA;
	color: #1B7A43;
}

.tag-high {
	background: #FBDCDC;
	color: #B23B3B;
}

/* Footer */
.footer-container {
	display: flex;
	justify-content: flex-end;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px 40px;
	font-size: 0.85rem;
	color: #5B6B63;
}

@media (max-width: 800px) {
	.main {
		flex-direction: column;
		text-align: left;
	}

	.left-container h1 {
		font-size: 2.2rem;
		max-width: none;
	}

	.right-container {
		width: 100%;
	}
}

/* Results CSS */

/* Results page */

.results-page {
	max-width: 900px;
	margin: 0 auto;
	padding: 60px 20px 100px;
}

.results-intro {
	margin-bottom: 50px;
}

.eyebrow {
	font-family: "IBM Plex Mono", monospace;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: #1B7A43;
	margin-bottom: 10px;
}

.results-intro h1 {
	font-size: 2.8rem;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin-bottom: 14px;
}

.results-intro>p:last-child {
	color: #5B6B63;
	font-size: 1.05rem;
}


.culprit-card {
	background: #FFFFFF;
	border: 1px solid #E3E7E1;
	border-radius: 12px;
	padding: 36px;
	margin-bottom: 70px;
}

.culprit-card h2 {
	font-size: 2rem;
	margin-bottom: 28px;
}

.culprit-number {
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.culprit-number strong {
	font-family: "IBM Plex Mono", monospace;
	font-size: 3rem;
	font-weight: 600;
}

.culprit-number span {
	color: #5B6B63;
}

.driving-equivalent {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #E3E7E1;
	color: #5B6B63;
}

.driving-equivalent strong {
	color: #14181C;
}


.top-five {
	margin-bottom: 70px;
}

.section-heading {
	margin-bottom: 30px;
}

.section-heading h2 {
	font-size: 1.8rem;
}


.co2-item {
	margin-bottom: 24px;
}

.co2-item-info {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 0.95rem;
}

.co2-item-info span:last-child {
	font-family: "IBM Plex Mono", monospace;
	color: #5B6B63;
}

.co2-bar {
	width: 100%;
	height: 10px;
	background: #E8ECE7;
	border-radius: 20px;
	overflow: hidden;
}

.co2-bar-fill {
	width: 70%;
	height: 100%;
	background: #2ec666;
	border-radius: 20px;
}


.summary {
	padding-bottom: 40px;
}

.summary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
}

.summary-card {
	border: 1px solid #E3E7E1;
	background: #FFFFFF;
	border-radius: 10px;
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.summary-card strong {
	font-family: "IBM Plex Mono", monospace;
	font-size: 2rem;
}

.summary-card span {
	color: #5B6B63;
	font-size: 0.9rem;
}


@media (max-width: 800px) {

	.results-page {
		padding-top: 40px;
	}

	.results-intro h1 {
		font-size: 2.2rem;
	}

	.culprit-card {
		padding: 28px;
	}

	.summary-grid {
		grid-template-columns: 1fr;
	}

}

@media (max-width: 480px) {
	.left-container h1 {
		font-size: 1.9rem;
		max-width: none;
	}

	.left-container h2 {
		font-size: 1rem;
	}

	.button {
		width: 100%;
		text-align: center;
	}

	.receipt-card {
		max-width: 100%;
		transform: rotate(0deg);
	}

	.results-intro h1 {
		font-size: 1.8rem;
	}

	.culprit-card {
		padding: 22px;
	}

	.culprit-number strong {
		font-size: 2.2rem;
	}
}

/*logo animation*/



/* co2 bar */
.co2-bar-fill {
	height: 100%;
	border-radius: inherit;
	background: #1B7A43;
}

.co2-bar-fill.high-impact {
	background: #d94f4f;
}

.co2-bar-fill.medium-impact {
	background: #e0b400;
}


/* Loading spinner  */
.loading-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(255, 255, 255, 0.97);
	z-index: 999;
	align-items: center;
	justify-content: center;
}

.loading-overlay.active {
	display: flex;
}

.loading-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	text-align: center;
}

.loading-content p {
	font-size: 1.15rem;
	font-weight: 500;
}

.loading-spinner {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 3px solid #E3E7E1;
	border-top-color: #2ec666;
	animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
	to {
		transform: rotate(360deg);
	}
}