/** biome-ignore-all lint/complexity/noImportantStyles: i dont care about this rule */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

:root {
	/* More technical 'Drafting Table' Palette */
	--primary: #2563eb;
	--primary-dark: #1d4ed8;
	--primary-light: #dbeafe;
	--accent: #ea580c;
	--bg-main: #e5e7eb;
	/* Refined technical gray */
	--bg-secondary: #d1d5db;
	--bg-grid: rgba(31, 41, 55, 0.08);
	/* Higher contrast grid */
	--text-main: #111827;
	--text-muted: #4b5563;
	--border-color: #9ca3af;
	--border-accent: #3b82f6;
	--transition-fast: 150ms ease;
	--transition-smooth: 250ms cubic-bezier(0.4, 0, 0.2, 1);
	--shadow-subtle:
		0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	--shadow-hover:
		0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
	box-sizing: border-box;
}

body {
	font-family:
		"IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		sans-serif;
	margin: 0;
	padding: 0;
	background-color: var(--bg-main);
	background-image:
		linear-gradient(var(--bg-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
	background-size: 40px 40px;
	color: var(--text-main);
	min-height: 100vh;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	position: relative;
}

body::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0.04;
	pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
	z-index: 1;
}

#page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Header & Logo */
header {
	padding: 1.5rem 2rem;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 2px solid var(--text-main);
	position: sticky;
	top: 0;
	z-index: 1000;
	display: flex;
	justify-content: center;
}

.logo {
	font-family: "JetBrains Mono", monospace;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.5px;
	color: var(--text-main);
	text-decoration: none;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.logo::before {
	content: "[PrintGraphs]";
	color: var(--primary);
}

.logo:hover {
	color: var(--primary);
}

/* Main Content */
#main {
	padding: 4rem 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
}

#holder h1 {
	font-family: "JetBrains Mono", monospace;
	font-size: 2.5rem;
	font-weight: 700;
	text-align: center;
	margin: 0 0 4rem 0;
	color: var(--text-main);
	letter-spacing: -1px;
}

/* Section Headers & Dividers */
.category-header {
	font-family: "JetBrains Mono", monospace;
	color: var(--text-main);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-left: 4px solid var(--primary);
	padding-left: 1rem;
	margin-bottom: 2rem;
	font-size: 1.25rem;
}

.category-description {
	color: var(--text-muted);
	font-size: 1rem;
	margin-bottom: 2rem;
	max-width: 800px;
}

.category-ads {
	background: var(--bg-secondary);
	padding: 1rem;
	border: 1px dashed var(--border-color);
	border-radius: 4px;
	margin: 2rem 0;
	text-align: center;
	color: var(--text-muted);
	font-family: "JetBrains Mono", monospace;
	font-size: 0.75rem;
}

.category-divider {
	border: 0;
	height: 1px;
	background: var(--border-color);
	margin: 4rem 0 !important;
}

h2 {
	font-family: "JetBrains Mono", monospace;
	color: var(--text-main);
	font-size: 1.5rem;
}

/* Hide empty elements */
h1:empty,
h2:empty,
.site-title:empty {
	display: none !important;
}

/* Category Quick Links */
.categories {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 5rem !important;
}

.category {
	flex: 1 1 150px;
	max-width: 200px;
	background: var(--bg-main);
	border: 1px solid var(--border-color);
	border-radius: 0;
	transition: var(--transition-fast);
	display: flex;
	box-shadow: var(--shadow-subtle);
}

.category:hover {
	transform: translateY(-4px);
	border-color: var(--primary);
	box-shadow: var(--shadow-hover);
}

.home-page-category-link {
	color: var(--text-main) !important;
	text-decoration: none !important;
	padding: 2rem 1rem;
	display: flex !important;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
	font-family: "JetBrains Mono", monospace;
	font-size: 0.8rem;
	font-weight: 500;
}

.category:hover .home-page-category-link {
	color: var(--primary) !important;
}

/* Product list (Grids) */
.category-list,
#holder ul {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
	gap: 2rem !important;
	list-style: none;
	padding: 0 !important;
	margin: 0 auto;
}

.category-list .show,
#holder ul .show {
	background: #ffffff;
	/* Contrast against tech gray bg */
	border: 1px solid var(--border-color);
	border-radius: 0;
	overflow: hidden;
	transition: var(--transition-smooth);
	position: relative;
	display: flex !important;
	flex-direction: column;
	box-shadow: 4px 4px 0 var(--border-color);
	/* Technical offset shadow */
}

.category-list .show:hover,
#holder ul .show:hover {
	border-color: var(--primary);
	box-shadow: var(--shadow-hover);
}

.show a {
	position: relative;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	height: 100%;
	width: 100%;
}

.show h4 {
	margin: 0;
	padding: 1rem 1.25rem;
	font-size: 0.85rem;
	font-weight: 600;
	font-family: "JetBrains Mono", monospace;
	/* Monospace title for tech feel */
	color: var(--text-main);
	text-align: center;
	/* Center-aligned technical ledger style */
	transition: var(--transition-fast);
	line-height: 1.4;
	order: 2;
	background: #ffffff;
	z-index: 5;
	border-top: 1px solid var(--border-color);
	flex-grow: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.show:hover h4 {
	color: var(--primary);
}

.show img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-color);
	transition: var(--transition-smooth);
	display: block;
	padding: 1rem;
	order: 1;
}

