/* ------------------------------------------------------------------
   orcam — your website
   Colori e font ricavati dal logo:
   viola #2a203f · bianco #fff · Fascinate (logotipo) · Montserrat (testi)
   ------------------------------------------------------------------ */

:root {
  --viola: #2a203f;
  --viola-chiaro: #3b2f55;
  --viola-70: rgba(42, 32, 63, .7);
  --tinta: #f3f1f7;            /* viola chiarissimo per fondi e schede */
  --bianco: #ffffff;
  --bianco-70: rgba(255, 255, 255, .7);

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-logo: "Fascinate", var(--font);

  --frame: 12px;          /* cornice bianca attorno ai pannelli viola */
  --raggio: 36px;         /* angoli arrotondati grandi */
  --raggio-s: 20px;       /* angoli arrotondati piccoli */
  --pad: clamp(20px, 3.2vw, 44px);
  --bar-top: clamp(16px, 2.4vw, 32px);
  --logo: 68px;

  --ease: cubic-bezier(.16, 1, .3, 1);   /* decelerazione morbida "Apple" */
  --passo: 70ms;                          /* ritardo tra un elemento e il successivo */
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bianco);
  color: var(--viola);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
strong { font-weight: 700; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 8px;
}

.blob { fill: currentColor; }
.brand { font-family: var(--font-logo); font-weight: 400; letter-spacing: 0; }

/* -------------------------- BARRA FISSA --------------------------- */

.bar {
  position: fixed;
  z-index: 5;
  top: calc(var(--frame) + var(--bar-top));
  left: calc(var(--frame) + var(--pad));
  right: calc(var(--frame) + var(--pad));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;      /* si clicca solo su marchio e menu */
}
.bar > * { pointer-events: auto; }

.bar__logo {
  display: grid;
  place-items: center;
  width: var(--logo);
  height: var(--logo);
  background: var(--bianco);
  color: var(--viola);
  border-radius: var(--raggio-s);
  box-shadow: 0 12px 32px rgba(42, 32, 63, .16), 0 0 0 1px rgba(42, 32, 63, .06);
}
.bar__logo svg { width: 58%; aspect-ratio: 94 / 60; transition: transform .6s var(--ease); }
.bar__logo:hover svg { transform: rotate(-10deg) scale(1.1); }

.bar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--bianco);
  color: var(--viola);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(42, 32, 63, .16), 0 0 0 1px rgba(42, 32, 63, .06);
  font-size: 15px;
  font-weight: 700;
}
.bar__nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .4s var(--ease), color .4s var(--ease), scale .4s var(--ease);
}
.bar__nav a:hover { background: rgba(42, 32, 63, .08); }
.bar__nav a:active { scale: .95; }
.bar__nav a.is-active { background: var(--viola); color: var(--bianco); }

/* emoticon animate (al passaggio del mouse, al tocco e da tastiera) */
.emo, .scheda__segno {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.emo .punto, .scheda__segno .punto { stroke-width: 2.4; }
.emo { width: 20px; height: 20px; flex: none; }
.emo--saluta { transform-origin: 70% 80%; }
a:hover .emo--saluta, a:focus-visible .emo--saluta, a.is-tapped .emo--saluta { animation: saluta .9s var(--ease); }
a:hover .emo--salta,  a:focus-visible .emo--salta,  a.is-tapped .emo--salta  { animation: salta .8s var(--ease); }
a:hover .emo--pop,    a:focus-visible .emo--pop,    a.is-tapped .emo--pop    { animation: pop .8s var(--ease); }

@keyframes saluta {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(22deg); }
  40% { transform: rotate(-12deg); }
  60% { transform: rotate(18deg); }
  80% { transform: rotate(-6deg); }
}
@keyframes salta {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-8px) scale(1.15); }
  55% { transform: translateY(0) scale(.95); }
  75% { transform: translateY(-3px) scale(1.05); }
}
@keyframes pop {
  0%, 100% { transform: scale(1) rotate(0); }
  30% { transform: scale(1.35) rotate(-12deg); }
  55% { transform: scale(.9) rotate(6deg); }
  75% { transform: scale(1.1) rotate(-3deg); }
}

