/* ==========================================================================
   LQ Motion — Home "Comp 1": il sito è una composizione
   Indice: 1 Variabili · 2 Header · 3 Scene · 4 Apertura · 5 Lavori · 6 Info
           7 Fuori schermo · 8 Contatti · 9 Comparsa · 10 Timeline · 11 Mobile
   ========================================================================== */

@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* 1. Variabili */
:root {
	--lqc-head: 64px;
	--lqc-tl: 210px;
	--mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}
html.lqc-tl-min { --lqc-tl: 48px; }

body.lqc-home { background: #07070A; padding-bottom: var(--lqc-tl); }

/* 2. Header fisso, come la barra di un'app */
.lqc-home .lq-header {
	position: fixed; top: 0;
	background: rgba(7, 7, 10, .82);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-bottom: 1px solid #1E1E24;
}
.lqc-home .lq-header__inner { padding-top: 14px; padding-bottom: 14px; max-width: none; }
.lq-header__comp { font-family: var(--mono); font-size: 11px; color: #8E8E98; letter-spacing: .02em; white-space: nowrap; }
@media (max-width: 1180px) { .lq-header__comp { display: none; } }

/* 3. Scene: ogni sezione è un fotogramma del viewer */
.lqc-scene {
	position: relative; overflow: hidden;
	display: flex; align-items: center;
	min-height: calc(100vh - var(--lqc-tl));
	min-height: calc(100dvh - var(--lqc-tl));
	padding: calc(var(--lqc-head) + 48px) 0 80px;
	background: #0B0B0D;
	border-bottom: 1px solid #15151A;
}
.lqc-frame {
	position: absolute; inset: calc(var(--lqc-head) + 12px) 16px 12px; pointer-events: none; z-index: 0;
	border: 1px solid rgba(255, 255, 255, .06);
}
.lqc-frame::before, .lqc-frame::after { content: ""; position: absolute; background: rgba(255, 255, 255, .025); }
.lqc-frame::before { left: 0; right: 0; top: 50%; height: 1px; }
.lqc-frame::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.lqc-frame__name, .lqc-frame__zoom {
	position: absolute; top: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: #6E6E78;
}
.lqc-frame__name { left: 14px; }
.lqc-frame__zoom { right: 14px; }
.lqc-scene__inner { position: relative; z-index: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.lqc-scene__inner--col { display: flex; flex-direction: column; }

/* 4. Apertura */
.lqc-scene--apertura { background: var(--sky); }
.lqc-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.lqc-hero__text { flex: 1 1 560px; min-width: 0; }
.lqc-hero__title {
	margin-top: 28px; font-family: var(--font-display); font-weight: 300;
	font-size: clamp(44px, 6vw, 92px); line-height: 1.02; letter-spacing: -.035em; color: var(--text-strong);
}
.lqc-hero__lead {
	margin-top: 26px; max-width: 640px; font-family: var(--font-display); font-weight: 300;
	font-size: clamp(20px, 2vw, 28px); line-height: 1.4; letter-spacing: -.01em; color: var(--text-strong);
}
.lqc-hero__body { margin-top: 24px; max-width: 580px; color: var(--text-soft); font-size: 16px; line-height: 1.8; }
.lqc-hero__reel { flex: 0 1 400px; min-width: 240px; display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* 5. Lavori: i progetti sono clip */
.lqc-works__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px 40px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.lqc-works__intro { max-width: 560px; color: var(--text-soft); font-size: 16px; line-height: 1.75; }
.lqc-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 36px 24px; margin-top: 40px; }
.lqc-clip__link { display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
.lqc-clip__media {
	position: relative; aspect-ratio: 16 / 10; overflow: hidden;
	background: var(--surface); border: 1px solid var(--line); transition: border-color .3s ease;
}
.lqc-clip__media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 44%; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); pointer-events: none; }
.lqc-clip__img, .lqc-clip__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lqc-clip__video { opacity: 0; transition: opacity .35s ease; }
.lqc-clip__media.is-playing .lqc-clip__video { opacity: 1; }
.lqc-clip__file, .lqc-clip__year {
	position: absolute; bottom: 9px; z-index: 1; font-family: var(--mono); font-size: 10px; color: rgba(255, 255, 255, .82);
}
.lqc-clip__file { left: 11px; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lqc-clip__year { right: 11px; }
.lqc-clip__link:hover .lqc-clip__media, .lqc-clip__link:focus-visible .lqc-clip__media { border-color: var(--pink); }
.lqc-clip__head { display: flex; align-items: baseline; gap: 14px; }
.lqc-clip__num { font-family: var(--mono); font-size: 11px; color: var(--text-hint); }
.lqc-clip__title { font-family: var(--font-display); font-weight: 400; font-size: 19px; line-height: 1.3; color: var(--text-strong); }
.lqc-clip__link:hover .lqc-clip__title { color: var(--pink); }
.lqc-clip__meta { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

/* 6. Info: i paragrafi sono precomp */
.lqc-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 56px; align-items: start; }
.lqc-info__lead {
	margin-top: 22px; font-family: var(--font-display); font-weight: 300;
	font-size: clamp(26px, 2.6vw, 38px); line-height: 1.3; letter-spacing: -.015em; color: var(--text-strong);
}
.lqc-info__photo { margin-top: 32px; max-width: 320px; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line); }
.lqc-info__photo img { width: 100%; height: 100%; object-fit: cover; }
.lqc-precomps { display: flex; flex-direction: column; gap: 14px; }
.lqc-precomp { padding: 20px 24px 22px; border: 1px solid var(--line); background: rgba(14, 14, 18, .7); }
.lqc-precomp__tag {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--c, var(--pink));
}
.lqc-precomp__tag::before { content: ""; width: 9px; height: 9px; background: var(--c, var(--pink)); }
.lqc-precomp p { margin-top: 12px; color: var(--text-soft); font-size: 15.5px; line-height: 1.75; }

/* 7. Fuori schermo: notte */
.lqc-scene--night { background: radial-gradient(ellipse at 60% 20%, #14213F 0%, #0B0E1A 50%, #07070A 85%); }
.lqc-stars {
	position: absolute; inset: 0; pointer-events: none; opacity: .9;
	background-image:
		radial-gradient(1.5px 1.5px at 23px 41px, #FFFFFF 50%, transparent 52%),
		radial-gradient(1px 1px at 97px 13px, #E9B9E9 50%, transparent 52%),
		radial-gradient(1px 1px at 151px 88px, #FFFFFF 50%, transparent 52%),
		radial-gradient(2px 2px at 61px 137px, #C9D6FF 50%, transparent 52%),
		radial-gradient(1px 1px at 183px 171px, #FFFFFF 50%, transparent 52%),
		radial-gradient(1px 1px at 128px 196px, #FFFFFF 50%, transparent 52%);
	background-size: 260px 260px;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 90%);
	mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 90%);
}
.lqc-mountains { position: absolute; left: 0; bottom: 0; width: 100%; height: 160px; fill: #05050A; pointer-events: none; }
.lqc-off { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-end; padding-bottom: 60px; }
.lqc-off__text { flex: 1 1 520px; min-width: 0; }
.lqc-off__title {
	margin-top: 22px; font-family: var(--font-display); font-weight: 300;
	font-size: clamp(30px, 3.4vw, 50px); line-height: 1.15; letter-spacing: -.02em; color: var(--text-strong);
}
.lqc-off__body { margin-top: 22px; max-width: 620px; color: var(--text-soft); line-height: 1.8; }
.lqc-off__photos { flex: 1 1 100%; margin-top: 8px; }

/* 8. Contatti: render finale */
.lqc-scene--end { background: var(--sky-end); }
.lqc-end__title {
	margin-top: 22px; max-width: 900px; font-family: var(--font-display); font-weight: 300;
	font-size: clamp(38px, 5.4vw, 80px); line-height: 1.04; letter-spacing: -.035em; color: var(--text-strong);
}
.lqc-end__note { margin-top: 18px; color: var(--text-soft); }
.lqc-end .lq-footer__email { align-self: flex-start; }
.lqc-end__bar {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
	margin-top: 64px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1);
	font-family: var(--font-display); font-weight: 500; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint);
}

/* 9. Comparsa delle scene (easy ease) */
.js .lqc-anim {
	opacity: 0; transform: translateY(18px);
	transition: opacity .9s cubic-bezier(.33, 0, .2, 1), transform .9s cubic-bezier(.33, 0, .2, 1);
	transition-delay: calc(var(--i, 0) * 90ms);
}
.js .lqc-scene.is-in .lqc-anim { opacity: 1; transform: none; }

/* 10. Timeline fissa */
.lqc-tl {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
	height: var(--lqc-tl); display: flex; flex-direction: column;
	background: #0E0E12; border-top: 1px solid #1E1E24; color: var(--text);
	font-family: var(--mono);
	transition: height .35s cubic-bezier(.33, 0, .2, 1);
}
.lqc-tl__bar { position: relative; height: 48px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 20px; border-bottom: 1px solid #1E1E24; }
.lqc-tl__tc { min-width: 160px; font-size: 22px; font-weight: 500; color: var(--pink); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lqc-tl__transport { display: flex; gap: 6px; }
.lqc-btn {
	width: 36px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
	background: transparent; color: var(--text); border: 1px solid #2E2E34; cursor: pointer;
}
.lqc-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.lqc-btn:hover { border-color: var(--pink); color: var(--pink); }
.lqc-btn--play { width: 44px; border-color: var(--pink); color: var(--pink); }
.lqc-btn--play .lqc-ico-pause, .lqc-btn--play[aria-pressed="true"] .lqc-ico-play { display: none; }
.lqc-btn--play[aria-pressed="true"] .lqc-ico-pause { display: block; }
.lqc-tl__current { font-size: 12px; color: var(--text); }
.lqc-tl__hint { font-size: 11px; color: #8E8E98; }
.lqc-btn--min { margin-left: auto; border-color: transparent; }
.lqc-btn--min svg { transition: transform .3s ease; }
html.lqc-tl-min .lqc-btn--min svg { transform: rotate(180deg); }

.lqc-tl__mini { display: none; }

.lqc-tl__body { flex: 1 1 auto; min-height: 0; display: flex; }
html.lqc-tl-min .lqc-tl__body { visibility: hidden; }
.lqc-tl__names { width: 240px; flex: none; border-right: 1px solid #1E1E24; }
.lqc-tl__names-head { height: 26px; display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid #1E1E24; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #6E6E78; }
.lqc-tl__names ol { list-style: none; margin: 0; padding: 0; }
.lqc-layer {
	height: 27px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
	border-bottom: 1px solid #17171C; font-size: 12px; color: #A6A6B0; text-decoration: none;
}
.lqc-layer:hover { color: var(--text-strong); }
.lqc-layer.is-active { color: var(--text-strong); background: #1A1A22; }
.lqc-layer__swatch { width: 9px; height: 9px; flex: none; }
.lqc-layer__n { width: 14px; color: #6E6E78; }

.lqc-tl__track { position: relative; flex: 1 1 auto; min-width: 0; margin: 0 22px; }
.lqc-tl__ruler { position: relative; height: 26px; border-bottom: 1px solid #1E1E24; }
.lqc-tick { position: absolute; bottom: 0; width: 1px; height: 5px; background: #3A3A42; }
.lqc-tick--major { height: 10px; }
.lqc-tick em { position: absolute; top: -14px; left: 0; transform: translateX(-50%); font-style: normal; font-size: 9px; color: #6E6E78; white-space: nowrap; }
.lqc-row { position: relative; height: 27px; border-bottom: 1px solid #17171C; }
.lqc-bar { position: absolute; top: 6px; height: 15px; background: var(--c); opacity: .42; transition: opacity .3s ease; }
.lqc-bar.is-active, .lqc-bar:hover { opacity: 1; }
.lqc-kf-pos { position: absolute; top: 7px; transform: translateX(-50%); line-height: 0; pointer-events: none; }
.lqc-kf { width: 13px; height: 13px; fill: #0E0E12; stroke: #F2F2F2; stroke-width: 2; }
.lqc-tl__head { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: var(--pink); pointer-events: none; will-change: left; }
.lqc-tl__head span {
	position: absolute; top: 0; left: -6px; width: 0; height: 0;
	border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid var(--pink);
}

/* 11. Mobile e schermi stretti: timeline compatta */
@media (max-width: 900px) {
	:root, html.lqc-tl-min { --lqc-tl: 56px; --lqc-head: 60px; }
	.lqc-tl__body, .lqc-tl__hint, .lqc-btn--min, .lqc-frame__zoom { display: none; }
	.lqc-tl__bar { height: 56px; gap: 12px; padding: 0 14px; border-bottom: 0; }
	.lqc-tl__tc { min-width: 0; font-size: 16px; }
	.lqc-tl__transport { order: 3; margin-left: auto; }
	.lqc-btn { width: 40px; height: 36px; }
	.lqc-tl__current { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.lqc-tl__mini { display: flex; position: absolute; left: 0; right: 0; top: 0; height: 3px; gap: 2px; }
	.lqc-tl__mini span { background: var(--c); opacity: .5; }
	.lqc-tl__mini-head { position: absolute; top: -3px; left: 0; width: 2px; height: 9px; background: var(--pink); }
	.lqc-scene { min-height: 0; padding: calc(var(--lqc-head) + 44px) 0 64px; }
	.lqc-frame { inset: calc(var(--lqc-head) + 8px) 8px 8px; }
	.lqc-info { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.lqc-hero__reel { margin: 8px auto 0; max-width: 320px; }
	.lqc-mountains { height: 90px; }
}
@media (max-width: 420px) {
	.lqc-tl__current { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.js .lqc-anim { opacity: 1; transform: none; transition: none; }
	.lqc-tl { transition: none; }
}
