/* ============================================================================
   base.css — CSS Reset, Custom Properties, Typography, Utilities
   tt-trader.de — Droste TradeTec UG & Co. KG
   ============================================================================ */

/* --- Fonts ------------------------------------------------- */
/* Loaded via <link> tags in each HTML page (preconnect + stylesheet),
   not @import, to avoid render-blocking. */

/* --- CSS Reset --------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	line-height: 1.6;
	background-color: var(--color-bg-primary);
	color: var(--color-text-primary);
	transition: background-color 0.3s ease, color 0.3s ease;
	min-height: 100vh;
}

img,
svg {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	cursor: pointer;
	font: inherit;
	border: none;
	background: none;
}

ul,
ol {
	list-style: none;
}

code,
pre,
.mono {
	font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

code {
	background: var(--color-accent-dim);
	padding: 0.1rem 0.35rem;
	border-radius: 3px;
	font-size: 0.88em;
	color: var(--color-accent);
}

pre code {
	background: none;
	padding: 0;
	color: inherit;
}

kbd {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.78em;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-light);
	border-bottom-width: 2px;
	border-radius: 4px;
	padding: 0.1rem 0.4rem;
	color: var(--color-text-primary);
}

/* --- Custom Properties (Default: Dark + Electric Blue) ----- */
:root {
	/* ---- palette ---- */
	--color-accent: #00d4ff;
	--color-accent-hover: #33ddff;
	--color-accent-dim: rgba(0, 212, 255, 0.15);
	--color-accent-glow: rgba(0, 212, 255, 0.35);

	--color-bg-primary: #0a0f1a;
	--color-bg-secondary: #111827;
	--color-bg-tertiary: #1a2236;
	--color-bg-card: #141c2b;
	--color-bg-elevated: #1c2840;

	--color-border: rgba(255, 255, 255, 0.08);
	--color-border-light: rgba(255, 255, 255, 0.14);

	--color-text-primary: #e8eaed;
	--color-text-secondary: #9ca3af;
	--color-text-muted: #6b7280;
	--color-text-inverse: #0a0f1a;

	--color-success: #22c55e;
	--color-warning: #f59e0b;
	--color-danger: #ef4444;
	--color-info: #3b82f6;

	/* ---- sizing ---- */
	--max-width: 1320px;
	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 12px;
	--radius-xl: 16px;

	/* ---- shadows ---- */
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
	--shadow-glow: 0 0 30px var(--color-accent-glow);

	/* ---- transitions ---- */
	--transition-fast: 150ms ease;
	--transition-base: 300ms ease;
	--transition-slow: 500ms ease;
}

/* --- Selection --------------------------------------------- */
::selection {
	background: var(--color-accent-dim);
	color: var(--color-accent);
}

/* --- Scrollbar --------------------------------------------- */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
	background: var(--color-bg-elevated);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--color-text-muted);
}

/* --- Focus ------------------------------------------------- */
:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

/* --- Section spacing --------------------------------------- */
.section {
	padding: 3.5rem 1.5rem;
}

.section--tight {
	padding: 2.25rem 1.5rem;
}

.section--wide {
	padding: 5rem 1.5rem;
}

.container {
	max-width: var(--max-width);
	margin: 0 auto;
}

/* --- Grid helpers ------------------------------------------ */
.grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

.grid-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

.grid-4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.25rem;
}

@media (max-width: 768px) {

	.grid-2,
	.grid-3,
	.grid-4 {
		grid-template-columns: 1fr;
	}

	.section {
		padding: 3rem 1rem;
	}

	.section--wide {
		padding: 4rem 1rem;
	}
}

/* --- Typography -------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.2;
	font-weight: 600;
}

.heading-xl {
	font-size: clamp(2rem, 4.5vw, 3.2rem);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.heading-lg {
	font-size: clamp(1.45rem, 3vw, 2.1rem);
	font-weight: 600;
}

.heading-md {
	font-size: 1.4rem;
}

.heading-sm {
	font-size: 1.1rem;
}

.text-gradient {
	background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.text-muted {
	color: var(--color-text-muted);
}

.text-small {
	font-size: 0.875rem;
}

.text-center {
	text-align: center;
}

/* --- Spacing utilities ------------------------------------- */
.mt-1 {
	margin-top: 0.5rem;
}

.mt-2 {
	margin-top: 1rem;
}

.mt-3 {
	margin-top: 1.5rem;
}

.mt-4 {
	margin-top: 2rem;
}

.mt-5 {
	margin-top: 3rem;
}

.mt-6 {
	margin-top: 4rem;
}

.mb-1 {
	margin-bottom: 0.5rem;
}

.mb-2 {
	margin-bottom: 1rem;
}

.mb-3 {
	margin-bottom: 1.5rem;
}

.mb-4 {
	margin-bottom: 2rem;
}

.mb-5 {
	margin-bottom: 3rem;
}

/* --- Technical data typography ------------------------------- */
/* Tabular numerals for aligned numeric display */
.tnum,
.stat-card__value,
.spec-table td,
.spec-table th {
	font-variant-numeric: tabular-nums;
}

/* Overline label — small monospaced section eyebrow */
.overline {
	display: block;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-accent);
	margin-bottom: 0.6rem;
}

.overline::before {
	content: '// ';
	color: var(--color-text-muted);
}

/* Prose measure */
.measure {
	max-width: 68ch;
}

/* --- Inline SVG icons --------------------------------------- */
svg.ic {
	width: 1.1em;
	height: 1.1em;
	vertical-align: -0.15em;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

.card__icon svg.ic,
.section-header__icon svg.ic {
	width: 24px;
	height: 24px;
	color: var(--color-accent);
}

.cap-item__icon svg.ic {
	width: 18px;
	height: 18px;
}

.tech-cat-card__icon svg.ic {
	width: 16px;
	height: 16px;
}

/* --- Reduced motion ------------------------------------------ */
@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;
	}
}