/* Rules of Engagement Italia
 *
 * Colori presi dal logo: metallo scuro, nebbia verde acqua, avorio e ruggine.
 * Gli angoli smussati e i bulloni richiamano la placca ottagonale del logo.
 * Il blu è riservato al pulsante del Discord: è l'azione principale della pagina.
 *
 * 1. Font
 * 2. Colori e base
 * 3. Pulsanti
 * 4. Eroe
 * 5. Il gioco
 * 6. Le classi
 * 7. Immagini
 * 8. Chiusura e piede
 * 9. Pagine di testo
 * 10. Telefono e tablet
 * 11. Movimento
 */

/* 1. Font: file sul nostro server, licenza SIL Open Font License ------------- */

@font-face { font-family: "Saira Stencil One"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/saira-stencil-one-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }

/* 2. Colori e base --------------------------------------------------------- */

:root {
	--roe-nero: #0c1011;
	--roe-ferro: #161c1e;
	--roe-acciaio: #2b3437;
	--roe-bordo: #4a5659;
	--roe-avorio: #f1e8d3;
	--roe-grigio: #b9c4c2;
	--roe-acqua: #7fe6d6;
	--roe-ruggine: #e0653a;
	--roe-verde-it: #1f8a4c;
	--roe-rosso-it: #c62f2b;
	--roe-rosso: #c8322c;
	--roe-rosso-acceso: #de423b;
	--roe-verde: #3ba55d;
	--roe-blu: #5865f2;
	--roe-blu-chiaro: #6c78f7;
	--roe-titoli: "Saira Stencil One", "Bahnschrift", "Arial Narrow", sans-serif;
	--roe-testo: "Barlow", "Segoe UI", Arial, sans-serif;
	--roe-sfondo-img: url("../img/sfondo.webp");
	--roe-smusso: 12px;
	--roe-angoli: polygon(var(--roe-smusso) 0, calc(100% - var(--roe-smusso)) 0, 100% var(--roe-smusso), 100% calc(100% - var(--roe-smusso)), calc(100% - var(--roe-smusso)) 100%, var(--roe-smusso) 100%, 0 calc(100% - var(--roe-smusso)), 0 var(--roe-smusso));
	--roe-tricolore: linear-gradient(90deg, var(--roe-verde-it) 0 33.33%, var(--roe-avorio) 33.33% 66.66%, var(--roe-rosso-it) 66.66%);
	--roe-grana: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background:
		radial-gradient(ellipse 60% 900px at 92% 1500px, rgba(127, 230, 214, .07), transparent),
		radial-gradient(ellipse 55% 800px at 4% 2300px, rgba(224, 101, 58, .06), transparent),
		var(--roe-nero);
	color: var(--roe-avorio);
	font: 400 1.06rem/1.65 var(--roe-testo);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--roe-acqua); outline-offset: 4px; }

h1, h2, h3 { font-family: var(--roe-titoli); font-weight: 400; }

/* 3. Pulsanti: il colore sta in uno strato smussato sotto al testo, così
 *    il contorno della tastiera e l'ombra restano interi. */

.roe-pulsanti {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 16px;
}

.roe-btn {
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .55em;
	color: #fff;
	font-family: var(--roe-titoli);
	line-height: 1;
	letter-spacing: .03em;
	text-decoration: none;
	white-space: nowrap;
	transition: transform .2s, filter .2s;
}

.roe-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	clip-path: var(--roe-angoli);
	transition: background-color .2s;
}

.roe-btn:hover { transform: translateY(-2px); }

.roe-btn--discord {
	padding: .8em 1.4em;
	font-size: clamp(1.25rem, 2.2vw, 1.5rem);
	filter: drop-shadow(0 0 18px rgba(88, 101, 242, .55));
}

.roe-btn--discord::before { background: var(--roe-blu); }

.roe-btn--discord:hover { filter: drop-shadow(0 0 28px rgba(108, 120, 247, .85)); }

.roe-btn--discord:hover::before { background: var(--roe-blu-chiaro); }

.roe-btn--discord .roe-icona { width: 1.15em; height: 1.15em; }

.roe-btn--reddit {
	padding: .8em 1.2em;
	font-size: 1.08rem;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6));
}

