/* ==========================================================
   GRIFO GROUP — DESIGN SYSTEM
   Versione 1.0.0

   Questo file contiene esclusivamente:
   - variabili globali;
   - normalizzazione;
   - tipografia;
   - contenitori;
   - griglie;
   - spaziature;
   - pulsanti;
   - accessibilità;
   - utility generali.

   I singoli componenti delle pagine restano nel file:
   assets/css/grifo-group.css
   ========================================================== */


/* ==========================================================
   01. DESIGN TOKENS — COLORI
   ========================================================== */

:root {
	/* Colori principali */
	--gg-color-white: #ffffff;
	--gg-color-black: #16191b;
	--gg-color-text: #252525;
	--gg-color-text-soft: #555d61;
	--gg-color-muted: #737a7e;
	--gg-color-light: #959c9f;

	/* Fondi */
	--gg-color-background: #ffffff;
	--gg-color-background-soft: #f4f5f5;
	--gg-color-background-medium: #e8ecee;
	--gg-color-background-dark: #929da2;

	/* Bordi */
	--gg-color-border: #dfe3e5;
	--gg-color-border-strong: #c8ced1;

	/* Colori istituzionali disponibili */
	--gg-color-blue: #315e79;
	--gg-color-blue-dark: #24465a;
	--gg-color-gold: #8b7650;

	/* Stati interattivi */
	--gg-color-link: #315e79;
	--gg-color-link-hover: #24465a;
	--gg-color-focus: #315e79;

	/* Alias compatibili con i componenti già creati */
	--gg-white: var(--gg-color-white);
	--gg-text: var(--gg-color-text);
	--gg-muted: var(--gg-color-muted);
	--gg-line: var(--gg-color-border);
	--gg-soft: var(--gg-color-background-soft);
	--gg-icon: #a7adaf;
}


/* ==========================================================
   02. DESIGN TOKENS — DIMENSIONI E CONTENITORI
   ========================================================== */

:root {
	/* Larghezza massima generale */
	--gg-page-width: 1320px;

	/* Contenitori editoriali */
	--gg-width-wide: 1200px;
	--gg-width-content: 1080px;
	--gg-width-reading: 820px;
	--gg-width-narrow: 680px;

	/* Margine laterale fluido */
	--gg-content-padding: clamp(20px, 3vw, 42px);

	/* Altezza indicativa dell’header */
	--gg-header-height: 104px;
}


/* ==========================================================
   03. DESIGN TOKENS — SPAZIATURE
   ========================================================== */

:root {
	--gg-space-1: 4px;
	--gg-space-2: 8px;
	--gg-space-3: 12px;
	--gg-space-4: 16px;
	--gg-space-5: 20px;
	--gg-space-6: 24px;
	--gg-space-7: 32px;
	--gg-space-8: 40px;
	--gg-space-9: 48px;
	--gg-space-10: 56px;
	--gg-space-11: 64px;
	--gg-space-12: 72px;
	--gg-space-13: 80px;
	--gg-space-14: 96px;
	--gg-space-15: 112px;
	--gg-space-16: 128px;

	/* Spazi verticali standard delle sezioni */
	--gg-section-space-small: clamp(56px, 6vw, 88px);
	--gg-section-space: clamp(72px, 8vw, 128px);
	--gg-section-space-large: clamp(96px, 11vw, 168px);
}


/* ==========================================================
   04. DESIGN TOKENS — TIPOGRAFIA
   ========================================================== */

