@import url("/public/css/offen.css");

@font-face {
	font-family: "BONX";
	src: url("/api/font/medium") format("opentype");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "BONX";
	src: url("/api/font/bold") format("opentype");
	font-weight: 700;
	font-display: swap;
}

:root {
	--bg-primary: #0f0f0f;
	--bg-secondary: #1a1a1a;
	--bg-tertiary: #2a2a2a;

	--text-primary: #e6e6e6;
	--text-secondary: #888888;
	--text-muted: #555555;

	--accent-primary: #8b5fa8;
	--accent-secondary: #cc4499;
	--accent-hover: #bd93f9;

	--border-primary: #2a2a2a;
	--border-secondary: #3a3a3a;

	--overlay-light: rgba(255, 255, 255, 0.05);
	--overlay-light-border: rgba(255, 255, 255, 0.1);
	--overlay-dark: rgba(0, 0, 0, 0.4);
	--overlay-darker: rgba(0, 0, 0, 0.8);
	--shadow-sm: rgba(0, 0, 0, 0.05);
	--shadow-md: rgba(0, 0, 0, 0.2);
	--shadow-lg: rgba(0, 0, 0, 0.3);
	--shadow-accent: rgba(139, 95, 168, 0.15);
	--shadow-accent-lg: rgba(139, 95, 168, 0.25);
	--gradient-overlay: rgba(0, 0, 0, 0.9);
	--progress-bg: rgba(255, 255, 255, 0.2);
	--text-on-dark: rgba(255, 255, 255, 0.8);
	--badge-bg: rgba(0, 0, 0, 0.6);
	--star-color: #fbbf24;
	--accent-on-dark: #bd93f9;
	--snowflake-color: white;
	--bg-image: url("/api/background");
	--bg-video: url("/api/background-video");

	--spacing-xs: 0.25rem;
	--spacing-sm: 0.5rem;
	--spacing-md: 1rem;
	--spacing-lg: 1.5rem;
	--spacing-xl: 2rem;
	--spacing-xxl: 3rem;
	--spacing-xxxl: 5rem;

	--font-family-primary:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
		Cantarell, sans-serif;
	--font-family-display: "BONX", var(--font-family-primary);
	--font-family-mono:
		"SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New",
		monospace;

	--font-size-xs: 0.75rem;
	--font-size-sm: 0.875rem;
	--font-size-base: 1rem;
	--font-size-lg: 1.125rem;
	--font-size-xl: 1.25rem;
	--font-size-2xl: 1.5rem;
	--font-size-3xl: 2rem;
	--font-size-4xl: 2.5rem;

	--line-height-tight: 1.25;
	--line-height-normal: 1.5;
	--line-height-relaxed: 1.75;

	--container-max-width: 1400px;
	--container-padding: var(--spacing-lg);

	--transition-fast: 0.15s ease;
	--transition-normal: 0.25s ease;
	--transition-slow: 0.35s ease;
}

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

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-family-primary);
	font-size: var(--font-size-base);
	line-height: var(--line-height-normal);
	color: var(--text-primary);
	background-color: var(--bg-primary);
	overflow-x: hidden;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 0.15;
	}
}

body::before {
	content: "";
	position: fixed;
	bottom: 0;
	right: 0;
	width: min(clamp(250px, 40vw, 600px), calc(90vh * 0.651));
	height: auto;
	aspect-ratio: 651 / 1000;
	background-image: var(--bg-image);
	background-size: contain;
	background-repeat: no-repeat;
	background-position: bottom right;
	opacity: 0.15;
	pointer-events: none;
	z-index: -1;
	animation: fadeIn 2s ease-in-out;
}

.video-background {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 1s ease-in-out;
	z-index: -2;
}

.video-background.active {
	opacity: 0.1;
}

@media (max-width: 768px) {
	.video-background.active {
		opacity: 0.08;
	}
}

@media (max-width: 480px) {
	.video-background.active {
		opacity: 0.06;
	}
}

@media (max-width: 768px) {
	body::before {
		width: min(50vw, calc(90vh * 0.651));
		opacity: 0.1;
	}
}

@media (max-width: 480px) {
	body::before {
		width: min(60vw, calc(90vh * 0.651));
		opacity: 0.08;
	}
}

.snowflake {
	position: absolute;
	background-color: var(--snowflake-color);
	border-radius: 50%;
	pointer-events: none;
}

.theme-toggle {
	position: fixed;
	top: var(--spacing-md);
	right: var(--spacing-md);
	background: none;
	border: none;
	cursor: pointer;
	z-index: 1000;
	padding: var(--spacing-sm);
	transition: opacity 0.2s ease;
	opacity: 0.4;
	color: var(--text-secondary);
}

.theme-toggle:hover {
	opacity: 1;
	color: var(--text-primary);
}

.theme-toggle-sun,
.theme-toggle-moon,
.theme-toggle-system,
.theme-toggle-website {
	display: none;
}

.theme-toggle[data-mode="light"] .theme-toggle-sun {
	display: block;
}

.theme-toggle[data-mode="dark"] .theme-toggle-moon {
	display: block;
}

.theme-toggle[data-mode="system"] .theme-toggle-system {
	display: block;
}

.theme-toggle[data-mode="website"] .theme-toggle-website {
	display: block;
}
