/**
 * Nikolas X — Design system foundation
 * CSS custom properties and base styles.
 */

:root {
	/* Colors */
	--nx-color-bg: #05070d;
	--nx-color-surface: #0b1020;
	--nx-color-surface-2: #12182a;
	--nx-color-primary: #4f46ff;
	--nx-color-primary-2: #7c3aed;
	--nx-color-white: #ffffff;
	--nx-color-light: #f7f8fc;
	--nx-color-text: #111827;
	--nx-color-text-on-dark: #ffffff;
	--nx-color-muted: #6b7280;
	--nx-color-muted-on-dark: rgba(255, 255, 255, 0.65);
	--nx-color-border: #e5e7eb;
	--nx-color-border-dark: rgba(255, 255, 255, 0.1);

	--nx-gradient-accent: linear-gradient(135deg, var(--nx-color-primary) 0%, var(--nx-color-primary-2) 100%);

	/* Radii */
	--nx-radius-sm: 8px;
	--nx-radius-md: 12px;
	--nx-radius-lg: 16px;
	--nx-radius-xl: 24px;

	/* Layout */
	--nx-container: 1280px;
	--nx-gutter: 24px;
	--nx-section-spacing: clamp(4rem, 8vw, 6.5rem);

	/* Typography */
	--nx-font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--nx-font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	--nx-fs-xs: 0.75rem;
	--nx-fs-sm: 0.875rem;
	--nx-fs-base: 1rem;
	--nx-fs-lg: 1.125rem;
	--nx-fs-xl: 1.25rem;
	--nx-fs-2xl: clamp(1.5rem, 2vw, 1.75rem);
	--nx-fs-3xl: clamp(2rem, 4vw, 2.75rem);
	--nx-fs-hero: clamp(2.5rem, 6vw, 4rem);
	--nx-lh-tight: 1.15;
	--nx-lh-normal: 1.6;

	/* Motion */
	--nx-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--nx-duration: 220ms;

	/* Elevation */
	--nx-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
	--nx-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
	--nx-shadow-glow: 0 0 60px rgba(79, 70, 255, 0.35);
}

/* Inter loaded via Google Fonts enqueue; local() kept as progressive enhancement */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: local("Inter"), local("Inter Variable");
}

body.nx-header-transparent {
	--nx-header-fg: #ffffff;
}

body:not(.nx-header-transparent) {
	--nx-header-fg: #ffffff;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	font-family: var(--nx-font-sans);
	font-size: var(--nx-fs-base);
	line-height: var(--nx-lh-normal);
	color: var(--nx-color-text);
	background: var(--nx-color-white);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--nx-color-primary);
}

:focus-visible {
	outline: 2px solid var(--nx-color-primary);
	outline-offset: 3px;
}

.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;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--nx-color-white);
	clip: auto !important;
	clip-path: none;
	color: var(--nx-color-text);
	display: block;
	font-size: var(--nx-fs-sm);
	height: auto;
	left: 0.5rem;
	line-height: normal;
	padding: 0.75rem 1rem;
	text-decoration: none;
	top: 0.5rem;
	width: auto;
	z-index: 100000;
}

.skip-link:focus {
	position: absolute;
	z-index: 100000;
}

.nx-site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.nx-site-main {
	flex: 1 0 auto;
}

.nx-container {
	width: min(100% - (var(--nx-gutter) * 2), var(--nx-container));
	margin-inline: auto;
}

.nx-content-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 2.5rem;
	padding-block: var(--nx-section-spacing);
}

.nx-content-layout--full,
.nx-no-sidebar .nx-content-layout {
	grid-template-columns: minmax(0, 1fr);
}

.nx-section {
	padding-block: var(--nx-section-spacing);
}

.nx-section--dark {
	background: var(--nx-color-bg);
	color: var(--nx-color-text-on-dark);
}

.nx-section--light {
	background: var(--nx-color-light);
	color: var(--nx-color-text);
}

.nx-section__header {
	margin-bottom: 2.5rem;
	max-width: 40rem;
}

.nx-section__header--row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: none;
}

.nx-section__title {
	margin: 0 0 0.75rem;
	font-size: var(--nx-fs-3xl);
	line-height: var(--nx-lh-tight);
	letter-spacing: -0.03em;
	font-weight: 700;
}

.nx-section__subtitle {
	margin: 0;
	color: var(--nx-color-muted);
	font-size: var(--nx-fs-lg);
}

.nx-section--dark .nx-section__subtitle {
	color: var(--nx-color-muted-on-dark);
}

.nx-text-gradient {
	background: var(--nx-gradient-accent);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.nx-eyebrow {
	display: inline-block;
	margin: 0 0 1rem;
	font-size: var(--nx-fs-xs);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--nx-color-primary-2);
}

.nx-page-title {
	margin: 0 0 1rem;
	font-size: var(--nx-fs-3xl);
	letter-spacing: -0.03em;
}

.nx-empty-note {
	color: var(--nx-color-muted);
}

.nx-embed {
	position: relative;
	aspect-ratio: 16 / 9;
}

.nx-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