.roe-btn--reddit::before { background: var(--roe-rosso); }

.roe-btn--reddit:hover::before { background: var(--roe-rosso-acceso); }

.roe-btn--reddit .roe-icona { width: 1.05em; height: 1.05em; }

.roe-icona { flex: none; }

/* 4. Eroe ------------------------------------------------------------------ */

.roe-eroe {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding: 40px clamp(16px, 6vw, 96px) 84px;
	overflow: hidden;
	isolation: isolate;
}

/* Strato 1: illustrazione del gioco. */
.roe-eroe__sfondo {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--roe-sfondo-img) 60% 30% / cover no-repeat, #1c2a2a;
}

/* Strato 2: buio per il testo e verso il basso per unirsi alla pagina. */
.roe-eroe__sfondo::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(12, 16, 17, .82) 0%, rgba(12, 16, 17, .58) 46%, rgba(12, 16, 17, .08) 80%),
		linear-gradient(180deg, rgba(12, 16, 17, 0) 60%, var(--roe-nero) 100%);
}

/* Strato 3: bagliore di scarica dietro alla creatura. Si muove solo l'opacità, che costa poco. */
.roe-eroe__sfondo::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 44% 56% at 72% 42%, rgba(127, 230, 214, .3), transparent 72%);
	opacity: .4;
}

/* Strato 4: grana. */
.roe-eroe::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--roe-grana);
	opacity: .4;
	pointer-events: none;
}

.roe-eroe__corpo {
	display: grid;
	grid-template-columns: auto minmax(0, 560px);
	align-items: center;
	gap: clamp(28px, 4vw, 56px);
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
}

.roe-logo {
	width: min(400px, 56vh, 34vw);
	filter: drop-shadow(0 0 30px rgba(127, 230, 214, .22)) drop-shadow(0 16px 30px rgba(0, 0, 0, .8));
}

.roe-eroe__testo {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.roe-titolo {
	margin: 0;
	color: var(--roe-avorio);
	font-size: clamp(2.6rem, 5.2vw, 4.1rem);
	line-height: 1;
	text-transform: uppercase;
	text-shadow: 0 2px 22px rgba(0, 0, 0, .85);
	text-wrap: balance;
}

.roe-motto {
	display: block;
	margin-bottom: .7em;
	color: var(--roe-acqua);
	font: 600 clamp(.95rem, 1.6vw, 1.08rem)/1.2 var(--roe-testo);
	letter-spacing: .24em;
}

.roe-invito {
	margin: 0 0 6px;
	max-width: 30em;
	font-size: 1.14rem;
	text-wrap: balance;
	text-shadow: 0 1px 10px rgba(0, 0, 0, .95);
}

.roe-numeri {
	margin: 0;
	font-weight: 600;
	letter-spacing: .06em;
	color: var(--roe-grigio);
	text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
}

.roe-numeri strong { color: var(--roe-avorio); font-weight: 600; }

.roe-pallino {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin: 0 .5em .16em 0;
	border-radius: 50%;
	background: var(--roe-verde);
	box-shadow: 0 0 8px var(--roe-verde);
	vertical-align: middle;
}

.roe-giu {
	position: absolute;
	left: 50%;
	bottom: 18px;
	translate: -50% 0;
	padding: 8px;
	color: var(--roe-acqua);
	opacity: .8;
}

.roe-giu:hover { opacity: 1; color: var(--roe-avorio); }

/* 5. Il gioco -------------------------------------------------------------- */

.roe-gioco {
	max-width: 1080px;
	margin: 0 auto;
	padding: 72px 16px 40px;
}

.roe-foto {
	width: 100%;
	clip-path: var(--roe-angoli);
}

/* Foto e placca di metallo che le si sovrappone, fissata con quattro bulloni. */
.roe-coppia {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	align-items: center;
}

.roe-coppia .roe-foto {
	grid-column: 1 / 9;
	grid-row: 1;
}

.roe-pannello {
	--bullone: radial-gradient(circle at 40% 35%, #8b979a 0 1.5px, #3a4447 2.5px 4.5px, transparent 5px);
	--roe-smusso: 18px;
	position: relative;
	isolation: isolate;
	grid-column: 7 / 13;
	grid-row: 1;
	padding: 38px 36px 32px;
	margin-top: 120px;
	filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .7));
}

