/*
 * Verdant Home Core CSS Bundle: Tokens, Reset & Grid
 */

:root {
	/* Color System */
	--color-primary: #1b4332;
	--color-primary-dark: #081c15;
	--color-primary-light: #2d6a4f;
	--color-accent: #c97a3e;
	--color-accent-sage: #52796f;
	--color-bg: #fbf8f3;
	--color-surface: #ffffff;
	--color-surface-alt: #f3eee6;
	--color-text: #1a1f1b;
	--color-text-muted: #59655f;
	--color-border: #e5dfd5;
	--color-pros: #2d6a4f;
	--color-cons: #b23b3b;

	/* Typography */
	--font-serif: 'Newsreader', 'Playfair Display', Georgia, 'Times New Roman', serif;
	--font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	/* Layout & Spacing */
	--site-max-width: 1280px;
	--content-max-width: 760px;
	--space-3xs: 0.25rem;
	--space-2xs: 0.5rem;
	--space-xs: 0.75rem;
	--space-sm: 1rem;
	--space-md: 1.5rem;
	--space-lg: 2rem;
	--space-xl: 3rem;
	--space-2xl: 4.5rem;

	/* Radii & Shadows */
	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 12px;
	--radius-full: 9999px;
	--shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
	--shadow-md: 0 4px 12px rgba(0,0,0,0.08);
	--shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

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

html, body {
	max-width: 100% !important;
	overflow-x: hidden !important;
}

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

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

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

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

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

h1, h2, h3, h4, h5, h6 {
	color: var(--color-text);
	font-weight: 600;
	line-height: 1.25;
}

.text-serif { font-family: var(--font-serif); }
.text-sans { font-family: var(--font-sans); }

h1, .h1 { font-size: clamp(2rem, 4vw, 3rem); font-family: var(--font-serif); }
h2, .h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-family: var(--font-serif); }
h3, .h3 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); font-family: var(--font-serif); }
h4, .h4 { font-size: 1.1875rem; font-family: var(--font-sans); }
h5, .h5 { font-size: 1.0625rem; font-family: var(--font-sans); }

/* Containers & Grid Layouts */
.site-container {
	width: 100%;
	max-width: var(--site-max-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--space-sm);
	padding-right: var(--space-sm);
}

.layout-primary-with-sidebar {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-xl);
}

@media (min-width: 1024px) {
	.layout-primary-with-sidebar {
		grid-template-columns: minmax(0, 1fr) 340px;
	}
}

.layout-single-column-centered {
	max-width: var(--content-max-width);
	margin: 0 auto;
}

/* Common Flex & Spacing Utilities */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }

.gap-2xs { gap: var(--space-2xs); }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

@media (max-width: 640px) {
	.grid-2, .grid-3, .grid-4 {
		grid-template-columns: 1fr !important;
	}
}

.p-xs { padding: var(--space-xs); }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

.py-2xs { padding-top: var(--space-2xs); padding-bottom: var(--space-2xs); }
.py-xs { padding-top: var(--space-xs); padding-bottom: var(--space-xs); }
.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }

.mb-2xs { margin-bottom: var(--space-2xs); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-2xs { margin-top: var(--space-2xs); }
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.my-lg { margin-top: var(--space-lg); margin-bottom: var(--space-lg); }
.my-xl { margin-top: var(--space-xl); margin-bottom: var(--space-xl); }

.text-xs { font-size: 0.8125rem; }
.text-sm { font-size: 0.9375rem; }
.text-md { font-size: 1.125rem; }
.text-2xs { font-size: 0.72rem; }
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-teal { color: var(--color-teal); }
.text-accent { color: var(--color-accent); }
.text-white { color: #ffffff; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.08em; }
.w-full { width: 100%; }
.block { display: block; }

.bg-white { background-color: var(--color-surface); }
.bg-warm { background-color: var(--color-surface-alt); }
.bg-primary { background-color: var(--color-primary); }

.border { border: 1px solid var(--color-border); }
.border-top { border-top: 1px solid var(--color-border); }
.border-bottom { border-bottom: 1px solid var(--color-border); }

.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-full { border-radius: var(--radius-full); }
.shadow-sm { box-shadow: var(--shadow-sm); }
