/* =====================================================
   RESET DI BASE
===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  color: #000000;
  overflow-x: hidden;
}

/* =====================================================
   SEZIONE 1 — HERO
===================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh; /* gestisce meglio la altezza reale su mobile */

  /* Sfondo: gradiente grigio -> bianco, più chiaro in alto a destra */
  /* background: radial-gradient(
    ellipse 120% 100% at 88% 8%,
    #ffffff 0%,
    #eeeeee 30%,
    #cfcfcf 62%,
    #b7b7b7 100%
  ); */

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}

/* Texture "grana" leggera sopra il gradiente */
.hero__noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
}



/* Titolo "Portfolio" — centrato rispetto a tutta la pagina */
.hero__title {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-style: normal;
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: #000000;
  text-align: center;
  blur-edge: 24%;
  blur-amount: 2px;
}




/* Blocco dati anagrafici — fisso in basso a sinistra */
.hero__info {
  position: absolute;
  left: 6vw;
  bottom: 6vh;
  z-index: 1;
  max-width: 90vw;
}

.hero__name {
  font-weight: 400;
  font-style: normal;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  line-height: 1.4;
}

.hero__role {
  font-weight: 700;
  font-style: normal;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  line-height: 1.4;
}

.hero__email {
  margin-top: 0.9em;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  line-height: 1.4;
}

/* =====================================================
   SEZIONE 2 — 3D PROJECTS
===================================================== */
.projects {
  width: 100%;
  background: #ffffff;
}

.projects__row {
  display: flex;
  width: 100%;
}

/* Riga 1: testo (35%) + immagine larga (44%) + immagine stretta (21%) */
.projects__row--top {
  height: 26.1vw;
}

.projects__row--top .projects__cell--text {
  flex: 0 0 35%;
  max-width: 35%;
}

.projects__row--top .projects__cell--img:nth-of-type(2) {
  flex: 0 0 44%;
  max-width: 44%;
}

.projects__row--top .projects__cell--img:nth-of-type(3) {
  flex: 0 0 21%;
  max-width: 21%;
}

/* Riga 2: due immagini al 50% */
.projects__row--bottom {
  height: 38.8vw;
}

.projects__row--bottom .projects__cell--img {
  flex: 0 0 50%;
  max-width: 50%;
}

/* Cella di testo */
.projects__cell--text {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}

.projects__title {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-style: normal;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: #000000;
  text-align: center;
}

/* Celle immagine */
.projects__cell--img {
  overflow: hidden;
  line-height: 0;
}

.projects__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =====================================================
   RESPONSIVE — sezione 2
===================================================== */
@media (max-width: 800px) {
  .projects__row {
    flex-direction: column;
  }

  .projects__row--top,
  .projects__row--bottom {
    height: auto;
  }

  .projects__row--top .projects__cell--text,
  .projects__row--top .projects__cell--img:nth-of-type(2),
  .projects__row--top .projects__cell--img:nth-of-type(3),
  .projects__row--bottom .projects__cell--img {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .projects__cell--text {
    padding: clamp(1.5rem, 8vw, 2.5rem) clamp(1rem, 6vw, 2rem);
  }

  .projects__cell--img {
    aspect-ratio: 4 / 3;
  }
}

/* =====================================================
   SEZIONE 3 
===================================================== */

.txt-projects {
  position: relative;
  width: 100%;
  height: 450px;
}

.txt-projects__noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
}

