/* =========================================================
   STILETTI PRODUCTION — Vittorio Stiletti
   Direzione: cinematografico scuro + sezione editoriale chiara
   ========================================================= */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight.woff2") format("woff2");
  font-weight: 300 600; font-style: normal; font-display: swap;
}

:root {
  --bg: #0b0a09;
  --bg-2: #13110f;
  --bg-3: #1b1815;
  --ink: #ede7dc;
  --ink-2: #b9b1a4;
  --muted: #7d766b;
  --line: rgba(237, 231, 220, 0.13);
  --line-2: rgba(237, 231, 220, 0.28);
  --accent: #d2402f;
  --paper: #ece5d8;
  --paper-ink: #16130f;
  --paper-muted: #6f675b;
  --paper-line: rgba(22, 19, 15, 0.14);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1680px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

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

html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Grana pellicola ---------- */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 90;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Tipografia ---------- */
.label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-2);
}
.label .num { color: var(--accent); font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); font-weight: 400; }
em, .italic { font-family: var(--serif); font-style: italic; font-weight: 400; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

/* Riga di testo che "sale" dalla maschera */
.mask { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.mask > span { display: inline-block; will-change: transform; }

/* ---------- Bottoni / link ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  height: 52px; padding: 0 26px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  overflow: hidden; isolation: isolate;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: translateY(101%); border-radius: inherit;
  transition: transform 0.6s var(--ease);
}
.btn:hover { color: var(--bg); border-color: var(--ink); }
.btn:hover::before { transform: translateY(0); }
.btn .arrow { transition: transform 0.5s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid::before { background: var(--accent); }
.btn--solid:hover { color: #fff; border-color: var(--accent); }

.link-line {
  position: relative; display: inline-block;
}
.link-line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.6s var(--ease);
}
.link-line:hover::after { transform: scaleX(1); transform-origin: left; }

/* =========================================================
   PRELOADER
   ========================================================= */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: grid; place-items: center;
  pointer-events: all;
  animation: preloader-failsafe 0.01s 6s forwards;
}
@keyframes preloader-failsafe { to { visibility: hidden; opacity: 0; } }
.preloader__name {
  font-family: var(--serif);
  font-size: clamp(44px, 9vw, 140px);
  line-height: 1; letter-spacing: -0.02em;
  display: flex; gap: 0.25em; overflow: hidden;
}
.preloader__name span { display: inline-block; }
.preloader__name em { color: var(--ink-2); }
.preloader__meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
.preloader__count {
  font-family: var(--serif); font-size: clamp(56px, 10vw, 150px);
  color: var(--ink); letter-spacing: -0.03em; line-height: 0.8;
  font-variant-numeric: tabular-nums;
}
.preloader__bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--accent); transform-origin: left; transform: scaleX(0);
}
html.no-js .preloader, html.is-loaded .preloader { display: none; }

