/* Smetch — Michel Sirotti
   Layout: griglia 1420px su base 1512 (gutter 46), sezioni a tutta larghezza alternate chiaro/nero.
   Valori ricavati dal file Figma "Smetch" (MS-Home desktop + iPhone mobile). */
:root {
  --black: #050505;
  --ink: #292929;          /* testo nav, bordi card */
  --light: #f4f4f4;        /* fondo hero */
  --pale: #d9d9d9;         /* titoli su nero, fascia contatti */
  --grey: #8c8c8c;         /* testo secondario */
  --dim: #292929;          /* testo non ancora letto */
  --red: #de3636;          /* accento */
  --purple: #b478c8;       /* accento progetto Doody */
  --white: #f7f7f7;

  --font: "Jost", "Futura", "Avenir Next", "Century Gothic", sans-serif;
  --font-label: "Poppins", "Jost", "Avenir Next", sans-serif;

  --max: 1420px;
  --gutter: clamp(12px, 3.05vw, 46px);
  color-scheme: light;
}

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

/* ---------- Transizione di pagina: pannello rosso che sale e riscende ---------- */
.page-transition {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: var(--red); transform: translateY(101%); visibility: hidden;
}
.pt-full .page-transition, .pt-in .page-transition, .pt-out .page-transition { visibility: visible; }
.pt-full .page-transition { animation: pt-full 1.25s cubic-bezier(.7, 0, .3, 1) both; }
.pt-in .page-transition { animation: pt-in .7s cubic-bezier(.7, 0, .3, 1) both; }
.pt-out .page-transition { transform: none; transition: transform .55s cubic-bezier(.7, 0, .3, 1); pointer-events: auto; }
.pt-full { --pt-delay: .7s; }
.pt-in { --pt-delay: .2s; }
@keyframes pt-full {
  0% { transform: translateY(101%); }
  44%, 56% { transform: none; }
  100% { transform: translateY(101%); }
}
@keyframes pt-in {
  0%, 12% { transform: none; }
  100% { transform: translateY(101%); }
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--pale);
  font-family: var(--font);
  font-size: 18px;
  line-height: 30px;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- Pulsanti e link ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 220px; height: 46px; padding-inline: 24px;
  border: 1px solid currentColor; border-radius: 60px;
  font-size: 18px; line-height: 32px; letter-spacing: 0.05em;
  transition: background-color .25s, color .25s, border-color .25s;
}
.pill--light { color: var(--pale); }
.pill--light:hover { background: var(--pale); color: var(--black); }
.pill--dark { color: var(--black); }
.pill--dark:hover { background: var(--black); color: var(--pale); }
.pill--muted { color: var(--grey); border-color: var(--ink); font-size: 16px; }
.pill--muted:hover { border-color: var(--pale); color: var(--pale); }

.arrow-link {
  display: inline-flex; align-items: center; gap: 11px;
  font-size: 14.2px; letter-spacing: 0.1em; line-height: 1.2;
}
.arrow-link img { width: 28px; height: auto; transition: transform .25s; }
.arrow-link:hover img { transform: translateX(6px); }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--light); color: var(--ink);
  /* header + fascia nera = esattamente uno schermo all'apertura */
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--idbar-h, 120px));
  min-height: calc(100svh - var(--idbar-h, 120px));
}
.site-header > .wrap { flex: 1 0 auto; display: flex; flex-direction: column; }
/* La hero resta ferma e il resto della pagina le scorre sopra */
.site-header { position: sticky; top: 0; z-index: 0; overflow: hidden; isolation: isolate; }
/* Marchio ingrandito sullo sfondo della hero */
.hero__bg {
  position: absolute; z-index: -1; pointer-events: none; user-select: none;
  left: 50%; top: 50%;
  width: max(104vw, 145svh); max-width: none; height: auto;
  transform: translate(-44%, -47%);
}
.idbar, main { position: relative; z-index: 1; background: var(--black); }
.menu-open .site-header { z-index: 40; }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 20px; border-bottom: 1px solid var(--black);
}
.nav__logo img { width: 50px; height: 50px; }
.nav__links { display: flex; gap: clamp(60px, 17.2vw, 260px); }
.nav__links a {
  position: relative; width: 100px; text-align: center;
  font-size: 24px; line-height: 30px; color: var(--ink);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -36px; height: 6px;
  background: var(--black); transform: scaleX(0); transition: transform .3s;
}
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__toggle { display: none; }

