/* ────────────────────────────────────────────────────────────
   INSITU SRL — Global Stylesheet
   ──────────────────────────────────────────────────────────── */

:root {
  --bg:      #F0F0EE;
  --ink:     #111111;
  --muted:   #888888;
  --line:    #D8D8D4;
  --white:   #ffffff;
  --helmet:  #E8651A;   /* NCS S1080-Y70R — unico accento cromatico */
  --serif:   'Avenir Next', 'Avenir', 'Gill Sans Nova', 'Gill Sans', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
  --edge: 8px;          /* margine minimo dal bordo — testi respirano, foto no */
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── CURSOR — semicerchio (casco della I del logo) ────────── */
* { cursor: none; }
/* Cursore: casco arancione pieno — copia esatta del caschetto della I */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 6px;
  background: var(--helmet);
  border-radius: 6px 6px 0 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-500px, -500px, 0) translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
  will-change: transform;
}
#cursor.hover { opacity: 0.6; }
#cursor.click { opacity: 0.3; }

/* Bagliore pulsante alla nascita del cappellino — più evidenza senza ingrandirlo */
@keyframes capPulse {
  0%   { box-shadow: 0 0 0 0 rgba(232, 101, 26, 0.55); }
  70%  { box-shadow: 0 0 0 16px rgba(232, 101, 26, 0); }
  100% { box-shadow: 0 0 0 16px rgba(232, 101, 26, 0); }
}
#cursor.birth { animation: capPulse 1.1s var(--ease-out); }

/* Accento arancione fisso per mobile: parte permanente del logo (non un
   cursore) — nasce con l'intro e resta in flow nello stage, scorrendo
   naturalmente con la pagina come il resto del logo. */
.hero-logo-accent {
  position: absolute;
  background: var(--helmet);
  border-radius: 999px 999px 0 0;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
}

/* Su touch (mobile/tablet) non esiste un puntatore — nascondi il casco
   cursore: sul logo compare invece l'accento fisso qui sopra. */
@media (hover: none) {
  #cursor { display: none; }

  /* Card progetti — la pressione del dito sostituisce l'hover del mouse */
  .project-card.touch-active .img-before { opacity: 0; }
  .project-card.touch-active .project-card-info { opacity: 1; transform: translateY(0); }
}

/* Su desktop il puntino nasce come cursore: non serve il secondo elemento fisso */
@media (hover: hover) {
  .hero-logo-accent { display: none; }
}

/* ── NAV ──────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px var(--edge);
}

/* Mini logo SVG nel nav — invisibile finché non si scrolla */
.nav-logo-wrap {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
nav.scrolled .nav-logo-wrap {
  opacity: 1;
  transform: translateY(0);
}
.nav-logo-svg {
  width: 260px;
  height: 15px;
  display: block;
  fill: var(--ink);
}
/* Micro animazione discreta sul logo quando appare */
@keyframes logoReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}
nav.scrolled .nav-logo-svg {
  animation: logoReveal 0.6s var(--ease-out) forwards;
}

nav .nav-links {
  display: flex;
  gap: 56px;
  list-style: none;
}
nav .nav-links a {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  position: relative;
}
nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 100%; height: 6px;
  background: var(--helmet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
nav .nav-links a:hover::after { transform: scaleX(1); }

/* ── HERO ─────────────────────────────────────────────────── */
#hero {
  position: relative;
  width: 100vw;
  height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 36px;
  overflow: hidden;
}

#hero-stage {
  position: relative;
  width: 680px;
  max-width: 88vw;
  height: 56px;
  /* Su mobile lo schermo è stretto: lo spostamento usato su desktop per
     centrare solo "insitu" farebbe leggere l'intero blocco come spostato
     a destra. Qui "insitu s.r.l." resta un'unica scritta centrata nel suo
     insieme. */
}
/* Desktop: la scritta occupa una percentuale fissa della larghezza utile
   dello schermo (~50%), invece di una dimensione fissa in px. Il sottotitolo
   scala in proporzione (stesso rapporto dell'originale 680px / 14px / 30px). */