/* =========================================================
   NAVIGAZIONE
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  transition: transform 0.6s var(--ease), background-color 0.6s var(--ease), padding 0.6s var(--ease);
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(11,10,9,0.75), rgba(11,10,9,0));
  opacity: 1; transition: opacity 0.6s var(--ease);
}
.nav.is-scrolled { padding-top: 14px; padding-bottom: 14px; }
.nav.is-scrolled::before { background: rgba(11,10,9,0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav.is-hidden { transform: translateY(-110%); }

.brand {
  display: flex; align-items: baseline; gap: 10px; line-height: 1;
}
.brand__name { font-family: var(--serif); font-size: 28px; letter-spacing: -0.01em; }
.brand__sub { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-2); }

.nav__links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav__links a:not(.btn) {
  font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2); transition: color 0.3s;
}
.nav__links a:not(.btn):hover, .nav__links a.is-active { color: var(--ink); }
.nav__links .btn { height: 40px; padding: 0 18px; font-size: 11px; }

.nav__toggle {
  display: none; position: relative; width: 44px; height: 44px; z-index: 2;
  border: 1px solid var(--line-2); border-radius: 50%;
}
.nav__toggle span {
  position: absolute; left: 13px; right: 13px; height: 1px; background: var(--ink);
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 18px; }
.nav__toggle span:nth-child(2) { top: 25px; }
.menu-open .nav__toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .nav__toggle span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 79;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 110px var(--gutter) 36px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.9s var(--ease-in-out);
  visibility: hidden;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; }
.menu ul { list-style: none; }
.menu li { border-bottom: 1px solid var(--line); }
.menu li a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0;
  font-family: var(--serif); font-size: clamp(40px, 11vw, 64px); line-height: 1;
}
.menu li a small { font-family: var(--sans); font-size: 11px; letter-spacing: 0.2em; color: var(--muted); }
.menu__foot { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink-2); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden; background: #000;
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12);
  filter: brightness(0.72) contrast(1.05);
}
.hero__slide.is-active img { animation: kenburns 9s linear forwards; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1.0); } }

.hero__shade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to top, rgba(11,10,9,0.9) 0%, rgba(11,10,9,0) 45%);
}
.hero__bar {
  position: absolute; left: 0; right: 0; z-index: 3; height: 7vh; background: #000;
  pointer-events: none;
}
.hero__bar--top { top: 0; }
.hero__bar--bottom { bottom: 0; }

.hero__content {
  position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter); bottom: calc(7vh + 34px);
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px;
}
.hero__title {
  font-size: clamp(64px, 14.5vw, 260px);
  line-height: 0.84;
  letter-spacing: -0.035em;
}
.hero__title .mask:nth-child(2) { padding-left: 0.9em; }
.hero__title em { color: var(--ink); }
.hero__aside { max-width: 320px; padding-bottom: 1.2vw; }
.hero__aside p { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin: 16px 0 26px; }

.hud {
  position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(237,231,220,0.75);
  font-variant-numeric: tabular-nums;
}
.hud--bottom { bottom: calc(7vh - 26px); }
.hud .rec { display: inline-flex; align-items: center; gap: 10px; }
.hud .rec i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: blink 1.4s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }
.hud__progress { display: flex; gap: 6px; }
.hud__progress button {
  width: 34px; height: 14px; position: relative;
}
.hud__progress button::before, .hud__progress button::after {
  content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: rgba(255,255,255,0.22);
}
.hud__progress button::after { background: var(--ink); transform: scaleX(0); transform-origin: left; }
.hud__progress button.is-active::after { animation: progress var(--slide-time, 6s) linear forwards; }
.hud__progress button.is-done::after { transform: scaleX(1); }
@keyframes progress { to { transform: scaleX(1); } }

.corner {
  position: absolute; z-index: 4; width: 18px; height: 18px; border: 1px solid rgba(237,231,220,0.5);
}
.corner--tl { top: calc(7vh + 20px); left: var(--gutter); border-right: 0; border-bottom: 0; }
.corner--tr { top: calc(7vh + 20px); right: var(--gutter); border-left: 0; border-bottom: 0; }
.corner--bl { bottom: calc(7vh + 20px); left: var(--gutter); border-right: 0; border-top: 0; display: none; }
.corner--br { bottom: calc(7vh + 20px); right: var(--gutter); border-left: 0; border-top: 0; display: none; }

/* =========================================================
   SEZIONI GENERALI
   ========================================================= */
.section { position: relative; padding: clamp(96px, 14vw, 200px) var(--gutter); }
.wrap { max-width: var(--max); margin: 0 auto; }
.section-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end;
  margin-bottom: clamp(48px, 7vw, 100px);
}
.section-title { font-size: clamp(52px, 8vw, 132px); }
.section-head p { color: var(--ink-2); max-width: 420px; justify-self: end; font-size: 16px; }

/* ---------- Manifesto ---------- */
.manifesto { padding-top: clamp(120px, 16vw, 240px); }
.manifesto__text {
  font-family: var(--serif);
  font-size: clamp(34px, 5.4vw, 92px);
  line-height: 1.04; letter-spacing: -0.015em;
  max-width: 15.5em;
  margin-top: 32px;
}
.manifesto__text .w { opacity: 0.16; transition: opacity 0.2s; }
html.no-js .manifesto__text .w, html.reduced .manifesto__text .w { opacity: 1; }
.manifesto__text em { color: var(--accent); }
.manifesto__foot {
  display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap;
  margin-top: clamp(48px, 6vw, 90px); padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--ink-2); font-size: 14px;
}
.stats { display: flex; gap: clamp(28px, 5vw, 80px); }
.stat strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.5vw, 64px); line-height: 1; color: var(--ink); }
.stat span { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }

