/* Fonts will be loaded asynchronously via preload in app.html */

/* ==============================================
   🎯 SIMPLE DESIGN SYSTEM
   ============================================== */

:root {
	/* Breakpoints */
	--mobile: 768px;
	
	/* Colors (mantenuti dal design esistente) */
	--orange: #F26C4F;
	--water-green: #5BB6BC;
	
	--surface: #ffffff;
	--surface-75: rgba(255, 255, 255, 0.75);
	--surface-50: rgba(255, 255, 255, 0.5);
	--surface-25: rgba(255, 255, 255, 0.25);
	--surface-container: rgb(245, 243, 237);
	--surface-container-75: rgba(245, 243, 237, 0.75);
	--surface-container-50: rgba(245, 243, 237, 0.5);
	--surface-container-25: rgba(245, 243, 237, 0.25);
	--on-surface: rgb(24, 24, 24);
	--on-surface-75: rgba(24, 24, 24, 0.75);
	--on-surface-50: rgba(24, 24, 24, 0.5);
	--on-surface-25: rgba(24, 24, 24, 0.25);
	--on-primary: rgb(255, 255, 255);
	--on-primary-75: rgba(255, 255, 255, 0.75);
	--on-primary-50: rgba(255, 255, 255, 0.5);
	--on-primary-25: rgba(255, 255, 255, 0.25);
	
	/* Legacy colors */
	--color-bg-0: rgb(202, 216, 228);
	--color-bg-1: hsl(209, 36%, 86%);
	--color-bg-2: hsl(224, 44%, 95%);
	--color-theme-1: #ff3e00;
	--color-theme-2: #4075a6;
	--color-text: rgba(0, 0, 0, 0.7);
	
	/* Fonts */
	--font-body: 'Inter', sans-serif;
	--font-heading: 'Grandstander Variable', sans-serif;
	
	/* Spacing */
	--space-xs: 0.5rem;   /* 8px */
	--space-sm: 1rem;     /* 16px */
	--space-md: 1.5rem;   /* 24px */
	--space-lg: 2rem;     /* 32px */
	--space-xl: 3rem;     /* 48px */

	--max-width: 1400px; /* Max width for containers */
}

/* ==============================================
   🎯 BASE STYLES
   ============================================== */

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: var(--font-body);
	color: var(--color-text);
	line-height: 1.6;
	background-attachment: fixed;
	background-color: var(--surface);
}

img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* ==============================================
   🎯 TYPOGRAPHY
   ============================================== */

/* Mobile First Typography */
h1 {
	font-family: var(--font-heading);
	font-size: 64px;        /* 32px */
	font-weight: 600;
	line-height: 1;
	letter-spacing: -3.84px;
	margin-bottom: var(--space-md);
	text-align: center;
	color: var(--on-surface);
}

h2 {
	font-family: var(--font-heading);
	font-size: 64px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -3.84px;
	margin-bottom: var(--space-sm);
	color: var(--on-surface);
}

h3 {
	font-family: var(--font-heading);
	font-size: 32px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -1.28px;
	margin-bottom: var(--space-sm);
	color: var(--on-surface);
}

p {
	font-size: 18px;
	margin-bottom: var(--space-sm);
	line-height: 140%;
    letter-spacing: -0px;
    color: var(--on-surface-50);
	font-weight: 300;
}

label {
	font-size: 16px;
	font-weight: 500;
	color: var(--on-surface);
	margin-bottom: 0.25rem;
	letter-spacing: 0px;
	display: block;
	font-weight: 500;
}

/* Desktop Typography */
@media (max-width: 768px) {
	h1 {
		font-size: 40px;
        letter-spacing: -2px;
		line-height: 1.2;
	}
	
	h2 {
		font-size: 40px;
        letter-spacing: -2px;
		line-height: 1.2;
	}
	
	h3 {
		font-size: 24px;
	}
	
	p {
		font-size: 18px;
	}
	
	label {
		font-size: 16px;
	}
}

/* ==============================================
   🎯 FLEX UTILITIES - NAMING CHIARO
   ============================================== */

/* Center tutto */
.center {
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Center solo orizzontale */
.center-h {
	display: flex;
	justify-content: center;
}

/* Center solo verticale */
.center-v {
	display: flex;
	align-items: center;
}

/* Flex con gap */
.flex-gap {
	display: flex;
	gap: var(--space-sm);
}

.flex-gap-md {
	display: flex;
	gap: var(--space-md);
}

/* ==============================================
   🎯 LAYOUT RESPONSIVE - NOMI ESPLICITI
   ============================================== */

/* MOBILE: colonna | DESKTOP: riga */
.mobile-col {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

@media (min-width: 768px) {
	.desktop-row {
		flex-direction: row;
		gap: var(--space-md);
	}
}

/* MOBILE: riga | DESKTOP: colonna */
.mobile-row {
	display: flex;
	flex-direction: row;
	gap: var(--space-sm);
}

@media (min-width: 768px) {
	.desktop-col {
		flex-direction: column;
		gap: var(--space-md);
	}
}

/* GRID SYSTEM - Mobile: 1 colonna | Desktop: Multiple */
.mobile-grid-1 {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-sm);
}

@media (min-width: 768px) {
	.desktop-grid-2 {
		grid-template-columns: 1fr 1fr;
		gap: var(--space-md);
	}
	
	.desktop-grid-3 {
		grid-template-columns: repeat(3, 1fr);
		gap: var(--space-md);
	}
	
	.desktop-grid-4 {
		grid-template-columns: repeat(4, 1fr);
		gap: var(--space-md);
	}
}

/* ==============================================
   🎯 CONTAINER & SPACING
   ============================================== */

.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
	.container {
		padding: 0 var(--space-md);
	}
}

/* Spacing utilities */
.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); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }

/* ==============================================
   🎯 UTILITY CLASSES
   ============================================== */

.w-full { width: 100%; }
.h-full { height: 100%; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Show/Hide responsive - NOMI ESPLICITI */
.show-mobile { display: block; }
.hide-mobile { display: none; }
.show-desktop { display: none; }
.hide-desktop { display: block; }

@media (min-width: 768px) {
	.show-mobile { display: none; }
	.hide-mobile { display: block; }
	.show-desktop { display: block; }
	.hide-desktop { display: none; }
}

/* ==============================================
   🎯 LEGACY SUPPORT (da rimuovere gradualmente)
   ============================================== */

.text-column {
	display: flex;
	max-width: 48rem;
	flex: 0.6;
	flex-direction: column;
	justify-content: center;
	margin: 0 auto;
}

.visually-hidden {
	border: 0;
	clip: rect(0 0 0 0);
	height: auto;
	margin: 0;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

/* Links */
a {
	color: var(--color-theme-1);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* Forms */
input, button, textarea, select {
	font: inherit;
	color: inherit;
}

button:focus:not(:focus-visible) {
	outline: none;
}