.txt-projects_cnt {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.txt-projects_cnt h3 {
  max-width: 55%;
  font-size: 30px;
  font-weight: 300;
  font-style: italic;
  text-align: left;
}



/* =====================================================
   SEZIONE 4 — PROJECT DETAIL (template riutilizzabile)
   Colonna sinistra: immagine sopra + testo sotto
   Colonna destra: immagine unica a piena altezza
===================================================== */
.project-detail {
  width: 100%;
  display: flex;
  align-items: stretch; /* la colonna destra si adatta all'altezza della sinistra */
  background: #ffffff;
}

.project-detail__col--left {
  flex: 0 0 44%;
  max-width: 44%;
  display: flex;
  flex-direction: column;
}

.project-detail__col--right {
  flex: 0 0 56%;
  max-width: 56%;
  line-height: 0;
}

.project-detail__col--right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Immagine in cima alla colonna sinistra, edge-to-edge */
.project-detail__media {
  width: 100%;
  line-height: 0;
}

.img-desk {
  display: block !important;
}

.img-mobile {
  display: none !important;
} 

.project-detail__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 540 / 470;
  object-fit: cover;
  display: block;
}

/* Blocco titolo + testo, con padding interno */
.project-detail__content {
  padding: clamp(1.5rem, 3vw, 2.75rem) clamp(1.5rem, 4vw, 3.5rem) clamp(2rem, 4vw, 3.5rem);
}

.project-detail__title {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-style: normal;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #000000;
  margin-bottom: 0.6em;
}

.project-detail__text {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  line-height: 1.55;
  color: #000000;
  max-width: 46ch;
}

@media (max-width: 1200px) {
  .img-desk {
    display: none !important;
  }

  .img-mobile {
    display: block !important;
  } 
}