@media (min-width: 901px) {
  #hero-stage {
    width: 50vw;
    max-width: none;
    height: 4.12vw;
    /* Il box include anche la piccola "s.r.l." a destra, che altrimenti
       sposta "insitu" a sinistra del vero centro pagina. Spostiamo l'intero
       stage di (50% - 38.26%) verso destra così è "insitu" — non l'intero
       blocco "insitu s.r.l." — a risultare centrato sulla pagina. Su schermi
       larghi questo scarto è impercettibile; su mobile no, per questo si
       applica solo qui. */
    transform: translateX(11.74%);
  }
  .hero-service {
    font-size: 1.03vw;
    margin-top: 2.21vw;
  }
}

.hero-service {
  position: absolute;
  /* 38.26% = centro della sola scritta "INSITU" nel logo (0 -> 168.86 su viewBox 220.64),
     non il centro dell'intero blocco che includa anche la piccola "srl" più a destra */
  left: 38.26%;
  top: 100%;
  margin-top: 30px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  opacity: 0;
  animation: fadeIn 0.8s 2.8s forwards;
}

.hero-clock {
  position: absolute;
  bottom: 40px; left: 56px;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: .08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hero-mark {
  position: absolute;
  bottom: 40px; right: 56px;
  /* SVG mark in basso a destra */
}
.hero-mark svg {
  width: 70px;
  height: auto;
  fill: var(--muted);
  display: block;
}

.hero-scroll {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
}
.hero-scroll.is-visible { opacity: 0.45; }
.hero-scroll.hidden { opacity: 0 !important; pointer-events: none; }
.hero-scroll-arrow {
  width: 44px;
  height: auto;
  color: var(--ink);
  display: block;
  animation: arrowBob 2.2s ease-in-out infinite;
}
@keyframes arrowBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(11px); }
}
@keyframes fadeIn { to { opacity: 1; } }

/* ── TYPOGRAPHY TOKENS ────────────────────────────────────── */
.section-eyebrow {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}
/* Crane-arm underline on section headings */
.section-eyebrow::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 6px;
  background: var(--helmet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.section-eyebrow:hover::after { transform: scaleX(1); }

/* Titoli sezione principali — spaziati */
.title-spaced {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1.1;
  position: relative;
  display: inline-block;
}
.title-spaced::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 6px;
  background: var(--helmet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.title-spaced:hover::after { transform: scaleX(1); }

/* ── WORK SECTION (homepage) ──────────────────────────────── */
#work {
  padding: 160px 0 180px;
}

.work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 var(--edge);
  margin-bottom: 48px;
}

/* SEE ALL — crane-arm underline */
.section-link {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  position: relative;
  /* area sensibile allargata (padding + margine negativo) senza spostare il testo */
  padding: 14px 4px 18px;
  margin: -14px -4px -18px;
}
.section-link::after {
  content: '';
  position: absolute;
  bottom: 14px; left: 4px;
  width: calc(100% - 8px); height: 6px;
  background: var(--helmet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.section-link:hover::after { transform: scaleX(1); }

/* 6 card uniformi portrait — 3 colonne full-width, griglia bianca sottile */
.projects-grid {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--white);
}

.project-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--line);
  display: block;
}
/* Wrapper media — copre l'intera card */
.project-card-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.project-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* PRIMA: sopra, in bianco e nero, perfettamente immobile */
.img-before {
  z-index: 2;
  filter: grayscale(100%) contrast(1.02);
  transition: opacity 1.1s var(--ease-out);
}
/* DOPO: sotto, a colori, rivelata sull'hover senza alcun movimento */
.img-after {
  z-index: 1;
}
.project-card:hover .img-before {
  opacity: 0;
}

.project-card-info {
  position: absolute;
  z-index: 10;
  bottom: 0; left: 0; right: 0;
  padding: 28px 22px;
  background: linear-gradient(to top, rgba(0,0,0,0.62) 0%, transparent 100%);
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  color: var(--white);
}
.project-card:hover .project-card-info { opacity: 1; transform: translateY(0); }

/* Card name — NESSUNA spaziatura tra le lettere */
.project-card-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.project-card-meta {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0.65;
}
.project-card-index {
  position: absolute;
  top: 18px; left: 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  color: rgba(255,255,255,0.5);
}

