/**
 * Backlot — Global shell (Brief C5 M1)
 *
 * Header sticky, footer, user dropdown, mobile drawer, logo.
 * + immersive stage background riempimento (applicato alle pagine immersive).
 */

/* ============================================================
   1. LOGO
   ============================================================ */
.bkl-logo {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	text-decoration: none;
	user-select: none;
	color: inherit;
}
.bkl-logo__mark {
	font-family: var(--backlot-font-serif, 'Cormorant Garamond', Georgia, serif);
	font-style: italic;
	font-weight: 600;
	font-size: 28px;
	line-height: 1;
	color: var(--backlot-gold-soft, #F5C66B);
	letter-spacing: -0.01em;
}
.bkl-logo__sub {
	font-family: var(--backlot-font-mono, 'JetBrains Mono', 'Geist Mono', monospace);
	font-size: 10px;
	font-weight: 500;
	color: var(--backlot-text-muted, #8C7E70);
	letter-spacing: 0.2em;
	text-transform: uppercase;
}
.bkl-logo--small .bkl-logo__mark { font-size: 22px; }
.bkl-logo--small .bkl-logo__sub  { font-size: 9px; letter-spacing: 0.18em; }

/* ============================================================
   2. HEADER
   ============================================================ */
.bkl-header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: 68px;
	background: rgba(11, 9, 8, 0.85);
	backdrop-filter: blur(20px) saturate(1.2);
	-webkit-backdrop-filter: blur(20px) saturate(1.2);
	border-bottom: 1px solid rgba(245, 198, 107, 0.2);
}
.bkl-header__inner {
	height: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.bkl-header__left,
.bkl-header__right {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}
.bkl-header__nav {
	display: flex;
	align-items: center;
	gap: 28px;
	flex: 1 1 auto;
	justify-content: center;
}
.bkl-header__nav-link {
	font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--backlot-text-secondary, #C8BFB3);
	text-decoration: none;
	padding: 6px 4px;
	border-bottom: 2px solid transparent;
	transition: color 180ms, border-color 180ms;
}
.bkl-header__nav-link:hover,
.bkl-header__nav-link:focus-visible {
	color: var(--backlot-gold-soft, #F5C66B);
	border-bottom-color: rgba(245, 198, 107, 0.5);
	outline: none;
}
.bkl-header__login {
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #0B0908;
	background: linear-gradient(135deg, #F5C66B 0%, #C9A84C 55%, #9B7A2E 100%);
	padding: 8px 18px;
	border-radius: 999px;
	text-decoration: none;
	border: none;
	transition: box-shadow 180ms, transform 180ms;
}
.bkl-header__login:hover,
.bkl-header__login:focus-visible {
	box-shadow: 0 0 22px rgba(245, 198, 107, 0.5);
	transform: translateY(-1px);
	outline: none;
}

/* ============================================================
   3. USER MENU dropdown (desktop)
   ============================================================ */
.bkl-user-menu__toggle {
	width: 40px; height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #C9A84C 0%, #9B7A2E 100%);
	border: 1.5px solid rgba(245, 198, 107, 0.55);
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: box-shadow 180ms, transform 180ms;
}
.bkl-user-menu__toggle:hover,
.bkl-user-menu__toggle:focus-visible {
	box-shadow: 0 0 18px rgba(245, 198, 107, 0.4);
	outline: none;
}
.bkl-user-menu__avatar {
	font-family: 'Geist', system-ui, sans-serif;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.02em;
	color: #0B0908;
}
.bkl-user-menu {
	position: absolute;
	top: 58px;
	right: 24px;
	min-width: 240px;
	background: rgba(14, 11, 9, 0.96);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(245, 198, 107, 0.3);
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
	padding: 12px 0;
	z-index: 101;
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: opacity 180ms, transform 180ms;
}
.bkl-user-menu:not([hidden]) {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.bkl-user-menu[hidden] { display: block; }  /* overriding default hidden=none */
.bkl-user-menu__header {
	padding: 8px 16px 12px;
	border-bottom: 1px solid rgba(245, 198, 107, 0.15);
}
.bkl-user-menu__name {
	margin: 0;
	font-family: 'Geist', system-ui, sans-serif;
	font-weight: 700;
	font-size: 14px;
	color: var(--backlot-gold-soft, #F5C66B);
	line-height: 1.2;
}
.bkl-user-menu__email {
	margin: 2px 0 0;
	font-family: 'Geist', system-ui, sans-serif;
	font-weight: 400;
	font-size: 11px;
	color: var(--backlot-text-muted, #8C7E70);
	line-height: 1.3;
}
.bkl-user-menu__code {
	margin: 8px 0 0;
	font-family: var(--backlot-font-mono, 'JetBrains Mono', monospace);
	font-size: 11px;
	letter-spacing: 0.08em;
	color: var(--backlot-gold-soft, #F5C66B);
	opacity: 0.8;
}
.bkl-user-menu__list {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
}
.bkl-user-menu__list a {
	display: block;
	padding: 10px 16px;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 13px;
	color: var(--backlot-text, #E8E2D8);
	text-decoration: none;
	transition: background 160ms, color 160ms;
}
.bkl-user-menu__list a:hover,
.bkl-user-menu__list a:focus-visible {
	background: rgba(245, 198, 107, 0.08);
	color: var(--backlot-gold-soft, #F5C66B);
	outline: none;
}

/* ============================================================
   4. MOBILE DRAWER + hamburger
   ============================================================ */
.bkl-drawer__toggle {
	display: none;
	width: 40px; height: 40px;
	background: transparent;
	border: 1px solid rgba(245, 198, 107, 0.3);
	border-radius: 10px;
	padding: 0;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
}
.bkl-drawer__toggle span {
	display: block;
	width: 18px;
	height: 1.5px;
	background: var(--backlot-gold-soft, #F5C66B);
	border-radius: 2px;
	transition: transform 180ms, opacity 180ms;
}

.bkl-drawer {
	position: fixed;
	inset: 0;
	z-index: 200;
	pointer-events: none;
}
.bkl-drawer:not([hidden]) { pointer-events: auto; }
.bkl-drawer[hidden] { display: block; }
.bkl-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(11, 9, 8, 0.62);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 280ms ease-out;
}
.bkl-drawer[data-open="true"] .bkl-drawer__backdrop { opacity: 1; }
.bkl-drawer__panel {
	position: absolute;
	top: 0; right: 0;
	width: 280px;
	height: 100%;
	background: rgba(11, 9, 8, 0.96);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border-left: 1px solid rgba(245, 198, 107, 0.22);
	transform: translateX(100%);
	transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	padding: 20px 22px;
}
.bkl-drawer[data-open="true"] .bkl-drawer__panel { transform: translateX(0); }
.bkl-drawer__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 24px;
}
.bkl-drawer__user {
	margin: 0;
	font-family: 'Geist', system-ui, sans-serif;
	font-weight: 700;
	font-size: 16px;
	color: var(--backlot-gold-soft, #F5C66B);
}
.bkl-drawer__code {
	margin: 2px 0 0;
	font-family: var(--backlot-font-mono, 'JetBrains Mono', monospace);
	font-size: 11px;
	letter-spacing: 0.08em;
	color: var(--backlot-text-muted, #8C7E70);
}
.bkl-drawer__close {
	background: transparent;
	border: none;
	color: var(--backlot-text-muted, #8C7E70);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}
.bkl-drawer__nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
}
.bkl-drawer__nav a {
	display: block;
	padding: 14px 8px;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: var(--backlot-text, #E8E2D8);
	text-decoration: none;
	border-bottom: 1px solid rgba(245, 198, 107, 0.08);
	transition: color 160ms;
}
.bkl-drawer__nav a:hover { color: var(--backlot-gold-soft, #F5C66B); }
.bkl-drawer__foot {
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid rgba(245, 198, 107, 0.18);
}
.bkl-drawer__logout {
	display: block;
	text-align: center;
	padding: 12px 20px;
	background: rgba(245, 198, 107, 0.08);
	color: var(--backlot-gold-soft, #F5C66B);
	border: 1px solid rgba(245, 198, 107, 0.3);
	border-radius: 999px;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
}

/* Mobile breakpoint */
@media (max-width: 900px) {
	.bkl-header { height: 56px; }
	.bkl-header__nav { display: none; }
	.bkl-user-menu__toggle { display: none; }
	.bkl-user-menu { display: none !important; }
	.bkl-drawer__toggle { display: flex; }
	.bkl-header__login { font-size: 12px; padding: 6px 14px; }
}

/* ============================================================
   5. FOOTER
   ============================================================ */
.bkl-footer {
	background: #0B0908;
	border-top: 1px solid rgba(245, 198, 107, 0.15);
	padding: 48px 24px 0;
	color: var(--backlot-text-secondary, #C8BFB3);
}
.bkl-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr;
	gap: 48px;
}
.bkl-footer__tagline {
	margin: 12px 0 0;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 13px;
	color: var(--backlot-text-muted, #8C7E70);
	line-height: 1.5;
	max-width: 280px;
}
.bkl-footer__heading {
	margin: 4px 0 14px;
	font-family: 'Geist', system-ui, sans-serif;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--backlot-gold-soft, #F5C66B);
}
.bkl-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.bkl-footer__list a {
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 13px;
	color: var(--backlot-text-secondary, #C8BFB3);
	text-decoration: none;
	transition: color 160ms;
}
.bkl-footer__list a:hover,
.bkl-footer__list a:focus-visible {
	color: var(--backlot-gold-soft, #F5C66B);
	outline: none;
}
.bkl-footer__bottom {
	max-width: 1200px;
	margin: 40px auto 0;
	padding: 20px 0;
	border-top: 1px solid rgba(245, 198, 107, 0.1);
	text-align: center;
}
.bkl-footer__bottom p {
	margin: 0;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 12px;
	color: var(--backlot-text-muted, #8C7E70);
}
@media (max-width: 900px) {
	.bkl-footer { padding: 32px 20px 0; }
	.bkl-footer__inner {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	.bkl-footer__bottom { margin-top: 28px; }
}

/* ============================================================
   6. IMMERSIVE stage background riempimento (Brief C5 1.9)
   Applicato alle pagine immersive via classe .bkl-immersive-stage
   sul root main (tornello, biglietteria, gate, park map).
   ============================================================ */
.bkl-immersive-stage {
	position: fixed;
	inset: 0;
	overflow: hidden;
	background:
		radial-gradient(circle at center,
			rgba(30, 58, 42, 0.15) 0%,
			rgba(11, 9, 8, 1) 70%),
		#0B0908;
}
.bkl-immersive-stage::before {
	content: '';
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		0deg,
		transparent 0,
		transparent 3px,
		rgba(245, 198, 107, 0.02) 3px,
		rgba(245, 198, 107, 0.02) 4px
	);
	pointer-events: none;
	z-index: 1;
}
.bkl-immersive-stage::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at center,
		transparent 40%,
		rgba(11, 9, 8, 0.4) 100%);
	pointer-events: none;
	z-index: 2;
}
/* Lo stage interno (il contenuto della pagina immersiva) si posiziona sopra i pseudo */
.bkl-immersive-stage > * {
	position: relative;
	z-index: 3;
}

/* ============================================================
   7. Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.bkl-drawer__panel,
	.bkl-drawer__backdrop,
	.bkl-user-menu,
	.bkl-header__nav-link,
	.bkl-footer__list a {
		transition: none !important;
	}
}
