/* ========== Fonts ========== */
@font-face {
	font-family: 'Acens';
	src: url('/assets/fonts/acens.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

/* ========== Theme variables ========== */
:root {
	--bg: #212121;
	--bg-hero: #0b0b0d;
	--bg-panel: black;
	--bg-footer: #212121;
	--ink: #e9eef5;
	--muted: #9aa3ad;
	--line: #23252b;
	--accent: #50a4d1;
	--procat-colour-orange: #e86e01;
	--procat-colour-purple: #7c5290;
	--procat-colour-blue: #42527d;
	--procat-colour-pink: #bb4682;
	--procat-colour-peach: #e54856;
	--procat-colour-teal: #00745e;

	--procat-purple-1: #b674d4;
	--procat-purple-2: #9556b3;
	--procat-purple-3: #753893;
	--procat-purple-4: #561a74;
	--procat-purple-5: #380057;

	--procat-teal-1: #56b8cf;
	--procat-teal-2: #2592a9;
	--procat-teal-3: #006e84;
	--procat-teal-4: #004c61;
	--procat-teal-5: #002c40;

	--procat-light-1: #56b8cf;
	--procat-light-2: #41cbce;
	--procat-light-3: #52dcbf;
	--procat-light-4: #81eaa5;
	--procat-light-5: #baf488;
	--procat-light-5: #f9f871;

	--procat-gradient-1: #56b8cf;
	--procat-gradient-2: #50a4d1;
	--procat-gradient-3: #658dca;
	--procat-gradient-4: #8172b5;
	--procat-gradient-5: #965692;
	--procat-gradient-6: #9d3b66;

	/* mobile header height */
	--procat-header-height: 64px;
	/* */
	--gutter: 12px;
	/* fallback for first paint */
	--toggle-w: 120px;
}

.heading-level1 {
	text-align: center;
	font-family: 'Acens', system-ui, sans-serif;
	color: var(--procat-teal-2);
	letter-spacing: .06em;
	text-transform: uppercase;
}

.heading-level2 {
	color: var(--procat-teal-1);
}

/* ========== Resets / base ========== */
* {
	box-sizing: border-box;
}

/* Any element that can be a scroll target */
[id] {
	scroll-margin-top: var(--procat-header-height);
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 16px/1.5 system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}

img {
	max-width: 100%;
	display: block;
}

a {
	color: inherit;
}

/* Smooth in-page anchor jumps */
html {
	scroll-behavior: smooth;
}

/* ========== Layout ========== */
.wrap {
	display: flex;
	min-height: 100vh;
}

/* Left rail / sidebar (desktop; mobile overrides below) */
.sidebar {
	width: 260px;
	background: var(--bg-panel);
	border-right: 1px solid var(--line);
	padding: 16px;
	position: sticky;
	top: 0;
	align-self: flex-start;
	height: 100vh;
	overflow: auto;
}

/* Main content */
.content {
	flex: 1;
	max-width: 920px;
	padding: 32px 24px;
	margin: 0 auto;
}

/* ========== Site Footrer ========== */

.site-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	border-top: 1px solid rgba(255, 255, 255, .08);
	background: var(--bg-footer);
}

.mixt-badge {
	list-style: none;	
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border-radius: 10px;
	/* pill */
	text-decoration: none;
	color: var(--ink);
	padding: 4px 10px;
	border: 1px solid rgba(255, 255, 255, .12);
	background: var(--procat-teal-4);
	font-size: 12px;
	letter-spacing: .02em;
	text-transform: none;
	padding: 4px 10px;
}

.mixt-badge:hover {
	background: var(--accent);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .06),
		0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.mixt-badge:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.mixt-badge-gh {
	width: 18px;
	height: 18px;
	opacity: .80;
	flex: 0 0 auto;
}

.mixt-badge-label strong {
	font-weight: 700;
}

/* Stack neatly on narrow screens */
@media (max-width: 560px) {
	.site-footer {
		flex-direction: column;
	}
}

/* ========== Brand (logo/banner links) ========== */
.brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0 0 16px 0;
	text-decoration: none;
	color: var(--ink);
	font-weight: 700;
	line-height: 1;
}

.brand img {
	max-height: calc(var(--procat-header-height) - 8px);
	height: auto;
}

/* ========== Unified collapsible sidebar nav ========== */
.toc {
	margin-top: 16px;
}

.toc-group {
	margin: 0 0 12px 0;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg-hero);
}

/* Top-level headings (use Acens) */
.toc-heading {
	list-style: none;
	font-family: 'Acens', system-ui, sans-serif;
	font-size: 14px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ink);
	padding: 10px 10px;
	cursor: pointer;
	user-select: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.toc-heading::-webkit-details-marker {
	display: none;
}

/* Caret */
.toc-heading::after {
	content: '▸';
	opacity: .7;
	transition: transform .18s ease;
}

.toc-group[open]>.toc-heading::after {
	transform: rotate(90deg);
}

/* Links inside sections */
/* --- Level 2 (nested) --- */
.toc-links .toc-sublinks {
	list-style: none;
	margin: 4px 0 8px 0;
	/* small gap under the parent item */
	padding-left: 12px;
	/* base indent for the whole sublist */
}

.toc-links {
	list-style: none;
}

.toc-links>li {
	margin-bottom: 4px;
}

.toc-links a {
	text-decoration: none;
}

.toc-links .toc-sublinks li {
	margin: 0;
}

