:root {
	--gold: #c6a36d;
	--white-60: rgba(255, 255, 255, 0.6);
	--white-50: rgba(255, 255, 255, 0.5);
	--white-30: rgba(255, 255, 255, 0.3);
	--ink: #0e0c0a;
	--serif: 'Playfair Display', Georgia, serif;
	--sans: 'Montserrat', Arial, sans-serif;
	--body: 'Roboto', Arial, sans-serif;
	--side-x: 90px;
}

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

html, body {
	margin: 0;
	height: 100%;
	overflow: hidden;
	background: var(--ink);
	color: #fff;
	-webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

.has-cursor, .has-cursor * { cursor: none !important; }

/* ---------- palcoscenico e sfondo ---------- */
.stage {
	position: fixed;
	inset: 0;
	overflow: hidden;
	user-select: none;
}

.bg, .bg-fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.bg-fallback { overflow: hidden; }
.bg-layer {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	filter: brightness(0.5) sepia(0.35);
	transform: scale(1.2);
}

/* ---------- testata ---------- */
.top {
	position: absolute;
	top: 34px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	z-index: 3;
}

.logo { color: var(--gold); display: block; width: 44px; height: 44px; }
.logo svg { width: 100%; height: 100%; }

.brand {
	margin-top: 10px;
	font-family: var(--serif);
	font-size: 20px;
	letter-spacing: 6px;
	text-transform: uppercase;
	color: #fff;
}

.tagline {
	margin-top: 4px;
	font-family: var(--sans);
	font-size: 9px;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--white-50);
}

.counter {
	position: relative;
	width: 46px;
	height: 46px;
	margin-top: 18px;
	font-family: var(--body);
	font-weight: 300;
	font-size: 15px;
	color: var(--white-50);
}

.counter-mask {
	position: absolute;
	overflow: hidden;
	line-height: 1;
	padding: 2px 1px;
}
.counter-mask--cur { top: 0; left: 0; }
.counter-mask--tot { bottom: 0; right: 0; }
.counter .ch { display: inline-block; transform-origin: 0 100%; }

.counter-sep {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 34px;
	height: 1px;
	margin-left: -17px;
	background: var(--white-50);
	rotate: -55deg;
}

/* ---------- pulsante menu ---------- */
.menu-btn {
	position: fixed;
	top: 40px;
	right: var(--side-x);
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--sans);
	font-size: 11px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: #fff;
	transition: color 0.3s;
}
.menu-btn:hover { color: var(--gold); }
.menu-btn-lines { display: grid; gap: 6px; width: 26px; }
.menu-btn-lines i { display: block; height: 1px; background: currentColor; transition: transform 0.4s, width 0.4s; }
.menu-btn-lines i:last-child { width: 60%; margin-left: auto; }
.menu-btn[aria-expanded="true"] .menu-btn-lines i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-lines i:last-child { width: 100%; transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- contenuto centrale ---------- */
.center {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(620px, calc(100% - 48px));
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	z-index: 2;
	pointer-events: none;
}
.center a { pointer-events: auto; }

.caption {
	margin: 0;
	font-family: var(--sans);
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--gold);
}

.title {
	margin: 8px 0 0;
	font-family: var(--serif);
	font-weight: 700;
	font-size: 145px;
	line-height: 1.05;
	color: var(--white-60);
	white-space: nowrap;
	perspective: 600px;
}
.title .ch {
	display: inline-block;
	transform-origin: 50% 50% -0.25em;
	backface-visibility: hidden;
}

.text {
	margin: 18px 0 0;
	font-family: var(--body);
	font-weight: 300;
	font-size: 18px;
	line-height: 1.6;
	color: var(--white-60);
}

.cta {
	margin-top: 38px;
	padding-bottom: 6px;
	font-family: var(--sans);
	font-weight: 500;
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	border-bottom: 1px solid var(--white-30);
	transition: color 0.3s, border-color 0.3s;
}
.cta:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- precedente / successivo ---------- */
.side {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	gap: 36px;
	z-index: 3;
}
.side--prev { left: var(--side-x); }
.side--next { right: var(--side-x); }