/* ── ABOUT + CONTACTS ─────────────────────────────────────── */
#about-contacts {
  padding: 160px 0 140px;
  border-top: 1px solid var(--line);
}

.about-contacts-grid {
  display: flex;
  flex-direction: column;
  padding: 0 var(--edge);
}

/* ─ About ─ */
.about-col {
  padding-right: 0;
  border-right: none;
  padding-bottom: 100px;
}

.about-text {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: -.005em;
  color: var(--ink);
  max-width: 520px;
}

/* Details block — "Sede: Milano" inline, stile editoriale */
.about-details {
  margin-top: 0;
  margin-bottom: 56px;
}
.about-detail-line {
  font-size: 15px;
  font-weight: 400;
  line-height: 2.1;
  color: #444;
  letter-spacing: .01em;
}
.about-collab-list {
  list-style: none;
  margin-top: 0;
  margin-bottom: 8px;
}
.about-collab-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  font-weight: 400;
  line-height: 2.1;
  color: #444;
  letter-spacing: .01em;
}
.about-collab-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 12px;
  width: 8px; height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--ink);
}
.about-collab-list li.is-primary::before {
  background: var(--helmet);
}
.about-detail-line strong {
  font-weight: 500;
  color: var(--ink);
}

/* Competenze list — dentro la colonna About */
.about-competenze { margin-top: 40px; }
.about-competenze-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.about-competenze-list { list-style: none; }
.about-competenze-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 2.1;
  color: var(--ink);
}
.about-competenze-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 12px;
  width: 8px; height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--helmet);
}

/* ─ Contacts ─ */
.contacts-col {
  padding-left: 0;
  border-top: 1px solid var(--line);
  padding-top: 80px;
}

.contact-block {
  padding: 12px 0;
}
.contact-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.contact-value {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.75;
  transition: opacity 0.3s;
}
.contact-value a:hover { opacity: 0.45; }
.contact-address {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 8px;
}

/* ── LET'S TALK CTA ───────────────────────────────────────── */
.contacts-data { margin-bottom: 0; }

.lets-talk {
  display: block;
  text-align: left;
  margin-top: 140px;
  background: none;
  border: none;
  padding: 0;
  cursor: none;
}
.lets-talk-title {
  display: block;
}
.lets-talk-text {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--ink);
}
.lets-talk-arrow {
  display: inline-block;
  margin-left: 16px;
  vertical-align: middle;
  font-size: clamp(24px, 3.6vw, 46px);
  font-weight: 400;
  color: var(--ink);
  transition: transform 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
.lets-talk:hover .lets-talk-arrow {
  transform: translate(5px, -5px);
  color: var(--helmet);
}
.lets-talk-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--muted);
}
.lets-talk-tag {
  position: relative;
  padding-left: 18px;
}
.lets-talk-tag::before {
  content: '';
  position: absolute;
  left: 0; top: 0.6em;
  width: 8px; height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--ink);
}

/* ── MODAL PREVENTIVO / APPUNTAMENTO ─────────────────────── */
.quote-overlay {
  position: fixed;
  inset: 0;
  background: rgba(240, 240, 238, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s var(--ease-out);
}
.quote-overlay.open {
  opacity: 1;
  visibility: visible;
}

.quote-panel {
  position: relative;
  width: min(540px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--bg);
  padding: 56px 48px;
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
}
.quote-overlay.open .quote-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.quote-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 28px; height: 28px;
  background: none;
  border: none;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  cursor: none;
  transition: opacity 0.3s var(--ease-out);
}
.quote-close:hover { opacity: 0.45; }

.quote-title {
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.1;
}
.quote-subtitle {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--muted);
  margin-bottom: 36px;
}

.quote-field { margin-bottom: 26px; }
.quote-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}
.quote-field input,
.quote-field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  padding: 5px 0 10px;
  transition: border-color 0.3s var(--ease-out);
  resize: none;
  cursor: text;
}
.quote-field input:focus,
.quote-field textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.quote-field textarea { line-height: 1.6; }