/* ---------- Hero (slider) ---------- */
.hero { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; }
.hero__slides { position: relative; display: grid; flex: 1 0 auto; }
.slide {
  grid-area: 1 / 1;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding: 40px 0;
  --hero-h: calc(100svh - var(--idbar-h, 120px) - var(--nav-h, 91px));
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility 0s linear .7s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s ease; }
.slide__text { flex: 1 1 0; min-width: 0; max-width: 820px; display: flex; flex-direction: column; gap: clamp(26px, 3.4vh, 40px); }
.slide__title {
  font-weight: 700; font-size: clamp(56px, 6.4vw, 104px); line-height: .957; letter-spacing: -0.05em;
  color: var(--black); text-wrap: balance;
}
.slide__title .accent-purple { color: var(--purple); }
.slide__title .accent-grey { color: var(--grey); }
.slide__title .accent-red { display: block; color: var(--red); }
.slide__grid {
  --card-h: clamp(140px, calc((var(--hero-h) - 200px) / 2), 240px);
  flex: none; display: flex; flex-direction: column; gap: calc(var(--card-h) * .076);
  margin-right: clamp(0px, 5vw, 90px);
}
.slide__row { display: flex; gap: calc(var(--card-h) * .053); }
.slide__row:first-child { padding-left: calc(var(--card-h) * .25); }
.slide__grid img {
  width: auto; height: var(--card-h); aspect-ratio: 113 / 171; object-fit: cover; border-radius: calc(var(--card-h) * .123);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .22);
  transition: transform .35s ease;
}
.slide__grid img:hover { transform: translateY(-6px); }
.slide__body { padding-left: clamp(20px, 8.6vw, 140px); display: flex; flex-direction: column; gap: 26px; color: var(--black); }
.slide__body p { max-width: 600px; }
.slide__media { flex: none; width: auto; margin-right: clamp(0px, 5vw, 90px); }
.slide__media img { width: auto; height: clamp(320px, calc(var(--hero-h) - 100px), 860px); aspect-ratio: 385 / 580; object-fit: cover; border-radius: clamp(24px, 2.4vw, 40px); box-shadow: 0 10px 40px rgba(0, 0, 0, .12); transition: transform .5s; }
.slide__media:hover img { transform: scale(1.02); }
.slide__pills { flex: none; width: clamp(300px, 27vw, 500px); margin-right: clamp(0px, 5vw, 90px); display: flex; flex-direction: column; gap: clamp(14px, 2.4vh, 28px); }
.slide__pills a {
  display: flex; align-items: center; justify-content: center; height: clamp(62px, 8.6vh, 100px);
  border: 1px solid var(--black); border-radius: 60px; background: var(--black); color: var(--white);
  font-weight: 600; font-size: clamp(24px, 2.3vw, 40px); line-height: 1; letter-spacing: -0.02em;
  transition: background-color .25s, color .25s;
}
.slide__pills a:hover { background: transparent; color: var(--black); }

.hero__dots {
  position: absolute; left: 10px; bottom: 37px;
  display: flex; flex-direction: column; gap: 10px;
}
.hero__dots button {
  width: 10px; height: 10px; padding: 0; border: 1px solid var(--black); background: transparent; cursor: pointer;
}
.hero__dots button[aria-selected="true"] { background: var(--black); }

/* ---------- Animazione d'ingresso hero ----------
   1. il marchio di sfondo arriva con uno zoom out
   2. gli elementi della slide compaiono uno dopo l'altro */
@media (prefers-reduced-motion: no-preference) {
  .hero-intro .hero__bg { animation: logo-zoom 1.6s cubic-bezier(.16, 1, .3, 1) var(--pt-delay, 0s) both; }
  .slide.is-active .a-item {
    animation: item-in .9s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: calc(var(--base, .2s) + var(--i, 0) * .11s);
  }
  .hero-intro .a-item { --base: calc(1s + var(--pt-delay, 0s)); }
}
@keyframes logo-zoom {
  from { scale: 1.9; opacity: 0; }
  35%  { opacity: 1; }
  to   { scale: 1; opacity: 1; }
}
@keyframes item-in {
  from { opacity: 0; translate: 0 34px; }
  to   { opacity: 1; translate: none; }
}

/* ---------- Fascia identità ---------- */
.idbar { background: var(--black); }
.idbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 120px; padding-block: 20px; }
.idbar__name { font-weight: 700; font-size: 24px; line-height: 24px; color: var(--light); }
.idbar__role { font-size: 18px; line-height: 30px; color: var(--grey); }
.social { position: relative; display: flex; align-items: center; gap: 11px; }
.social ul { display: flex; flex-direction: column; gap: 5px; font-size: 14px; letter-spacing: 0.1em; line-height: 20px; }
.social a { color: var(--grey); transition: color .2s; }
.social a.is-on, .social a:hover { color: var(--light); }
.social__arrow { width: 28px; height: auto; transition: translate .3s ease; }