:root {
	/*
	 * GeneratePress eredita normalmente il font impostato
	 * nel tema. Questa variabile permette ai componenti Grifo
	 * di usare lo stesso stack in modo uniforme.
	 */
	--gg-font-sans:
		Arial,
		Helvetica,
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		sans-serif;

	--gg-font-serif:
		Georgia,
		"Times New Roman",
		serif;

	/* Dimensioni tipografiche fluide */
	--gg-font-xs: clamp(10px, 0.72vw, 12px);
	--gg-font-sm: clamp(12px, 0.82vw, 14px);
	--gg-font-base: clamp(15px, 1vw, 17px);
	--gg-font-md: clamp(17px, 1.25vw, 20px);
	--gg-font-lg: clamp(20px, 1.65vw, 26px);
	--gg-font-xl: clamp(26px, 2.5vw, 40px);
	--gg-font-2xl: clamp(34px, 3.8vw, 58px);
	--gg-font-3xl: clamp(44px, 5.5vw, 82px);
	--gg-font-display: clamp(52px, 7.5vw, 112px);

	/* Interlinea */
	--gg-leading-tight: 1.02;
	--gg-leading-heading: 1.1;
	--gg-leading-body: 1.6;
	--gg-leading-relaxed: 1.75;

	/* Tracking */
	--gg-tracking-tight: -0.035em;
	--gg-tracking-heading: -0.02em;
	--gg-tracking-normal: 0;
	--gg-tracking-wide: 0.12em;
	--gg-tracking-caps: 0.16em;
}


/* ==========================================================
   05. DESIGN TOKENS — BORDI, OMBRE E TRANSIZIONI
   ========================================================== */

:root {
	--gg-radius-none: 0;
	--gg-radius-small: 2px;
	--gg-radius-medium: 6px;
	--gg-radius-round: 999px;

	--gg-border-thin: 1px solid var(--gg-color-border);
	--gg-border-strong: 1px solid var(--gg-color-border-strong);

	--gg-shadow-soft:
		0 12px 36px rgba(22, 25, 27, 0.06);

	--gg-transition-fast: 160ms ease;
	--gg-transition: 260ms ease;
	--gg-transition-slow: 500ms ease;
}


/* ==========================================================
   06. NORMALIZZAZIONE GLOBALE
   ========================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	min-width: 320px;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	min-width: 320px;
	margin: 0;
	overflow-x: clip;
	color: var(--gg-color-text);
	background: var(--gg-color-background);
	font-family: var(--gg-font-sans);
	font-size: var(--gg-font-base);
	line-height: var(--gg-leading-body);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

main {
	display: block;
}

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

img,
picture,
video,
canvas {
	height: auto;
}

svg {
	overflow: visible;
}

figure {
	margin: 0;
}

button,
input,
textarea,
select {
	font: inherit;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
}

[hidden] {
	display: none !important;
}


/* ==========================================================
   07. ELEMENTI TESTUALI
   ========================================================== */

.gg-component h1,
.gg-component h2,
.gg-component h3,
.gg-component h4,
.gg-component h5,
.gg-component h6 {
	margin-top: 0;
	color: var(--gg-color-text);
	font-family: var(--gg-font-sans);
	text-wrap: balance;
}

.gg-component h1 {
	font-size: var(--gg-font-3xl);
	font-weight: 500;
	line-height: var(--gg-leading-tight);
	letter-spacing: var(--gg-tracking-tight);
}

.gg-component h2 {
	font-size: var(--gg-font-2xl);
	font-weight: 500;
	line-height: var(--gg-leading-heading);
	letter-spacing: var(--gg-tracking-heading);
}

.gg-component h3 {
	font-size: var(--gg-font-xl);
	font-weight: 500;
	line-height: 1.18;
	letter-spacing: -0.015em;
}

.gg-component h4 {
	font-size: var(--gg-font-lg);
	font-weight: 600;
	line-height: 1.25;
}

.gg-component p {
	margin-top: 0;
	text-wrap: pretty;
}

.gg-component p:last-child {
	margin-bottom: 0;
}

.gg-component strong,
.gg-component b {
	font-weight: 700;
}

.gg-component small {
	font-size: var(--gg-font-sm);
}

.gg-component blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: var(--gg-font-serif);
	font-size: var(--gg-font-xl);
	line-height: 1.35;
}

.gg-eyebrow,
.gg-kicker {
	margin: 0 0 var(--gg-space-4);
	color: var(--gg-color-muted);
	font-size: var(--gg-font-xs);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: var(--gg-tracking-caps);
	text-transform: uppercase;
}

.gg-lead {
	font-size: var(--gg-font-md);
	font-weight: 500;
	line-height: 1.5;
}

.gg-body {
	font-size: var(--gg-font-base);
	line-height: var(--gg-leading-body);
}