.quote-radio-group {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.quote-radio {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--ink);
  cursor: none;
}
.quote-radio input[type="radio"] {
  accent-color: var(--helmet);
  width: 14px; height: 14px;
  cursor: none;
}

.quote-submit {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 0 0 7px 0;
  background: none;
  border: none;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: none;
  position: relative;
}
.quote-submit::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 6px;
  background: var(--helmet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.quote-submit:hover::after { transform: scaleX(1); }
.quote-submit:disabled { opacity: 0.5; }

.quote-error {
  display: none;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #B3261E;
}
.quote-error.show { display: block; }

.quote-form.hide { display: none; }

/* Firma finale — sostituisce il messaggio di conferma classico.
   Semplice dissolvenza in entrata e in uscita, font del sito, peso misurato. */
.quote-signature {
  display: none;
  align-items: flex-start;
  min-height: 100px;
  padding: 20px 0;
}
.quote-signature.show { display: flex; }
.quote-signature-line {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 28px var(--edge);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-logo { display: none; }

/* ── ARCHIVE PAGE ─────────────────────────────────────────── */
.archive-hero {
  padding: 180px var(--edge) 100px;
  border-bottom: 1px solid var(--line);
}
.archive-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeIn 0.6s 0.2s forwards;
}
.archive-title {
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.0;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 0.8s 0.35s forwards;
  position: relative;
  display: inline-block;
}
.archive-title::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 6px;
  background: var(--helmet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.archive-title:hover::after { transform: scaleX(1); }

.archive-list { padding: 0 var(--edge); }

.archive-item {
  display: grid;
  grid-template-columns: 60px 1fr auto 180px;
  gap: 40px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  transition: background 0.3s;
}
.archive-item:hover { background: rgba(0,0,0,0.02); }

.archive-item-num {
  font-size: 13px;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--muted);
}
/* Nomi lavori nell'archivio — NESSUNA spaziatura */
.archive-item-name {
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: transform 0.4s var(--ease-out);
}
.archive-item:hover .archive-item-name { transform: translateX(8px); }
.archive-item-type {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.archive-item-thumb {
  width: 180px; height: 120px;
  overflow: hidden;
  background: var(--line);
}
.archive-item-thumb img { transition: transform 0.6s var(--ease-out); }
.archive-item:hover .archive-item-thumb img { transform: scale(1.08); }

/* ── PROJECT / WORK PAGE ──────────────────────────────────── */
.project-page {
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: start;
  min-height: 100vh;
}

/* Immagini — editoriali, respirano */
.project-images-col {
  padding: 220px 80px 200px 120px;
}

.project-img-item {
  width: 55%;           /* monografia — generoso spazio bianco */
  margin: 0 auto 140px;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--line);
}
.project-img-item:last-child { margin-bottom: 0; }
.project-img-item img { transition: transform 1.4s var(--ease-out); }
.project-img-item:hover img { transform: scale(1.03); }

/* Sidebar sticky — contenuto allineato all'inizio della prima foto */
.project-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 220px 56px 60px 56px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  scrollbar-width: none;
}
.project-sidebar::-webkit-scrollbar { display: none; }

.project-sidebar-name {
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 44px;
}