.show:hover img {
	background: #ffffff;
}

/* Hover Action Bar - Moved to Top-Right Tab */
.show a::after {
	content: "GENERATE";
	position: absolute;
	top: 0;
	right: 0;
	background: var(--text-main);
	color: #fff;
	text-align: center;
	padding: 0.4rem 1rem;
	font-size: 0.65rem;
	font-weight: 700;
	font-family: "JetBrains Mono", monospace;
	opacity: 0;
	transform: translateY(-100%);
	transition: var(--transition-smooth);
	z-index: 10;
	pointer-events: none;
	border-bottom: 2px solid var(--primary);
	border-left: 2px solid var(--primary);
}

.show:hover a::after {
	opacity: 1;
	transform: translateY(0);
}

/* Ensure image dims on hover to provide contrast */
.show:hover img {
	background: #ffffff;
	opacity: 0.8;
}

/* Footer Styling */
footer {
	margin-top: auto;
	padding: 4rem 2rem;
	background: var(--text-main);
	color: var(--bg-secondary);
	text-align: center;
}

/* biome-ignore lint/style/noDescendingSpecificity: dont care */
footer a {
	color: #94a3b8;
	text-decoration: none;
	font-size: 0.9rem;
	font-family: "JetBrains Mono", monospace;
	transition: var(--transition-fast);
}

footer a:hover {
	color: #ffffff;
}

/* Document Detail Page */
.showDoc {
	background: var(--bg-main);
	border: 1px solid var(--border-color);
	border-radius: 0;
	padding: 4rem 2rem;
	margin-bottom: 4rem;
	text-align: center;
	box-shadow: var(--shadow-subtle);
}

/* biome-ignore lint/style/noDescendingSpecificity: dont care */
.showDoc h1 {
	font-family: "JetBrains Mono", monospace;
	font-size: 2rem;
	font-weight: 700;
	color: var(--text-main) !important;
	margin-bottom: 2rem;
}

.showDoc .large-preview-image {
	max-width: 100%;
	height: auto;
	border: 1px solid var(--border-color);
	padding: 1rem;
	background: var(--bg-secondary);
	margin-bottom: 3rem;
}

.showDoc p {
	color: var(--text-muted);
	font-size: 1.1rem;
	max-width: 700px;
	margin: 0 auto 3rem auto;
}

/* Technical Button */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 3rem;
	background: var(--text-main);
	color: #ffffff !important;
	text-decoration: none !important;
	font-family: "JetBrains Mono", monospace;
	font-weight: 600;
	font-size: 1rem;
	text-transform: uppercase;
	border: 2px solid var(--text-main);
	transition: var(--transition-fast);
	cursor: pointer;
}

.btn:hover {
	background: transparent;
	color: var(--text-main) !important;
}

/* Download Link Specifics */
#holder:has(#downloadlink) {
	text-align: center;
	max-width: 600px;
	margin: 4rem auto;
	padding: 4rem 2rem;
	background: var(--bg-main);
	border: 2px solid var(--text-main);
	box-shadow: 10px 10px 0 var(--border-color);
}

#holder:has(#downloadlink) h1 {
	font-family: "JetBrains Mono", monospace;
	font-size: 2.5rem;
	margin-bottom: 1.5rem;
}

#downloadlink {
	color: var(--primary);
	text-decoration: underline;
	font-weight: 700;
	font-family: "JetBrains Mono", monospace;
}

/* Utility Classes */
.ba {
	border: 1px solid var(--border-color) !important;
}

.black {
	color: var(--text-main) !important;
}

.link {
	color: var(--primary);
	text-decoration: none;
	transition: var(--transition-fast);
}

.link:hover {
	color: var(--primary-dark);
	text-decoration: underline;
}

.w-100 {
	width: 100% !important;
}

.flex {
	display: flex !important;
}

.flex-col {
	flex-direction: column !important;
}

.gap-2 {
	gap: 0.5rem !important;
}

.gap-4 {
	gap: 1rem !important;
}

.gap-6 {
	gap: 1.5rem !important;
}

.gap-8 {
	gap: 2rem !important;
}

.justify-center {
	justify-content: center !important;
}

.items-center {
	align-items: center !important;
}

.items-start {
	align-items: flex-start !important;
}

.mt2 {
	margin-top: 0.5rem !important;
}

.mb2 {
	margin-bottom: 0.5rem !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-width: 0;
}

/* Accessibility */
:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	::before,
	::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Responsive Adjustments */
@media (max-width: 768px) {
	#holder h1 {
		font-size: 2rem;
	}

	.category-list,
	#holder ul {
		grid-template-columns: 1fr !important;
	}

	header {
		padding: 1rem;
	}

	.logo {
		font-size: 1.25rem;
	}
}