/* =====================================================
   RESPONSIVE — sezione 4
===================================================== */
@media (max-width: 800px) {
  .project-detail {
    flex-direction: column;
  }

  .project-detail__col--left,
  .project-detail__col--right {
    flex: 0 0 auto;
    max-width: 100%;
  }

  /* Colonna sinistra: da impilata a affiancata (testo a sx, immagine a dx) */
  .project-detail__col--left {
    flex-direction: row;
    align-items: stretch;
  }

  .project-detail__media {
    order: 2;
    flex: 0 0 42%;
    max-width: 42%;
  }

  .project-detail__media img {
    aspect-ratio: auto;
    height: 100%;
  }

  .project-detail__content {
    order: 1;
    flex: 0 0 58%;
    max-width: 58%;
    padding: clamp(1.25rem, 5vw, 2rem) clamp(1rem, 4vw, 1.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .project-detail__text {
    max-width: none;
  }

  /* Colonna destra: si impila sotto, a piena larghezza */
  .project-detail__col--right {
    width: 100%;
  }

  .project-detail__col--right img {
    aspect-ratio: 694 / 902;
    height: auto;
  }
}


/* =====================================================
   SEZIONE 5 — PROJECT COVER (template riutilizzabile)
   Immagine a piena larghezza/altezza (100vh) con testo
   overlay fisso in basso a destra
===================================================== */
.project-cover {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.project-cover.nok
{background: #000000;}

.project-cover.nok img
{object-position: right;
object-fit: contain;}

.project-cover img {
  width: 100%;
  height:100%;
  object-fit: cover;
  object-position: 30% center; /* priorità alla parte sinistra/centro dell'immagine */
  display: block;
}
 
/* Overlay scuro dietro al testo, per leggibilità */
.project-cover__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 35%,
    rgba(0, 0, 0, 0.28) 65%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}
 
/* Blocco testo, fisso in basso a destra */
.project-cover__content {
  position: absolute;
  right: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(1.5rem, 6vh, 4rem);
  z-index: 1;
  max-width: 46ch;
  text-align: left;
}
 
.project-cover__title {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-style: normal;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 0.4em;
}
 
.project-cover__text {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  line-height: 1.5;
  color: #ffffff;
}
 
/* =====================================================
   RESPONSIVE — sezione 5 (variante ATTIVA: overlay resta
   sull'immagine anche su mobile, testo ridimensionato)
===================================================== */
@media (max-width: 800px) {
  .project-cover__content {
    max-width: 90vw;
    right: clamp(1rem, 4vw, 1.5rem);
    bottom: clamp(1rem, 4vh, 1.5rem);
  }
}
 
/* =====================================================
   VARIANTE ALTERNATIVA (non attiva) — sezione 5
   Testo sotto l'immagine, su sfondo bianco, invece che
   in overlay. Per attivarla: usa il markup alternativo
   commentato in index.html (classe .project-cover--stacked)
   e scommenta le regole qui sotto.
===================================================== */
/*
@media (max-width: 800px) {
  .project-cover--stacked {
    height: auto;
    display: flex;
    flex-direction: column;
  }
 
  .project-cover--stacked img {
    height: auto;
    aspect-ratio: 16 / 10;
    object-position: 30% center;
  }
 
  .project-cover--stacked .project-cover__overlay {
    display: none;
  }
 
  .project-cover--stacked .project-cover__content {
    position: static;
    max-width: 100%;
    background: #ffffff;
    padding: clamp(1.5rem, 6vw, 2rem) clamp(1rem, 5vw, 1.5rem);
  }
 
  .project-cover--stacked .project-cover__title,
  .project-cover--stacked .project-cover__text {
    color: #000000;
  }
}
*/


/* =====================================================
   SEZIONE 6 — PROJECT COVER (template riutilizzabile)
   Immagine a piena larghezza/altezza (100vh) con testo
   overlay fisso in basso a destra
===================================================== */

/* Blocco testo, fisso in basso a sx */
.project-cover__content.left-text {
  position: absolute;
  left: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(1.5rem, 6vh, 4rem);
  z-index: 1;
  max-width: 46ch;
  text-align: left;
}





/* =====================================================
   SEZIONE 7 — PROJECT COVER (template riutilizzabile)
   Immagine a piena larghezza/altezza (100vh) con testo
   overlay fisso in basso a destra
===================================================== */


/* Blocco testo, fisso in basso a sx */
.project-cover__content.big-text {
  position: absolute;
  right: clamp(1.25rem, 5vw, 4rem);
  left: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(1.5rem, 17vh, 17rem);
  z-index: 1;
  max-width: 55ch;
  text-align: left;
}

.project-cover__content.big-text.soft {
position: absolute;
  right: clamp(1.25rem, 5vw, 4rem);
  left: unset;
  }

.project-cover__content.big-text .project-cover__title {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-style: normal;
  font-size: clamp(4rem, 4.2vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 0.4em;
}
 
.project-cover__content.nok-left {
  position: absolute;
  left: clamp(1.25rem, 5vw, 4rem);
  right: auto;
  bottom: clamp(1.5rem, 17vh, 17rem);
  max-width: 55ch;
  text-align: left;
}


.project-cover__text {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  line-height: 1.5;
  color: #ffffff;
}

/* =====================================================
   SEZIONE 8 — LABEL DESIGN & PACKAGING
===================================================== */
.label-design {
  width: 100%;
  background: #ffffff;
}

/* Margine bianco condiviso da Blocco A e Blocco B */
.label-design__inner {
  margin: 0 clamp(1rem, 2vw, 5rem);
}

/* ---------- BLOCCO A: riquadro con bordo ---------- */
.label-frame {
  display: flex;
  width: 100%;
  border-left: 2px solid #000000;
  border-bottom: 2px solid #000000;
}

.label-frame__col {
  flex: 0 0 50%;
  max-width: 50%;
  padding: clamp(1rem, 3vw, 2.5rem);
}

/* Immagine con il suo bordo separato (sinistra + sotto) */
.label-frame__media {
  width: 100%;
  border-left: 2px solid #000000;
  border-bottom: 2px solid #000000;
  line-height: 0;
}

.label-frame__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.label-frame__col--text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.label-frame__title {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-style: normal;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: #000000;
  text-align: left;
  margin-bottom: 0.5em;
}

.label-frame__text {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.5;
  color: #000000;
  text-align: left;
  max-width: 100%;
}

/* ---------- BLOCCO B: titolo e testo "appesi" (SVG) ---------- */
/* L'intero blocco è un unico SVG con viewBox: testo e linee condividono
   lo stesso sistema di coordinate, quindi ridimensionando la larghezza
   scala TUTTO in blocco, nelle stesse identiche proporzioni, a qualunque
   dimensione di schermo — le linee restano sempre agganciate alle
   lettere esatte, senza bisogno di calcoli JavaScript. */
.label-hanging {
  width: 100%;
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.label-hanging__svg {
  display: block;
  width: 100%;
  height: auto;
}

.hang-line {
  stroke: #000000;
}

.hang-line--top {
  stroke-width: 1.8;
}

.hang-line--bottom {
  stroke-width: 1.8;
}

.hang-title {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-style: normal;
  font-size: 130px;
  letter-spacing: -1px;
  fill: #000000;
}

.hang-text {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 300;
  font-style: italic;
  font-size: 28.8px;
  fill: #000000;
}

/* =====================================================
   RESPONSIVE — sezione 8
===================================================== */
@media (max-width: 800px) {
  .label-frame {
    flex-direction: column;
  }

  .label-frame__col {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* mobile: testo sopra, immagine sotto (ordine invertito) */
  .label-frame__col--text {
    order: 1;
  }

  .label-frame__col--image {
    order: 2;
  }

  .label-frame__media img {
    aspect-ratio: 4 / 3;
  }

  /* Il Blocco B resta identico nel layout: tutte le misure sono
     già in vw, quindi si ridimensiona in blocco mantenendo le
     proporzioni e l'aggancio delle lineette a testo/paragrafo */
}




/* SEZIONE MODULO SOLO IMMAGINE */

.modulo-section-img {
  width: 100%;
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  row-gap: 50px;
}

.modulo-section-img div {
  margin: 0 clamp(1rem, 2vw, 5rem);
}

.modulo-section-img div img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% center;
    display: block;
}
/* =====================================================
   SEZIONE 9 — THANKS (chiusura del sito)
   Immagine a piena larghezza/altezza (100vh), blocco testo
   fisso in basso a destra: THANKS + nome/ruolo/email + riga
===================================================== */
.thanks-cover {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.thanks-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Stessa identica texture "grana" della sezione Hero */
.thanks-cover__noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
}

/* Blocco testo, fisso in basso a destra, tutto allineato a destra */
.thanks-cover__content {
  position: absolute;
  right: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(1.5rem, 6vh, 4rem);
  z-index: 1;
  max-width: 90vw;
  text-align: right;
}

.thanks-cover__title {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-style: normal;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: 0.6em;

  /* Grana dentro le lettere: due livelli di sfondo (texture di rumore +
     base bianca) mescolati tra loro con background-blend-mode, poi
     "ritagliati" esattamente sulla forma del testo con background-clip.
     Il colore normale del testo (color) qui non serve più: il riempimento
     visibile è lo sfondo stesso, reso visibile solo dove ci sono le lettere. */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    linear-gradient(#ffffff, #ffffff);
  background-blend-mode: overlay;
  background-repeat: repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.thanks-cover__info {
  margin-bottom: 1em;
}

.thanks-cover__name {
  font-weight: 400;
  font-style: normal;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.4;
  color: #ffffff;
}

.thanks-cover__role {
  font-weight: 700;
  font-style: normal;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.4;
  color: #ffffff;
}

.thanks-cover__email {
  margin-top: 0.9em;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.4;
  color: #ffffff;
}

/* Riga decorativa: prende tutta la larghezza del blocco di testo */
.thanks-cover__rule {
  width: 100%;
  border: none;
  border-top: 10px solid rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* =====================================================
   RESPONSIVE — sezione 9
===================================================== */
@media (max-width: 800px) {
  .thanks-cover__content {
    right: clamp(1rem, 4vw, 1.5rem);
    bottom: clamp(1rem, 4vh, 1.5rem);
  }
}