html {
	box-sizing: border-box;
}

*,
*:before,
*:after {
	margin: 0;
	padding: 0;
	box-sizing: inherit;
}

:root {
	--background: 0 0% 3.9%;
	--foreground: 0 0% 98%;
	--card: 0 0% 3.9%;
	--card-foreground: 0 0% 98%;
	--popover: 0 0% 3.9%;
	--popover-foreground: 0 0% 98%;
	--primary: 0 0% 98%;
	--primary-foreground: 0 0% 9%;
	--secondary: 0 0% 14.9%;
	--secondary-foreground: 0 0% 98%;
	--muted: 0 0% 14.9%;
	--muted-foreground: 0 0% 63.9%;
	--accent: 0 0% 14.9%;
	--accent-foreground: 0 0% 98%;
	--destructive: 0 62.8% 30.6%;
	--destructive-foreground: 0 0% 98%;
	--border: 0 0% 14.9%;
	--input: 0 0% 14.9%;
	--ring: 0 0% 83.1%;
	--radius: 0.5rem;
}

body {
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: hsl(var(--background));
	color: hsl(var(--foreground));
	line-height: 1.6;
	overflow-x: hidden;
}

.container {
	display: flex;
	margin: 1rem;
	border: 1px solid hsl(var(--border));
	height: calc(100dvh - 2rem);
}

.left-section {
	flex: 1;
	padding: 1rem;
	border-right: 1px solid hsl(var(--border));
	position: relative;
	overflow: hidden;
}

.right-section {
	flex: 1;
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 2rem;
	overflow: hidden;
}

.hero-content {
	position: relative;
	z-index: 2;
	max-width: 800px;
}

.hero-title {
	font-size: 2.8rem;
	font-weight: bold;
	line-height: 1.2;
	color: hsl(var(--foreground));
	margin-bottom: 1rem;
}

.hero-subtitle {
	font-size: 1.2rem;
	color: hsl(var(--muted-foreground));
	margin-bottom: 2rem;
}

.hero-description {
	font-size: 1rem;
	color: hsl(var(--muted-foreground));
	max-width: 600px;
	margin-bottom: 3rem;
}

.cta-container {
	display: flex;
	gap: 1rem;
}

.cta-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1.2rem;
	border-radius: var(--radius);
	text-decoration: none;
	font-weight: 500;
	transition: all 0.2s ease;
}

.cta-primary {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border: 1px solid hsl(var(--border));
}

.cta-primary:hover {
	background: hsl(var(--accent));
	color: hsl(var(--accent-foreground));
}

.cta-secondary {
	background: transparent;
	color: hsl(var(--foreground));
	border: 1px solid hsl(var(--border));
}

.cta-secondary:hover {
	background: hsl(var(--accent));
	color: hsl(var(--accent-foreground));
	border-color: hsl(var(--accent));
}

footer {
	position: absolute;
	bottom: 1rem;
	left: 2rem;
	right: 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: hsl(var(--muted-foreground));
	font-size: 0.9rem;
}

.logo-container {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

h1.logo {
	font-size: 2rem;
	font-weight: bold;
	color: hsl(var(--foreground));
}

.memory-feed {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	height: 60%;
	overflow: hidden;
	mask: linear-gradient(
		to bottom,
		transparent 0%,
		black 20%,
		black 80%,
		transparent 100%
	);
	-webkit-mask: linear-gradient(
		to bottom,
		transparent 0%,
		black 20%,
		black 80%,
		transparent 100%
	);
}

.memory-scroller {
	display: flex;
	flex-direction: column;
	animation: scrollUp 25s linear infinite;
}

.memory-item {
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	padding: 0.75rem 1rem;
	margin-bottom: 0.5rem;
	transition: all 0.2s ease;
}

.memory-item:hover {
	opacity: 1;
	background: hsl(var(--accent));
	border-color: hsl(var(--primary));
}

.memory-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
}

.agent-name {
	font-weight: 600;
	color: hsl(var(--primary));
	font-size: 0.875rem;
}

.space-name {
	font-size: 0.875rem;
	color: hsl(var(--muted-foreground));
	background: hsl(var(--accent));
	padding: 0.1rem 0.4rem;
	border-radius: 0.25rem;
}

.timestamp {
	font-size: 0.75rem;
	color: hsl(var(--muted-foreground));
}

.memory-content {
	font-size: 0.875rem;
	color: hsl(var(--foreground));
	line-height: 1.4;
}