/* ---------- Pellicola orizzontale ---------- */
.reel { padding: 0; }
.reel__pin { height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.reel__head {
  display: flex; justify-content: space-between; align-items: end;
  padding: 0 var(--gutter); margin-bottom: 4vh;
}
.reel__head h2 { font-size: clamp(44px, 6vw, 96px); }
.reel__count { font-size: 11px; letter-spacing: 0.22em; color: var(--ink-2); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.reel__track {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 32px);
  padding: 0 var(--gutter);
  width: max-content;
  will-change: transform;
}
.frame { position: relative; flex: 0 0 auto; margin: 0; }
.frame__img { position: relative; overflow: hidden; height: 62vh; background: var(--bg-2); }
.frame--land .frame__img { aspect-ratio: 3 / 2; }
.frame--port .frame__img { aspect-ratio: 2 / 3; }
.frame--port.frame--lo .frame__img { height: 50vh; align-self: flex-end; }
.frame__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.frame figcaption {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 12px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.frame figcaption b { color: var(--ink-2); font-weight: 500; }
.reel__end {
  flex: 0 0 auto; width: min(420px, 80vw); padding-left: 3vw;
}
.reel__end p { font-family: var(--serif); font-size: clamp(30px, 3vw, 46px); line-height: 1.05; margin-bottom: 28px; }

/* ---------- Cinema ---------- */
.cinema { border-top: 1px solid var(--line); }
.credits { list-style: none; border-top: 1px solid var(--line); }
.credit {
  position: relative;
  border-bottom: 1px solid var(--line);
}
.credit a, .credit > div {
  display: grid; grid-template-columns: 80px 1.3fr 1fr 1fr 40px; gap: 24px; align-items: center;
  padding: clamp(24px, 3vw, 40px) 0;
  transition: padding 0.6s var(--ease), color 0.4s;
}
.credit__n { font-size: 11px; letter-spacing: 0.2em; color: var(--muted); font-variant-numeric: tabular-nums; }
.credit__title { font-family: var(--serif); font-size: clamp(40px, 5.5vw, 92px); line-height: 0.95; letter-spacing: -0.02em; transition: transform 0.6s var(--ease); }
.credit__meta { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.credit__meta b { display: block; font-weight: 500; color: var(--ink); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 4px; }
.credit__arrow { justify-self: end; font-size: 22px; transition: transform 0.6s var(--ease); }
.credit a:hover .credit__title { transform: translateX(18px); font-style: italic; }
.credit a:hover .credit__arrow { transform: rotate(-45deg); }
.credit__thumb { display: none; }

.preview {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: 340px; aspect-ratio: 16 / 10; overflow: hidden;
  opacity: 0; transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
}
.preview.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.preview img.is-current { opacity: 1; }

/* ---------- Lavori ---------- */
.works__list { display: grid; gap: clamp(80px, 10vw, 160px); }
.work { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end; }
.work__media {
  grid-column: 1 / span 8; position: relative; overflow: hidden; aspect-ratio: 3 / 2;
  background: var(--bg-2);
}
.work:nth-child(even) .work__media { grid-column: 5 / span 8; grid-row: 1; }
.work:nth-child(even) .work__info { grid-column: 1 / span 4; grid-row: 1; }
.work__media > img { position: absolute; left: 0; top: -9%; width: 100%; height: 118%; object-fit: cover; transition: transform 1.4s var(--ease), filter 1s; filter: brightness(0.92); }
.work__media:hover img { filter: brightness(1); }
.work__media .work__portrait {
  position: absolute; z-index: 2; right: 5%; bottom: 10%; width: 24%; aspect-ratio: 2 / 3; height: auto;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  overflow: hidden;
}
.work__media .work__portrait img { width: 100%; height: 100%; object-fit: cover; }
.work__info { grid-column: 9 / span 4; padding-bottom: 8px; }
.work__info .label { margin-bottom: 22px; }
.work__title { font-size: clamp(48px, 5.6vw, 96px); margin-bottom: 20px; }
.work__info p { color: var(--ink-2); font-size: 15px; margin-bottom: 30px; max-width: 380px; }
.work__meta { display: flex; gap: 22px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 30px; }

/* =========================================================
   SEZIONE CHIARA — CHI SONO / SERVIZI
   ========================================================= */
.paper {
  background: var(--paper); color: var(--paper-ink);
  --curtain: var(--paper);
  --ink: var(--paper-ink); --ink-2: #4a443b; --muted: var(--paper-muted); --line: var(--paper-line); --line-2: rgba(22,19,15,0.3);
}
.paper .btn::before { background: var(--paper-ink); }
.paper .btn:hover { color: var(--paper); border-color: var(--paper-ink); }

.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: start; }
.about__photo { grid-column: 1 / span 5; position: sticky; top: 110px; }
.about__photo .ph { overflow: hidden; aspect-ratio: 1183 / 1330; background: #000; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__photo figcaption { margin-top: 12px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper-muted); display: flex; justify-content: space-between; }
.about__body { grid-column: 7 / span 6; padding-top: 2vw; }
.about__title { font-size: clamp(44px, 5.2vw, 86px); margin: 26px 0 36px; }
.about__title em { color: var(--accent); }
.about__body p { font-size: 17px; line-height: 1.7; color: #3d372f; max-width: 560px; margin-bottom: 18px; }
.about__body p.lead { font-size: clamp(20px, 1.7vw, 24px); line-height: 1.5; color: var(--paper-ink); }
.about__sign { width: 220px; margin-top: 28px; filter: invert(1) brightness(0.2); opacity: 0.9; }
.about__video {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: end;
  margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--paper-line);
}
.about__video video { width: 150px; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.about__video p { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 38px); line-height: 1.08; color: var(--paper-ink); margin: 0; }
.about__video span { display: block; margin-top: 12px; font-family: var(--sans); font-size: 13px; color: var(--paper-muted); line-height: 1.5; }

.services { margin-top: clamp(100px, 12vw, 180px); }
.services__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.services__head h2 { font-size: clamp(48px, 6.5vw, 110px); }
.services__head p { max-width: 380px; color: #4a443b; }
.services__list { list-style: none; border-top: 1px solid var(--paper-ink); }
.service {
  display: grid; grid-template-columns: 80px 1fr 1fr; gap: 24px; align-items: baseline;
  padding: 28px 0; border-bottom: 1px solid var(--paper-line);
  transition: padding 0.6s var(--ease);
}
.service:hover { padding-left: 14px; }
.service__n { font-size: 11px; letter-spacing: 0.2em; color: var(--paper-muted); }
.service h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.2vw, 52px); line-height: 1; }
.service p { color: #4a443b; font-size: 15px; max-width: 440px; }

/* =========================================================
   METODO
   ========================================================= */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.step { padding: 36px 32px 10px 0; border-right: 1px solid var(--line); }
.step + .step { padding-left: 32px; }
.step:last-child { border-right: 0; }
.step__n { font-family: var(--serif); font-size: clamp(70px, 8vw, 130px); line-height: 0.9; color: var(--ink); opacity: 0.18; }
.step h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 2.6vw, 42px); margin: 28px 0 14px; }
.step p { color: var(--ink-2); font-size: 15px; max-width: 360px; }
.step a { display: inline-block; margin-top: 18px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }

/* =========================================================
   CONTATTI
   ========================================================= */
.contact { border-top: 1px solid var(--line); }
.contact__title { font-size: clamp(60px, 11vw, 200px); line-height: 0.88; letter-spacing: -0.035em; margin: 30px 0 clamp(56px, 7vw, 110px); }
.contact__title em { color: var(--accent); }
.contact__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 120px); align-items: start; }
.channels { list-style: none; border-top: 1px solid var(--line); }
.channels a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  transition: padding 0.6s var(--ease);
}
.channels a:hover { padding-left: 12px; }
.channels small { display: block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.channels strong { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.1; word-break: break-word; }
.channels .arrow { font-size: 20px; transition: transform 0.6s var(--ease); }
.channels a:hover .arrow { transform: rotate(-45deg); }
.contact__note { margin-top: 28px; color: var(--ink-2); font-size: 14px; }

.form { display: grid; gap: 34px; }
.form fieldset { border: 0; }
.form legend { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2);
  transition: all 0.35s var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 28px; }