/* ---------- Intro ---------- */
.intro { padding-top: 87px; }
.intro__portrait { width: 137px; height: auto; }
.intro__statement {
  margin-top: 25px;
  font-weight: 500; font-size: clamp(32px, 4.63vw, 70px); line-height: 1.143; letter-spacing: -0.05em;
  color: var(--pale);
}
.intro__statement em { font-style: normal; color: var(--red); }
/* Riempimento lettera per lettera allo scroll (attivato da JS) */
.fill-word { display: inline-block; white-space: nowrap; }
.fill-char { color: var(--dim); transition: color .18s linear; }
.fill-char.is-on { color: var(--pale); }
em .fill-char.is-on { color: var(--red); }
.intro__side { width: min(580px, 100%); margin: 51px 0 0 auto; display: flex; flex-direction: column; gap: 25px; align-items: flex-start; color: var(--grey); }
.intro__place { margin-top: 11px; color: var(--grey); }

/* ---------- Etichette di sezione ---------- */
.label {
  position: relative; display: flex; align-items: center; gap: 15px;
  padding: 14px 14px 0;
  border-top: 1px solid var(--ink);
  font-family: var(--font-label); font-weight: 700; font-size: 18px; line-height: 18px; color: var(--red);
}
.label img { width: 19px; height: auto; aspect-ratio: 31.16 / 28.3; }
/* Etichette di sezione fisse in alto finché non arriva la sezione successiva */
.label {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  padding-bottom: 14px; background: var(--black);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--black); }

/* ---------- Servizi ---------- */
.services { position: relative; margin-top: 98px; isolation: isolate; overflow-x: clip; }
.services__bg {
  position: absolute; z-index: -1; top: 192px; left: calc(50% - 454px);
  width: 1155px; max-width: none; height: auto; opacity: .055; pointer-events: none;
}
.services__list { display: flex; flex-direction: column; gap: 91px; padding-top: 86px; }
.service { display: grid; grid-template-columns: 460px minmax(0, 940px); justify-content: space-between; align-items: start; }
.service__num {
  font-weight: 200; font-size: 360px; line-height: 265px; height: 265px;
  color: transparent; -webkit-text-stroke: 1px var(--grey); letter-spacing: -0.02em;
  margin-left: -14px; user-select: none;
}
.service__head { display: flex; flex-direction: column; gap: 20px; }
.service__title { font-weight: 600; font-size: clamp(33px, 3.57vw, 54px); line-height: 50px; letter-spacing: -0.06em; color: var(--pale); }
.service__desc { color: var(--grey); }
.service__items { margin-top: 50px; }
.service__items li {
  display: flex; align-items: center; gap: 19px; height: 65px;
  border-bottom: 1px solid var(--ink);
  font-size: 20px; color: var(--grey);
}
.service__items img { width: 13px; height: auto; aspect-ratio: 31.16 / 28.3; flex: none; }

/* ---------- Ogni progetto ha una storia ---------- */
.story { padding-top: 132px; padding-bottom: 108px; text-align: center; }
.story__title { font-weight: 700; font-size: clamp(46px, 7.14vw, 108px); line-height: .935; letter-spacing: -0.05em; color: var(--white); }
.story__title span { display: block; color: var(--red); }
.story__sub { margin-top: 0; font-weight: 500; font-size: clamp(20px, 1.98vw, 30px); line-height: 80px; color: var(--grey); }

/* ---------- Progetti ---------- */
.projects { --stick: 47px; }
.projects > .wrap { max-width: none; }
/* Progetti impilati: ognuno occupa lo schermo, resta fisso sotto l'etichetta
   e si rimpicciolisce mentre il successivo sale dal basso */