/* ------------------------------ HERO ------------------------------ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 7vh, 80px);
  padding: calc(var(--frame) + var(--pad));
  padding-top: calc(var(--frame) + var(--bar-top) + var(--logo) + 40px);
  background: var(--viola);
  color: var(--bianco);
  overflow: hidden;
  clip-path: inset(var(--frame) round var(--raggio));
}
.hero--bassa { min-height: min(100svh, 640px); }

/* marchio decorativo sullo sfondo */
.hero__bg {
  position: absolute;
  right: -8%;
  bottom: -14%;
  width: min(78vw, 980px);
  aspect-ratio: 94 / 60;
  color: var(--viola-chiaro);
  opacity: .55;
  pointer-events: none;
  transform: translate3d(calc(var(--mx, 0) * 18px), calc(var(--my, 0) * 18px), 0);
  animation: galleggia 14s ease-in-out infinite alternate;
}
@keyframes galleggia {
  from { rotate: -2deg; translate: 0 0; }
  to   { rotate: 3deg;  translate: -2% -3%; }
}

/* luogo e ora, allineati alla barra */
.hero__meta {
  position: absolute;
  top: calc(var(--frame) + var(--bar-top));
  left: calc(var(--frame) + var(--pad) + var(--logo) + clamp(20px, 4vw, 64px));
  height: var(--logo);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.hero__title {
  position: relative;
  margin: auto 0;
  max-width: 21ch;
  font-size: clamp(1.9rem, 4.5vw, 4.25rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.03em;
  text-indent: 1.6em;        /* prima riga rientrata, come nel riferimento */
}
.hero__title .brand { font-size: 1.06em; }
.word { display: inline-block; text-indent: 0; }

.hero__foot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
}
.hero__foot p {
  max-width: 34ch;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--bianco-70);
}
.hero__foot p strong { color: var(--bianco); }

/* ---------------------------- PULSANTI ---------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 28px;
  background: var(--bianco);
  color: var(--viola);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background .4s var(--ease);
}
.btn svg {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .5s var(--ease);
}
.btn:hover { transform: scale(1.04); box-shadow: 0 16px 40px rgba(0, 0, 0, .28); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn--linea { background: transparent; color: var(--bianco); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
.btn--linea:hover { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1.5px var(--bianco); }
.btn--viola { background: var(--viola); color: var(--bianco); }
.btn--viola:hover { background: var(--viola-chiaro); box-shadow: 0 16px 40px rgba(42, 32, 63, .3); }

/* pulsante principale della hero: grande, con freccia in evidenza e alone che pulsa */
.btn--grande {
  position: relative;
  min-height: 80px;
  padding: 0 12px 0 36px;
  gap: 24px;
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  letter-spacing: -.01em;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .3);
}
.btn--grande::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: alone 2.6s var(--ease) 3s infinite;
  pointer-events: none;
}
.btn__freccia {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 50%;
  background: var(--viola);
  color: var(--bianco);
  transition: transform .6s var(--ease), background .4s var(--ease);
}
.btn__freccia svg { width: 20px; height: 20px; }
.btn--grande:hover { transform: scale(1.05); box-shadow: 0 24px 64px rgba(0, 0, 0, .4); }
.btn--grande:hover .btn__freccia { transform: rotate(-45deg); background: var(--viola-chiaro); }
.btn--grande:hover svg { transform: none; }
@keyframes alone {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); }
  70%, 100% { box-shadow: 0 0 0 22px rgba(255, 255, 255, 0); }
}

.btn--piccolo { min-height: 46px; padding: 0 20px; font-size: 14px; }

/* --------------- APERTURA DELLA PAGINA "PROGETTA" ----------------- */