/* Override only what's needed so alignment stays consistent */
.toc-links .toc-sublinks a {
	display: block;
	padding: 6px 8px 6px 12px;
	/* keep your 6/8/6, add +12px left to indent */
	text-decoration: none;
	border-radius: 6px;
	color: var(--ink);
	font-size: 0.95em;
	/* slightly lighter than level 1 */
}

.toc-links a:hover {
	background: rgba(255, 255, 255, .04);
	color: var(--accent);
}

/* Optional: a hairline guide if you want it later
.toc-links .toc-sublinks { border-left: 1px solid rgba(255,255,255,.12); }
*/


/* Back-compat alias (if HTML uses .section-content) */
.section-content a {
	text-decoration: none;
}

/* ========== Hero & cards (home) ========== */
.hero {
	background: #0b0b0d;
	/* slightly lighter than body bg */
	border-color: #2a2e35;
	/* a bit brighter than current line */
	box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
	/* subtle depth */
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 24px 20px;
	margin-bottom: 24px;
}

.hero .lead {
	color: var(--muted);
}

.hero-eyebrow {
	text-align: center;
	font-family: 'Acens', system-ui, sans-serif;
	color: var(--procat-purple-1);
	letter-spacing: .06em;
	text-transform: uppercase;
}

.hero-product {
	text-align: center;
	font-family: 'Acens', system-ui, sans-serif;
	color: var(--procat-purple-2);
	letter-spacing: .06em;
	text-transform: uppercase;
	font-size: 64px;
	font-weight: 700;
	margin: 0px;
	padding: 0;
}

.hero-tagline {
	text-align: center;
	color: var(--procat-gradient-5);
	letter-spacing: .06em;
	margin-top: 0px;
	font-weight: 700;
	font-size: 24px;
}

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

.card {
	background: var(--bg-panel);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 16px;
}

.card h2,
.card h3 {
	margin-top: 0;
}

/* ========== Mobile header (fixed) ========== */
.topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1200;
	height: var(--procat-header-height);
	background: var(--bg-panel);
	border-bottom: 1px solid var(--line);
}

.topbar-row {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--procat-header-height);
	padding: 0px 12px;
	position: relative;
}

/* Brand stays centered; shrink if needed to avoid the button */
.brand {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	line-height: var(--procat-header-height);
	/* critical: allows flex shrink */
	min-width: 0;
	margin-bottom: 0px;
}

.topbar-row .brand img {
	display: block;
	height: auto;
	max-height: calc(var(--procat-header-height) - 8px);
	margin-left: auto;
	margin-right: auto;
	padding: 5px;
	/* keep aspect */
	object-fit: contain;
}

.topbar-spacer {
	visibility: hidden;
	flex: 0 2 auto;
	margin-right: auto;
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 6px 10px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
	min-width: 0px;
}

.button {
	flex: 0 0 auto;
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 6px 10px;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
	text-decoration: none;
	/* for <a> buttons */
	line-height: 1.2;
	/* 
	* Buttons: subtle transitions for polish & affordance
	* - Fades color/border/background so hover/active changes feel intentional, not jumpy.
	* - Animates only paint/composite-friendly props (color, background-color, border-color, transform).
	* - Keeps focus ring instant for accessibility (no transition on outline).
	* - Disabled under prefers-reduced-motion to respect user settings.
	*/
	transition: background-color .15s, color .15s, border-color .15s, transform .12s;
}

.button:hover {
	background: rgba(255, 255, 255, .05);
	color: var(--accent);
}

/* When the sidebar toggle checkbox is checked */
.nav-toggle-input:checked~.topbar .topbar-nav-toggle {
	color: #fff;
	border-color: var(--accent);
	background: rgba(255, 255, 255, .05);
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5);
	/* pressed look */
	transform: translateY(1px);
	/* shift down 1px */
}

/*
Call To Action (CTA)
*/

/* Base remains your current .cta-row a */
.cta-row {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	justify-content: center;
	margin: 2rem auto 0;
	padding: .5rem 0 1.5rem;
}

.cta-row a {
	display: block;
	padding: 6px 8px;
	/* no underline */
	text-decoration: none;
	border-radius: 6px;
	color: var(--ink);
	border: 1px solid var(--line);
	transition: background-color .15s, color .15s, border-color .15s, transform .12s;
}

.cta-row a:hover {
	background: rgba(255, 255, 255, .04);
	color: var(--accent);
}

/* Focus ring for keyboard users */
.cta-row a:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
	.cta-row a {
		transition: none;
	}
}

/* Hidden visually, but available to AT; NOT for focusable controls */
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	white-space: nowrap;
	clip-path: inset(50%);
	clip: rect(0 0 0 0);
}

/* ========== Responsive / mobile drawer mechanics ========== */
.mobile-only {
	display: none;
}

.desktop-only {
	display: block;
}

@media (max-width:900px) {

	/* Push content below fixed header */
	body.document {
		margin-top: var(--procat-header-height);
	}

	.wrap {
		display: block;
	}

	.sidebar {
		position: fixed;
		top: var(--procat-header-height);
		/* ensure the sidebat fills the rest of the viewport but not under the header */
		height: calc(100vh - var(--procat-header-height));
		left: 0;
		bottom: 0;
		width: 260px;
		transform: translateX(-100%);
		transition: transform .2s ease;
		z-index: 1000;
		border-right: 1px solid var(--line);
		overflow: auto;
	}

	/* checkbox-controlled open state */
	.nav-toggle-input:checked~.wrap .sidebar {
		transform: translateX(0);
	}

	.mobile-only {
		display: block;
	}

	.desktop-only {
		display: none;
	}
}

@media (min-width:901px) {
	.mobile-only {
		display: none;
	}

	.desktop-only {
		display: block;
	}
}