/*
 * CSS Modernizer
 *   Input:          34 rules
 *   Passes:         2 (converged)
 *   Max nest depth: 1
 *   Compacted:      10 single-declaration rules
 */

/* ==========================================================================
   Cybernetic Nordic - base layer
   Element defaults only. Everything here sits above the parent framework
   layer, so layer order alone wins against a vendor reset.
   ========================================================================== */

@layer base {
	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}
	html {
		font-size: 100%;
		scroll-behavior: auto;
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
		/* The parent reset declares html { scroll-behavior: smooth }. It now
       lives in @layer framework, so base outranks it by layer alone. This
       replaces priority overrides: reload no longer replays a
       multi-thousand-pixel smooth-scroll camera flight. */
	}
	body {
		margin: 0;
		background-color: var(--ebg-surface-0);
		color: var(--ebg-body-ink);
		font-family: var(--font-sans);
		font-size: var(--fs-16);
		font-weight: 400;
		line-height: var(--lh-body);
		letter-spacing: var(--tr-body);
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		text-rendering: optimizeLegibility;
	}
	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		margin: 0;
		color: var(--ebg-heading-ink);
		font-family: var(--font-display);
		font-weight: 650;
		line-height: var(--lh-heading);
		letter-spacing: var(--tr-heading);
	}
	h1 {
		font-size: var(--text-display);
		font-weight: 750;
		line-height: var(--lh-display);
		letter-spacing: var(--tr-display);
	}
	h2 {
		font-size: var(--text-3xl);
		font-weight: 700;
		line-height: var(--lh-display);
		letter-spacing: var(--tr-display);
	}
	h3 { font-size: var(--text-2xl); }
	h4 { font-size: var(--text-xl); }
	h5 {
		font-size: var(--text-lg);
		line-height: var(--lh-tight);
	}
	h6 {
		font-size: var(--text-base);
		line-height: var(--lh-tight);
	}
	p {
		margin: 0;

		+ p { margin-block-start: var(--space-s); }
		/* Prose links keep the underline; logotypes and navigation do not. */
		a { --ebg-link-decoration: underline; }
	}
	a {
		color: var(--ebg-link-ink);
		text-decoration-thickness: 1px;
		text-underline-offset: .18em;
		transition: color var(--dur-fast) var(--ease-snap);
	}
	a:hover { color: var(--ebg-accent-bright); }
	img,
	svg,
	video {
		display: block;
		max-width: 100%;
		height: auto;
	}
	ul,
	ol {
		margin: 0;
		padding: 0;
		list-style: none;
	}
	button {
		font: inherit;
		color: inherit;
	}
	strong,
	b {
		font-weight: 650;
		color: var(--ebg-heading-ink);
	}
	small {
		font-size: var(--text-sm);
		line-height: var(--lh-tight);
		color: var(--ebg-meta-ink);
	}
	hr {
		height: 1px;
		margin-block: var(--space-xl);
		border: 0;
		background-color: var(--ebg-hairline);
	}
	:focus-visible {
		outline: 2px solid var(--ebg-accent);
		outline-offset: 2px;
	}
	/* --- editorial primitives (element level, no component coupling) ------ */
	.ebg-eyebrow {
		display: inline-flex;
		align-items: center;
		gap: var(--space-2xs);
		margin: 0;
		color: var(--ebg-meta-ink);
		font-family: var(--font-mono);
		font-size: var(--fs-12);
		font-weight: 500;
		line-height: var(--lh-tight);
		letter-spacing: var(--tr-eyebrow);
		text-transform: uppercase;
	}
	.ebg-eyebrow--accent { color: var(--ebg-accent); }
	.ebg-prose a { --ebg-link-decoration: underline; }
	.ebg-display {
		color: var(--ebg-heading-ink);
		font-family: var(--font-display);
		font-size: var(--text-display);
		font-weight: 750;
		line-height: var(--lh-display);
		letter-spacing: var(--tr-display);
	}
	code {
		padding: .1em .35em;
		border: 1px solid var(--ebg-hairline);
		border-radius: var(--radius-xs);
		background-color: var(--ebg-surface-3);
		color: var(--ebg-heading-ink);
		font-family: var(--font-mono);
		font-size: .875em;
	}
	.ebg-lead {
		max-width: var(--measure);
		color: var(--ebg-body-ink);
		font-family: var(--font-sans);
		font-size: var(--text-lg);
		font-weight: 400;
		line-height: var(--lh-body);
		letter-spacing: var(--tr-body);
	}
	.ebg-meta {
		color: var(--ebg-meta-ink);
		font-family: var(--font-mono);
		font-size: var(--fs-13);
		font-weight: 400;
		line-height: var(--lh-tight);
		letter-spacing: .04em;
		text-transform: uppercase;
	}
	.ebg-dark {
		--ebg-heading-ink: var(--ebg-on-dark);
		--ebg-body-ink: var(--ebg-on-dark-2);
		--ebg-link-ink: var(--ebg-accent-bright);
		--ebg-meta-ink: var(--ebg-on-dark-2);
		background-color: var(--ebg-surface-anchor);
		color: var(--ebg-body-ink);

		code {
			border-color: var(--ebg-rim);
			background-color: var(--ebg-glass-fill-subtle);
			color: var(--ebg-on-dark);
		}
		.ebg-accent-text { color: var(--ebg-accent-bright); }
	}
	.ebg-accent-text { color: var(--ebg-accent); }
	@media (prefers-reduced-motion: no-preference) {
		:root:has(:target) { scroll-behavior: smooth; }
	}
}

