/* ===== Nidea – main.css ===== */
:root {
	--bg: #f3f3f5;
	--ink: #1b1a22;
	--dark: #1b1620;
	--pad: clamp(1rem, 2vw, 1.75rem);
	--font: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--blur: 0px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font-family: var(--font); font-size: 1rem; line-height: 1.4; font-weight: 500;
	-webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.js body:not(.is-ready) .index__title { visibility: hidden; }

/* ===== Cursore ===== */
.cursor { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; mix-blend-mode: normal; }
.cursor__dot {
	position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
	background: var(--ink); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.28); transition: transform .3s, opacity .3s;
}
.cursor__pill {
	position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.4); opacity: 0;
	padding: .35em .9em; border-radius: 999px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
	background: rgba(255,255,255,.55); color: var(--ink);
	-webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
	box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset;
	transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s;
	white-space: nowrap;
}
.cursor.is-view .cursor__pill { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor.is-view .cursor__dot { transform: scale(0); opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (hover: hover) and (pointer: fine) { .js, .js a, .js button { cursor: none; } }

/* ===== Sipario transizione ===== */
.curtain { position: fixed; inset: 0; z-index: 150; background: var(--dark); pointer-events: none; clip-path: inset(100% 0 0 0); }
.is-entering .curtain { clip-path: inset(0); }

/* ===== Header ===== */
.site-header {
	position: fixed; left: 0; right: 0; top: 0; z-index: 50; display: flex; justify-content: space-between; align-items: flex-start;
	padding: var(--pad); color: #fff; mix-blend-mode: difference; pointer-events: none;
	font-weight: 600; letter-spacing: -.01em;
}
.admin-bar .site-header { top: 32px; }
.site-header a, .site-header button { pointer-events: auto; }

/* ===== Menu a tendina ===== */
.menu {
	position: fixed; left: 0; right: 0; top: 0; z-index: 100; height: clamp(26rem, 64vh, 44rem);
	background: var(--dark); color: #fff; visibility: hidden; overflow: hidden;
}
.admin-bar .menu { top: 32px; }
.menu__top { display: flex; justify-content: space-between; padding: var(--pad); font-weight: 500; font-size: 1rem; line-height: 1.25; }
.menu__brand strong { font-weight: 700; }
.menu__close { font-weight: 600; }
.menu__body { position: absolute; top: var(--pad); left: 50%; right: var(--pad); }
.menu__list li { overflow: hidden; }
.menu__list a {
	display: block; font-size: clamp(2.2rem, 4.6vw, 4.6rem); line-height: .94; font-weight: 700; text-transform: uppercase;
	letter-spacing: -.035em; transition: opacity .25s;
}
.menu__list a:hover { opacity: .4; }
.menu__list span { display: block; }
.menu__social { display: flex; gap: 1.2rem; margin-top: 2.2rem; font-weight: 600; font-size: .95rem; }
@media (max-width: 700px) {
	.menu__body { left: var(--pad); top: 5.5rem; }
	.menu__list a { font-size: 12vw; }
}

/* ===== Intro ===== */
.intro { position: fixed; inset: 0; z-index: 120; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.intro__row { display: flex; align-items: center; gap: 2.4vw; }
.intro__word { font-size: clamp(3rem, 8.4vw, 10rem); font-weight: 800; text-transform: uppercase; letter-spacing: -.045em; line-height: 1; }
.intro__img { position: relative; width: clamp(9rem, 14vw, 18rem); aspect-ratio: 3 / 4; overflow: hidden; display: block; }
.intro__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.intro__img img.is-on { opacity: 1; }
@media (max-width: 700px) { .intro__row { flex-direction: column; gap: 1rem; } .intro__word { font-size: 16vw; } }

/* ===== Titoli giganti (con split lettere) ===== */
.index__title {
	font-size: clamp(4.5rem, 13.5vw, 16rem); line-height: .9; font-weight: 800; text-transform: uppercase;
	letter-spacing: -.055em; padding: clamp(4.5rem, 7vw, 7rem) var(--pad) 0 38%;
}
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .02em .06em; margin: 0 -.02em; }
.c { display: inline-block; will-change: transform; }
@media (max-width: 700px) { .index__title { padding-left: var(--pad); font-size: 22vw; } }

/* ===== Indice: foto sfalsate ===== */
.index__list { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--pad); row-gap: clamp(5rem, 16vh, 11rem); padding: clamp(3rem, 9vh, 7rem) var(--pad) 0; align-items: start; }
.index__item:nth-child(4n+1) { grid-column: 1 / 5; }
.index__item:nth-child(4n+2) { grid-column: 6 / 12; margin-top: 18vh; }
.index__item:nth-child(4n+3) { grid-column: 3 / 8; }
.index__item:nth-child(4n+4) { grid-column: 9 / 13; margin-top: 12vh; }
.index__fig { position: relative; margin: 0; overflow: hidden; aspect-ratio: 3 / 2; background: #dcdce0; }
.index__item:nth-child(4n+2) .index__fig { aspect-ratio: 4 / 3; }
.index__item:nth-child(4n+3) .index__fig { aspect-ratio: 1 / 1; }
.index__item:nth-child(4n+4) .index__fig { aspect-ratio: 3 / 4; }
.index__img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; filter: blur(var(--blur)); transition: transform .9s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.index__link:hover .index__img { transform: scale(1.05); }
.index__caption { display: block; margin-top: .7rem; font-size: .95rem; font-weight: 500; letter-spacing: -.005em; }
.index__link { display: block; }
.empty { padding: 4rem var(--pad); max-width: 36rem; }
@media (max-width: 700px) {
	.index__list { grid-template-columns: 1fr; }
	.index__item:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
	.index__item:nth-child(even) { width: 82%; justify-self: end; }
}

/* ===== Griglia ===== */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--pad) * 1.2); padding: clamp(3rem, 8vh, 6rem) var(--pad) 0; }
.grid figure { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: #dcdce0; }
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.grid a:hover img { transform: scale(1.05); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }

/* ===== Pagina progetto ===== */
.hscroll { position: relative; height: 100vh; overflow: hidden; }
.hscroll__track { display: flex; align-items: center; height: 100%; gap: 4vw; width: max-content; padding-right: 8vw; will-change: transform; }
.hscroll__intro { position: relative; flex: 0 0 100vw; height: 100%; }
.project__title {
	position: absolute; left: var(--pad); top: clamp(3.5rem, 6vw, 5.5rem); z-index: 3; max-width: 92vw;
	font-size: clamp(3.5rem, 11vw, 13rem); line-height: .9; font-weight: 800; text-transform: uppercase; letter-spacing: -.055em;
}
.project__cat { position: absolute; left: var(--pad); bottom: var(--pad); font-size: .95rem; }
.project__desc { position: absolute; left: 50%; bottom: var(--pad); width: min(28rem, 36vw); font-size: 1rem; line-height: 1.3; font-weight: 500; z-index: 3; }
.project__hero { position: absolute; right: 0; top: 0; width: 34vw; height: 100%; margin: 0; overflow: hidden; }
.project__hero img { width: 100%; height: 100%; object-fit: cover; filter: blur(var(--blur)); }
.hscroll__item { flex: 0 0 auto; margin: 0; position: relative; overflow: hidden; background: #dcdce0; }
.hscroll__item img { height: 100%; width: auto; max-width: none; filter: blur(var(--blur)); }
.hscroll__item.is-port { height: 74vh; }
.hscroll__item.is-land { height: 58vh; }
.hscroll__item.n1 { align-self: flex-end; margin-bottom: 9vh; }
.hscroll__item.n2 { align-self: flex-start; margin-top: 14vh; }
.hscroll__item.n3 { align-self: center; }
.project__next { display: block; background: var(--dark); color: #fff; padding: clamp(6rem, 22vh, 12rem) var(--pad) clamp(4rem, 12vh, 8rem); }
.project__next span { display: block; font-size: .95rem; opacity: .7; margin-bottom: 1rem; }
.project__next strong { display: block; font-size: clamp(3rem, 11vw, 13rem); line-height: .9; font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; transition: opacity .3s; }
.project__next:hover strong { opacity: .55; }
@media (max-width: 899px) {
	.hscroll { height: auto; overflow: visible; }
	.hscroll__track { flex-direction: column; align-items: stretch; width: auto; padding: 0 var(--pad) 4rem; gap: 1rem; height: auto; }
	.hscroll__intro { flex: none; height: auto; min-height: 100svh; margin: 0 calc(var(--pad) * -1); }
	.project__hero { width: 62vw; height: 62vh; top: auto; bottom: 5rem; }
	.project__desc { left: var(--pad); width: auto; right: var(--pad); bottom: 3.4rem; top: auto; }
	.project__desc { display: none; }
	.hscroll__item, .hscroll__item.n1, .hscroll__item.n2 { height: auto !important; width: 100%; margin: 0; }
	.hscroll__item img { width: 100%; height: auto; }
}

/* ===== Pagine e journal ===== */
.page__content { padding: clamp(3rem, 8vh, 6rem) var(--pad) 0 38%; max-width: 100%; }
.page__img { margin: 0 0 2rem; max-width: 26rem; }
.prose { max-width: 40rem; font-size: 1.15rem; line-height: 1.45; }
.prose p { margin: 0 0 1.1em; }
.prose a { text-decoration: underline; text-underline-offset: .2em; }
.journal { padding: clamp(3rem, 8vh, 6rem) var(--pad) 0; }
.journal__item a { display: flex; gap: 2rem; align-items: baseline; padding: 1.3rem 0; border-top: 1px solid rgba(27,26,34,.18); transition: opacity .3s; }
.journal__item a:hover { opacity: .45; }
.journal__date { min-width: 11rem; font-size: .95rem; }
.journal__title { font-size: clamp(1.6rem, 3.6vw, 3.4rem); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
@media (max-width: 700px) { .page__content { padding-left: var(--pad); } .journal__item a { flex-direction: column; gap: .4rem; } }

/* ===== Footer ===== */
.site-footer { margin-top: clamp(7rem, 22vh, 14rem); background: var(--dark); color: #fff; padding: clamp(4rem, 12vh, 8rem) var(--pad) var(--pad); }
.site-footer__big { font-size: clamp(3.5rem, 14vw, 17rem); line-height: .88; font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; margin-bottom: clamp(3rem, 10vh, 7rem); }
.site-footer__row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .95rem; }
.site-footer__social { display: flex; gap: 1.2rem; }
.site-footer a:hover { opacity: .55; }
.single-progetto .site-footer { margin-top: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
