/* global styles */

/* geist font */
@font-face {
	font-family: "Geist";
	src: url("https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-sans/Geist-Regular.woff2")
		format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Geist";
	src: url("https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-sans/Geist-Medium.woff2")
		format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Geist";
	src: url("https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-sans/Geist-Bold.woff2")
		format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* design tokens */
:root {
	/* light mode colors */
	--color-bg: #fafafa;
	--color-surface: #ffffff;
	--color-surface-elevated: #ffffff;
	--color-text-primary: #171717;
	--color-text-secondary: #525252;
	--color-text-muted: #737373;
	--color-border: #e5e5e5;
	--color-border-subtle: #f5f5f5;

	/* accent */
	--color-accent: #ea580c;
	--color-accent-hover: #c2410c;
	--color-accent-light: #fff7ed;
	--color-accent-text: #ffffff;

	/* semantic */
	--color-success: #16a34a;
	--color-warning: #ca8a04;
	--color-error: #dc2626;

	/* hero */
	--hero-bg-image: url("../res/imgs/cars/lightmodeherobg.jpg");

	/* typography */
	--font-display: "Ga Maamli", cursive;
	--font-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		sans-serif;

	--text-xs: 0.75rem;
	--text-sm: 0.875rem;
	--text-base: 1rem;
	--text-lg: 1.125rem;
	--text-xl: 1.25rem;
	--text-2xl: 1.5rem;
	--text-3xl: 1.875rem;
	--text-4xl: 2.25rem;
	--text-5xl: 3rem;
	--text-6xl: 3.75rem;

	--leading-tight: 1.25;
	--leading-normal: 1.5;
	--leading-relaxed: 1.75;

	/* spacing */
	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.25rem;
	--space-6: 1.5rem;
	--space-8: 2rem;
	--space-10: 2.5rem;
	--space-12: 3rem;
	--space-16: 4rem;
	--space-20: 5rem;
	--space-24: 6rem;

	/* layout */
	--max-width: 75rem;
	--container-padding: var(--space-4);

	/* radius */
	--radius-sm: 0.25rem;
	--radius-md: 0.5rem;
	--radius-lg: 0.75rem;
	--radius-xl: 1rem;
	--radius-2xl: 1.5rem;
	--radius-full: 99rem;

	/* shadows */
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
		0 2px 4px -2px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
		0 4px 6px -4px rgba(0, 0, 0, 0.1);
	--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
		0 8px 10px -6px rgba(0, 0, 0, 0.1);

	/* transitions */
	--transition-fast: 150ms ease;
	--transition-base: 300ms ease;
	--transition-slow: 500ms ease;
	--transition-theme: 400ms cubic-bezier(0.4, 0, 0.2, 1);

	/* z-index */
	--z-base: 0;
	--z-dropdown: 100;
	--z-sticky: 200;
	--z-overlay: 300;
	--z-modal: 400;
	--z-toast: 500;
}

/* dark mode */
[data-theme="dark"] {
	--color-bg: #0f0f0f;
	--color-surface: #1a1a1a;
	--color-surface-elevated: #262626;
	--color-text-primary: #fafafa;
	--color-text-secondary: #a3a3a3;
	--color-text-muted: #737373;
	--color-border: #2d2d2d;
	--color-border-subtle: #1f1f1f;

	--color-accent: #f97316;
	--color-accent-hover: #fb923c;
	--color-accent-light: #1c1410;

	--hero-bg-image: url("../res/imgs/cars/darkmodeherobg.jpg");

	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4),
		0 2px 4px -2px rgba(0, 0, 0, 0.3);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5),
		0 4px 6px -4px rgba(0, 0, 0, 0.4);
	--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
		0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

/* reset */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 100%;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	color: var(--color-text-primary);
	background-color: var(--color-bg);
	min-height: 100vh;
	scroll-behavior: smooth;
}

/* smooth theme transitions */
body,
.navbar,
.card,
.footer,
.mobile-nav,
.form-input,
.form-select,
.form-textarea,
.btn-secondary,
.theme-toggle,
.category-card-icon,
.footer-social a,
.quiz-option {
	transition: background-color var(--transition-theme),
		border-color var(--transition-theme), color var(--transition-theme),
		box-shadow var(--transition-theme);
}

/* logo branding items should be static during theme toggle */
.navbar-brand,
.navbar-brand img {
	transition: none !important;
}

/* hero bg transition */
.hero {
	transition: background-image var(--transition-slow);
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	border: none;
	background: none;
}

a {
	color: inherit;
	text-decoration: none;
}

ul,
ol {
	list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 700;
	line-height: var(--leading-tight);
}

/* typography utilities */
.font-display {
	font-family: var(--font-display);
}
.font-body {
	font-family: var(--font-body);
}

.text-xs {
	font-size: var(--text-xs);
}
.text-sm {
	font-size: var(--text-sm);
}
.text-base {
	font-size: var(--text-base);
}
.text-lg {
	font-size: var(--text-lg);
}
.text-xl {
	font-size: var(--text-xl);
}
.text-2xl {
	font-size: var(--text-2xl);
}
.text-3xl {
	font-size: var(--text-3xl);
}
.text-4xl {
	font-size: var(--text-4xl);
}
.text-5xl {
	font-size: var(--text-5xl);
}
.text-6xl {
	font-size: var(--text-6xl);
}

