/* =========================================================================
   Home di Ortel (front-page.php)
   Apertura chiara (la foto su fondo bianco si fonde con la pagina), poi il
   giallo/verde del singolo, Instagram su bianco, piattaforme su nero.
   Il singolo prende i colori della sua pagina (--brano-bg, --brano-accent).
   ========================================================================= */

.home {
	--home-nero: #0c0c0c;
	--home-nero-2: #171717;
	--home-giallo: #ffc244;
	--home-verde: #00a082;
	--home-font: var(--iam-font-heading); /* Forma DJR (Personalizza > Brand identity > Tipografia) */
	--home-r: 28px;
}
/* Nastro inclinato e luci escono dai bordi: si tagliano qui, senza barra orizzontale. */
.home .iam-main { overflow-x: clip; }
.home .iam-header { background: #fff; }
.home .iam-logo__testo { font-family: var(--home-font); font-weight: 700; }
.home .iam-main ::selection { background: var(--home-giallo); color: var(--home-nero); }

/* ---------- Elementi comuni ---------- */
.iam-home-occhiello {
	margin: 0 0 .75rem;
	font-family: var(--home-font);
	font-weight: 500;
	font-size: .85rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	opacity: .7;
}

.iam-home-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .55em;
	min-height: 3.5rem;
	padding: .85rem 1.6rem;
	border: 2px solid transparent;
	border-radius: 999px;
	font-family: var(--home-font);
	font-weight: 500;
	font-size: 1.05rem;
	line-height: 1.1;
	text-decoration: none;
	transition: transform .2s var(--iam-ease), background-color .2s var(--iam-ease), color .2s var(--iam-ease), border-color .2s var(--iam-ease);
}
.iam-home-btn:hover { transform: translateY(-2px); }
.iam-home-btn:active { transform: translateY(0) scale(.98); }
.iam-home-btn--giallo { background: var(--home-giallo); color: var(--home-nero); }
.iam-home-btn--giallo:hover { background: var(--home-nero); color: #fff; }
.iam-home-btn--contorno { border-color: var(--home-nero); color: var(--home-nero); }
.iam-home-btn--contorno:hover { background: var(--home-nero); color: #fff; }
.iam-home-btn--accento { background: var(--brano-accent, var(--home-verde)); color: #fff; }
.iam-home-btn--accento:hover { background: var(--home-nero); }
.iam-home-btn--nero { background: var(--home-nero); color: #fff; }
.iam-home-btn--nero:hover { background: var(--home-verde); }

.iam-home-testa {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem 2rem;
	margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}
.iam-home-social { display: flex; flex-wrap: wrap; gap: .75rem; }

.iam-home-testa__titolo {
	margin: 0;
	font-family: var(--home-font);
	font-weight: 700;
	font-size: clamp(2.75rem, 1.5rem + 6vw, 6.5rem);
	line-height: .9;
	letter-spacing: -.035em;
	overflow-wrap: anywhere;
}

/* ---------- Apertura ---------- */
.iam-home-hero {
	position: relative;
	isolation: isolate;
	background: #fff;
	color: var(--home-nero);
	overflow: hidden;
}
.iam-home-hero__luci {
	/* Solo sul lato del testo: dietro la foto si vedrebbe il bordo del suo fondo bianco. */
	position: absolute;
	inset: -10% 45% 0 -15%;
	z-index: -1;
	background: radial-gradient(closest-side, rgb(255 194 68 / .38), transparent 75%);
	filter: blur(20px);
	animation: iam-home-luci 14s ease-in-out infinite alternate;
}
@keyframes iam-home-luci {
	to { transform: translate3d(6%, 4%, 0) scale(1.12); }
}

.iam-home-hero__inner {
	display: grid;
	align-items: center;
	min-height: calc(100vh - var(--iam-header-h));
	min-height: calc(100svh - var(--iam-header-h));
	padding-block: clamp(2.5rem, 6vh, 5rem) clamp(4.5rem, 3rem + 5vw, 7rem);
}
.iam-home-hero--foto .iam-home-hero__inner {
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	column-gap: clamp(1.5rem, 3vw, 3rem);
	padding-bottom: 0;
}
.iam-home-hero--foto .iam-home-hero__testo { position: relative; z-index: 2; padding-bottom: clamp(5rem, 4rem + 4vw, 8rem); } /* davanti al fondo bianco della foto */

.iam-home-novita {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	margin-bottom: clamp(1.25rem, 1rem + 1.5vw, 2rem);
	padding: .55rem 1.1rem .55rem .9rem;
	border: 1px solid rgb(12 12 12 / .12);
	border-radius: 999px;
	background: rgb(255 255 255 / .7);
	color: var(--home-nero);
	font-size: .95rem;
	text-decoration: none;
	transition: border-color .2s var(--iam-ease), background-color .2s var(--iam-ease);
	animation: iam-home-entra .9s var(--iam-ease) both;
}
.iam-home-novita:hover { border-color: var(--home-nero); background: #fff; }
.iam-home-novita strong { font-family: var(--home-font); font-weight: 700; }
.iam-home-novita__punto {
	width: .6rem;
	height: .6rem;
	border-radius: 50%;
	background: var(--home-verde);
	box-shadow: 0 0 0 0 rgb(0 160 130 / .6);
	animation: iam-home-pulsa 1.8s ease-out infinite;
}
@keyframes iam-home-pulsa {
	to { box-shadow: 0 0 0 .7rem rgb(0 160 130 / 0); }
}

.iam-home-hero__nome {
	margin: 0 0 0 -.06em;
	font-family: var(--home-font);
	font-weight: 700;
	font-size: clamp(5rem, 1rem + 20vw, 20rem);
	line-height: .8;
	letter-spacing: -.05em;
	text-transform: uppercase;
	animation: iam-home-entra 1s .08s var(--iam-ease) both;
}
.iam-home-hero--foto .iam-home-hero__nome { font-size: clamp(5rem, 1rem + 22vw, 13.5rem); }

.iam-home-hero__intro {
	max-width: 34rem;
	margin: clamp(1.5rem, 1rem + 1.5vw, 2.25rem) 0 0;
	font-size: clamp(1.1rem, 1rem + .55vw, 1.4rem);
	line-height: 1.5;
	color: #3d3d3a;
	text-wrap: pretty;
	animation: iam-home-entra 1s .16s var(--iam-ease) both;
}
.iam-home-hero__intro strong { color: var(--home-nero); font-weight: 700; }
.iam-home-azioni {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin-top: 2rem;
	animation: iam-home-entra 1s .24s var(--iam-ease) both;
}

.iam-home-hero__foto {
	align-self: end;
	width: 122%;
	margin: 0 -14% 0 -8%;
	animation: iam-home-entra 1.2s .12s var(--iam-ease) both;
}
.iam-home-hero__foto img {
	width: 100%;
	height: auto;
	/* Il fondo della foto è 254, la pagina 255: senza questo si intravede il riquadro. */
	filter: brightness(1.025);
	/* Il fondo della foto è bianco: in basso il corpo arriva al bordo, si sfuma nella pagina. */
	-webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 99%);
	mask-image: linear-gradient(to bottom, #000 78%, transparent 99%);
}

@keyframes iam-home-entra {
	from { opacity: 0; transform: translateY(1.5rem); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 899px) {
	.iam-home-hero--foto .iam-home-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		padding-top: 1rem;
	}
	.iam-home-hero__foto {
		order: -1;
		justify-self: center;
		width: min(92%, 28rem);
		margin: 0 0 -1rem;
	}
	.iam-home-hero--foto .iam-home-hero__nome { font-size: clamp(5rem, 30vw, 10rem); }
	.iam-home-hero--foto .iam-home-hero__testo { position: relative; padding-bottom: 5rem; }
	.iam-home-hero__luci { inset: 30% -20% 0 -30%; }
}

/* ---------- Nastro ---------- */
.iam-home-nastro {
	position: relative;
	z-index: 2;
	margin: -2.5rem -3vw 0;
	padding-block: 1.1rem;
	background: var(--home-giallo);
	color: var(--home-nero);
	transform: rotate(-2.5deg);
	box-shadow: 0 18px 40px -20px rgb(0 0 0 / .45);
	overflow: hidden;
}
.iam-home-nastro__traccia {
	display: flex;
	width: max-content;
	animation: iam-home-scorri 32s linear infinite;
}
.iam-home-nastro__giro {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	padding-right: 1.75rem;
	font-family: var(--home-font);
	font-weight: 700;
	font-size: clamp(1.4rem, 1rem + 2vw, 2.5rem);
	line-height: 1;
	letter-spacing: -.02em;
	text-transform: uppercase;
	white-space: nowrap;
}
.iam-home-nastro__stella { color: var(--home-verde); }
@keyframes iam-home-scorri {
	to { transform: translateX(-50%); }
}

/* ---------- Singolo in evidenza ---------- */
.iam-home-singolo {
	margin-top: -2rem;
	padding-block: clamp(6rem, 4rem + 8vw, 10rem) clamp(4.5rem, 3rem + 6vw, 8rem);
	background: var(--brano-bg, var(--home-giallo));
	color: var(--home-nero);
}
.iam-home-singolo__inner {
	display: grid;
	align-items: center;
	gap: clamp(3rem, 2rem + 4vw, 6rem);
}
@media (min-width: 900px) {
	.iam-home-singolo__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

.iam-home-singolo__cover {
	position: relative;
	width: 100%;
	max-width: 520px;
	margin: 0 auto;
}
.iam-home-singolo__cover a { display: block; }
.iam-home-singolo__cover img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--home-r);
	box-shadow: 0 2px 4px rgb(0 0 0 / .06), 0 36px 70px -28px rgb(0 0 0 / .45);
	transform: rotate(-3deg);
	transition: transform .6s var(--iam-ease);
}
.iam-home-singolo__cover:hover img { transform: rotate(0deg) scale(1.015); }

.iam-home-bollino {
	position: absolute;
	top: -2.25rem;
	right: -1.25rem;
	display: grid;
	place-items: center;
	width: clamp(7rem, 5rem + 6vw, 9.5rem);
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--brano-accent, var(--home-verde));
	color: #fff;
	box-shadow: 0 14px 30px -12px rgb(0 0 0 / .45);
	pointer-events: none;
}
.iam-home-bollino svg:first-child {
	grid-area: 1 / 1;
	width: 100%;
	height: 100%;
	animation: iam-home-gira 18s linear infinite;
}
.iam-home-bollino text {
	fill: currentColor;
	font-family: var(--home-font);
	font-weight: 500;
	font-size: 11.5px;
	letter-spacing: .5px;
}
.iam-home-bollino__lucchetto { grid-area: 1 / 1; width: 30%; height: auto; }
@keyframes iam-home-gira {
	to { transform: rotate(360deg); }
}
@media (max-width: 600px) {
	.iam-home-bollino { top: -1.75rem; right: -.5rem; }
}

.iam-home-singolo__titolo {
	margin: 0 0 1.25rem;
	font-family: var(--home-font);
	font-weight: 700;
	font-size: clamp(3rem, 1.5rem + 5.5vw, 6.25rem);
	line-height: .9;
	letter-spacing: -.035em;
}
.iam-home-singolo__descrizione {
	max-width: 30rem;
	margin: 0 0 2rem;
	font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem);
	line-height: 1.5;
}
.iam-home-singolo .iam-home-occhiello { opacity: .75; }
.iam-home-singolo__azioni { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- La parte Glovo (nastro e singolo) tiene il carattere della pagina /glovo ---------- */
.iam-home-nastro,
.iam-home-singolo {
	--home-font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", Quicksand, Nunito, "Arial Rounded MT Bold", "Arial Rounded MT", system-ui, sans-serif;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.iam-home-nastro .iam-home-nastro__giro,
.iam-home-singolo .iam-home-singolo__titolo { font-weight: 900; }
.iam-home-singolo .iam-home-singolo__titolo { letter-spacing: -.045em; }
.iam-home-singolo .iam-home-occhiello,
.iam-home-singolo .iam-home-btn,
.iam-home-singolo .iam-home-bollino text { font-weight: 800; }

/* ---------- Instagram ---------- */
.iam-home-ig {
	padding-block: clamp(4.5rem, 3rem + 6vw, 8rem);
	background: #fff;
	color: var(--home-nero);
}
.iam-home-ig__embed {
	position: relative;
	height: 560px; /* corretta da instagram.js */
	overflow: hidden;
	border-radius: var(--home-r);
	background: #fafafa;
	box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 30px 60px -30px rgb(0 0 0 / .35);
}
.iam-home-ig__embed iframe { display: block; width: 100%; height: 2400px; border: 0; }

/* ---------- Piattaforme ---------- */
.iam-home-ascolta {
	padding-block: clamp(4.5rem, 3rem + 6vw, 8rem);
	background: var(--home-nero);
	color: #fff;
}
.iam-home-ascolta :focus-visible { outline-color: var(--home-giallo); }
.iam-home-piattaforme {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1rem;
}
.iam-home-piattaforma {
	--iam-icona-fondo: var(--home-nero-2);
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 1rem;
	min-height: 15rem;
	padding: 1.75rem;
	border-radius: var(--home-r);
	background: var(--home-nero-2);
	color: #fff;
	text-decoration: none;
	transition: background-color .3s var(--iam-ease), color .3s var(--iam-ease), transform .3s var(--iam-ease);
}
.iam-home-piattaforma__icona { color: var(--iam-p); transition: color .3s var(--iam-ease); }
.iam-home-piattaforma__icona svg { width: 3.25rem; height: 3.25rem; }
.iam-home-piattaforma__nome {
	align-self: end;
	font-family: var(--home-font);
	font-weight: 700;
	font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.4rem);
	line-height: 1;
	letter-spacing: -.03em;
}
.iam-home-piattaforma__vai { font-weight: 500; opacity: .7; }
.iam-home-piattaforma:hover {
	--iam-icona-fondo: var(--iam-p);
	background: var(--iam-p);
	color: var(--iam-p-testo);
	transform: translateY(-4px);
}
.iam-home-piattaforma:hover .iam-home-piattaforma__icona { color: var(--iam-p-testo); }

/* Il piè di pagina continua il nero della sezione sopra */
.home .iam-footer { --iam-ink: var(--home-nero); border-top: 1px solid rgb(255 255 255 / .08); }

/* ---------- Entrata in scena allo scorrimento (home.js) ---------- */
.iam-js [data-rivela] {
	opacity: 0;
	transform: translateY(2rem);
	transition: opacity .9s var(--iam-ease), transform .9s var(--iam-ease);
}
.iam-js [data-rivela].is-visibile { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.iam-js [data-rivela] { opacity: 1; transform: none; }
	.iam-home-nastro__traccia,
	.iam-home-hero__luci,
	.iam-home-bollino svg:first-child { animation: none; }
}
