@layer reset, tokens, base, layout, components, utilities;

/* ========== RESET ========== */
@layer reset {
	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}

	* {
		margin: 0;
	}

	html {
		scroll-behavior: smooth;
		-webkit-text-size-adjust: 100%;
	}

	html,
	body {
		overflow-x: clip;
	}

	body {
		min-height: 100vh;
	}

	img,
	picture,
	svg,
	video,
	canvas {
		display: block;
		max-width: 100%;
	}

	button,
	input,
	textarea,
	select {
		font: inherit;
	}

	a {
		color: inherit;
		text-decoration: none;
	}

	button {
		border: 0;
		background: none;
		cursor: pointer;
	}
}

/* ========== TOKENS ========== */
@layer tokens {
	:root {
		color-scheme: light;

		--color-bg: #f6f9fc;
		--color-surface: #ffffff;
		--color-surface-soft: #f0f6fb;
		--color-border: rgba(13, 60, 100, 0.10);
		--color-border-strong: rgba(13, 60, 100, 0.16);

		--color-text: #0c1520;
		--color-muted: #52657a;

		--color-primary: #1b87c5;
		--color-primary-dark: #0d5f92;
		--color-sky: #56b6e6;
		--color-success: #16a34a;
		--color-star: #f6a723;

		--gradient-primary: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary), var(--color-sky));
		--gradient-soft: linear-gradient(135deg, rgb(27 135 197 / .10), rgb(86 182 230 / .14));

		--font-body: "Inter Tight", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
		--font-display: "Inter Tight", system-ui, sans-serif;
		--font-serif: "Instrument Serif", Georgia, serif;

		--radius-sm: 12px;
		--radius-md: 20px;
		--radius-lg: 28px;
		--radius-xl: 36px;
		--radius-pill: 999px;

		--shadow-sm: 0 6px 20px -8px rgb(13 95 146 / .14);
		--shadow-lg: 0 30px 70px -25px rgb(13 95 146 / .28);

		--container: 1240px;
		--container-narrow: 820px;
		--gutter: 4vw;

		--space-1: .25rem;
		--space-2: .5rem;
		--space-3: .75rem;
		--space-4: 1rem;
		--space-5: 1.25rem;
		--space-6: 1.5rem;
		--space-8: 2rem;
		--space-10: 2.5rem;
		--space-12: 3rem;
		--space-16: 4rem;
		--space-20: 5rem;
		--space-24: 6rem;

		--header-height: 74px;
		--header-height-small: 60px;
	}
}

/* ========== BASE ========== */
@layer base {
	body {
		font-family: var(--font-body);
		background: var(--color-bg);
		color: var(--color-text);
		line-height: 1.55;
		-webkit-font-smoothing: antialiased;
	}

	::selection {
		background: var(--color-primary);
		color: #fff;
	}

	p {
		color: var(--color-muted);
	}

	:focus-visible {
		outline: 3px solid rgb(27 135 197 / .35);
		outline-offset: 3px;
	}
}

/* ========== LAYOUT ========== */
@layer layout {
	.l-container {
		width: min(var(--container), calc(100% - (var(--gutter) * 2)));
		margin-inline: auto;
	}

	.l-container--narrow {
		width: min(var(--container-narrow), calc(100% - (var(--gutter) * 2)));
	}

	.l-section {
		padding-block: clamp(5rem, 8vw, 7rem);
	}

	.l-grid {
		display: grid;
		gap: var(--space-5);
	}

	.l-grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.l-grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	@media (max-width: 800px) {
		.l-grid--2,
		.l-grid--3 {
			grid-template-columns: 1fr;
		}
	}
}

/* ========== COMPONENTS ========== */
@layer components {
	.c-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: .625rem;
		min-height: 48px;
		padding: .95rem 1.55rem;
		border-radius: var(--radius-pill);
		font-weight: 700;
		font-size: .95rem;
		transition:
			transform .25s ease,
			box-shadow .25s ease,
			background-color .25s ease;
	}

	.c-button--primary {
		background: var(--gradient-primary);
		color: #fff;
		box-shadow: 0 16px 34px -14px rgb(27 135 197 / .6);
	}

	.c-button--ghost {
		background: #fff;
		border: 1px solid var(--color-border);
		color: var(--color-text);
		box-shadow: var(--shadow-sm);
	}

	.c-button:hover {
		transform: translateY(-2px);
	}

	.c-eyebrow {
		display: inline-flex;
		align-items: center;
		gap: .5rem;
		margin-block-end: 1rem;
		padding: .4rem .85rem;
		border: 1px solid rgb(27 135 197 / .22);
		border-radius: var(--radius-pill);
		background: rgb(27 135 197 / .08);
		color: var(--color-primary-dark);
		font-size: .75rem;
		font-weight: 700;
		letter-spacing: .12em;
		text-transform: uppercase;
	}

	.c-eyebrow::before {
		content: "";
		width: .4rem;
		height: .4rem;
		border-radius: 50%;
		background: var(--color-primary);
		box-shadow: 0 0 8px rgb(27 135 197 / .7);
	}

	.c-card {
		position: relative;
		padding: clamp(1.5rem, 3vw, 1.75rem);
		border: 1px solid var(--color-border);
		border-radius: var(--radius-md);
		background: var(--color-surface);
		box-shadow: var(--shadow-sm);
		overflow: hidden;
	}

	.c-card--soft {
		background: linear-gradient(160deg, rgb(27 135 197 / .10), rgb(86 182 230 / .05)), #fff;
		border-color: rgb(27 135 197 / .30);
	}
}

/* ========== UTILITIES ========== */
@layer utilities {
	.u-text-gradient {
		background: var(--gradient-primary);
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
	}

	.u-serif {
		font-family: var(--font-serif);
		font-style: italic;
		font-weight: 400;
	}

	.u-muted {
		color: var(--color-muted);
	}

	.u-center {
		text-align: center;
	}

	.u-hidden {
		display: none !important;
	}

	.u-visually-hidden {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}