/* ==========================================================================
   Design system tokens + utility classes
   ========================================================================== */

:root {
	/* Brand palette — Romanian tricolor (blue primary, red + yellow accents) */
	--color-indigo: #2853C4;       /* lighter brand blue (legacy var name) */
	--color-primary: #1E40AF;      /* premium flag blue (dominant) */
	--color-primary-dark: #16317D;
	--color-secondary: #CE1126;    /* flag red — strong CTAs / accents */
	--color-accent: #F2B705;       /* flag yellow — small highlights only */

	/* Tricolor */
	--color-blue: #1E40AF;
	--color-red: #CE1126;
	--color-red-dark: #A60E1F;
	--color-yellow: #F2B705;

	/* Semantic */
	--color-success: #10B981;
	--color-warning: #F59E0B;
	--color-danger: #EF4444;

	/* Neutrals */
	--color-text: #0F172A;
	--color-text-soft: #475569;
	--color-muted: #64748B;
	--color-bg: #F8FAFC;
	--color-bg-alt: #EAF0FB;        /* light blue tint */
	--color-card: #FFFFFF;
	--color-border: #E2E8F0;
	--color-border-soft: #EDF2F7;

	/* Gradients */
	--gradient-primary: linear-gradient(135deg, #2853C4 0%, #1E40AF 55%, #16317D 100%);
	--gradient-hero: radial-gradient(1200px 600px at 50% -10%, rgba(30,64,175,0.16), transparent 60%),
	                 linear-gradient(180deg, #FFFFFF 0%, #EAF0FB 100%);
	--gradient-cta: linear-gradient(135deg, #E0263A 0%, #CE1126 100%);   /* red */
	--gradient-tricolor: linear-gradient(90deg, #1E40AF 0 33.33%, #F2B705 33.33% 66.66%, #CE1126 66.66% 100%);

	/* Typography */
	--font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
	--font-size-xs: 0.75rem;
	--font-size-sm: 0.875rem;
	--font-size-base: 1rem;
	--font-size-lg: 1.125rem;
	--font-size-xl: 1.375rem;
	--font-size-2xl: 1.75rem;
	--font-size-3xl: 2.25rem;
	--font-size-4xl: 3rem;
	--font-size-5xl: 3.75rem;

	/* Spacing scale */
	--space-xs: 4px;
	--space-sm: 8px;
	--space-md: 16px;
	--space-lg: 24px;
	--space-xl: 32px;
	--space-2xl: 48px;
	--space-3xl: 72px;
	--space-4xl: 112px;

	/* Radius */
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--radius-xl: 24px;
	--radius-full: 999px;

	/* Shadows (soft, layered — premium feel) */
	--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
	--shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
	--shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.18), 0 8px 16px -8px rgba(15, 23, 42, 0.10);
	--shadow-xl: 0 30px 60px -15px rgba(30, 64, 175, 0.30);
	--shadow-ring: 0 0 0 4px rgba(30, 64, 175, 0.14);

	/* Breakpoints (reference only — media queries use literals) */
	--breakpoint-sm: 640px;
	--breakpoint-md: 768px;
	--breakpoint-lg: 1024px;
	--breakpoint-xl: 1280px;

	/* Z-index */
	--z-modal: 1000;
	--z-sticky: 100;
	--z-dropdown: 50;
	--z-default: 1;

	/* Transitions */
	--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Layout container */

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

@media (min-width: 768px) {
	.container { padding-inline: var(--space-xl); }
}

.container-narrow { max-width: 820px; }

/* Flex utilities */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

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

/* Display */

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Padding scale */

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

.py-sm  { padding-block: var(--space-sm); }
.py-md  { padding-block: var(--space-md); }
.py-lg  { padding-block: var(--space-lg); }
.py-xl  { padding-block: var(--space-2xl); }
.py-2xl { padding-block: var(--space-3xl); }
.py-3xl { padding-block: var(--space-4xl); }
.px-md  { padding-inline: var(--space-md); }
.px-lg  { padding-inline: var(--space-lg); }

/* Margin scale */

.m-0 { margin: 0; }
.mx-auto { margin-inline: auto; }

.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); }
.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); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* Typography */

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

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

.font-bold { font-weight: 800; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

.text-muted { color: var(--color-muted); }
.text-soft { color: var(--color-text-soft); }
.text-primary { color: var(--color-primary); }
.text-white { color: #fff; }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }

.text-gradient {
	background: var(--gradient-primary);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Backgrounds */

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

/* Borders / shadows */

.border { border: 1px solid var(--color-border); }
.rounded { 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); }

/* Responsive helpers */

@media (max-width: 767px) {
	.hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
	.show-mobile { display: none !important; }
}

/* Accessibility */

.sr-only,
.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-width: 0;
}

.skip-link:focus {
	position: fixed;
	top: var(--space-md);
	left: var(--space-md);
	width: auto;
	height: auto;
	clip: auto;
	padding: var(--space-sm) var(--space-md);
	background: var(--color-primary);
	color: #fff;
	border-radius: var(--radius-md);
	z-index: var(--z-modal);
}

/* Global keyboard focus indicator (WCAG 2.4.7).
   :focus-visible keeps it off mouse clicks but on for keyboard. */
:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Don't double up on the skip link (it has its own treatment). */
.skip-link:focus-visible { outline: none; }

/* Windows High Contrast / forced colors */
@media (forced-colors: active) {
	:focus-visible {
		outline: 3px solid LinkText;
	}
}
