/*
 * Profilegno — fondazioni di sviluppo.
 * Evidenza Figma letta dal browser, tavola SMART (14 ottobre 2026):
 * Newsreader Regular 400, titolo 64px/120%, tracking 0; Avenir Next Medium
 * 500, testo 18px/120%, Bold 700 per enfasi e sottotitolo 20px; nero #000,
 * bianco #fff, fascia campione #D2D6D3 larga 1200px, gutter desktop 40px.
 * Questi campioni non dimostrano un sistema universale per tutte le tavole.
 * PROVVISORIO: muted/line, scala spazi, breakpoint, titoli xl/md e scala mobile.
 * Il ritmo di lettura del corpo (1.6) è una scelta di sviluppo provvisoria;
 * non riproduce il 120% osservato nel breve paragrafo SMART.
 * Newsreader è locale, dal repository ufficiale Production Type, con licenza
 * OFL inclusa: asse peso 200–800 verificato nei sorgenti della stessa revisione.
 * Avenir Next richiede ancora i file web autorizzati; il fallback è di sistema.
 * Tutte le regole appartengono al frontend identificato da body.pg-site.
 */

@font-face {
	font-family: "Newsreader";
	src: url("../fonts/newsreader-roman.woff2") format("woff2");
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
}

@font-face {
	font-family: "Newsreader";
	src: url("../fonts/newsreader-italic.woff2") format("woff2");
	font-style: italic;
	font-weight: 200 800;
	font-display: swap;
}

body.pg-site {
	--pg-color-ink: #000000;
	--pg-color-paper: #ffffff;
	--pg-color-muted: #5b6258;
	--pg-color-panel: #d2d6d3;
	--pg-color-line: #c3c8bd;
	--pg-font-body: "Avenir Next", Arial, Helvetica, sans-serif;
	--pg-font-display: "Newsreader", Georgia, "Times New Roman", serif;
	--pg-space-1: 0.5rem;
	--pg-space-2: 1rem;
	--pg-space-3: 1.5rem;
	--pg-space-4: 2rem;
	--pg-space-5: 3rem;
	--pg-space-6: 4rem;
	--pg-space-7: 6rem;
	--pg-space-8: 8rem;
	--pg-gutter: clamp(1.25rem, 3.125vw, 2.5rem);
	--pg-container: 75rem;
	--pg-text-sm: 0.875rem;
	--pg-text-base: clamp(1rem, 0.875rem + 0.3125vw, 1.125rem);
	--pg-text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
	--pg-title-xl: clamp(2.75rem, 1.6rem + 5vw, 6.5rem);
	--pg-title-lg: clamp(2.25rem, 1.4rem + 3.4vw, 4rem);
	--pg-title-md: clamp(1.75rem, 1.25rem + 2vw, 3rem);
	margin: 0;
	background: var(--pg-color-paper);
	color: var(--pg-color-ink);
	font-family: var(--pg-font-body);
	font-optical-sizing: auto;
	font-size: var(--pg-text-base);
	font-weight: 500;
	line-height: 1.6;
}

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

.pg-site :where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl) {
	margin: 0;
}