.apertura {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: calc(var(--frame) + var(--bar-top) + var(--logo) + clamp(64px, 11vw, 150px)) calc(var(--frame) + var(--pad)) clamp(48px, 7vw, 96px);
}
.apertura__titolo {
  max-width: 15ch;
  font-size: clamp(2.1rem, 5.6vw, 5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.03em;
}
.apertura__testo {
  max-width: 46ch;
  margin: clamp(24px, 3vw, 40px) 0 clamp(32px, 4vw, 48px);
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  color: var(--viola-70);
}
.apertura__testo strong { color: var(--viola); }
.apertura__giu {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: clamp(56px, 8vw, 110px);
  font-size: 13px;
  font-weight: 700;
}
.apertura__giu svg {
  width: 44px; height: 44px;
  padding: 13px;
  border-radius: 50%;
  background: var(--tinta);
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  animation: giu 1.8s ease-in-out infinite;
}
@keyframes giu {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ----------------------------- SEZIONI ---------------------------- */

.sezione {
  padding: clamp(88px, 14vw, 180px) calc(var(--frame) + var(--pad));
  scroll-margin-top: 0;
}
.sezione--tinta {
  background: var(--tinta);
  margin: 0 var(--frame);
  padding-inline: var(--pad);
  border-radius: var(--raggio);
}
.sezione--vicina { padding-top: clamp(16px, 2vw, 32px); }
.contenitore { margin: 0; }   /* largo quanto la prima sezione */

.occhiello {
  display: inline-block;
  margin-bottom: 28px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--tinta);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}
.sezione--tinta .occhiello { background: var(--bianco); }

.titolo {
  max-width: 20ch;
  font-size: clamp(1.75rem, 3.6vw, 3.25rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.titolo--grande { font-size: clamp(2rem, 4.6vw, 4.25rem); max-width: 16ch; }

.testo {
  max-width: 58ch;
  margin-top: 32px;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  color: var(--viola-70);
}
.testo strong { color: var(--viola); }
.testo + .testo { margin-top: 20px; }
.testo .brand { color: var(--viola); font-size: 1.1em; }

/* titolo a sinistra, testo a destra: riempie tutta la larghezza */
.duecol {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
  gap: 32px clamp(32px, 6vw, 96px);
}
.duecol .testo { margin-top: 0; }

.segnaposto {
  padding: 20px 24px;
  border: 1.5px dashed rgba(42, 32, 63, .3);
  border-radius: var(--raggio-s);
}

/* schede "perché" */
.schede {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: clamp(56px, 8vw, 96px);
}
.scheda {
  padding: 28px;
  background: var(--tinta);
  border-radius: 28px;
  transition: transform .6s var(--ease), background .4s var(--ease), color .4s var(--ease);
}
.scheda:hover { transform: translateY(-6px); background: var(--viola); color: var(--bianco); }
.scheda__segno { width: 36px; height: 36px; margin-bottom: 40px; stroke-width: 1.4; transition: transform .6s var(--ease); }
.scheda:hover .scheda__segno { transform: scale(1.15) rotate(-6deg); }
.scheda h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.scheda p { margin-top: 10px; font-size: .95rem; opacity: .75; }

/* esempi di siti (segnaposto finché non arrivano le immagini) */
.galleria {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.finestra {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--tinta);
  border-radius: 28px;
  color: var(--viola-70);
  font-size: 13px;
  font-weight: 500;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.finestra::before {            /* tre puntini da finestra del browser */
  content: "";
  position: absolute;
  top: 18px; left: 22px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(42, 32, 63, .25);
  box-shadow: 14px 0 rgba(42, 32, 63, .25), 28px 0 rgba(42, 32, 63, .25);
}
.finestra img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.finestra::after {             /* bordo sottile: stacca dal fondo anche le immagini bianche */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(42, 32, 63, .1);
  pointer-events: none;
}
.finestra:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(42, 32, 63, .16); }

/* come procedo: tre fasi su una riga, unite da una linea che si disegna */
.procedo { margin-top: clamp(80px, 11vw, 160px); }
.procedo .titolo { max-width: 32ch; }

.fasi {
  --num: clamp(64px, 7vw, 104px);   /* altezza dei numeri */
  --punto: 16px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 clamp(24px, 5vw, 80px);
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  list-style: none;
}
/* linea di base e linea viola che avanza da sinistra a destra */
.fasi::before, .fasi::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--num) + 24px + var(--punto) / 2 - 1px);
  height: 2px;
  border-radius: 2px;
  background: rgba(42, 32, 63, .14);
}
.fasi::after {
  background: var(--viola);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 2s var(--ease) .3s;
}
.fasi.in::after { transform: scaleX(1); }
html:not(.js) .fasi::after { transform: none; }

