/* Bowling Varese: design token, reset e tipografia di base. */

@font-face {
	font-family: "Rubik";
	src: url("../fonts/rubik-latin-variabile.woff2") format("woff2");
	font-weight: 300 900;
	font-style: normal;
	font-display: swap;
}

:root {
	/* Colori del marchio */
	--colore-magenta: #f04393;
	--colore-ciano: #70f0fd;
	--colore-bianco: #ffffff;
	--colore-sfondo: #11011a;

	/* Colori derivati */
	--colore-sfondo-alt: #1b0a27;
	--colore-sfondo-footer: #0b0112;
	--colore-testo: var(--colore-bianco);
	--colore-testo-attenuato: rgb(255 255 255 / 0.78);
	--colore-bordo: rgb(255 255 255 / 0.18);
	--colore-su-magenta: var(--colore-sfondo);
	--colore-su-ciano: var(--colore-sfondo);
	--colore-whatsapp: #25d366;
	--colore-errore: #ff8fa3;

	/* Tipografia */
	--font-base: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--testo-base: 1rem;
	--testo-piccolo: 0.9375rem;
	--testo-lead: clamp(1.125rem, 1rem + 0.5vw, 1.5625rem);
	--titolo-1: clamp(2.625rem, 1.1rem + 6.8vw, 6.875rem);
	--titolo-2: clamp(1.625rem, 0.9rem + 3.4vw, 3.75rem);
	--titolo-3: clamp(1.375rem, 0.9rem + 1.8vw, 2.5rem);
	--titolo-4: clamp(1.25rem, 1rem + 0.8vw, 1.625rem);
	--peso-testo: 400;
	--peso-forte: 700;
	--peso-titolo: 800;
	--spaziatura-maiuscolo: 0.06em;

	/* Spaziature */
	--sp-1: 0.25rem;
	--sp-2: 0.5rem;
	--sp-3: 0.75rem;
	--sp-4: 1rem;
	--sp-5: 1.5rem;
	--sp-6: 2rem;
	--sp-7: 3rem;
	--sp-8: 4rem;
	--sp-9: 6rem;
	--spazio-sezione: clamp(3rem, 2rem + 5vw, 7rem);
	--gutter: clamp(1.25rem, 0.75rem + 2.5vw, 2.5rem);
	--larghezza-max: 80rem;
	--larghezza-testo: 52rem;

	/* Raggi */
	--raggio-s: 0.375rem;
	--raggio-m: 0.625rem;
	--raggio-l: 1.25rem;
	--raggio-pillola: 999px;

	/* Effetti neon e ombre */
	--neon-magenta: 0 0 0.5rem rgb(240 67 147 / 0.9), 0 0 1.5rem rgb(240 67 147 / 0.6), 0 0 3.5rem rgb(240 67 147 / 0.4);
	--neon-ciano: 0 0 0.5rem rgb(112 240 253 / 0.9), 0 0 1.5rem rgb(112 240 253 / 0.6), 0 0 3.5rem rgb(112 240 253 / 0.4);
	--bagliore-ciano: 0 0 0.625rem rgb(112 240 253 / 0.7), 0 0 1.5rem rgb(112 240 253 / 0.4);
	--bagliore-magenta: 0 0 0.625rem rgb(240 67 147 / 0.7), 0 0 1.5rem rgb(240 67 147 / 0.4);
	--ombra-scheda: 0 1rem 2.5rem rgb(0 0 0 / 0.4);

	/* Header */
	--altezza-header: 4.5rem;
	--altezza-logo: 2.375rem;

	/* Movimento */
	--transizione: 0.2s ease;
	--z-header: 100;
	--z-whatsapp: 90;
}

@media (min-width: 48em) {
	:root {
		--testo-base: 1.0625rem;
	}
}

@media (min-width: 80em) {
	:root {
		--altezza-header: 6rem;
		--altezza-logo: 2.25rem;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	hyphens: none;
	-webkit-hyphens: none;
	overflow-wrap: normal;
	word-break: normal;
	scroll-padding-top: calc(var(--altezza-header) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	background: var(--colore-sfondo);
	color: var(--colore-testo);
	font-family: var(--font-base);
	font-size: var(--testo-base);
	font-weight: var(--peso-testo);
	line-height: 1.65;
	color-scheme: dark;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

body.menu-aperto {
	overflow: hidden;
}

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

img,
video {
	height: auto;
}

figure {
	margin: 0;
}

address {
	font-style: normal;
}

/* Titoli e testo: a capo sempre voluti */
h1,
h2,
h3,
h4,
h5,
h6,
.titolo,
.btn,
.menu a {
	text-wrap: balance;
}

p,
li,
blockquote,
figcaption {
	text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--sp-4);
	font-weight: var(--peso-titolo);
	line-height: 1.1;
}

h1 {
	font-size: var(--titolo-1);
	line-height: 1.02;
}

h2 {
	font-size: var(--titolo-2);
}

h3 {
	font-size: var(--titolo-3);
}

h4,
h5,
h6 {
	font-size: var(--titolo-4);
	font-weight: 700;
}

p {
	margin: 0 0 var(--sp-4);
}

strong,
b {
	font-weight: var(--peso-forte);
}

a {
	color: var(--colore-ciano);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--colore-bianco);
}

ul,
ol {
	margin: 0 0 var(--sp-4);
	padding-left: 1.25rem;
}

hr {
	border: 0;
	border-top: 1px solid var(--colore-bordo);
	margin: var(--sp-6) 0;
}

/* Accessibilità */
:focus-visible {
	outline: 3px solid var(--colore-ciano);
	outline-offset: 3px;
}

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

.salta-contenuto {
	position: fixed;
	top: var(--sp-3);
	left: var(--sp-3);
	z-index: 1000;
	padding: var(--sp-3) var(--sp-5);
	background: var(--colore-ciano);
	color: var(--colore-su-ciano);
	font-weight: var(--peso-forte);
	border-radius: var(--raggio-s);
	transform: translateY(-200%);
}

.salta-contenuto:focus {
	transform: none;
}

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