/* =========================================================
   GLOBAL STYLES
   Foundation layer: reset, defaults, utilities.
   Uses CSS variables defined in style.css only — no variables
   are redefined here. No header, footer, hero, product, page
   or animation styles belong in this file.
========================================================= */


/* ---------------------------------------------------------
   1. Modern CSS Reset
--------------------------------------------------------- */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
}

/* ---------------------------------------------------------
   2. Box Sizing
--------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------
   3. HTML & Body Defaults
--------------------------------------------------------- */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	min-height: 100vh;
	background-color: var(--color-background);
	color: var(--color-text-primary);
	font-family: var(--font-family-primary);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-regular);
	line-height: var(--line-height-normal);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------------
   4. Smooth Scrolling
--------------------------------------------------------- */
html {
	scroll-behavior: smooth;
}

@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;
		scroll-behavior: auto !important;
	}
}

/* ---------------------------------------------------------
   5. Typography Defaults
--------------------------------------------------------- */
body,
input,
textarea,
select,
button {
	font-family: var(--font-family-primary);
}

/* ---------------------------------------------------------
   6. Heading Hierarchy
--------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-family-heading);
	font-weight: var(--font-weight-semibold);
	line-height: var(--line-height-tight);
	letter-spacing: var(--letter-spacing-tight);
	color: var(--color-text-primary);
}

h1 {
	font-size: var(--font-size-5xl);
}

h2 {
	font-size: var(--font-size-4xl);
}

h3 {
	font-size: var(--font-size-3xl);
}

h4 {
	font-size: var(--font-size-2xl);
}

h5 {
	font-size: var(--font-size-xl);
}

h6 {
	font-size: var(--font-size-lg);
}

/* ---------------------------------------------------------
   7. Paragraph Styling
--------------------------------------------------------- */
p {
	color: var(--color-text-secondary);
	line-height: var(--line-height-relaxed);
}

p + p {
	margin-top: var(--space-md);
}

small {
	font-size: var(--font-size-sm);
	color: var(--color-text-muted);
}

/* ---------------------------------------------------------
   8. Link Styling
--------------------------------------------------------- */
a {
	color: var(--color-accent);
	text-decoration: none;
	transition: color var(--transition-fast);
}

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

a:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

/* ---------------------------------------------------------
   9. List Styling
--------------------------------------------------------- */
ul,
ol {
	list-style: none;
}

/* Restore semantic list markers for content-authored lists. */
.entry-content ul,
.entry-content ol {
	padding-inline-start: var(--space-lg);
}

.entry-content ul {
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

.entry-content li + li {
	margin-top: var(--space-xxs);
}

/* ---------------------------------------------------------
   10. Image Defaults
--------------------------------------------------------- */
img,
picture,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

img {
	font-style: italic;
	background-repeat: no-repeat;
	background-size: cover;
}

/* ---------------------------------------------------------
   11. Button Reset
--------------------------------------------------------- */
button {
	appearance: none;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	line-height: var(--line-height-normal);
}

button:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

/* ---------------------------------------------------------
   12. Form Element Reset
--------------------------------------------------------- */
input,
textarea,
select {
	appearance: none;
	background-color: transparent;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-size: var(--font-size-md);
	color: var(--color-text-primary);
	width: 100%;
}

textarea {
	resize: vertical;
}

label {
	display: inline-block;
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-medium);
	color: var(--color-text-primary);
}

fieldset {
	border: none;
}

/* ---------------------------------------------------------
   13. Accessibility Helpers
--------------------------------------------------------- */
:focus:not(:focus-visible) {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	top: -999px;
	left: 0;
	z-index: var(--z-index-toast);
	background-color: var(--color-background-dark);
	color: var(--color-text-inverse);
	padding: var(--space-sm) var(--space-md);
	border-radius: var(--radius-sm);
}

.skip-link:focus {
	top: var(--space-sm);
	left: var(--space-sm);
}

/* ---------------------------------------------------------
   14. Utility Classes
--------------------------------------------------------- */
.text-center {
	text-align: center;
}

.text-left {
	text-align: left;
}

.text-right {
	text-align: right;
}

.text-muted {
	color: var(--color-text-muted);
}

.text-inverse {
	color: var(--color-text-inverse);
}

.bg-alt {
	background-color: var(--color-background-alt);
}

.bg-dark {
	background-color: var(--color-background-dark);
}

.rounded-sm {
	border-radius: var(--radius-sm);
}

.rounded-md {
	border-radius: var(--radius-md);
}

.rounded-lg {
	border-radius: var(--radius-lg);
}

.rounded-full {
	border-radius: var(--radius-full);
}

.shadow-sm {
	box-shadow: var(--shadow-sm);
}

.shadow-md {
	box-shadow: var(--shadow-md);
}

.shadow-lg {
	box-shadow: var(--shadow-lg);
}

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

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

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

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

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

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

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

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

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

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

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

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

/* ---------------------------------------------------------
   17. Flex Helpers
--------------------------------------------------------- */
.flex {
	display: flex;
}

.flex--wrap {
	flex-wrap: wrap;
}

.flex--column {
	flex-direction: column;
}

.items-center {
	align-items: center;
}

.items-start {
	align-items: flex-start;
}

.items-end {
	align-items: flex-end;
}

.justify-center {
	justify-content: center;
}

.justify-between {
	justify-content: space-between;
}

.justify-start {
	justify-content: flex-start;
}

.justify-end {
	justify-content: flex-end;
}

.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);
}

/* ---------------------------------------------------------
   18. Section Spacing
--------------------------------------------------------- */
.section {
	padding-block: var(--space-3xl);
}

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

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

.section--xl {
	padding-block: var(--space-5xl);
}

@media (max-width: 768px) {
	.section {
		padding-block: var(--space-2xl);
	}

	.section--lg,
	.section--xl {
		padding-block: var(--space-3xl);
	}
}

/* ---------------------------------------------------------
   19. Visually Hidden Helper
--------------------------------------------------------- */
.visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------------------------------------------------------
   20. Screen Reader Helper
--------------------------------------------------------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.screen-reader-text:focus {
	position: static !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	clip: auto !important;
	white-space: normal !important;
}