.fase__num {
  display: block;
  height: var(--num);
  font-size: var(--num);
  line-height: 1;
}
.fase__punto {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--punto);
  height: var(--punto);
  margin: 24px 0 28px;
  border-radius: 50%;
  background: var(--viola);
  box-shadow: 0 0 0 6px var(--bianco);
}
.fase h3 { font-size: clamp(1.15rem, 1.6vw, 1.5rem); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.fase p { margin-top: 10px; max-width: 32ch; color: var(--viola-70); }

/* invito finale */
.invito {
  margin-top: clamp(56px, 8vw, 96px);
  padding: clamp(32px, 6vw, 80px);
  background: var(--viola);
  color: var(--bianco);
  border-radius: var(--raggio);
}
.invito h3 {
  max-width: 18ch;
  font-size: clamp(1.6rem, 3.2vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.invito p { margin-top: 16px; max-width: 44ch; color: var(--bianco-70); }
.invito__azioni { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* chi sono */
.chi {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}
.chi__foto {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  background: var(--viola);
  color: var(--viola-chiaro);
  border-radius: var(--raggio);
}
.chi__foto { overflow: hidden; }
.chi__foto img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* ----------------------------- CONTATTI --------------------------- */

.contatti {
  margin: var(--frame);
  padding: clamp(88px, 12vw, 160px) var(--pad) var(--pad);
  background: var(--viola);
  color: var(--bianco);
  border-radius: var(--raggio);
}
.contatti .occhiello { background: rgba(255, 255, 255, .12); }

.contatti__lista { margin-top: clamp(48px, 7vw, 88px); }
.contatto {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 16px 24px;
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.contatto:last-child { border-bottom: 1px solid rgba(255, 255, 255, .16); }
.contatto__tipo { font-size: 13px; font-weight: 500; color: var(--bianco-70); }
.contatto__valore {
  justify-self: start;
  max-width: 100%;
  font-size: clamp(1.1rem, 2.6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .6s var(--ease);
}
.contatto__valore:hover { background-size: 100% 2px; }

.copy {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: var(--bianco);
  cursor: pointer;
  transition: background .3s, transform .4s var(--ease);
}
.copy:hover { background: rgba(255, 255, 255, .22); transform: scale(1.08); }
.copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.copy__tip {
  position: absolute;
  right: calc(100% + 8px);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bianco);
  color: var(--viola);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .3s, transform .4s var(--ease);
  pointer-events: none;
}
.copy__tip:empty { display: none; }
.copy.is-done .copy__tip { opacity: 1; transform: none; }

.piede {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(64px, 10vw, 140px);
  font-size: 13px;
  color: var(--bianco-70);
}
.piede .brand { font-size: 1.3em; color: var(--bianco); }
.piede--chiaro { color: var(--viola-70); margin-top: 64px; }
.piede--chiaro .brand { color: var(--viola); }

/* ----------------------- ANIMAZIONE DI APERTURA -------------------- */

.intro { display: none; }

.js:not(.no-intro) .intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--bianco);
  pointer-events: none;
  transition: opacity .7s var(--ease), transform 1s var(--ease), filter .7s var(--ease);
}
.intro__mark { width: clamp(84px, 13vw, 132px); aspect-ratio: 94 / 60; overflow: visible; margin-left: 18%; }
.intro__mark .blob {
  transform-box: fill-box;
  transform-origin: center;
  animation: blob-in 1.1s var(--ease) both;
}
.intro__mark .blob--b { animation-delay: .14s; }

.intro__word {
  margin-top: 10px;
  font-family: var(--font-logo);
  font-size: clamp(3.4rem, 11vw, 6.2rem);
  line-height: 1;
}
.intro__word span { display: inline-block; animation: sali 1s var(--ease) both; }
.intro__word span:nth-child(1) { animation-delay: .22s; }
.intro__word span:nth-child(2) { animation-delay: .28s; }
.intro__word span:nth-child(3) { animation-delay: .34s; }
.intro__word span:nth-child(4) { animation-delay: .40s; }
.intro__word span:nth-child(5) { animation-delay: .46s; }

.intro__tag {
  margin-top: 6px;
  font-size: clamp(1rem, 2.6vw, 1.45rem);
  letter-spacing: .01em;
  animation: sali 1s var(--ease) .7s both;
}

@keyframes blob-in {
  from { opacity: 0; transform: scale(.4) translateY(30%); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes sali {
  from { opacity: 0; transform: translateY(.45em); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* stato iniziale: hero a tutto schermo, contenuti nascosti */
.js .hero { transition: clip-path 1.5s var(--ease); }
.js:not(.no-intro):not(.ready) .hero { clip-path: inset(0 round 0); }

.js [data-reveal],
.js .word {
  transition:
    opacity 1.1s var(--ease) calc(var(--d, 0) * var(--passo) + .25s),
    transform 1.3s var(--ease) calc(var(--d, 0) * var(--passo) + .25s),
    filter 1.1s var(--ease) calc(var(--d, 0) * var(--passo) + .25s);
}
.js:not(.ready) [data-reveal],
.js:not(.ready) .word {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(12px);
}
.js .hero__bg { transition: opacity 2s var(--ease) .3s, transform 1.2s var(--ease); }
.js:not(.ready) .hero__bg { opacity: 0; }

/* uscita del logo di apertura */
.js.ready .intro {
  opacity: 0;
  transform: translateY(-32px) scale(.94);
  filter: blur(14px);
}

/* dopo l'ingresso i ritardi non devono rallentare gli hover */
.js.done [data-reveal] {
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background .4s var(--ease);
}

/* comparsa allo scorrimento */
.js [data-scroll] {
  opacity: 0;
  transform: translateY(36px);
  filter: blur(10px);
  transition:
    opacity 1.1s var(--ease) calc(var(--s, 0) * 90ms),
    transform 1.3s var(--ease) calc(var(--s, 0) * 90ms),
    filter 1.1s var(--ease) calc(var(--s, 0) * 90ms),
    background .4s var(--ease), color .4s var(--ease), box-shadow .6s var(--ease);
}
.js [data-scroll].in { opacity: 1; transform: none; filter: none; }
.js .scheda.in:hover, .js .finestra.in:hover { transform: translateY(-6px); transition-delay: 0s; }

/* ----------------------------- TABLET ----------------------------- */

@media (max-width: 1000px) {
  .schede { grid-template-columns: repeat(2, 1fr); }
}

/* ----------------------------- TELEFONO ---------------------------- */

@media (max-width: 760px) {
  :root { --frame: 8px; --raggio: 28px; --raggio-s: 16px; --logo: 56px; }

  /* il menu scende in basso, a portata di pollice */
  /* il marchio resta in cima alla pagina e non copre i testi mentre si scorre */
  .bar { position: absolute; }

  .bar__nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: -moz-fit-content;
    width: fit-content;
    max-width: calc(100% - 16px);
    margin: 0 auto;
    font-size: 13px;
    padding: 5px;
    gap: 2px;
  }
  .bar__nav a { padding: 0 10px; gap: 5px; }
  .emo { width: 17px; height: 17px; }

  .hero { padding-bottom: calc(var(--frame) + var(--pad) + 76px); }
  .hero--bassa { min-height: 0; }
  .hero__meta { left: auto; right: calc(var(--frame) + var(--pad)); }
  .hero__title { max-width: none; text-indent: 0; font-size: clamp(1.75rem, 7.4vw, 2.6rem); }
  .hero__bg { width: 130vw; right: -40%; bottom: -4%; }
  .hero__foot { flex-direction: column; align-items: stretch; }

  .schede, .galleria, .chi, .duecol { grid-template-columns: 1fr; }
  .btn--grande { min-height: 72px; padding: 0 10px 0 24px; gap: 12px; justify-content: space-between; font-size: 1rem; white-space: nowrap; }
  .btn__freccia { width: 52px; height: 52px; }
  .scheda__segno { margin-bottom: 24px; }
  .chi__foto { aspect-ratio: 4 / 5; }
  .invito__azioni { flex-direction: column; }

  /* fasi in verticale: la linea scende lungo il lato sinistro */
  .fasi { --num: 56px; grid-template-columns: 1fr; gap: 40px; padding-left: 44px; }
  .fasi::before, .fasi::after { left: 7px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; }
  .fasi::after { transform: scaleY(0); transform-origin: center top; }
  .fasi.in::after { transform: scaleY(1); }
  .fase { position: relative; }
  .fase__punto { position: absolute; left: -44px; top: 20px; margin: 0; }
  .fase__num { margin-bottom: 8px; }
  .invito .btn { padding: 0 18px; white-space: nowrap; }
  .sezione, .contatti { padding-top: 72px; }
  .sezione { padding-bottom: 72px; }
  .sezione--vicina { padding-top: 8px; }

  /* niente sfocature su telefono: più leggere e senza difetti di disegno */
  .js [data-reveal], .js .word, .js [data-scroll], .js.ready .intro,
  .js:not(.ready) [data-reveal], .js:not(.ready) .word { filter: none; }

  .contatto { grid-template-columns: 1fr auto; padding: 22px 0; }
  .contatto__tipo { grid-column: 1 / -1; }

  .piede { padding-bottom: 76px; }   /* spazio per il menu in basso */
}

@media (max-width: 350px) {
  .bar__nav { font-size: 12px; }
  .bar__nav a { padding: 0 9px; gap: 4px; }
}

/* telefono in orizzontale: poca altezza */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { gap: 24px; }
  .hero__title { font-size: clamp(1.6rem, 4.4vw, 2.6rem); max-width: none; }
}

/* schermi a tocco: nessun effetto "hover" che resta attivo dopo il tocco */
@media (hover: none) {
  .scheda:hover, .js .scheda.in:hover { transform: none; background: var(--tinta); color: inherit; }
  .scheda:hover .scheda__segno { transform: none; }
  .finestra:hover, .js .finestra.in:hover { transform: none; box-shadow: none; }
  .btn:hover, .btn--grande:hover { transform: none; }
  .btn--grande:hover .btn__freccia { transform: none; background: var(--viola); }
  .bar__nav a:hover { background: none; }
  .bar__nav a.is-active:hover { background: var(--viola); }
}

/* --------------------- MOVIMENTO RIDOTTO (accessibilità) ----------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .hero__bg { animation: none; transform: none; }
}
