/**
 * Nexlogicx Agency Theme — base reset.
 *
 * Lives in a low-priority cascade layer: any unlayered rule (Elementor, widgets, theme.css)
 * beats it regardless of specificity, so components never fight the reset.
 */
@layer nx-base, nx-reset;

@layer nx-base {
	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}

	html {
		line-height: 1.15;
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}

	body {
		margin: 0;
		font-size: 1rem;
		font-weight: 400;
		line-height: 1.6;
	}

	h1, h2, h3, h4, h5, h6 {
		margin: 0 0 0.75em;
		color: inherit;
		font-family: var(--nx-font-heading);
		font-weight: 600;
		line-height: 1.15;
		letter-spacing: -0.01em;
	}

	h1 { font-size: 2.5rem; }
	h2 { font-size: 2rem; }
	h3 { font-size: 1.5rem; }
	h4 { font-size: 1.25rem; }
	h5 { font-size: 1.125rem; }
	h6 { font-size: 1rem; }

	p, ul, ol, dl, blockquote, figure, pre, table {
		margin: 0 0 1.25em;
	}

	a {
		color: var(--nx-accent);
		text-decoration: none;
		background-color: transparent;
	}

	a:hover {
		color: var(--nx-accent-to);
	}

	img, svg, video, canvas {
		max-width: 100%;
		height: auto;
		vertical-align: middle;
	}

	img {
		border-style: none;
	}

	b, strong { font-weight: 600; }
	small { font-size: 80%; }

	code, kbd, samp, pre {
		font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
		font-size: 0.9em;
	}

	pre {
		overflow: auto;
		padding: 1rem 1.25rem;
		border-radius: var(--nx-radius-control);
		background: var(--nx-surface);
		white-space: pre-wrap;
	}

	hr {
		height: 0;
		margin: 2rem 0;
		border: 0;
		border-top: 1px solid var(--nx-line);
	}

	button, input, optgroup, select, textarea {
		margin: 0;
		font: inherit;
		color: inherit;
	}

	button,
	[type="button"],
	[type="submit"],
	[type="reset"] {
		cursor: pointer;
		-webkit-appearance: button;
	}

	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="number"],
	input[type="tel"],
	input[type="date"],
	select,
	textarea {
		width: 100%;
		padding: 0.75rem 1rem;
		border: 1px solid var(--nx-line);
		border-radius: var(--nx-radius-control);
		background: var(--nx-bg);
		transition: border-color 0.2s, background-color 0.2s;
	}

	input:focus,
	select:focus,
	textarea:focus {
		border-color: color-mix(in srgb, var(--nx-fg) 30%, transparent);
		outline: none;
	}

	textarea { resize: vertical; }

	table {
		width: 100%;
		border-collapse: collapse;
		font-size: 0.95em;
	}

	th, td {
		padding: 0.75rem;
		border-bottom: 1px solid var(--nx-line);
		text-align: start;
		vertical-align: top;
	}

	ul, ol { padding-inline-start: 1.25em; }
	li > ul, li > ol { margin-bottom: 0; }

	blockquote {
		padding-inline-start: 1.25rem;
		border-inline-start: 3px solid var(--nx-accent);
		font-size: 1.125em;
	}

	[hidden], template { display: none; }
}

/* Accessibility helpers (unlayered on purpose). */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	word-wrap: normal !important;
}

.nx-skip-link {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 200;
	padding: 0.5rem 1rem;
	border-radius: var(--nx-radius-control);
	background: var(--nx-ink);
	color: #fff;
	font-size: 0.875rem;
	transform: translateY(-200%);
	transition: transform 0.2s;
}

.nx-skip-link:focus {
	color: #fff;
	transform: none;
}

@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;
	}
}