.projects__list { display: flex; flex-direction: column; gap: 8vh; padding-top: 16px; }
.project {
  position: sticky; top: calc(var(--stick) + 16px);
  height: calc(100vh - var(--stick) - 32px);
  height: calc(100svh - var(--stick) - 32px);
  display: grid; grid-template-columns: minmax(0, 820fr) minmax(0, 580fr); gap: 20px;
  background: var(--black);
  transform-origin: 50% 0;
  will-change: transform, opacity;
}
.project__media { position: relative; border-radius: 30px; overflow: hidden; height: 100%; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project:hover .project__media img { transform: scale(1.03); }
.project__card { min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 30px;
  padding: clamp(22px, 2vw, 32px) clamp(24px, 2.4vw, 36px) clamp(14px, 1.2vw, 20px) clamp(22px, 2vw, 30px);
  border: 1px solid var(--ink); border-radius: 30px;
}
.project__title { font-weight: 700; font-size: clamp(32px, 2.78vw, 46px); line-height: 1.2; letter-spacing: -0.01em; color: var(--pale); }
.project__desc { margin-top: clamp(14px, 1.4vw, 24px); max-width: 640px; font-size: clamp(15px, 1.06vw, 17px); line-height: 1.6; color: var(--grey); }
.project__items li {
  padding: clamp(10px, 1vw, 15px) 0;
  border-top: 1px solid var(--ink);
  font-size: clamp(13px, .93vw, 15px); line-height: 20px; color: var(--grey);
}
.projects__more { display: flex; justify-content: flex-end; margin-top: 86px; }

/* Schermi bassi: compatta il blocco info perché stia sempre nell'altezza disponibile */
@media (min-width: 761px) and (max-height: 760px) {
  .project__items li { padding-block: 8px; }
}
@media (min-width: 761px) and (max-height: 600px) {
  .project__desc { font-size: 14px; line-height: 22px; }
  .project__items li { padding-block: 5px; font-size: 13px; }
}

/* Cursore "View" sulle card progetto (solo mouse) */
.cursor-view {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none;
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0);
}
.cursor-view span {
  display: flex; align-items: center; justify-content: center;
  width: 100px; height: 100px; margin: -50px 0 0 -50px; border-radius: 50%;
  background: var(--red); color: var(--white);
  font-weight: 400; font-size: 18px; letter-spacing: 0.02em;
  transform: scale(0); transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.cursor-view.is-on span { transform: scale(1); }
@media (hover: hover) and (pointer: fine) {
  .has-view-cursor .project, .has-view-cursor .project * { cursor: none; }
}

/* ---------- Claim + contatti ---------- */
.contact-block { margin-top: 129px; }
.claim { position: relative; isolation: isolate; overflow-x: clip; padding-top: 221px; padding-bottom: 136px; }
.claim__bg {
  position: absolute; z-index: -1; right: 0; bottom: -62px;
  width: 1157px; max-width: none; height: auto; pointer-events: none;
}
.claim__text {
  font-weight: 700; font-size: clamp(48px, 9.66vw, 146px); line-height: .959; letter-spacing: -0.06em;
  text-align: center; color: var(--pale); text-wrap: balance;
}
.claim__text em { font-style: normal; color: var(--red); }

.cta { position: relative; z-index: 1; background: var(--pale); color: var(--black); text-align: center; }
.cta__inner { display: flex; flex-direction: column; align-items: center; padding-block: 113px 0; }
.cta__portrait { width: 106px; height: auto; }
.cta__name { margin-top: 37px; font-weight: 700; font-size: 23px; line-height: 30px; }
.cta__role { font-size: 20px; line-height: 30px; color: var(--grey); }
.cta__q { margin-top: 50px; font-weight: 700; font-size: clamp(26px, 2.78vw, 42px); line-height: 1.45; color: #0c0c0c; text-wrap: balance; }
.cta .pill { margin-top: 18px; }

.footer { margin-top: 139px; }
.footer__years { display: flex; align-items: center; justify-content: center; gap: 43px; font-size: 12px; letter-spacing: .3em; color: var(--grey); }
.footer__years img { width: 53px; height: 53px; }
.footer__legal { margin-top: 38px; border-top: 1px solid var(--black); }
.footer__legal p { padding-block: 26px 40px; font-size: 14px; line-height: 20px; text-align: center; color: var(--black); }
.footer__legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Animazioni d'ingresso (contenuto già visibile a riposo) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { transform: translateY(24px); opacity: .001; transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .8s ease; }
  .js .reveal.is-in { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .slide.is-active { transition: none; }
}

/* ======================================================
   Tablet
   ====================================================== */
@media (max-width: 1180px) {
  .service { grid-template-columns: minmax(0, 30fr) minmax(0, 70fr); }
  .service__num { font-size: 26vw; line-height: .74; height: auto; }
}

/* ======================================================
   Mobile (layout iPhone 393)
   ====================================================== */
@media (max-width: 760px) {
  body { font-size: 16px; line-height: 26px; }
  .nav { border-bottom: 0; padding-block: 22px 0; }
  .nav__logo img { width: 53px; height: 53px; }
  /* Logo e pulsante restano sopra il menu aperto, nella stessa posizione */
  .nav__logo, .nav__toggle { position: relative; z-index: 31; }
  .nav__toggle {
    display: block; width: 44px; height: 44px; margin-right: -8px; padding: 0;
    border: 0; background: none; cursor: pointer; color: var(--black);
  }
  .nav__toggle span:not(.sr-only) {
    position: absolute; left: 8px; width: 28px; height: 1.5px; border-radius: 1px; background: currentColor;
    transition: top .2s ease .2s, transform .2s ease;
  }
  .nav__toggle span:nth-child(1) { top: 17px; }
  .nav__toggle span:nth-child(2) { top: 26px; }
  /* aperto: le due linee si uniscono al centro e poi ruotano formando la X */
  .nav.is-open .nav__toggle span:not(.sr-only) { top: 21.5px; transition: top .2s ease, transform .2s ease .2s; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { transform: rotate(-45deg); }
  .nav__links {
    position: fixed; inset: 0; z-index: 30;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 24px;
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
    background: var(--light);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s;
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transition: opacity .3s; }
  .nav__links a {
    width: auto; text-align: left; font-weight: 700; font-size: 56px; line-height: 1; letter-spacing: -0.05em; color: var(--black);
    transition: color .2s;
  }
  .nav__links a::after { display: none; }
  .nav__links a:hover, .nav__links a:focus-visible, .nav__links a:active { color: var(--red); }

  .slide { flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px; padding: 20px 0 44px; }
  .slide__title { font-size: clamp(46px, 14vw, 92px); }
  .slide { --media-h: calc(var(--hero-h) - 380px); }
  .slide__body { padding-left: 20px; }
  .slide__media { width: 100%; margin: 0; }
  .slide__media img { width: auto; height: auto; max-width: 100%; aspect-ratio: 385 / 580; max-height: clamp(170px, var(--media-h), 520px); min-height: 0; }
  .slide__pills { width: 100%; margin: 0; }
  .slide__grid { margin: 0; --card-h: clamp(84px, calc((var(--media-h) - 12px) / 2), 152px); }
  .slide__text { flex: none; width: 100%; }
  .hero__bg { width: 230vw; transform: translate(-40%, -46%); }
  .slide__pills { gap: 12px; width: 100%; }
  .slide__pills a { font-size: 20px; height: 52px; }
  .hero__dots { left: auto; right: 0; bottom: 24px; flex-direction: row; }

  .idbar__inner { min-height: 0; padding-block: 16px; }
  .idbar__name { font-size: 20px; line-height: 22px; }
  .idbar__role { font-size: 15px; line-height: 24px; }
  .social ul { font-size: 13px; gap: 2px; }

  .intro { padding-top: 28px; }
  .intro__portrait { width: 149px; }
  .intro__statement { margin-top: 46px; line-height: 38px; letter-spacing: -0.05em; }
  .intro__side { margin-top: 21px; }

  /* Etichetta di sezione mobile: freccia grande, titolo e linea che prosegue fino al bordo */
  .label {
    height: 60px; padding: 0 0 0 8px; gap: 10px; border-top: 0;
    font-size: 18px; line-height: 1; letter-spacing: -0.01em;
  }
  .label img { width: 23px; }
  .label::after { content: ""; flex: 1; height: 1px; margin-left: 7px; background: var(--ink); }

  .services { margin-top: 92px; }
  .services__bg { display: none; }
  .services__list { gap: 70px; padding-top: 50px; }
  .service { grid-template-columns: 1fr; }
  .service__num { display: none; }
  .service__title { line-height: 50px; letter-spacing: -0.06em; font-weight: 700; }
  .service__head { gap: 6px; padding-bottom: 20px; }
  .service__items { margin-top: 0; margin-inline: calc(-1 * var(--gutter)); border-top: 1px solid var(--ink); }
  .service__items li { font-size: 16px; padding-left: calc(var(--gutter) + 12px); gap: 17px; }

  .story { padding-block: 90px 70px; }
  .story__title { line-height: .914; }
  .story__sub { line-height: 25px; margin-top: 12px; }

  .projects { --stick: 44px; }
  .projects__list { gap: 6vh; padding-top: 0; }
  /* Mobile: card unica con titolo, foto e caratteristiche (senza descrizione) */
  .project {
    display: flex; flex-direction: column; gap: 20px; min-height: 0;
    top: calc(var(--stick) + 8px);
    height: calc(100vh - var(--stick) - 16px); height: calc(100svh - var(--stick) - 16px);
    padding: 22px 20px 12px; border: 1px solid var(--ink); border-radius: 30px;
  }
  .project__card, .project__card > div { display: contents; }
  .project__title { order: 1; font-size: clamp(26px, 7.6vw, 34px); line-height: 1.1; }
  .project__desc { display: none; }
  .project__media { order: 2; flex: 1 1 auto; min-height: 140px; height: auto; border-radius: 24px; }
  .project__items { order: 3; flex: none; }
  .project__items li { padding: 11px 0; font-size: 14px; }
  .projects__more { justify-content: center; margin-top: 50px; }

  .contact-block { margin-top: 90px; }
  .claim { padding-block: 90px 80px; }
  .claim__bg { width: 100%; bottom: -20px; }

  .cta__inner { padding-top: 70px; }
  .footer { margin-top: 80px; }
}


/* ======================================================
   Pagine interne (About, Progetti, Contatti)
   ====================================================== */
.site-header--page { position: relative; z-index: 2; min-height: 0; overflow: visible; }
.site-header--dark { background: var(--black); color: var(--light); }
.site-header--dark .nav { border-bottom-color: var(--ink); }
.site-header--dark .nav__links a { color: var(--light); }
.site-header--dark .nav__links a::after { background: var(--ink); }

/* ---------- About ---------- */
.about-intro { padding-top: 94px; }
.about-statement {
  font-weight: 500; font-size: clamp(34px, 4.63vw, 70px); line-height: 1.143; letter-spacing: -0.04em;
  color: var(--pale);
}
.about-statement .about-portrait {
  display: inline-block; vertical-align: baseline;
  width: clamp(90px, 9vw, 137px); height: auto; margin-right: clamp(20px, 3.8vw, 58px);
}
.about-portrait--mobile { display: none; }
.about-cols {
  margin-top: 82px; columns: 2; column-gap: clamp(32px, 3.4vw, 51px);
  color: var(--grey);
}
.about-cols p { break-inside: auto; }
.about-cols p + p { margin-top: 30px; }
.about-years--mobile { display: none; }

.about-photo { margin: 250px 0 0; position: relative; overflow: hidden; aspect-ratio: 1512 / 772; }
/* Parallasse: l'immagine è più alta del riquadro e scorre più lenta della pagina */
.about-photo img {
  position: absolute; left: 0; top: -15%; width: 100%; height: 130%; max-width: none;
  object-fit: cover; will-change: transform;
}

.about-cta { padding-top: 148px; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.about-cta__text { max-width: 1346px; font-weight: 500; font-size: clamp(24px, 3.05vw, 46px); line-height: 1.4; letter-spacing: -0.02em; color: var(--light); }
.about-cta__text em { font-style: normal; color: var(--red); }
.pill--red { min-width: 313px; border-color: var(--red); background: var(--red); color: var(--black); }
.pill--red:hover { background: transparent; color: var(--red); }

.site-footer { margin-top: 250px; }
.site-footer .footer__legal { border-top-color: var(--ink); }
.site-footer .footer__legal p { color: var(--grey); }

@media (max-width: 760px) {
  .site-header--dark .nav__links { background: var(--black); }
  .site-header--dark .nav__links a { color: var(--light); }
  .site-header--dark .nav__links a:hover, .site-header--dark .nav__links a:focus-visible, .site-header--dark .nav__links a:active { color: var(--red); }
  .site-header--dark .nav__toggle { color: var(--light); }

  .about-intro { padding-top: 56px; }
  .about-statement { line-height: 1.12; letter-spacing: -0.04em; }
  .about-statement .about-portrait { display: none; }
  .about-portrait--mobile { display: block; width: 149px; height: auto; margin: 36px auto 0; }
  .about-cols { columns: 1; margin-top: 44px; font-size: 15px; line-height: 26px; }
  .about-years--mobile { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 56px; font-size: 12px; letter-spacing: .3em; color: var(--grey); }
  .about-years--mobile img { width: 53px; height: 53px; }
  .about-photo { margin-top: 56px; }
  .about-photo { aspect-ratio: 393 / 240; }
  .about-cta { padding-top: 40px; }
  .pill--red { min-width: 0; width: 100%; }
  .site-footer { margin-top: 110px; }
}


/* ---------- Contatti ---------- */
.contact { padding-top: 126px; display: grid; grid-template-columns: minmax(0, 538fr) minmax(0, 851fr); column-gap: clamp(32px, 2.2vw, 31px); justify-content: space-between; }
.contact > * { min-width: 0; }
.contact__intro { display: flex; flex-direction: column; }
.contact__title {
  font-weight: 700; font-size: clamp(48px, 6.4vw, 100px); line-height: .9; letter-spacing: -0.05em;
  color: var(--pale); white-space: nowrap;
}
.contact__sub { margin-top: 38px; max-width: 500px; font-weight: 500; font-size: clamp(22px, 1.98vw, 30px); line-height: 1.3; color: var(--grey); }
.social--contact { margin-top: 110px; align-self: flex-start; align-items: flex-start; }
.social--contact ul { gap: 12px; font-size: 16px; }
.social--contact .social__arrow { position: absolute; left: 0; top: 0; rotate: 180deg; }

.contact__form { margin-top: calc(clamp(48px, 6.4vw, 100px) * 1.8 + 34px); display: flex; flex-direction: column; }
.field { position: relative; padding-top: 26px; border-bottom: 1px solid var(--ink); transition: border-color .25s; }
.field + .field { margin-top: 46px; }
.field:focus-within { border-bottom-color: var(--grey); }
.field label {
  position: absolute; left: 0; top: 26px; pointer-events: none;
  font-size: 18px; line-height: 30px; color: #c9c9c9;
  transform-origin: 0 0; transition: transform .25s ease, color .25s;
}
.field input, .field textarea {
  display: block; width: 100%; padding: 0 0 12px; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 18px; line-height: 30px; color: var(--light); resize: none;
}
.field textarea { min-height: 42px; overflow: hidden; }
.field input:focus ~ label, .field input:not(:placeholder-shown) ~ label,
.field textarea:focus ~ label, .field textarea:not(:placeholder-shown) ~ label { transform: translateY(-26px) scale(.78); color: var(--grey); }
.field.is-invalid { border-bottom-color: var(--red); }
.field__error { position: absolute; right: 0; top: 30px; font-size: 13px; color: var(--red); }
.contact__send {
  margin-top: 74px; align-self: flex-start; min-width: 197px; height: 46px; padding-inline: 32px;
  border: 1px solid var(--pale); border-radius: 60px; background: var(--pale); color: var(--black);
  font: inherit; font-size: 18px; letter-spacing: .02em; cursor: pointer; transition: background-color .25s, color .25s;
}
.contact__send:hover { background: transparent; color: var(--pale); }
.contact__status { margin-top: 18px; min-height: 30px; color: var(--grey); }
.contact__status.is-ok { color: var(--light); }

.contact__info { margin-top: 104px; display: flex; flex-direction: column; gap: 22px; font-family: var(--font-label); font-size: 18px; line-height: 30px; color: var(--grey); }
.contact__info b { font-weight: 700; color: var(--light); }
.contact__info a:hover { color: var(--light); }

@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; padding-top: 56px; }
  .contact__sub { margin-top: 20px; }
  .social--contact { margin-top: 44px; }
  .contact__form { margin-top: 56px; }
  .field + .field { margin-top: 34px; }
  .contact__send { margin-top: 48px; width: 100%; }
  .contact__info { margin-top: 64px; font-size: 16px; gap: 14px; }
}


/* ---------- Portfolio ---------- */
.pf-intro { padding-top: 70px; padding-bottom: 80px; }
.pf-title { font-weight: 700; font-size: clamp(46px, 6.4vw, 96px); line-height: .94; letter-spacing: -0.05em; color: var(--pale); text-wrap: balance; }
.pf-sub { margin-top: 30px; max-width: 560px; font-size: clamp(16px, 1.32vw, 20px); line-height: 1.6; color: var(--grey); }

.pf-outro { margin-top: clamp(100px, 10vw, 160px); }
.pf-update { display: flex; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.pf-update b { font-weight: 600; color: var(--pale); }
.pf-outro .about-cta { padding-top: 40px; }

@media (max-width: 760px) {
  .pf-intro { padding-top: 48px; padding-bottom: 50px; }
  .br-desk { display: none; }
  .pf-update { flex-direction: column; gap: 4px; }
}


/* ======================================================
   Pagina di dettaglio progetto (case study)
   ====================================================== */
.cs { background: var(--black); }
/* La foto di apertura resta ferma e si scurisce mentre il contenuto sale a coprirla */
.cs-hero { position: sticky; top: 0; z-index: 0; overflow: hidden; height: min(60.6vw, 100svh); min-height: 320px; }
.cs-hero img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.cs-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: #000; opacity: var(--dim, 0); pointer-events: none; }
.cs-body { position: relative; z-index: 1; background: var(--black); }
.cs-close {
  position: absolute; z-index: 2;
  top: max(24px, calc(env(safe-area-inset-top, 0px) + 16px)); right: max(var(--gutter), env(safe-area-inset-right, 0px));
  width: 52px; height: 52px; display: grid; place-items: center; color: var(--white);
  transition: rotate .3s ease, opacity .2s;
}
.cs-close:hover { rotate: 90deg; }
.cs-close svg { width: 34px; height: 34px; }

.cs-text {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter);
  padding-block: clamp(56px, 7.4vw, 112px) clamp(80px, 16vw, 300px);
}
.cs-text--short { padding-block: clamp(56px, 6vw, 90px) clamp(70px, 9vw, 150px); }
.cs-title { font-weight: 700; font-size: clamp(44px, 5.4vw, 84px); line-height: 1; letter-spacing: -0.04em; color: var(--pale); }
.cs-lead {
  grid-column: 2; max-width: min(44vw, 660px);
  font-weight: 400; font-size: clamp(20px, 2.7vw, 41px); line-height: 1.26; letter-spacing: -0.01em; color: var(--light);
}
.cs-lead em { font-style: normal; color: var(--purple); }

.cs-img { display: block; width: 100%; height: auto; }
.cs-band { background: #b378c8; text-align: center; padding: clamp(60px, 10.5vw, 170px) var(--gutter) clamp(56px, 8vw, 130px); }
.cs-band img { width: min(47.5vw, 720px); height: auto; margin-inline: auto; }

/* Logo Doody: la griglia di costruzione si disegna, poi compare il logo e la griglia sfuma.
   Stato finale (senza JS o con "riduci movimento"): solo il logo. */
.logo-grid { display: block; width: min(55.6vw, 842px); height: auto; margin-inline: auto; overflow: visible; }
.lg-grid { opacity: 0; }
.lg-grid .g-main { stroke-width: 1; }
.lg-grid .g-thin { stroke-width: .4; }
.lg-logo path { transform-box: fill-box; transform-origin: 50% 60%; }

.logo-grid.is-armed .lg-grid { opacity: 1; }
.logo-grid.is-armed .lg-grid line, .logo-grid.is-armed .lg-grid circle, .logo-grid.is-armed .lg-grid > path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.logo-grid.is-armed .lg-nums { opacity: 0; }
.logo-grid.is-armed .lg-logo path { opacity: 0; transform: scale(.94); }

.logo-grid.is-drawn .lg-grid line, .logo-grid.is-drawn .lg-grid circle, .logo-grid.is-drawn .lg-grid > path {
  stroke-dashoffset: 0; transition: stroke-dashoffset .9s cubic-bezier(.6, 0, .3, 1) var(--d);
}
.logo-grid.is-drawn .lg-nums { opacity: 1; transition: opacity .6s ease var(--d); }
.logo-grid.is-drawn .lg-logo path { opacity: 1; transform: none; transition: opacity .6s ease var(--d), transform .8s cubic-bezier(.2, .7, .2, 1) var(--d); }
.logo-grid.is-drawn .lg-grid { opacity: 0; transition: opacity 1.2s ease var(--fade); }
.cs-band p { max-width: none; margin: clamp(40px, 6.6vw, 100px) auto 0; font-size: clamp(17px, 2.3vw, 35px); line-height: 1.3; color: var(--light); text-wrap: balance; }
.cs-band strong { font-weight: 500; color: var(--black); }

.cs-cards {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.26vw, 19px);
  padding-block: clamp(50px, 6.2vw, 94px) clamp(24px, 3vw, 46px);
}
.cs-cards img { width: 100%; height: auto; aspect-ratio: 295 / 481; object-fit: cover; border-radius: clamp(14px, 1.5vw, 22px); }
.cs-wide { padding-top: clamp(40px, 5vw, 80px); }
.cs-feature { width: min(65vw, 980px); margin: clamp(60px, 10.6vw, 160px) auto 0; }

.cs-end { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: clamp(90px, 11vw, 170px); }
.cs-all {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding-inline: 38px;
  border: 1px solid var(--pale); border-radius: 60px; color: var(--light); font-size: 18px;
  transition: background-color .25s, color .25s;
}
.cs-all svg { width: 13px; height: 13px; }
.cs-all:hover { background: var(--pale); color: var(--black); }
.cs-top {
  width: 32px; height: 46px; padding: 0; border: 0; border-radius: 60px; background: var(--red); color: var(--white);
  display: grid; place-items: center; cursor: pointer; transition: translate .25s;
}
.cs-top:hover { translate: 0 -4px; }
.cs-top svg { width: 12px; height: 18px; }
.cs .site-footer { margin-top: clamp(110px, 12vw, 190px); }

@media (max-width: 760px) {
  .cs-hero { height: 78svh; }
  .cs-text { grid-template-columns: 1fr; row-gap: 26px; }
  .cs-lead { grid-column: 1; max-width: none; }
  .cs-band p { max-width: none; }
  .cs-band img { width: 72vw; }
  .logo-grid { width: 84vw; }
  .cs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-feature { width: calc(100% - 2 * var(--gutter)); }
}
