/* ==========================================================================
   Layout — Reset, Container, Grid, Section Spacing
   ========================================================================== */

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

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

body {
	font-family: var(--font-sans);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	color: var(--color-text);
	background-color: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a {
	color: var(--color-accent);
	text-decoration: none;
	transition: color var(--duration-fast) var(--ease-out);
}

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

ul,
ol {
	list-style: none;
}

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

.container--wide {
	max-width: var(--container-wide);
}

/* --- Section spacing --- */
.section {
	padding-block: var(--space-20);
}

.section--lg {
	padding-block: var(--space-32);
}

.section--sm {
	padding-block: var(--space-12);
}

.section--dark {
	background-color: var(--color-secondary);
	color: #D1D5DB;
	/* Subtle dot pattern */
	background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
	background-size: 4px 4px;
}

.section--dark .section-title,
.section--dark .gradient-text {
	color: #fff;
}

.section--dark .section-subtitle {
	color: rgba(255, 255, 255, 0.6);
}

/* --- Grid --- */
.grid {
	display: grid;
	gap: var(--space-8);
}

.grid--2 {
	grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
	grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
	grid-template-columns: repeat(4, 1fr);
}

/* --- Flex utilities --- */
.flex {
	display: flex;
}

.flex--center {
	align-items: center;
	justify-content: center;
}

.flex--between {
	align-items: center;
	justify-content: space-between;
}

.flex--gap {
	gap: var(--space-4);
}

/* --- Visually hidden --- */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