.field { position: relative; }
.field--full { grid-column: 1 / -1; }
.field label { display: block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-2);
  padding: 10px 0 12px; font-size: 18px; color: var(--ink); border-radius: 0;
  transition: border-color 0.4s;
  color-scheme: dark;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: #57514a; }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.form__feedback { font-size: 14px; color: var(--ink-2); min-height: 1.4em; }
.form__feedback.is-error { color: #ff8a7a; }
.form__feedback.is-ok { color: #a9d8a0; }
.form__privacy { font-size: 12px; color: var(--muted); max-width: 360px; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { padding: 80px var(--gutter) 28px; border-top: 1px solid var(--line); overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: clamp(60px, 8vw, 120px); }
.footer__top p { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 38px); line-height: 1.1; max-width: 420px; }
.footer__col h4 { font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer__col ul { list-style: none; display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.footer__col a:hover { color: var(--ink); }
.footer__mark {
  font-family: var(--serif); font-size: 23.5vw; line-height: 0.78; letter-spacing: -0.045em;
  white-space: nowrap; text-align: center; margin: 0 -1vw;
  background: linear-gradient(180deg, var(--ink) 30%, rgba(237,231,220,0.08) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none;
}
.footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); letter-spacing: 0.04em;
}

/* =========================================================
   CURSORE
   ========================================================= */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none;
  width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--ink); mix-blend-mode: difference;
  transition: width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease), background-color 0.3s;
  display: none;
}
.cursor span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #000;
  opacity: 0; transition: opacity 0.3s;
}
.cursor:not(.is-on) { opacity: 0; }
.cursor.is-big { width: 86px; height: 86px; margin: -43px 0 0 -43px; mix-blend-mode: normal; background: var(--ink); }
.cursor.is-big span { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .has-cursor .cursor { display: block; } }