.gg-body-small {
	font-size: var(--gg-font-sm);
	line-height: 1.55;
}

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

.gg-text-soft {
	color: var(--gg-color-text-soft);
}

.gg-text-center {
	text-align: center;
}

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

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


/* ==========================================================
   08. LINK
   ========================================================== */

.gg-component a {
	color: var(--gg-color-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition:
		color var(--gg-transition-fast),
		opacity var(--gg-transition-fast);
}

.gg-component a:hover {
	color: var(--gg-color-link-hover);
}

.gg-component a:focus-visible {
	outline: 2px solid var(--gg-color-focus);
	outline-offset: 4px;
}


/* ==========================================================
   09. CONTENITORI
   ========================================================== */

.gg-container,
.gg-container-wide,
.gg-container-content,
.gg-container-reading,
.gg-container-narrow {
	width: calc(100% - (var(--gg-content-padding) * 2));
	margin-inline: auto;
}

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

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

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

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

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


/* ==========================================================
   10. SEZIONI
   ========================================================== */

.gg-section {
	position: relative;
	width: 100%;
	padding-block: var(--gg-section-space);
}

.gg-section--small {
	padding-block: var(--gg-section-space-small);
}

.gg-section--large {
	padding-block: var(--gg-section-space-large);
}

.gg-section--white {
	background: var(--gg-color-white);
}

.gg-section--soft {
	background: var(--gg-color-background-soft);
}

.gg-section--medium {
	background: var(--gg-color-background-medium);
}

.gg-section--dark {
	color: var(--gg-color-white);
	background: var(--gg-color-black);
}

.gg-section--flush {
	padding-block: 0;
}


/* ==========================================================
   11. GRIGLIE
   ========================================================== */

.gg-grid {
	display: grid;
	gap: var(--gg-space-7);
}

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

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

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

.gg-grid--6 {
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

.gg-grid--gap-small {
	gap: var(--gg-space-4);
}

.gg-grid--gap-large {
	gap: clamp(36px, 5vw, 72px);
}

.gg-flex {
	display: flex;
}

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

.gg-flex--center {
	align-items: center;
	justify-content: center;
}

.gg-flex--between {
	align-items: center;
	justify-content: space-between;
}

.gg-stack {
	display: flex;
	flex-direction: column;
}

.gg-stack--small {
	gap: var(--gg-space-4);
}

.gg-stack--medium {
	gap: var(--gg-space-7);
}

.gg-stack--large {
	gap: var(--gg-space-11);
}


/* ==========================================================
   12. SEPARATORI
   ========================================================== */

.gg-divider {
	width: 100%;
	height: 1px;
	margin: 0;
	border: 0;
	background: var(--gg-color-border);
}

.gg-divider--strong {
	background: var(--gg-color-border-strong);
}

.gg-rule {
	width: 40px;
	height: 2px;
	margin: 0 0 var(--gg-space-6);
	background: currentColor;
}


/* ==========================================================
   13. PULSANTI
   ========================================================== */

.gg-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--gg-space-3);
	min-height: 48px;
	padding: 13px 24px;
	border: 1px solid var(--gg-color-black);
	border-radius: var(--gg-radius-none);
	color: var(--gg-color-white);
	background: var(--gg-color-black);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition:
		color var(--gg-transition),
		background-color var(--gg-transition),
		border-color var(--gg-transition),
		transform var(--gg-transition-fast);
}

.gg-button:hover {
	color: var(--gg-color-black);
	background: transparent;
}

.gg-button:active {
	transform: translateY(1px);
}

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

.gg-button--outline {
	color: var(--gg-color-black);
	background: transparent;
}

.gg-button--outline:hover {
	color: var(--gg-color-white);
	background: var(--gg-color-black);
}

.gg-button--light {
	border-color: var(--gg-color-white);
	color: var(--gg-color-black);
	background: var(--gg-color-white);
}

.gg-button--light:hover {
	color: var(--gg-color-white);
	background: transparent;
}

.gg-button--small {
	min-height: 40px;
	padding: 10px 18px;
	font-size: 11px;
}


