/* ============================================================
   base.css — design tokens, reset, base typography
   Loaded on every page (first in the cascade).

   Typography uses the native system-ui stack only. Custom @font-face
   declarations (Plus Jakarta Sans / Inter / JetBrains Mono) were
   removed because the matching .woff2 binaries never existed in
   assets/fonts/, which produced redirect chains and broken font
   requests. See `--font*` tokens below for the native stack.
============================================================ */

/* ------------------------------------------------------------
   DESIGN TOKENS
------------------------------------------------------------ */
:root {
	/* Brand */
	--primary: #0066ff;
	--primary-dark: #0052cc;
	--primary-light: #e6f0ff;
	--primary-glow: rgba(0, 102, 255, 0.12);

	--accent: #ff6b35;
	--accent-dark: #e8541f;
	--accent-light: #fff0e8;

	--success: #00a86b;
	--success-light: #d4f5e9;
	--success-dark: #008556;

	--gold: #ffa502;
	--gold-light: #fff4d6;

	--danger: #e74c3c;
	--danger-light: #fdebe9;

	--purple: #7c3aed;
	--purple-light: #ede9fe;

	--pink: #db2777;
	--pink-light: #fce7f3;

	/* Platform accents */
	--windows: #0078d4;
	--mac: #1d1d1f;
	--linux: #e95420;
	--android: #3ddc84;
	--ios: #007aff;

	/* Surfaces */
	--bg: #ffffff;
	--bg-tint: #fafbfc;
	--bg-soft: #f5f6f8;
	--surface: #ffffff;

	--border: #e8eaed;
	--border-2: #d2d6dc;

	/* Text */
	--text: #0a0e1a;
	--text-2: #4a5568;
	--text-3: #8b95a5;
	--text-muted: #b1b8c4;

	/* Shadows */
	--shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
	--shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
	--shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
	--shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
	--shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.10), 0 8px 16px rgba(15, 23, 42, 0.05);

	/* Typography — native system-ui stack only (custom fonts removed) */
	--font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-display: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-mono: ui-monospace, 'SF Mono', Consolas, 'Liberation Mono', monospace;

	/* Radii */
	--r-sm: 6px;
	--r-md: 10px;
	--r-lg: 14px;
	--r-xl: 20px;
	--r-2xl: 28px;
	--r-full: 999px;

	/* Layout */
	--container: 1280px;
}

/* ------------------------------------------------------------
   RESET
------------------------------------------------------------ */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	/* Defensive page-level horizontal-overflow guard. `overflow-x: clip`
	   prevents stray child elements (e.g., a content-sized .cat-bar-inner
	   on iOS) from creating page-wide horizontal scroll, WITHOUT breaking
	   `position: sticky` the way `overflow: hidden` would. */
	overflow-x: clip;
}

body {
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg-tint);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a {
	color: var(--primary);
	text-decoration: none;
}

a:hover {
	color: var(--primary-dark);
}

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

/* ------------------------------------------------------------
   BASE TYPOGRAPHY
------------------------------------------------------------ */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: var(--text);
}

code,
kbd,
pre,
samp {
	font-family: var(--font-mono);
}

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 10px 18px;
	background: var(--text);
	color: #fff;
	border-radius: 0 0 var(--r-md) 0;
	font-weight: 700;
}

.skip-link:focus {
	left: 0;
	color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