/* =========================================================
   REVEAL (gestiti da JS — senza JS tutto resta visibile)
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(40px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
/* tendina che si apre sull'immagine (niente clip-path sul target: l'IntersectionObserver lo ignorerebbe) */
.reveal-img { position: relative; }
.js .reveal-img::after {
  content: ""; position: absolute; inset: -1px; z-index: 3; pointer-events: none;
  background: var(--curtain, var(--bg));
  transform-origin: top; transform: scaleY(1);
}
.js .reveal-img.is-in::after { transform: scaleY(0); transition: transform 1.4s var(--ease-in-out); }
html.reduced .reveal { opacity: 1 !important; transform: none !important; }
html.reduced .reveal-img::after { display: none; }

/* =========================================================
   PAGINA PROGETTO
   ========================================================= */
.p-hero { position: relative; height: 92vh; height: 92svh; min-height: 520px; overflow: hidden; background: #000; }
.p-hero img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.62); transform: scale(1.08); }
.p-hero__content { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 48px; z-index: 2; }
.p-hero__title { font-size: clamp(64px, 12vw, 210px); margin: 18px 0 0; }
.p-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,10,9,0.95) 0%, rgba(11,10,9,0) 50%); }
.p-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: clamp(64px, 8vw, 120px) var(--gutter) clamp(48px, 6vw, 80px); max-width: var(--max); margin: 0 auto; }
.p-intro p { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 42px); line-height: 1.15; }
.p-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 24px 48px; justify-content: end; align-content: start; }
.p-meta div small { display: block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.p-meta div span { font-size: 15px; }

.jg { padding: 0 var(--gutter); max-width: var(--max); margin: 0 auto; }
.jg__row { display: flex; gap: 10px; margin-bottom: 10px; }
.jg__item {
  position: relative; overflow: hidden; background: var(--bg-2); cursor: zoom-in;
  flex: 0 0 auto;
}
.jg__item img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 0.9s var(--ease), transform 1.2s var(--ease); }
.jg__item img.is-loaded { opacity: 1; transform: scale(1); }
.jg__item:hover img.is-loaded { transform: scale(1.03); }

/* Indice e capitoli della galleria (progetti con "sections") */
.p-index { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 var(--gutter) clamp(40px, 5vw, 72px); max-width: var(--max); margin: 0 auto; }
.p-index[hidden] { display: none; }
.p-index a { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s; }
.p-index a .num { color: var(--accent); font-size: 11px; }
.p-index a small { font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }
.p-index a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.p-index a:hover small { color: var(--bg); }
.jg__head { display: grid; grid-template-columns: 1fr minmax(0, 420px); align-items: end; gap: 12px 40px; padding: clamp(56px, 7vw, 110px) 0 clamp(20px, 2.4vw, 32px); border-top: 1px solid var(--line); margin-top: clamp(30px, 4vw, 60px); scroll-margin-top: 90px; }
.jg__head:first-child { margin-top: 0; }
.jg__head .label { grid-column: 1 / -1; }
.jg__head h2 { font-size: clamp(44px, 6vw, 104px); margin: 0; }
.jg__head p { color: var(--ink-2); font-size: 15px; max-width: 420px; justify-self: end; margin: 0 0 10px; }