/* ==========================================================
   14. CARD E PANNELLI
   ========================================================== */

.gg-card {
	position: relative;
	height: 100%;
	padding: clamp(24px, 3vw, 42px);
	border: var(--gg-border-thin);
	background: var(--gg-color-white);
}

.gg-card--soft {
	background: var(--gg-color-background-soft);
}

.gg-card--borderless {
	border: 0;
}

.gg-panel {
	padding: clamp(32px, 5vw, 72px);
	background: var(--gg-color-background-soft);
}


/* ==========================================================
   15. IMMAGINI E MEDIA
   ========================================================== */

.gg-media {
	position: relative;
	overflow: hidden;
}

.gg-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gg-media--portrait {
	aspect-ratio: 4 / 5;
}

.gg-media--landscape {
	aspect-ratio: 16 / 9;
}

.gg-media--editorial {
	aspect-ratio: 1.91 / 1;
}

.gg-media--square {
	aspect-ratio: 1;
}


/* ==========================================================
   16. ACCESSIBILITÀ
   ========================================================== */

.gg-sr-only {
	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;
}

.gg-skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 999999;
	padding: 12px 18px;
	color: var(--gg-color-white);
	background: var(--gg-color-black);
	transform: translateY(-160%);
	transition: transform var(--gg-transition-fast);
}

.gg-skip-link:focus {
	transform: translateY(0);
}

:focus:not(:focus-visible) {
	outline: none;
}

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


/* ==========================================================
   17. UTILITY — MARGINI
   ========================================================== */

.gg-m-0 {
	margin: 0 !important;
}

.gg-mt-0 {
	margin-top: 0 !important;
}

.gg-mt-4 {
	margin-top: var(--gg-space-4) !important;
}

.gg-mt-6 {
	margin-top: var(--gg-space-6) !important;
}

.gg-mt-8 {
	margin-top: var(--gg-space-8) !important;
}

.gg-mt-10 {
	margin-top: var(--gg-space-10) !important;
}

.gg-mt-12 {
	margin-top: var(--gg-space-12) !important;
}

.gg-mb-0 {
	margin-bottom: 0 !important;
}

.gg-mb-4 {
	margin-bottom: var(--gg-space-4) !important;
}

.gg-mb-6 {
	margin-bottom: var(--gg-space-6) !important;
}

.gg-mb-8 {
	margin-bottom: var(--gg-space-8) !important;
}

.gg-mb-10 {
	margin-bottom: var(--gg-space-10) !important;
}

.gg-mb-12 {
	margin-bottom: var(--gg-space-12) !important;
}


/* ==========================================================
   18. UTILITY — VISIBILITÀ
   ========================================================== */

.gg-hide {
	display: none !important;
}

.gg-show-mobile {
	display: none !important;
}


/* ==========================================================
   19. TABLET
   ========================================================== */

@media (max-width: 1024px) {
	:root {
		--gg-header-height: 88px;
	}

	.gg-grid--4,
	.gg-grid--6 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}


/* ==========================================================
   20. MOBILE
   ========================================================== */

@media (max-width: 767px) {
	:root {
		--gg-content-padding: 20px;
		--gg-header-height: 76px;
	}

	.gg-grid--2,
	.gg-grid--3,
	.gg-grid--4,
	.gg-grid--6 {
		grid-template-columns: 1fr;
	}

	.gg-flex--between {
		align-items: flex-start;
		flex-direction: column;
		gap: var(--gg-space-5);
	}

	.gg-hide-mobile {
		display: none !important;
	}

	.gg-show-mobile {
		display: block !important;
	}

	.gg-button {
		min-height: 46px;
		padding: 12px 20px;
	}
}


/* ==========================================================
   21. RIDUZIONE DELLE ANIMAZIONI
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}


/* ==========================================================
   22. STAMPA
   ========================================================== */

@media print {
	body {
		color: #000000;
		background: #ffffff;
	}

	.gg-button,
	.gg-skip-link {
		display: none !important;
	}

	a {
		color: inherit;
		text-decoration: none;
	}

	.gg-section {
		padding-block: 24px;
	}
}