/* ==========================================================================
   DESIGN SYSTEM UTILITIES & LAYOUT ENGINE
   ========================================================================== */

/* === Containers === */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp(1rem, 3vw, 2rem);
	padding-right: clamp(1rem, 3vw, 2rem);
}

.container-narrow {
	max-width: var(--container-narrow);
}

.container-query {
	container-type: inline-size;
}

/* === Section Layout Utilities === */
.section {
	padding-top: var(--section-padding);
	padding-bottom: var(--section-padding);
	position: relative;
}

.section-dark {
	background-color: var(--primary);
	color: var(--text-on-dark);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
	color: var(--text-on-dark);
}

.section-dark p {
	color: var(--text-muted-dark);
}

.section-darker {
	background-color: var(--primary-dark);
	color: var(--text-on-dark);
}

.section-light {
	background-color: var(--background);
	color: var(--text);
}

.section-surface {
	background-color: var(--surface);
}

/* === Section Header & Title Styles === */
.section-header {
	margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 1rem;
	font-size: var(--text-xs);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-radius: var(--radius-full);
	margin-bottom: 1rem;
}

.eyebrow-accent {
	background-color: var(--accent-subtle);
	color: var(--accent);
}

.eyebrow-dark {
	background-color: rgba(59, 108, 246, 0.15);
	color: #93b4ff;
	border: 1px solid rgba(59, 108, 246, 0.25);
}

.section-title {
	font-size: var(--text-3xl);
	margin-bottom: 0.75rem;
}

.section-subtitle {
	font-size: var(--text-lg);
	color: var(--text-secondary);
	max-width: 680px;
}

.section-dark .section-subtitle {
	color: var(--text-muted-dark);
}

/* === Typography Utilities === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gradient {
	background: linear-gradient(135deg, #3b6cf6 0%, #60a5fa 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	display: inline-block;
}

.text-gradient-dark {
	background: linear-gradient(135deg, #ffffff 0%, #98a9c7 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	display: inline-block;
}

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--text-on-dark) !important; }
.text-accent { color: var(--accent) !important; }

/* === Grid Layout Systems === */
.grid {
	display: grid;
	gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 1.5rem;
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 1.5rem;
}

.categories-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	gap: 1.25rem;
}

/* === Flexbox Utilities === */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-none { display: none; }
.d-block { display: block; }

.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.align-items-stretch { align-items: stretch; }

.justify-content-start { justify-content: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }

.flex-grow-1 { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 0.75rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 2rem; }

/* === Spacing Helpers === */
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2.5rem; }
.mt-6 { margin-top: 4rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 0.75rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2.5rem; }

.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* === Visibility & Accessibility Helpers === */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--primary);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	clip: auto !important;
	clip-path: none;
	color: #ffffff;
	display: block;
	font-size: var(--text-sm);
	font-weight: 600;
	height: auto;
	left: 1rem;
	line-height: normal;
	padding: 1rem 1.5rem;
	text-decoration: none;
	top: 1rem;
	width: auto;
	z-index: 100000;
}