.project-spec {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.project-spec:last-of-type { border-bottom: 1px solid var(--line); }
.project-spec-key {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-spec-val {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
}

.project-description {
  margin-top: 36px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--ink);
}

/* Nav in fondo */
.project-nav {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.project-nav-item {
  padding: 44px var(--edge);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.3s;
}
.project-nav-item:hover { background: rgba(0,0,0,0.02); }
.project-nav-item + .project-nav-item { border-left: 1px solid var(--line); }
.project-nav-dir {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-nav-name {
  font-size: clamp(18px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}
.project-nav-name::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 100%; height: 6px;
  background: var(--helmet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.project-nav-item:hover .project-nav-name::after { transform: scaleX(1); }

/* ── DETAILS SECTION ─────────────────────────────────────── */
.details-section {
  border-top: 1px solid var(--line);
  padding: 120px 0 160px;
}

.details-header {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 0 var(--edge);
  margin-bottom: 80px;
}

.details-title {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.1;
  position: relative;
  display: inline-block;
}
.details-title::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 6px;
  background: var(--helmet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.details-title:hover::after { transform: scaleX(1); }

/* ── DETAILS — banda orizzontale ── */
.details-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* padding: la carta in hover scala ×2 e deve avere spazio */
  padding: 110px 0 120px;
  cursor: none;
  user-select: none;
}

/* Vignette laterali */
.details-stage::before,
.details-stage::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 140px;
  z-index: 10;
  pointer-events: none;
}
.details-stage::before {
  left: 0;
  background: linear-gradient(to right, var(--bg) 25%, transparent 100%);
}
.details-stage::after {
  right: 0;
  background: linear-gradient(to left, var(--bg) 25%, transparent 100%);
}

/* Banda orizzontale — flex row */
.details-band {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  will-change: transform;
  padding: 12px 0;
}

/* Cartelletta verticale — perfettamente ritratto, nessun tilt */
.detail-card {
  flex-shrink: 0;
  width: 190px;
  aspect-ratio: 2 / 3;   /* 190 × 285px, ritratto */
  overflow: hidden;
  background: var(--line);
  transform: translateY(0) scale(1);
  transition: transform 0.6s var(--ease-out), filter 0.5s var(--ease-out);
  cursor: none;
  filter: grayscale(25%);
  position: relative;
  z-index: 1;
}

/* Hover — raddoppia */
.detail-card:hover {
  transform: translateY(-20px) scale(2);
  filter: grayscale(0%);
  z-index: 20;
}

.detail-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* ── REVEAL ───────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
[data-reveal].revealed { opacity: 1; transform: none; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .project-page { grid-template-columns: 1fr 300px; }
  .project-sidebar { padding: 200px 40px 60px 36px; }
  .project-images-col { padding: 200px 36px 140px 56px; }
  .project-img-item { width: 68%; }
}

@media (max-width: 900px) {
  #work { padding: 100px 0 100px; }
  #about-contacts { padding: 100px 0 140px; }
  nav { padding: 24px var(--edge); }
  .work-header { padding: 0 var(--edge); }
  .about-contacts-grid { padding: 0 var(--edge); }
  .about-col { padding-bottom: 64px; }
  .contacts-col { padding-top: 64px; }
  .lets-talk { margin-top: 88px; }
  .lets-talk-title { gap: 12px; }
  .archive-hero { padding-left: var(--edge); padding-right: var(--edge); }
  .archive-list { padding-left: var(--edge); padding-right: var(--edge); }
  footer { padding-left: var(--edge); padding-right: var(--edge); }
  .project-page { grid-template-columns: 1fr; }
  .project-sidebar { position: relative; height: auto; padding: 60px 32px; border-top: 1px solid var(--line); justify-content: flex-start; }
  .project-images-col { padding: 140px 32px 60px; }
  .project-img-item { width: 90%; margin-bottom: 60px; }
  .hero-clock { left: 32px; }
  .hero-mark { right: 32px; }
}

@media (max-width: 640px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-item { grid-template-columns: 36px 1fr 84px; gap: 16px; }
  .archive-item-type { display: none; }
  .archive-item-thumb { width: 84px; height: 56px; }
  .project-nav-item { padding: 32px 24px; }

  /* NAV — logo e link compattati per non andare in overflow */
  .nav-logo-svg { width: 160px; height: 9.2px; }
  nav .nav-links { gap: 14px; }
  nav .nav-links a { font-size: 10px; letter-spacing: .1em; }

  /* HERO — sottotitolo centrato sul viewport, non più sulla sola "INSITU" */
  .hero-service {
    left: 50%;
    white-space: normal;
    max-width: 92vw;
    text-align: center;
    font-size: 11px;
    letter-spacing: .14em;
  }

  /* DETAILS — vignette laterali ridotte, più foto visibili */
  .details-stage::before,
  .details-stage::after { width: 36px; }
  .detail-card { width: 150px; }

  /* MODALE PREVENTIVO — meno padding sprecato sullo schermo piccolo */
  .quote-overlay { padding: 16px; }
  .quote-panel { padding: 40px 24px; }

  /* FOOTER — copyright più piccolo (il logo è già nascosto ovunque) */
  .footer-copy { font-size: 7px; }
}