@keyframes scrollUp {
	from {
		transform: translateY(0);
	}
	to {
		transform: translateY(-50%);
	}
}

.fig {
	position: absolute;
	bottom: -5rem;
	right: -5rem;
	z-index: -1;
	opacity: 0.5;
}

.spaces {
	margin-top: 0.5rem;
}

.space-name {
	margin-right: 0.25rem;
}

#svg-logo {
	transition: transform 0.3s ease;
}

a.logo-link {
	display: flex;
	align-items: center;
	text-decoration: none;
	font-family: sans-serif;
	font-weight: bold;
	font-size: 24px;
	color: #fff;
	width: min-content;
}

a.logo-link:hover #svg-logo {
	transform: rotate(360deg);
}

.social-links a {
	color: hsl(var(--muted-foreground));
	text-decoration: none;
	margin-left: 1rem;
	transition: all 0.2s ease;
	position: relative;
}

.social-links a::after {
	content: "";
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 1px;
	background: hsl(var(--foreground));
	transition: width 0.3s ease;
}

.social-links a:hover {
	color: hsl(var(--foreground));
	transform: translateY(-1px);
}

.social-links a:hover::after {
	width: 100%;
}

.scroll-indicator {
	display: none;
}

.clipped-text {
	display: none;
}

@media (max-width: 1024px) {
	body {
		overflow-x: hidden;
		overflow-y: auto;
	}

	.container {
		flex-direction: column;
		height: 100dvh;
		margin: 0;
		border: none;
		position: relative;
	}

	header {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 1000;
		background: hsl(var(--background));
		border-bottom: 1px solid hsl(var(--border));
		padding: 1rem;
	}

	.left-section {
		position: fixed;
		top: 80px;
		left: 0;
		right: 0;
		height: calc(100dvh - 80px);
		border: none;
		padding: 1rem;
		z-index: 1;
		pointer-events: none;
	}

	.memory-feed {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: 90%;
		height: 60%;
		pointer-events: auto;
		z-index: 2;
		padding: 0;
	}

	.right-section {
		position: relative;
		z-index: 100;
		background: hsl(var(--background));
		margin-top: 100dvh;
		min-height: 100dvh;
		padding: 2rem 1.5rem;
		border-top: 1px solid hsl(var(--border));
	}

	.hero-title {
		font-size: 2.4rem;
	}

	.hero-subtitle {
		font-size: 1.1rem;
	}

	.hero-description {
		font-size: 1rem;
		margin-bottom: 2rem;
	}

	footer {
		position: static;
		padding: 2rem 1.5rem;
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}

	.social-links {
		margin-top: 1rem;
	}

	.social-links a {
		margin: 0 0.5rem;
	}

	.fig {
		position: absolute;
		bottom: -5rem;
		right: -5rem;
		z-index: 0;
		opacity: 0.3;
	}

	.scroll-indicator {
		display: block;
		position: fixed;
		bottom: 2rem;
		left: 50%;
		transform: translateX(-50%);
		z-index: 500;
		pointer-events: none;
		width: 28px;
		height: 48px;
		background: hsl(var(--background) / 0.9);
		border: 2px solid hsl(var(--border));
		border-radius: 14px;
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
		overflow: hidden;
		box-shadow: 0 4px 12px hsl(var(--background) / 0.3);
	}

	.scroll-ball {
		width: 8px;
		height: 8px;
		background: hsl(var(--foreground));
		border-radius: 50%;
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		animation: scrollDrop 1.5s infinite ease-in-out;
	}

	@keyframes scrollDrop {
		0% {
			top: 28px;
			opacity: 1;
		}
		50% {
			opacity: 0.6;
		}
		100% {
			top: 8px;
			opacity: 0;
		}
	}

	.clipped-text {
		--font-size: min(8rem, 15vw);
		display: block;
		position: absolute;
		bottom: calc(var(--font-size) / 4 * -1);
		left: 50%;
		transform: translateX(-50%);
		font-size: var(--font-size);
		font-weight: bold;
		color: hsl(var(--muted-foreground) / 0.15);
		pointer-events: none;
		z-index: 1;
		line-height: 1;
		user-select: none;
	}
}

@media (max-width: 768px) {
	.cta-container {
		flex-direction: column;
		align-items: stretch;
	}

	.cta-button {
		justify-content: center;
	}

	.hero-title {
		font-size: 2rem;
	}

	.hero-subtitle {
		font-size: 1rem;
	}

	.right-section {
		padding: 1rem;
	}

	footer {
		padding: 1.5rem 1rem;
	}
}