.pg-site :where(h1, h2, h3, h4, h5, h6) {
	font-family: var(--pg-font-display);
	font-weight: 400;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.pg-site :where(h1) { font-size: var(--pg-title-xl); }
.pg-site :where(h2) { font-size: var(--pg-title-lg); }
.pg-site :where(h3) { font-size: var(--pg-title-md); }
.pg-site :where(h4, h5, h6) { font-size: var(--pg-text-lg); }

.pg-site :where(a) {
	color: inherit;
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

.pg-site :where(img, video, iframe, svg) {
	max-width: 100%;
}

.pg-site :where(img, video) {
	display: block;
	height: auto;
}

.pg-site :where(strong, b) { font-weight: 700; }
.pg-site :where(em, i) { font-style: italic; }
.pg-site :where(small) { font-size: var(--pg-text-sm); }
.pg-site :where(hr) {
	margin-block: var(--pg-space-4);
	border: 0;
	border-top: 1px solid var(--pg-color-line);
}

/* Layout: larghezza editoriale, ritmo e griglie con collasso mobile esplicito. */
.pg-site .pg-container {
	width: 100%;
	max-width: calc(var(--pg-container) + var(--pg-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--pg-gutter);
}

.pg-site .pg-container--wide { --pg-container: 80rem; }
.pg-site .pg-container--narrow { --pg-container: 46rem; }

.pg-site .pg-section {
	padding-block: clamp(var(--pg-space-5), 8vw, var(--pg-space-8));
}

.pg-site .pg-stack > * + * {
	margin-block-start: var(--pg-stack-space, var(--pg-space-3));
}

.pg-site .pg-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--pg-grid-gap, var(--pg-space-4));
}

.pg-site .pg-grid > * { min-width: 0; }

@media (min-width: 48rem) {
	.pg-site :where(.pg-grid--2, .pg-grid--3) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 68rem) {
	.pg-site .pg-grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Tipografia editoriale riutilizzabile, senza forzare ogni heading in maiuscolo. */
.pg-site .pg-eyebrow {
	font-family: var(--pg-font-body);
	font-size: var(--pg-text-sm);
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.pg-site .pg-title {
	font-family: var(--pg-font-display);
	font-size: var(--pg-title-lg);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.pg-site .pg-title--xl { font-size: var(--pg-title-xl); }
.pg-site .pg-title--lg { font-size: var(--pg-title-lg); }
.pg-site .pg-title--md { font-size: var(--pg-title-md); }

.pg-site .pg-lead {
	max-width: 48ch;
	font-size: var(--pg-text-lg);
	line-height: 1.55;
}

/* Campi di base; feedback e invio restano responsabilità del modulo reale. */
.pg-site :where(button, input, select, textarea) {
	font: inherit;
	color: inherit;
}

.pg-site :where(button, input[type="button"], input[type="submit"], input[type="reset"]) {
	cursor: pointer;
}

.pg-site :where(label, legend) {
	font-size: var(--pg-text-sm);
	line-height: 1.5;
}

.pg-site :where(fieldset) {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.pg-site :where(legend) {
	margin-bottom: var(--pg-space-2);
	padding: 0;
}

.pg-site :where(input:not([type]), input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], select, textarea) {
	display: block;
	width: 100%;
	min-height: 3rem;
	margin: 0;
	padding: 0.75rem 0.875rem;
	border: 1px solid var(--pg-color-muted);
	border-radius: 0;
	background: var(--pg-color-paper);
	font-size: max(1rem, var(--pg-text-base));
	line-height: 1.5;
}

.pg-site :where(textarea) {
	min-height: 10rem;
	resize: vertical;
}

.pg-site :where(input, textarea)::placeholder {
	color: var(--pg-color-muted);
	opacity: 1;
}

.pg-site :where(input[type="checkbox"], input[type="radio"]) {
	width: 1.125rem;
	height: 1.125rem;
	margin: 0;
	accent-color: var(--pg-color-ink);
	vertical-align: middle;
}

.pg-site :where(button, input, select, textarea):disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

/* Contenuto WordPress: ritmo leggibile, immagini e blocchi editoriali. */
.pg-site :where(.pg-prose, .entry-content) {
	overflow-wrap: anywhere;
}

.pg-site :where(.pg-prose, .entry-content) > * + * {
	margin-block-start: var(--pg-space-3);
}

.pg-site :where(.pg-prose, .entry-content) :where(h2, h3, h4, h5, h6) {
	margin-block-start: var(--pg-space-5);
}

.pg-site :where(.pg-prose, .entry-content) > :first-child {
	margin-block-start: 0;
}

.pg-site :where(.pg-prose, .entry-content) :where(ul, ol) {
	padding-inline-start: 1.5em;
}

.pg-site :where(.pg-prose, .entry-content) :where(ul) { list-style: disc; }
.pg-site :where(.pg-prose, .entry-content) :where(ol) { list-style: decimal; }
.pg-site :where(.pg-prose, .entry-content) :where(li + li) {
	margin-block-start: var(--pg-space-1);
}

.pg-site :where(.pg-prose, .entry-content) :where(blockquote, .wp-block-quote) {
	padding-inline-start: var(--pg-space-3);
	border-inline-start: 1px solid var(--pg-color-muted);
	font-family: var(--pg-font-display);
	font-size: var(--pg-text-lg);
}

.pg-site :where(.pg-prose, .entry-content) :where(cite, figcaption, .wp-caption-text) {
	color: var(--pg-color-muted);
	font-family: var(--pg-font-body);
	font-size: var(--pg-text-sm);
	line-height: 1.5;
}

.pg-site :where(.wp-block-image, .wp-block-video, .wp-caption) {
	max-width: 100%;
}

.pg-site :where(.wp-block-image, .wp-block-video, .wp-caption) :where(figcaption, .wp-caption-text) {
	margin-block-start: var(--pg-space-1);
}

.pg-site :where(.wp-block-table) {
	max-width: 100%;
	overflow-x: auto;
}

.pg-site :where(.pg-prose, .entry-content) :where(table) {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--pg-text-sm);
}

.pg-site :where(.pg-prose, .entry-content) :where(th, td) {
	padding: var(--pg-space-2);
	border-bottom: 1px solid var(--pg-color-line);
	text-align: start;
	vertical-align: top;
}

.pg-site :where(.pg-prose, .entry-content) :where(th) { font-weight: 700; }
.pg-site :where(.pg-prose, .entry-content) :where(pre) {
	max-width: 100%;
	overflow-x: auto;
	padding: var(--pg-space-3);
	background: var(--pg-color-panel);
	font-family: monospace;
}

.pg-site :where(.aligncenter) { margin-inline: auto; }
.pg-site :where(.alignwide, .alignfull) { width: 100%; }

/* Tastiera e movimento: focus visibile anche su sezioni scure. */
.pg-site :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
	box-shadow: 0 0 0 2px var(--pg-color-paper);
}

.pg-site :where(.pg-visually-hidden, .screen-reader-text) {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.pg-site :where(.pg-visually-hidden, .screen-reader-text):focus {
	z-index: 100000;
	width: auto;
	height: auto;
	margin: var(--pg-space-2);
	padding: var(--pg-space-2) var(--pg-space-3);
	clip-path: none;
	background: var(--pg-color-paper);
	color: var(--pg-color-ink);
	white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
	.pg-site,
	.pg-site *,
	.pg-site *::before,
	.pg-site *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
