/* ==========================================================================
   CM Digital — Base / Reset
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg-primary);
	color: var(--text-primary);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	font-weight: var(--fw-regular);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

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

a {
	color: inherit;
	text-decoration: none;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

h1,
h2,
h3,
h4,
p {
	margin: 0;
}

h1,
h2,
h3,
h4 {
	font-weight: var(--fw-semibold);
	line-height: var(--lh-heading);
	letter-spacing: var(--ls-tight);
}

button {
	font-family: inherit;
	color: inherit;
	background: none;
	border: none;
	cursor: pointer;
}

/* ---- Layout helpers ---- */

.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-padding);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed;
	top: var(--space-sm);
	left: var(--space-sm);
	width: auto;
	height: auto;
	padding: var(--space-2xs) var(--space-sm);
	background: var(--accent-600);
	color: #fff;
	border-radius: var(--radius-sm);
	z-index: 1000;
	clip: auto;
}

/* ---- Focus states ---- */

:focus-visible {
	outline: 2px solid var(--accent-400);
	outline-offset: 3px;
	border-radius: var(--radius-sm);
}

/* ---- Buttons ---- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	padding: 0.875rem 1.75rem;
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-medium);
	border-radius: var(--radius-full);
	transition: transform var(--transition-fast), box-shadow var(--transition-fast),
		background-color var(--transition-fast), border-color var(--transition-fast);
	white-space: nowrap;
}

.btn-primary {
	background: var(--accent-600);
	color: #fff;
	box-shadow: 0 8px 24px -8px var(--accent-glow);
}

.btn-primary:hover {
	background: var(--accent-500);
	box-shadow: 0 10px 32px -6px var(--accent-glow);
	transform: translateY(-1px);
}

.btn-secondary {
	background: transparent;
	color: var(--text-primary);
	border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.28);
}

.btn-ghost {
	color: var(--text-secondary);
	padding: 0.5rem 0.25rem;
}

.btn-ghost:hover {
	color: var(--text-primary);
}

/* ---- Motion ---- */

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

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