/* Bordo chiaro e fondo scuro sono due strati smussati uno dentro l'altro. */
.roe-pannello::before,
.roe-pannello::after {
	content: "";
	position: absolute;
	z-index: -1;
	clip-path: var(--roe-angoli);
}

.roe-pannello::before { inset: 0; background: linear-gradient(145deg, var(--roe-bordo), #1d2426 55%, var(--roe-bordo)); }

.roe-pannello::after {
	inset: 2px;
	background:
		var(--bullone) 12px 12px / 12px 12px no-repeat,
		var(--bullone) calc(100% - 12px) 12px / 12px 12px no-repeat,
		var(--bullone) 12px calc(100% - 12px) / 12px 12px no-repeat,
		var(--bullone) calc(100% - 12px) calc(100% - 12px) / 12px 12px no-repeat,
		linear-gradient(160deg, #20282a, var(--roe-ferro));
}

.roe-pannello h2 {
	margin: 0 0 12px;
	font-size: clamp(1.7rem, 3.4vw, 2.2rem);
	line-height: 1.05;
	text-transform: uppercase;
}

.roe-pannello p { margin: 0 0 14px; font-size: 1.04rem; line-height: 1.6; }

.roe-pannello p:last-child { margin-bottom: 0; }

.roe-schede {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	margin: 64px 0 0;
	background: var(--roe-acciaio);
	border: 1px solid var(--roe-acciaio);
}

.roe-schede div { padding: 18px 16px 16px; background: var(--roe-nero); }

.roe-schede dt {
	color: var(--roe-acqua);
	font-size: .84rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.roe-schede dd {
	margin: 6px 0 0;
	font: 400 1.22rem/1.15 var(--roe-titoli);
}

.roe-nota {
	max-width: 42em;
	margin: 26px auto 0;
	color: var(--roe-grigio);
	text-align: center;
	text-wrap: balance;
}

/* 6. Le classi ------------------------------------------------------------- */

.roe-classi {
	max-width: 1080px;
	margin: 0 auto;
	padding: 56px 16px 24px;
}

.roe-classi > h2 {
	margin: 0 0 30px;
	font-size: clamp(2rem, 4.6vw, 3rem);
	line-height: 1.05;
	text-align: center;
	text-transform: uppercase;
}

.roe-classi__elenco {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.roe-classe {
	--roe-smusso: 16px;
	display: flex;
	flex-direction: column;
	background: linear-gradient(170deg, #20282a, var(--roe-ferro));
	clip-path: var(--roe-angoli);
}

.roe-classe img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	object-position: 50% 10%;
	background: #aebabc;
}

.roe-classe__corpo { flex: 1; display: flex; flex-direction: column; padding: 18px 22px 22px; }

.roe-classe__ruolo {
	margin: 0;
	color: var(--roe-ruggine);
	font-size: .84rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.roe-classe h3 { margin: 4px 0 8px; font-size: 1.9rem; line-height: 1.05; text-transform: uppercase; }

.roe-classe__corpo p:not([class]) { flex: 1; margin: 0 0 14px; line-height: 1.5; }

.roe-difficolta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: var(--roe-grigio);
	font-size: .88rem;
}

.roe-difficolta span { margin-right: 6px; }

.roe-difficolta i {
	width: 12px;
	height: 12px;
	background: var(--roe-acciaio);
	transform: rotate(45deg);
}

.roe-difficolta i.roe-piena { background: var(--roe-acqua); }

/* 7. Immagini -------------------------------------------------------------- */

.roe-immagini {
	max-width: 1080px;
	margin: 0 auto;
	padding: 28px 16px 40px;
}

.roe-galleria {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.roe-steam { margin: 34px 0 0; text-align: center; }

.roe-steam a {
	color: var(--roe-avorio);
	font-weight: 600;
	text-decoration-color: var(--roe-acqua);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.roe-steam a:hover { text-decoration-color: currentColor; }

/* 8. Chiusura e piede ------------------------------------------------------ */

.roe-chiusura {
	padding: 88px 16px 110px;
	text-align: center;
	background: radial-gradient(ellipse 60% 75% at 50% 100%, rgba(127, 230, 214, .16), transparent 72%);
}

.roe-chiusura h2 {
	margin: 0;
	font-size: clamp(2.5rem, 7vw, 4.2rem);
	line-height: 1.02;
	text-transform: uppercase;
}

.roe-chiusura p { margin: 12px auto 28px; max-width: 34em; color: var(--roe-grigio); text-wrap: balance; }

.roe-chiusura .roe-pulsanti { justify-content: center; }

.roe-piede {
	position: relative;
	padding: 28px 16px 30px;
	background: var(--roe-ferro);
	color: var(--roe-grigio);
	text-align: center;
	font-size: .9rem;
	line-height: 1.55;
}

.roe-piede::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 4px;
	background: var(--roe-tricolore);
}

.roe-piede p { margin: 0 auto 6px; max-width: 60em; }

/* 9. Pagine di testo ------------------------------------------------------- */

.roe-pagina {
	max-width: 720px;
	margin: 0 auto;
	padding: 40px 16px 88px;
}

.roe-pagina__logo { display: inline-block; margin-bottom: 24px; }

.roe-pagina__logo img { width: 84px; }

.roe-pagina h1 {
	font-size: clamp(2rem, 6vw, 2.7rem);
	line-height: 1.05;
	text-transform: uppercase;
}

.roe-pagina h2 { font: 600 1.4rem/1.2 var(--roe-testo); }

.roe-pagina a { color: var(--roe-avorio); text-decoration-color: var(--roe-acqua); }

/* Le tabelle scorrono dentro il loro riquadro: sul telefono non allargano la pagina. */
.roe-pagina figure { margin: 1.25em 0; overflow-x: auto; }

.roe-pagina table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }

.roe-pagina th, .roe-pagina td { padding: .6em .75em; border: 1px solid rgba(241, 232, 211, .2); text-align: left; vertical-align: top; }

/* 10. Telefono e tablet ---------------------------------------------------- */

@media (max-width: 860px) {
	.roe-eroe { padding-top: 28px; text-align: center; }

	.roe-eroe__sfondo { background-position: 60% 0; }

	.roe-eroe__sfondo::before {
		background: linear-gradient(180deg, rgba(12, 16, 17, .55) 0%, rgba(12, 16, 17, .76) 55%, var(--roe-nero) 100%);
	}

	.roe-eroe__corpo { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 20px; }

	.roe-eroe__testo { align-items: center; }

	.roe-logo { width: min(62vw, 280px, 36vh); }

	.roe-coppia { display: block; }

	.roe-pannello { margin: -28px 0 0; padding: 32px 24px 28px; }

	.roe-schede { grid-template-columns: repeat(2, 1fr); margin-top: 44px; }

	.roe-classi__elenco { grid-template-columns: minmax(0, 1fr); max-width: 460px; margin: 0 auto; }

	.roe-galleria { grid-template-columns: repeat(2, 1fr); gap: 10px; }

	.roe-galleria .roe-foto:first-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
	.roe-pulsanti { flex-direction: column; align-items: stretch; width: 100%; }

	.roe-chiusura .roe-pulsanti { max-width: 340px; margin: 0 auto; }
}

/* 11. Movimento ------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
	.roe-logo, .roe-eroe__testo > * { animation: roe-emerge .9s cubic-bezier(.2, .7, .2, 1) both; }
	.roe-eroe__testo > :nth-child(1) { animation-delay: .12s; }
	.roe-eroe__testo > :nth-child(2) { animation-delay: .22s; }
	.roe-eroe__testo > :nth-child(3) { animation-delay: .32s; }
	.roe-eroe__testo > :nth-child(4) { animation-delay: .42s; }
	.roe-eroe__sfondo::after { animation: roe-scarica 11s ease-in-out infinite; }
	.roe-giu { animation: roe-respira 2.4s ease-in-out 1.2s infinite; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

@keyframes roe-emerge {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: none; }
}

/* La nebbia si illumina piano, con un breve guizzo come il fulmine del logo. */
@keyframes roe-scarica {
	0%, 100% { opacity: .25; }
	46%      { opacity: .6; }
	48%      { opacity: 1; }
	50%      { opacity: .5; }
	52%      { opacity: .85; }
	62%      { opacity: .45; }
}

@keyframes roe-respira {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(6px); }
}