.next-project { display: block; margin-top: clamp(80px, 10vw, 160px); position: relative; height: 70vh; overflow: hidden; }
.next-project img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.45); transition: transform 1.6s var(--ease), filter 1s; }
.next-project:hover img { transform: scale(1.04); filter: brightness(0.6); }
.next-project__c { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 var(--gutter); }
.next-project__c h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 10vw, 170px); line-height: 0.9; letter-spacing: -0.03em; margin-top: 18px; }

/* Lightbox */
.lb {
  position: fixed; inset: 0; z-index: 120; background: #080706;
  display: grid; grid-template-rows: auto 1fr auto;
  opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.lb.is-open { opacity: 1; visibility: visible; }
.lb__top, .lb__bottom { display: flex; justify-content: space-between; align-items: center; padding: 18px var(--gutter); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lb__stage { position: relative; display: grid; place-items: center; overflow: hidden; padding: 0 var(--gutter); touch-action: pan-y; }
.lb__stage img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100svh - 150px); object-fit: contain; transition: opacity 0.35s, transform 0.5s var(--ease); }
.lb__stage img.is-swapping { opacity: 0; transform: scale(0.98); }
.lb__close { height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.lb__close:hover { background: var(--ink); color: var(--bg); }
.lb__nav { position: absolute; top: 0; bottom: 0; width: 30%; z-index: 2; }
.lb__nav--prev { left: 0; cursor: w-resize; }
.lb__nav--next { right: 0; cursor: e-resize; }
.lb__arrows { display: flex; gap: 8px; }
.lb__arrows button { width: 44px; height: 40px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 16px; }
.lb__arrows button:hover { background: var(--ink); color: var(--bg); }

/* =========================================================
   CONSEGNA
   ========================================================= */
.vault { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; }
.vault__media { position: relative; overflow: hidden; background: #000; }
.vault__media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.55); }
.vault__media blockquote { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 48px; font-family: var(--serif); font-size: clamp(30px, 3vw, 48px); line-height: 1.08; }
.vault__form { display: flex; flex-direction: column; justify-content: center; padding: 140px var(--gutter) 80px; max-width: 640px; }
.vault__title { font-size: clamp(52px, 6vw, 100px); margin: 22px 0 22px; }
.vault__text { color: var(--ink-2); margin-bottom: 44px; max-width: 440px; }
.pin-label { display: block; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 16px; }
.pin-inputs { display: flex; gap: 10px; }
.pin-box {
  width: 100%; max-width: 64px; aspect-ratio: 4 / 5; text-align: center;
  font-family: var(--serif); font-size: 30px;
  background: rgba(237,231,220,0.035); border: 0; border-bottom: 1px solid var(--line-2);
  border-radius: 0; color: var(--ink); outline: none;
  transition: border-color 0.3s, background-color 0.3s;
}
.pin-box:focus { border-color: var(--ink); background: rgba(237,231,220,0.04); }
.pin-box.error { border-color: var(--accent); animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pin-feedback { min-height: 1.5em; margin: 18px 0 8px; font-size: 14px; color: var(--ink-2); }
.pin-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.vault__note { display: flex; align-items: center; gap: 10px; margin-top: 40px; font-size: 12px; color: var(--muted); }
.pin-submit:disabled { opacity: 0.5; pointer-events: none; }

.delivery { padding: 140px var(--gutter) 100px; max-width: var(--max); margin: 0 auto; }
.delivery__top { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.delivery__top h2 { font-size: clamp(44px, 6vw, 96px); margin-top: 12px; }
.delivery__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.delivery__count { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.download-status { min-height: 1.4em; color: var(--ink-2); font-size: 14px; margin-bottom: 18px; }
.gallery-grid { columns: 4 260px; column-gap: 10px; }
.gallery-photo { position: relative; break-inside: avoid; margin-bottom: 10px; background: var(--bg-2); overflow: hidden; min-height: 160px; }
.gallery-photo img { width: 100%; height: auto; opacity: 0; transition: opacity 0.8s var(--ease); }
.gallery-photo img.loaded { opacity: 1; }
.photo-download {
  position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(11,10,9,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(6px); transition: all 0.4s var(--ease);
}
.gallery-photo:hover .photo-download, .photo-download:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .photo-download { opacity: 1; transform: none; } }
.btn-ghost { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); padding: 0 6px; height: 52px; }
.btn-ghost:hover { color: var(--ink); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* 404 */
.notfound { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter); }
.notfound h1 { font-size: clamp(120px, 26vw, 400px); line-height: 0.8; }
.notfound p { color: var(--ink-2); margin: 24px 0 36px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .credit a, .credit > div { grid-template-columns: 50px 1.4fr 1fr 30px; }
  .credit__meta--2 { display: none; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__top > p { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .brand__sub { display: none; }

  .hero__content { grid-template-columns: 1fr; gap: 22px; bottom: calc(5vh + 46px); }
  .hero__title { font-size: clamp(64px, 20vw, 150px); }
  .hero__title .mask:nth-child(2) { padding-left: 0.5em; }
  .hero__aside { max-width: none; padding-bottom: 0; }
  .hero__aside p { margin: 0 0 20px; font-size: 15px; }
  .hero__bar { height: 5vh; }
  .hud--bottom { bottom: calc(5vh - 22px); }
  .corner--tl, .corner--tr { top: calc(5vh + 76px); }

  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .section-head p { justify-self: start; }

  .reel__pin { height: auto; padding: 110px 0 40px; }
  .reel__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .reel__track::-webkit-scrollbar { display: none; }
  .frame { scroll-snap-align: center; }
  .frame__img, .frame--port.frame--lo .frame__img { height: 58vh; height: 58svh; }
  .reel__end { width: 78vw; padding-right: var(--gutter); }

  .credit a, .credit > div { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .credit__n { grid-column: 1 / -1; }
  .credit__meta, .credit__meta--2 { grid-column: 1 / -1; display: block; }
  .credit__arrow { grid-row: 2; grid-column: 2; }
  .credit__thumb { display: block; grid-column: 1 / -1; aspect-ratio: 16 / 9; overflow: hidden; margin-top: 8px; }
  .credit__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .preview { display: none; }

  .work, .work:nth-child(even) { grid-template-columns: 1fr; gap: 28px; }
  .work__media, .work:nth-child(even) .work__media, .work__info, .work:nth-child(even) .work__info { grid-column: 1; grid-row: auto; }
  .work__media { aspect-ratio: 4 / 5; }
  .work__media .work__portrait { width: 36%; }

  .about { grid-template-columns: 1fr; gap: 48px; }
  .about__photo, .about__body { grid-column: 1; }
  .about__photo { position: relative; top: 0; }
  .about__body { padding-top: 0; }
  .about__video { grid-template-columns: 110px 1fr; gap: 20px; }
  .about__video video { width: 110px; }

  .service { grid-template-columns: 40px 1fr; }
  .service p { grid-column: 2; }

  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 32px 0; border-right: 0; border-bottom: 1px solid var(--line); }

  .contact__grid { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }

  .footer__top { grid-template-columns: 1fr 1fr; }

  .p-intro { grid-template-columns: 1fr; }
  .p-meta { justify-content: start; grid-template-columns: repeat(2, auto); }
  .jg__row { gap: 6px; margin-bottom: 6px; }
  .jg__head { grid-template-columns: 1fr; padding-top: 56px; }
  .jg__head p { justify-self: start; margin: 0; }
  .p-index { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .p-index::-webkit-scrollbar { display: none; }
  .p-index a { flex: 0 0 auto; }

  .vault { grid-template-columns: 1fr; }
  .vault__media { height: 42vh; order: -1; }
  .vault__media blockquote { bottom: 24px; font-size: 26px; }
  .vault__form { padding: 48px var(--gutter) 80px; }
  .delivery { padding-top: 110px; }
  .gallery-grid { columns: 2 140px; column-gap: 6px; }
  .gallery-photo { margin-bottom: 6px; }
}

@media (max-width: 520px) {
  .stats { gap: 22px; }
  .work__meta { flex-wrap: wrap; gap: 10px 18px; }
  .pin-inputs { gap: 6px; }
  .pin-box { font-size: 26px; }
  .lb__top, .lb__bottom { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .grain { display: none; }
}