.text-primary {
	color: var(--color-text-primary);
}
.text-secondary {
	color: var(--color-text-secondary);
}
.text-muted {
	color: var(--color-text-muted);
}
.text-accent {
	color: var(--color-accent);
}

.text-center {
	text-align: center;
}
.text-left {
	text-align: left;
}
.text-right {
	text-align: right;
}

.font-normal {
	font-weight: 400;
}
.font-medium {
	font-weight: 500;
}
.font-bold {
	font-weight: 700;
}

/* layout utilities */
.container {
	width: 100%;
	max-width: var(--max-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-padding);
	padding-right: var(--container-padding);
}

.flex {
	display: flex;
}
.flex-col {
	flex-direction: column;
}
.flex-row {
	flex-direction: row;
}
.flex-wrap {
	flex-wrap: wrap;
}
.items-center {
	align-items: center;
}
.items-start {
	align-items: flex-start;
}
.items-end {
	align-items: flex-end;
}
.justify-center {
	justify-content: center;
}
.justify-between {
	justify-content: space-between;
}
.justify-start {
	justify-content: flex-start;
}
.justify-end {
	justify-content: flex-end;
}
.gap-1 {
	gap: var(--space-1);
}
.gap-2 {
	gap: var(--space-2);
}
.gap-3 {
	gap: var(--space-3);
}
.gap-4 {
	gap: var(--space-4);
}
.gap-6 {
	gap: var(--space-6);
}
.gap-8 {
	gap: var(--space-8);
}

.grid {
	display: grid;
}

/* spacing utilities */
.m-auto {
	margin: auto;
}
.mx-auto {
	margin-left: auto;
	margin-right: auto;
}

.p-4 {
	padding: var(--space-4);
}
.p-6 {
	padding: var(--space-6);
}
.p-8 {
	padding: var(--space-8);
}

.py-4 {
	padding-top: var(--space-4);
	padding-bottom: var(--space-4);
}
.py-6 {
	padding-top: var(--space-6);
	padding-bottom: var(--space-6);
}
.py-8 {
	padding-top: var(--space-8);
	padding-bottom: var(--space-8);
}
.py-12 {
	padding-top: var(--space-12);
	padding-bottom: var(--space-12);
}
.py-16 {
	padding-top: var(--space-16);
	padding-bottom: var(--space-16);
}
.py-20 {
	padding-top: var(--space-20);
	padding-bottom: var(--space-20);
}

.px-4 {
	padding-left: var(--space-4);
	padding-right: var(--space-4);
}
.px-6 {
	padding-left: var(--space-6);
	padding-right: var(--space-6);
}

.mt-4 {
	margin-top: var(--space-4);
}
.mt-6 {
	margin-top: var(--space-6);
}
.mt-8 {
	margin-top: var(--space-8);
}
.mb-4 {
	margin-bottom: var(--space-4);
}
.mb-6 {
	margin-bottom: var(--space-6);
}
.mb-8 {
	margin-bottom: var(--space-8);
}

/* visual utilities */
.bg-surface {
	background-color: var(--color-surface);
}
.bg-accent {
	background-color: var(--color-accent);
}

.rounded {
	border-radius: var(--radius-md);
}
.rounded-lg {
	border-radius: var(--radius-lg);
}
.rounded-xl {
	border-radius: var(--radius-xl);
}
.rounded-2xl {
	border-radius: var(--radius-2xl);
}
.rounded-full {
	border-radius: var(--radius-full);
}

.shadow {
	box-shadow: var(--shadow-md);
}
.shadow-lg {
	box-shadow: var(--shadow-lg);
}
.shadow-xl {
	box-shadow: var(--shadow-xl);
}

.border {
	border: 1px solid var(--color-border);
}

/* visibility */
.hidden {
	display: none !important;
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* sections */
.section {
	padding-top: var(--space-16);
	padding-bottom: var(--space-16);
}

.section-title {
	font-family: var(--font-display);
	font-size: var(--text-4xl);
	margin-bottom: var(--space-4);
}

.section-subtitle {
	font-size: var(--text-lg);
	color: var(--color-text-secondary);
	max-width: 37.5rem;
}

/* animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(0.625rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes shake {
	0%,
	100% {
		transform: translateX(0);
	}
	25% {
		transform: translateX(-0.3125rem);
	}
	75% {
		transform: translateX(0.3125rem);
	}
}

.animate-fadeIn {
	animation: fadeIn 0.4s ease forwards;
}

/* responsive */
@media (min-width: 480px) {
	:root {
		--container-padding: var(--space-6);
	}
}

@media (min-width: 768px) {
	:root {
		--container-padding: var(--space-8);
	}

	.section-title {
		font-size: var(--text-5xl);
	}
}

@media (min-width: 1024px) {
	.section {
		padding-top: var(--space-20);
		padding-bottom: var(--space-20);
	}
}
