/* ==========================================================================
   LXC Motion — start states and interaction styles
   Hidden states apply ONLY under html.lxc-js (set in <head> by the boot
   script, removed after 3s if lxc-motion.js never starts). With reduced
   motion the boot sets html.lxc-rm instead and nothing here hides content.
   ========================================================================== */

:root {
	--lxc-ease-move: cubic-bezier(0.77, 0, 0.175, 1);
	--lxc-ease-arrive: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Lenis ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Scrollbar hidden while smooth scroll is active */
html.lxc-js { scrollbar-width: none; }
html.lxc-js::-webkit-scrollbar { display: none; }

/* ---------- Intro: cover until the JS overlay is built ---------- */
html.lxc-intro-pending body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 10000;
	background-color: var(--lxc-ink, #1c1c1c);
}
.lxc-intro {
	position: fixed;
	inset: 0;
	z-index: 10001;
	pointer-events: auto;
	color: var(--lxc-paper, #fff);
}
.lxc-intro__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50.5%; /* slight overlap: no seam in the middle */
	display: flex;
	align-items: center;
	background-color: var(--lxc-ink, #1c1c1c);
	will-change: transform;
}
.lxc-intro__panel--l { left: 0; justify-content: flex-end; padding-right: calc(0.5% + 40px); }
.lxc-intro__panel--r { right: 0; justify-content: flex-start; padding-left: calc(0.5% + 40px); }
.lxc-intro__mask { display: block; overflow: hidden; padding: 0.15em 0; }
.lxc-intro__word { display: block; will-change: transform; }
.lxc-intro__mark { width: 118px; height: 40px; color: var(--lxc-paper, #fff); }
.lxc-intro__mark svg { display: block; width: 100%; height: 100%; }
.lxc-intro__label {
	font-family: var(--lxc-font-logo), sans-serif;
	font-weight: 300;
	font-size: 1.25rem;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	white-space: nowrap;
}
.lxc-intro__label strong { font-weight: 700; }
.lxc-intro__line {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 1px;
	height: 120px;
	margin: -60px 0 0 -0.5px;
	background-color: rgba(255, 255, 255, 0.6);
	transform: scaleY(0);
	transform-origin: 50% 50%;
	z-index: 2;
}

/* ---------- Text split (pattern 1 / 8) ---------- */
.lxc-split__mask {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	/* room for accents and descenders: masks never cut the glyphs */
	padding: 0.08em 0 0.14em;
	margin: -0.08em 0 -0.14em;
}
.lxc-split__word { display: inline-block; will-change: transform; }
.lxc-split__wordwrap { display: inline-block; white-space: nowrap; }
.lxc-split__char { display: inline; }

/* ---------- Start states (JS running) ---------- */
/* Titles: hidden until split into masked words */
html.lxc-js .lxc-h2:not(.lxc-about__title),
html.lxc-js .lxc-hero__slide--active .lxc-hero__title,
html.lxc-js .lxc-destinations__banner-title { visibility: hidden; }

/* Small texts: fade + 16px rise (pattern 2) */
html.lxc-js .lxc-hero__slide--active .lxc-hero__eyebrow,
html.lxc-js .lxc-hero__slide--active .lxc-hero__lead,
html.lxc-js .lxc-hero__slide--active .lxc-hero__actions,
html.lxc-js .lxc-section-head > .lxc-text,
html.lxc-js .lxc-section__head-action,
html.lxc-js .lxc-about__text,
html.lxc-js .lxc-about__metric,
html.lxc-js .lxc-about__brand-logo,
html.lxc-js .lxc-steps__card,
html.lxc-js .lxc-contact__card,
html.lxc-js .lxc-destinations__banner-text,
html.lxc-js .lxc-destinations__banner-btn,
html.lxc-js .lxc-destinations__link,
html.lxc-js .lxc-cta__actions,
html.lxc-js .lxc-footer__brand,
html.lxc-js .lxc-footer__col,
html.lxc-js .lxc-footer__bottom > * {
	opacity: 0;
	transform: translateY(16px);
}

/* Labels: fade only (pattern 4) */
html.lxc-js .lxc-section-head > .lxc-eyebrow,
html.lxc-js .lxc-about__brands-label,
html.lxc-js .lxc-destinations__banner-eyebrow,
html.lxc-js .lxc-hero__controls-wrap,
html.lxc-js .lxc-header__logo,
html.lxc-js .lxc-nav__item { opacity: 0; }

/* Photo reveal (pattern 3) */
html.lxc-js .lxc-models__card[data-page="1"] .lxc-models__media,
html.lxc-js .lxc-fleet__media,
html.lxc-js .lxc-steps__number { clip-path: inset(100% 0 0 0); }

/* Hairlines drawn from the left / top (pattern 4).
   The original border becomes transparent and a 1px pseudo line takes its
   place, scaled by --lxc-line (0 → 1) — same position, no layout change. */
html.lxc-js .lxc-about__metrics,
html.lxc-js .lxc-footer__bottom { position: relative; border-top-color: transparent; --lxc-line: 0; }
html.lxc-js .lxc-about__metrics::before,
html.lxc-js .lxc-footer__bottom::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -1px;
	height: 1px;
	background-color: var(--lxc-hairline);
	transform: scaleX(var(--lxc-line));
	transform-origin: 0 50%;
	pointer-events: none;
}
html.lxc-js .lxc-footer__bottom::before { background-color: var(--lxc-paper); }
html.lxc-js .lxc-about__brand { position: relative; border-left-color: transparent; --lxc-line: 0; }
html.lxc-js .lxc-about__brand:not(:first-child)::before {
	content: "";
	position: absolute;
	left: -1px;
	top: 0;
	bottom: 0;
	width: 1px;
	background-color: var(--lxc-hairline);
	transform: scaleY(var(--lxc-line));
	transform-origin: 50% 0;
	pointer-events: none;
}

/* ---------- Hero helpers ---------- */
.lxc-hero__zoom { position: absolute; inset: 0; will-change: transform; }
.lxc-hero__dot { transition: width 0.9s var(--lxc-ease-move), background-color 0.9s var(--lxc-ease-move); }

/* ---------- Navigation states (pattern 11) ----------
   The static gradient on .lxc-header stays as the no-JS fallback; with JS it
   moves to ::before so it can fade, and ::after is the solid band. */
html.lxc-js .lxc-header { background-image: none; }
html.lxc-js .lxc-header::before,
html.lxc-js .lxc-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	z-index: -1;
	pointer-events: none;
	transition: opacity 0.7s var(--lxc-ease-move), background-color 0.7s var(--lxc-ease-move);
}
html.lxc-js .lxc-header::before {
	bottom: 0;
	background-image: linear-gradient(to bottom, rgba(28,28,28,0.75) 0%, rgba(28,28,28,0.45) 55%, rgba(28,28,28,0) 100%);
}
html.lxc-js .lxc-header::after {
	height: 80px;
	background-color: var(--lxc-band, transparent);
	opacity: 0;
}
html.lxc-js .lxc-header--band::before { opacity: 0; }
html.lxc-js .lxc-header--band::after { opacity: 1; }

.lxc-header__logo,
.lxc-header__logo-text,
.lxc-header__logo-mark,
.lxc-nav__link {
	transition: color 0.6s var(--lxc-ease-move), border-color 0.6s var(--lxc-ease-move);
	transition-delay: var(--lxc-nav-delay, 0s);
}
html.lxc-js .lxc-header--ink .lxc-header__logo,
html.lxc-js .lxc-header--ink .lxc-header__logo-text,
html.lxc-js .lxc-header--ink .lxc-header__logo-mark,
html.lxc-js .lxc-header--ink .lxc-nav__link { color: var(--lxc-ink); }
html.lxc-js .lxc-header--ink .lxc-nav__link--cta { border-color: var(--lxc-ink); }

/* ---------- Keyboard focus: always visible ---------- */
.lxc-header a:focus-visible,
.lxc-hero a:focus-visible,
.lxc-hero button:focus-visible,
.lxc-section a:focus-visible,
.lxc-section button:focus-visible,
.lxc-footer a:focus-visible {
	outline: 2px solid var(--lxc-brand);
	outline-offset: 3px;
}
.lxc-hero a:focus-visible,
.lxc-hero button:focus-visible,
.lxc-header a:focus-visible,
.lxc-footer a:focus-visible { outline-color: currentColor; }

/* ---------- Hover (pattern 12) — only real pointers ---------- */
@media (hover: hover) and (pointer: fine) {
	.lxc-fleet__card,
	.lxc-models__card,
	.lxc-destinations__card,
	.lxc-experiences__card {
		translate: 0 0;
		transition: translate 0.9s var(--lxc-ease-arrive);
	}
	.lxc-fleet__card .lxc-media__img,
	.lxc-models__card .lxc-media__img,
	.lxc-destinations__card .lxc-media__img,
	.lxc-experiences__card .lxc-media__img {
		scale: 1;
		transition: scale 1.2s var(--lxc-ease-arrive);
	}
	.lxc-fleet__card:hover,
	.lxc-models__card:hover,
	.lxc-destinations__card:hover,
	.lxc-experiences__card:hover { translate: 0 -12px; }
	.lxc-fleet__card:hover .lxc-media__img,
	.lxc-models__card:hover .lxc-media__img,
	.lxc-destinations__card:hover .lxc-media__img,
	.lxc-experiences__card:hover .lxc-media__img { scale: 1.04; }

	/* Underline drawn from the left, 1px */
	.lxc-link-arrow { text-decoration: none; }
	.lxc-link-arrow__label,
	.lxc-request-bar__label,
	.lxc-nav__link:not(.lxc-nav__link--cta),
	.lxc-footer__link {
		background-image: linear-gradient(currentColor, currentColor);
		background-repeat: no-repeat;
		background-position: 0 100%;
		background-size: 0% 1px;
		transition: background-size 0.7s var(--lxc-ease-move), color 0.6s var(--lxc-ease-move);
		padding-bottom: 2px;
		margin-bottom: -2px;
	}
	/* Menu: the line enters from the left and leaves to the right */
	.lxc-nav__link:not(.lxc-nav__link--cta) { background-position: 100% 100%; }
	.lxc-nav__link:not(.lxc-nav__link--cta):hover { background-position: 0 100%; }

	/* Menu "Contatti": white background, brand text */
	.lxc-nav__link--cta { transition: color 0.5s var(--lxc-ease-move), background-color 0.5s var(--lxc-ease-move), border-color 0.5s var(--lxc-ease-move); }
	html .lxc-header .lxc-nav__link--cta:hover {
		background-color: var(--lxc-paper);
		border-color: var(--lxc-paper);
		color: var(--lxc-brand);
		transition-delay: 0s;
	}
	html.lxc-js .lxc-header--ink .lxc-nav__link--cta:hover { border-color: var(--lxc-brand); }

	/* Arrows: hero (on photo) → white background, brand icon;
	   models (on paper) → brand background, white icon */
	.lxc-hero__arrow,
	.lxc-hero__arrow-icon,
	.lxc-icon-btn { transition: color 0.5s var(--lxc-ease-move), background-color 0.5s var(--lxc-ease-move), border-color 0.5s var(--lxc-ease-move); }
	.lxc-hero__arrow:hover { background-color: var(--lxc-paper); color: var(--lxc-brand); }
	.lxc-hero__arrow:hover .lxc-hero__arrow-icon { color: var(--lxc-brand); }
	.lxc-icon-btn:hover { background-color: var(--lxc-brand); color: var(--lxc-paper); }

	/* Buttons */
	.lxc-btn { transition: color 0.5s var(--lxc-ease-move), background-color 0.5s var(--lxc-ease-move), border-color 0.5s var(--lxc-ease-move); }
	.lxc-btn--primary:hover {
		background-color: color-mix(in srgb, var(--lxc-brand) 86%, #000);
		border-color: color-mix(in srgb, var(--lxc-brand) 86%, #000);
	}
	.lxc-btn--secondary:hover,
	.lxc-btn--on-dark:hover,
	.lxc-btn--ghost:hover {
		background-color: var(--lxc-brand);
		border-color: var(--lxc-brand);
		color: var(--lxc-paper);
	}
	.lxc-btn--on-dark-outline:hover {
		background-color: var(--lxc-paper);
		color: var(--lxc-brand);
	}

	.lxc-link-arrow__label { background-size: 100% 1px; }
	.lxc-link-arrow:hover .lxc-link-arrow__label { animation: lxc-redraw 0.9s var(--lxc-ease-move); }
	.lxc-request-bar:hover .lxc-request-bar__label,
	.lxc-nav__link:hover,
	.lxc-footer__link:hover { background-size: 100% 1px; }

	.lxc-arrow { transition: translate 0.6s var(--lxc-ease-arrive); }
	.lxc-link-arrow:hover .lxc-arrow,
	.lxc-request-bar:hover .lxc-arrow { translate: 4px 0; }

	html.lxc-rm .lxc-card:hover { translate: 0 0; }
	html.lxc-rm .lxc-card:hover .lxc-media__img { scale: 1; }
}
@keyframes lxc-redraw {
	0% { background-size: 0% 1px; }
	100% { background-size: 100% 1px; }
}

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
	/* Solid nav band follows the shorter phone header */
	html.lxc-js .lxc-header::after { height: 64px; }

	/* Intro: mark and label fit half a phone screen each */
	.lxc-intro__panel--l { padding-right: calc(0.5% + 14px); }
	.lxc-intro__panel--r { padding-left: calc(0.5% + 14px); }
	.lxc-intro__mark { width: 72px; height: 24px; }
	.lxc-intro__label { font-size: 0.75rem; letter-spacing: 0.12em; white-space: normal; max-width: 7.5em; line-height: 1.35; }
	.lxc-intro__line { height: 72px; margin-top: -36px; }
}