.side-label {
	font-family: var(--serif);
	font-weight: 700;
	font-size: 30px;
	color: var(--white-60);
	transition: color 0.3s;
	white-space: nowrap;
}
.side-label:hover { color: #fff; }

.side-line-mask { display: block; overflow: hidden; width: 14vw; height: 1px; }
.side-line { display: block; width: 100%; height: 100%; background: var(--white-30); }

/* ---------- social ---------- */
.social {
	position: absolute;
	bottom: 36px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 22px;
	z-index: 3;
}
.social a { display: block; width: 16px; height: 16px; color: var(--white-60); transition: color 0.3s; }
.social a:hover { color: var(--gold); }
.social svg { width: 100%; height: 100%; }

/* ---------- menu a tutto schermo ---------- */
.menu {
	position: fixed;
	inset: 0;
	z-index: 15;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(14, 12, 10, 0.94);
	backdrop-filter: blur(6px);
	clip-path: inset(0 0 100% 0);
	pointer-events: none;
}
.menu.is-open { pointer-events: auto; }

.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu-list li { overflow: hidden; }

.menu-item {
	display: flex;
	align-items: baseline;
	gap: 22px;
	text-decoration: none;
	color: var(--white-50);
	transition: color 0.3s;
}
.menu-item:hover, .menu-item.is-active { color: #fff; }
.menu-num { font-family: var(--sans); font-size: 12px; letter-spacing: 2px; color: var(--gold); }
.menu-label { font-family: var(--serif); font-weight: 700; font-size: clamp(36px, 6vh, 64px); line-height: 1.15; }

/* ---------- cursore ---------- */
.cursor {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 30;
	pointer-events: none;
	display: none;
	opacity: 0;
	transition: opacity 0.3s;
}
.has-cursor .cursor { display: block; }
.cursor.is-visible { opacity: 1; }

.cursor-ring {
	position: absolute;
	left: -32px;
	top: -32px;
	width: 64px;
	height: 64px;
	border: 1px solid var(--white-50);
	border-radius: 50%;
	transform: scale(0.35);
	transition: transform 0.5s cubic-bezier(.16, 1, .3, 1), border-color 0.3s, background-color 0.3s;
}
.cursor.is-left .cursor-ring,
.cursor.is-right .cursor-ring { transform: scale(1); border-color: var(--gold); }
.cursor.is-link .cursor-ring { transform: scale(0.7); background: rgba(198, 163, 109, 0.15); border-color: var(--gold); }

.cursor-arrow {
	position: absolute;
	top: -6px;
	width: 32px;
	height: 12px;
	color: var(--gold);
	opacity: 0;
	transition: opacity 0.4s, transform 0.7s cubic-bezier(.16, 1, .3, 1);
}
.cursor-arrow--left { left: -16px; transform: translateX(30px); }
.cursor-arrow--right { left: -16px; transform: translateX(-30px); }
.cursor.is-left .cursor-arrow--left,
.cursor.is-right .cursor-arrow--right { opacity: 1; transform: translateX(0); }

/* ---------- caricamento ---------- */
.loader {
	position: fixed;
	inset: 0;
	z-index: 40;
	display: grid;
	place-items: center;
	background: var(--ink);
}
.loader-bar {
	width: 160px;
	height: 1px;
	background: var(--gold);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
	:root { --side-x: 60px; }
	.title { font-size: 120px; }
	.side-line-mask { width: 8vw; }
}

@media (max-width: 1024px) {
	:root { --side-x: 40px; }
	.title { font-size: 100px; }
	.side-label { font-size: 24px; }
	.side-line-mask { display: none; }
}

@media (max-width: 767px) {
	:root { --side-x: 24px; }
	.top { top: 22px; }
	.logo { width: 36px; height: 36px; }
	.brand { font-size: 16px; letter-spacing: 4px; }
	.counter { margin-top: 12px; transform: scale(0.85); }
	.menu-btn { top: 26px; }
	.menu-btn-text { display: none; }
	.title { font-size: 70px; }
	.text { font-size: 16px; }
	.cta { margin-top: 28px; }
	.side { top: auto; bottom: 84px; transform: none; }
	.side-label {
		font-family: var(--sans);
		font-weight: 500;
		font-size: 11px;
		letter-spacing: 2px;
		text-transform: uppercase;
	}
	.side--prev .side-label::before { content: '← '; color: var(--gold); }
	.side--next .side-label::after { content: ' →'; color: var(--gold); }
	.social { bottom: 28px; }
}

@media (max-height: 640px) and (min-width: 768px) {
	.text { display: none; }
	.counter { display: none; }
}
