/* ==========================================================================
   Base: reset leggero, tipografia, link, layout (container e griglia)
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--asm-bg);
	color: var(--asm-text);
	font-family: var(--asm-font-sans);
	font-size: var(--asm-fs-base);
	font-weight: 400;
	line-height: var(--asm-lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* Titoli */
h1, h2, h3, h4, h5, h6,
.asm-display, .asm-h1, .asm-h2, .asm-h3 {
	font-family: var(--asm-font-display);
	font-weight: 400;
	line-height: var(--asm-lh-heading);
	letter-spacing: -0.005em;
	margin: 0 0 var(--asm-sp-5);
	color: inherit;
}
.asm-display { font-size: var(--asm-fs-display); line-height: var(--asm-lh-tight); }
h1, .asm-h1 { font-size: var(--asm-fs-h1); }
h2, .asm-h2 { font-size: var(--asm-fs-h2); }
h3, .asm-h3 { font-size: var(--asm-fs-h3); }
h4 { font-size: var(--asm-fs-h4); }
h5, h6 { font-family: var(--asm-font-sans); font-size: var(--asm-fs-sm); text-transform: uppercase; letter-spacing: var(--asm-ls-caps); }

p { margin: 0 0 var(--asm-sp-5); }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 500; }
em, i { font-style: italic; }
small { font-size: var(--asm-fs-sm); }
hr { border: 0; border-top: 1px solid var(--asm-line); margin: var(--asm-sp-7) 0; }

/* Testo di apertura, eyebrow (sopratitolo in maiuscoletto), citazioni */
.asm-lead {
	font-family: var(--asm-font-display);
	font-size: var(--asm-fs-lead);
	line-height: 1.5;
	color: var(--asm-text);
}
.asm-eyebrow {
	font-family: var(--asm-font-sans);
	font-size: var(--asm-fs-xs);
	font-weight: 500;
	letter-spacing: var(--asm-ls-caps);
	text-transform: uppercase;
	color: var(--asm-text-muted);
	margin: 0 0 var(--asm-sp-4);
}
.asm-eyebrow--light { color: var(--asm-on-dark-soft); }
.asm-quote {
	font-family: var(--asm-font-display);
	font-style: italic;
	font-size: var(--asm-fs-h2);
	line-height: 1.25;
	margin: 0 auto var(--asm-sp-5);
	max-width: 22ch;
}
.asm-quote--small { font-size: var(--asm-fs-h3); max-width: none; margin-top: var(--asm-sp-6); }

/* Link: sottolineatura sottile, oro al passaggio */
a { color: inherit; text-decoration: none; transition: color var(--asm-dur) var(--asm-ease); }
.asm-prose a, .asm-blocks p a, .asm-blocks li a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	text-decoration-color: var(--asm-line-strong);
}
.asm-prose a:hover, .asm-blocks p a:hover, .asm-blocks li a:hover { color: var(--asm-accent); text-decoration-color: currentColor; }

/* Accessibilità */
:focus-visible { outline: 1px solid var(--asm-focus); outline-offset: 3px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.asm-skip {
	position: absolute; left: var(--asm-sp-4); top: -100px; z-index: 1000;
	background: var(--asm-nero); color: var(--asm-bianco); padding: var(--asm-sp-3) var(--asm-sp-5);
}
.asm-skip:focus { top: var(--asm-sp-4); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Layout */
.asm-container {
	width: 100%;
	max-width: calc(var(--asm-container) + 2 * var(--asm-gutter));
	margin-inline: auto;
	padding-inline: var(--asm-gutter);
}
.asm-narrow { max-width: calc(var(--asm-narrow) + 2 * var(--asm-gutter)); }
.asm-center { text-align: center; }
.asm-center .asm-quote, .asm-center .asm-lead { margin-inline: auto; }

/* Griglia a 12 colonne */
.asm-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--asm-grid-gap);
}
.asm-col-12 { grid-column: span 12; }
.asm-col-8 { grid-column: span 8; }
.asm-col-6 { grid-column: span 6; }
.asm-col-4 { grid-column: span 4; }
.asm-col-3 { grid-column: span 3; }
@media (max-width: 1023px) {
	.asm-col-3 { grid-column: span 6; }
	.asm-col-4, .asm-col-6, .asm-col-8 { grid-column: span 12; }
}

/* Sezioni */
.asm-section { padding-block: var(--asm-section-y); }
.asm-section--white { background: var(--asm-bianco); }
.asm-section--ivory { background: var(--asm-avorio); }
.asm-section--dark { background: var(--asm-nero-2); color: var(--asm-on-dark); }
.asm-section--dark .asm-eyebrow { color: var(--asm-on-dark-soft); }
.asm-section-head { margin-bottom: var(--asm-sp-8); }
.asm-page-head { padding-top: var(--asm-sp-9); padding-bottom: var(--asm-sp-7); text-align: center; }
.asm-prose { max-width: var(--asm-narrow); margin-inline: auto; }

/* Righe editoriali (asm_lines): a capo come scritto su desktop, testo libero su mobile */
.asm-line { display: inline; }
@media (min-width: 1024px) {
	.asm-line { display: block; }
}
