/*
 * Reset, font, tipografia e utility globali.
 */

/* --- font self-hosted, sottoinsieme latino ---------------------------- */
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url('../fonts/montserrat-300.woff2') format('woff2');
}

@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/montserrat-500.woff2') format('woff2');
}

@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/montserrat-600.woff2') format('woff2');
}

@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/montserrat-700.woff2') format('woff2');
}

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url('../fonts/opensans-300.woff2') format('woff2');
}

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/opensans-400.woff2') format('woff2');
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--arsa-bg);
	color: var(--arsa-text);
	font-family: var(--arsa-body);
	font-weight: 300;
	font-size: var(--arsa-text-base);
	line-height: 1.62;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

img {
	height: auto;
}

a {
	color: inherit;
}

button {
	font: inherit;
	color: inherit;
}

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 2px solid var(--arsa-accent-mark);
	outline-offset: 3px;
}

/* --- tipografia ------------------------------------------------------- */
h1,
h2,
h3,
h4 {
	margin: 0;
	font-family: var(--arsa-display);
	font-weight: 300;
	letter-spacing: var(--arsa-track-tight);
	line-height: 1.04;
	text-wrap: balance;
}

h1 { font-size: var(--arsa-text-h1); }
h2 { font-size: var(--arsa-text-h2); }
h3 { font-size: var(--arsa-text-h3); }

p {
	margin: 0 0 1em;
	max-width: 68ch;
}

p:last-child {
	margin-bottom: 0;
}

/* --- etichette tecniche: Montserrat 700 minuscolo, spaziato ----------- */
.arsa-eyebrow {
	margin: 0;
	font-family: var(--arsa-display);
	font-weight: 700;
	font-size: var(--arsa-text-xs);
	letter-spacing: var(--arsa-track-label);
	text-transform: uppercase;
	line-height: 1.4;
}

.arsa-eyebrow--accent { color: var(--arsa-accent); }
.arsa-eyebrow--film   { color: var(--arsa-amber); }
.arsa-eyebrow--muted  { color: var(--arsa-text-3); }

/* --- layout ----------------------------------------------------------- */
/* width:100% è necessario: dentro un contenitore flex o grid il solo
   margin-inline:auto centra l'elemento sulla sua larghezza di contenuto
   invece di allargarlo, e i blocchi hero finiscono al centro. */
.arsa-shell {
	width: 100%;
	max-width: var(--arsa-max);
	margin-inline: auto;
	padding-inline: var(--arsa-shell);
}

/* --- accessibilità ---------------------------------------------------- */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.arsa-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 12px 20px;
	background: var(--arsa-amber);
	color: var(--arsa-ink);
	font-family: var(--arsa-display);
	font-weight: 600;
	text-decoration: none;
}

.arsa-skip:focus {
	left: 0;
}

/* --- rivelazione allo scroll ------------------------------------------ */
[data-reveal] {
	opacity: 0;
	transform: translateY(20px);
	transition:
		opacity var(--arsa-slow) var(--arsa-ease),
		transform var(--arsa-slow) var(--arsa-ease);
}

[data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

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

	[data-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}

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