/* =========================================================
   Gianfranco Durand — portfolio
   Nero pieno, testo bianco, un solo accento: arancione.
   Il nero è lo stesso della foto: il ritratto ci si fonde dentro.
   ========================================================= */

:root {
  /* colore */
  --bg:        #000000;
  --surface:   #121110;
  --surface-2: #1B1917;
  --text:      #FFFFFF;
  --body-text: #B9B3AC;
  --muted:     #8B857D;
  --brand:     #FF6B1A;
  --brand-dim: #E85C0C;
  --brand-wash: rgba(255, 107, 26, 0.14);
  --line:      rgba(255, 255, 255, 0.14);

  /* tipografia */
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body:    "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  --mono:    "Martian Mono", ui-monospace, "SF Mono", monospace;

  /* misure */
  --wrap: 1180px;
  --gap:  clamp(1.25rem, 3vw, 2.5rem);
  --pad:  clamp(1.25rem, 5vw, 3rem);
  --sec:  clamp(4.5rem, 11vh, 8rem);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--body-text);
  font-family: var(--body);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0;
}
p { margin: 0 0 1em; }
a { color: inherit; }

::selection { background: var(--brand); color: #000; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--brand); color: #000; padding: 0.75rem 1rem;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

/* --- utility di scrittura ------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.25rem;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  border: 1px solid var(--brand-wash);
  background: var(--brand-wash);
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  margin-bottom: 1rem;
}

/* il nastro: sostiene la parola, non la evidenzia */
.mark { position: relative; display: inline-block; z-index: 0; }
.mark::after {
  content: "";
  position: absolute;
  left: -0.06em; right: -0.05em; bottom: 0.05em;
  height: 0.22em;
  background: var(--brand);
  transform: rotate(-1.1deg);
  z-index: -1;
}

/* segnaposto: quello che devi ancora compilare */
.fill { color: var(--muted); }
.fill::after {
  content: "";
  display: block;
  height: 0;
  border-bottom: 1px dashed rgba(255, 107, 26, 0.5);
  margin-top: 0.15em;
}
dd.fill, span.fill { display: inline-block; }
.facts__n.fill, .stat__n.fill { display: block; width: 2.5rem; }

/* --- barra superiore ------------------------------------ */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--pad);
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__id { text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; }
.topbar__name { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.topbar__role { font-family: var(--mono); font-size: 0.5625rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.topbar__nav { display: flex; align-items: center; gap: 1.4rem; }
.topbar__nav a { text-decoration: none; font-size: 0.875rem; color: var(--body-text); transition: color 0.2s; }
.topbar__nav a:hover { color: var(--brand); }
.topbar__cta {
  color: #000 !important;
  background: var(--brand);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
}
.topbar__cta:hover { background: #fff; }
@media (max-width: 720px) {
  .topbar__nav a:not(.topbar__cta) { display: none; }
}

/* --- hero ----------------------------------------------- */

.hero { padding: clamp(3rem, 8vh, 6rem) var(--pad) var(--sec); }
.hero__grid {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}
.hero__title {
  font-size: clamp(2.05rem, 4.6vw, 3.8rem);
  font-weight: 800;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}
.lede {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  max-width: 46ch;
  color: var(--body-text);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.btn {
  display: inline-block;
  font-size: 0.9375rem; font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn--solid { background: var(--brand); color: #000; }
.btn--solid:hover { background: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

/* --- termometro 0-10 (elemento firma) -------------------- */

.nrs {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(1.25rem, 2.5vw, 1.9rem);
}
.nrs__title { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.14; margin-bottom: 0.6rem; }
.nrs__hint { font-size: 0.8125rem; color: var(--muted); margin-bottom: 1.4rem; }

.nrs__scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
.nrs__btn {
  appearance: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.85rem 0;
  background: var(--surface-2);
  color: var(--body-text);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.nrs__btn:hover { background: var(--brand-wash); color: var(--brand); border-color: var(--brand); }
/* i gradini sotto il valore scelto: la scala si riempie come una colonnina */
.nrs__btn.is-filled {
  background: var(--brand-wash);
  border-color: rgba(255, 107, 26, 0.45);
  color: var(--brand);
}
.nrs__btn[aria-checked="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #000;
  font-weight: 600;
  transform: translateY(-3px);
}

.nrs__out { display: block; margin-top: 1.5rem; min-height: 11rem; }
.nrs__out.is-fresh .nrs__score,
.nrs__out.is-fresh .nrs__answer,
.nrs__out.is-fresh .nrs__action { animation: rispostaEntra 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.nrs__out.is-fresh .nrs__answer { animation-delay: 0.06s; }
.nrs__out.is-fresh .nrs__action { animation-delay: 0.14s; }

@keyframes rispostaEntra {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.nrs__action { margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.nrs__action-k {
  display: block;
  font-family: var(--mono);
  font-size: 0.5625rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.5rem;
}
.nrs__action-t { font-size: 0.875rem; color: var(--body-text); margin: 0; }
.nrs__score {
  display: block;
  font-family: var(--display);
  font-size: 3.4rem; font-weight: 800; line-height: 1;
  color: var(--brand);
  margin-bottom: 0.4rem;
}
.nrs__score.is-empty { color: rgba(255, 255, 255, 0.16); }
.nrs__answer { font-size: 0.9375rem; color: var(--text); margin: 0; max-width: 42ch; }

@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .hero__text, .lede { max-width: 100%; }
  .nrs__scale { grid-template-columns: repeat(6, 1fr); }
  .nrs__btn { font-size: 0.6875rem; }
}

/* l'invito compare insieme alla risposta: chi ha appena dato un numero alto
   è il momento in cui è più disposto a parlarne */
.nrs__cta {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 107, 26, 0.4);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.nrs__cta:hover { color: var(--text); border-color: var(--text); }

/* --- impalcatura sezioni -------------------------------- */

.section { padding-block: var(--sec); }
.section__head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__title { font-size: clamp(1.85rem, 1.4rem + 2.1vw, 3.1rem); margin-bottom: 1rem; }
.section__lede { color: var(--body-text); max-width: 58ch; margin: 0; }

/* --- servizi -------------------------------------------- */

.services { border-top: 1px solid var(--line); }
.services__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap) clamp(1.5rem, 3vw, 3rem);
}
.service { border-top: 2px solid var(--brand); padding-top: 1.1rem; }
.service h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.service p { font-size: 0.9375rem; color: var(--body-text); margin: 0; }

/* --- settori -------------------------------------------- */

.sectors { padding-block: clamp(3rem, 7vh, 5rem); }
.sectors__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.sectors .section__lede { margin-top: 1rem; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
}
@media (max-width: 800px) { .sectors__grid { grid-template-columns: 1fr; } }

/* --- metodo --------------------------------------------- */

.method { background: var(--surface); }
.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.phase { background: var(--surface); padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; gap: clamp(1.25rem, 3vw, 3rem); align-items: flex-start; }
.phase__mark { flex: 0 0 9.5rem; }
.phase__body { flex: 1; min-width: 0; }
.phase__n { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); padding-top: 0.35rem; }
.phase__title { font-size: 1.5rem; margin-bottom: 0.6rem; }
.phase p { color: var(--body-text); font-size: 0.9375rem; max-width: 62ch; }
.phase__out { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.03em; color: var(--text); margin: 0.4rem 0 0; }
.phase__out span { color: var(--muted); text-transform: uppercase; margin-right: 0.6rem; }
@media (max-width: 700px) {
  .phase { flex-direction: column; gap: 0.75rem; }
  .phase__mark { flex: none; display: flex; align-items: center; gap: 1rem; }
  .phase__ico { margin-top: 0; }
}


/* --- icone delle fasi ------------------------------------ */
/* Ogni icona anima ciò che la fase fa davvero: le onde ascoltano,
   le barre misurano, le celle riempiono il calendario, la linea sale. */

.phase__ico { display: block; margin-top: 1rem; }
.ico {
  width: clamp(58px, 7vw, 88px);
  height: clamp(58px, 7vw, 88px);
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.ico circle:not(.punto) { fill: var(--brand); stroke: none; }
.ico .punto { fill: var(--brand); stroke: none; }
.ico .barra, .ico .cella { fill: var(--brand); stroke: none; }
.ico .riga, .ico .cornice { stroke: rgba(255, 255, 255, 0.32); }

/* stato di partenza: l'animazione parte quando la fase entra in vista */
.ico .onda { opacity: 0.25; }
.ico .barra { transform-origin: 50% 28px; transform: scaleY(0.15); }
.ico .cella { opacity: 0; }
.ico .linea { stroke-dasharray: 44; stroke-dashoffset: 44; }
.ico .punto { opacity: 0; }

/* Tutte in ciclo, non una volta sola: la rete di sicurezza del JS aggiunge
   .is-in dopo 3 secondi anche a ciò che è fuori schermo, e un'animazione
   one-shot finirebbe prima che qualcuno arrivi a guardarla. */
.phase.is-in .ico .onda { animation: onda 2.4s ease-in-out infinite; }
.phase.is-in .ico .o2 { animation-delay: 0.25s; }
.phase.is-in .ico .o3 { animation-delay: 0.5s; }

.phase.is-in .ico .barra { animation: cresci 4s cubic-bezier(0.2, 0.8, 0.3, 1) infinite; }
.phase.is-in .ico .b2 { animation-delay: 0.14s; }
.phase.is-in .ico .b3 { animation-delay: 0.28s; }

.phase.is-in .ico .cella { animation: riempi 4.5s ease infinite; }
.phase.is-in .ico .c2 { animation-delay: 0.2s; }
.phase.is-in .ico .c3 { animation-delay: 0.4s; }
.phase.is-in .ico .c4 { animation-delay: 0.6s; }

.phase.is-in .ico .linea { animation: traccia 5s ease-out infinite; }
.phase.is-in .ico .punto { animation: spunta 5s ease infinite; }

@keyframes onda {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 1; }
}
@keyframes cresci {
  0%        { transform: scaleY(0.15); }
  18%, 80%  { transform: scaleY(1); }
  100%      { transform: scaleY(0.15); }
}
@keyframes riempi {
  0%        { opacity: 0; transform: translateY(3px); }
  14%, 82%  { opacity: 1; transform: none; }
  100%      { opacity: 0; transform: translateY(3px); }
}
@keyframes traccia {
  0%        { stroke-dashoffset: 44; }
  28%, 84%  { stroke-dashoffset: 0; }
  100%      { stroke-dashoffset: 44; }
}
@keyframes spunta {
  0%, 26%   { opacity: 0; transform: scale(0.4); }
  34%, 84%  { opacity: 1; transform: none; }
  100%      { opacity: 0; transform: scale(0.4); }
}

@media (prefers-reduced-motion: reduce) {
  /* niente movimento, ma le icone devono comunque leggersi */
  .ico .onda { opacity: 0.8; }
  .ico .barra { transform: none; }
  .ico .cella { opacity: 1; }
  .ico .linea { stroke-dashoffset: 0; }
  .ico .punto { opacity: 1; }
  .phase.is-in .ico * { animation: none !important; }
}

/* --- casi studio ---------------------------------------- */

.works__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: var(--gap);
}
@media (max-width: 520px) { .works__list { grid-template-columns: 1fr; } }
.case {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.case__head { padding: 1.25rem 1.4rem 1rem; border-bottom: 1px solid var(--line); }
.case__name { font-size: 1.35rem; margin-bottom: 0.3rem; }
.case__kind { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.case__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 0.75rem; margin: 0; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); }
.case__meta dt { font-family: var(--mono); font-size: 0.5625rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem; }
.case__meta dd { margin: 0; font-size: 0.8125rem; }

.case__body { padding: 1.25rem 1.4rem; flex: 1; }
.case__label { font-family: var(--mono); font-size: 0.5625rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.case__body p { font-size: 0.875rem; }
.case__body p:last-child { margin-bottom: 0; }

.case__result { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.1rem 1.4rem; background: var(--bg); border-top: 1px solid var(--line); }
.stat__n { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--brand); }
.stat__l { display: block; font-size: 0.6875rem; color: var(--muted); line-height: 1.35; margin-top: 0.35rem; }

/* --- contenuti (i reel) ---------------------------------- */

.reels { display: flex; gap: clamp(1rem, 2vw, 1.5rem); }
.reels .reel { flex: none; width: clamp(200px, 22vw, 300px); }

/* la pista dei video: come quella delle statistiche, ma più lenta —
   un video va guardato, non intravisto */
.marquee--reel .marquee__track { animation-duration: var(--durata, 70s); }
.marquee--reel .reel:hover { z-index: 2; }

/* i due segnali che compaiono passando sopra:
   l'altoparlante dice che stai sentendo, il triangolo che si può aprire */
.reel { cursor: pointer; }
.reel__audio, .reel__open {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.reel__audio {
  top: 0.6rem; right: 0.6rem;
  width: 2rem; height: 2rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}
.reel__open {
  left: 50%; top: 50%;
  width: 3.4rem; height: 3.4rem;
  margin: -1.7rem 0 0 -1.7rem;
  padding: 0.9rem 0.8rem 0.9rem 1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  transform: scale(0.85);
}
.reel__audio svg, .reel__open svg { width: 100%; height: 100%; display: block; }
.reel__audio svg { fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reel__open svg { fill: #fff; }

.reel:hover .reel__audio,
.reel:focus-visible .reel__audio { opacity: 1; }
.reel:hover .reel__open,
.reel:focus-visible .reel__open { opacity: 1; transform: scale(1); }

/* il video aperto a schermo intero */
.lb__video {
  max-width: min(100%, 460px);
  max-height: 82vh;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #000;
}
.lb__video[hidden] { display: none; }
.reel {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.reel:hover { border-color: var(--brand); transform: translateY(-4px); }
.reel video, .reel img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* etichetta sotto il video, se serve dire di chi è */
.reel__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.5rem 0.75rem 0.6rem;
  font-family: var(--mono); font-size: 0.5625rem; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text);
  background: linear-gradient(to top, rgba(0,0,0,0.92) 35%, transparent);
}

/* slot ancora da riempire */
.reel.is-empty { border-style: dashed; border-color: rgba(255, 107, 26, 0.45); }
.reel__slot {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  font-family: var(--mono); color: var(--muted);
}
.reel__n { font-family: var(--display); font-size: 2rem; font-weight: 800; color: rgba(255,255,255,0.12); }
.reel__hint { font-size: 0.625rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* --- schermate: pista che scorre in continuo -------------- */

.marquee {
  position: relative;
  overflow: hidden;
  /* le tile sfumano ai bordi invece di essere tagliate di netto */
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track { display: flex; gap: var(--gap); width: max-content; padding-inline: var(--pad); }

/* l'animazione parte solo dopo che il JS ha duplicato la fila:
   senza JS resta una striscia che si scorre a mano */
.marquee.is-loop .marquee__track { animation: scorri var(--durata, 60s) linear infinite; }
.marquee.is-loop:hover .marquee__track,
.marquee.is-loop:focus-within .marquee__track { animation-play-state: paused; }

@keyframes scorri {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - var(--gap) / 2)); }
}

.marquee__hint {
  margin: 1.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.shot {
  position: relative;
  flex: none;
  height: clamp(300px, 42vh, 420px);
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.shot:hover, .shot:focus-visible { border-color: var(--brand); transform: translateY(-4px); }
.shot img { display: block; height: 100%; width: auto; }

.shot__badge {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.5rem 0.75rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
  text-align: left;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 35%, transparent);
}

/* Su touch non esiste il passaggio del mouse: una pista che scorre da sola
   sarebbe impossibile da centrare. Meglio lasciarla scorrere col dito. */
@media (max-width: 700px), (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .marquee.is-loop .marquee__track { animation: none; }
}
@media (max-width: 700px), (prefers-reduced-motion: reduce) {
  /* senza il loop le copie sarebbero solo le stesse schermate una seconda volta */
  .marquee .shot[aria-hidden="true"] { display: none; }
}
@media (max-width: 700px) {
  .marquee__hint::after { content: " Scorri con il dito."; }
}

/* --- ingrandimento --------------------------------------- */

.lb {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(6px);
  animation: lbEntra 0.25s ease both;
}
.lb[hidden] { display: none; }
@keyframes lbEntra { from { opacity: 0; } to { opacity: 1; } }

.lb__box {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-height: 100%;
  min-width: 0;
}
.lb__img {
  max-width: min(100%, 900px);
  max-height: 78vh;
  width: auto;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.lb__cap {
  max-width: 62ch;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--body-text);
}

.lb__close, .lb__nav {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lb__close:hover, .lb__nav:hover { background: var(--brand); border-color: var(--brand); color: #000; }
.lb__close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  width: 2.75rem; height: 2.75rem;
  font-size: 1.5rem; line-height: 1;
}
.lb__nav {
  flex: none;
  width: 3rem; height: 3rem;
  font-size: 1.75rem; line-height: 1;
}
@media (max-width: 640px) {
  .lb__nav { position: absolute; bottom: 1.25rem; }
  .lb__nav--prev { left: 1.25rem; }
  .lb__nav--next { right: 1.25rem; }
  .lb__cap { padding-bottom: 3.5rem; }
}

/* lo screenshot del profilo va a filo della scheda: ha già il suo nero
   e messo in una cornice sembrerebbe una figurina, non una prova */
/* i due profili (Instagram e TikTok) si alternano nello stesso riquadro,
   scorrendo verso l'alto con una pausa su ciascuno: il tempo di leggerli */
.profili {
  --h: clamp(140px, 16.5vw, 196px);
  align-self: start;   /* la scheda è flex: senza questo il riquadro si stira */
  width: calc(100% - 2.8rem);
  height: var(--h);
  margin: 1.1rem 1.4rem 0.4rem;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.profili__track {
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: profiliScorri 9s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.profili__track img {
  display: block;
  width: 100%;
  height: var(--h);
  object-fit: contain;
  object-position: left center;
}
.profili:hover .profili__track { animation-play-state: paused; }

/* quattro riquadri in colonna: Instagram, TikTok e le loro copie.
   A fine giro siamo sulla copia di Instagram, identica alla prima:
   il ritorno a zero non si vede. */
@keyframes profiliScorri {
  0%, 42%   { transform: translateY(0); }
  50%, 92%  { transform: translateY(-25%); }
  100%      { transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .profili { overflow-y: auto; }
  .profili__track { animation: none; }
}

/* --- come lavoro (banda arancione) ----------------------- */

.compliance { background: var(--brand); color: #000; }
.compliance .eyebrow { color: rgba(0, 0, 0, 0.62); }
.compliance .section__title { color: #000; }
.compliance .section__lede { color: rgba(0, 0, 0, 0.74); }
.compliance__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.compliance__intro .section__lede { margin-top: 1.25rem; }

.rules { list-style: none; margin: 0; padding: 0; }
.rules li {
  padding: 1rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.22);
  font-size: 0.9375rem;
  color: rgba(0, 0, 0, 0.78);
}
.rules li:last-child { border-bottom: 1px solid rgba(0, 0, 0, 0.22); }
.rules__k {
  display: block;
  font-family: var(--mono);
  font-size: 0.625rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: #000;
  margin-bottom: 0.35rem;
}
@media (max-width: 860px) { .compliance__grid { grid-template-columns: 1fr; } }

/* --- quando non sono la persona giusta ------------------- */

.nope { border-top: 1px solid var(--line); }
.nope__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.nope .section__lede { margin-top: 1.25rem; }
.nope__list { list-style: none; margin: 0; padding: 0; }
.nope__list li {
  padding: 1rem 0 1rem 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--body-text);
  position: relative;
}
.nope__list li:last-child { border-bottom: 1px solid var(--line); }
.nope__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.55rem;
  width: 10px; height: 1.5px;
  background: var(--muted);
}
.nope__k { display: block; font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.07em;
           text-transform: uppercase; color: var(--text); margin-bottom: 0.35rem; }
@media (max-width: 860px) { .nope__grid { grid-template-columns: 1fr; } }

/* --- chi sono ------------------------------------------- */

.about__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about__photo { margin: 0; position: relative; }

/* la foto è su fondo nero come il sito: la sfumo in basso
   così il ritratto emerge dal fondo invece di stare in un riquadro */
.about__img {
  display: block;
  width: 100%;
  height: auto;
  mask-image:
    linear-gradient(to bottom, #000 70%, transparent 99%),
    linear-gradient(to right, #000 86%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(to bottom, #000 70%, transparent 99%),
    linear-gradient(to right, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
}
.about__photo.is-missing .about__img { display: none; }
.about__photo:not(.is-missing) .photo-slot { display: none; }

.photo-slot {
  aspect-ratio: 4 / 5;
  border: 1px dashed rgba(255, 107, 26, 0.5);
  border-radius: 4px;
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
}
.photo-slot small { font-size: 0.625rem; opacity: 0.7; }
.about__text .section__title { margin-bottom: 1.25rem; }
.about__text p { max-width: 54ch; }

.link {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.link:hover { color: var(--text); }

.facts { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2.5rem; }
.facts li { font-size: 0.75rem; color: var(--muted); line-height: 1.3; }
.facts__n { display: block; font-family: var(--display); font-size: 2.1rem; font-weight: 800; color: var(--brand); line-height: 1; margin-bottom: 0.25rem; }
@media (max-width: 800px) { .about__grid { grid-template-columns: 1fr; } .about__photo { max-width: 340px; } }

/* --- contatti ------------------------------------------- */

.contact { border-top: 1px solid var(--line); }
.contact__title { max-width: 20ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.contact__lines { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact__line {
  display: grid; grid-template-columns: 8rem 1fr;
  gap: 1rem; align-items: baseline;
  padding: 1.15rem 0.25rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left 0.2s, background 0.2s, color 0.2s;
}
.contact__line:hover { background: var(--brand-wash); padding-left: 1rem; color: var(--brand); }
.contact__k { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.contact__v { font-family: var(--display); font-size: clamp(1.05rem, 0.95rem + 0.7vw, 1.6rem); font-weight: 500; color: var(--text); }
.contact__line:hover .contact__v { color: var(--brand); }
@media (max-width: 560px) { .contact__line { grid-template-columns: 1fr; gap: 0.2rem; } }

/* --- pagina legale --------------------------------------- */

.legal { padding-block: clamp(3rem, 8vh, 5rem) var(--sec); }
.legal .wrap { max-width: 760px; }
.legal__title { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem); text-wrap: balance; margin-bottom: 1rem; }
.legal h2 {
  font-size: 1.15rem;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.legal p { max-width: 68ch; }
.legal .section__lede { margin-bottom: 1rem; }

/* prenotazione: l'azione principale della sezione contatti */
.contact__book { font-size: 1rem; padding: 1rem 1.75rem; }
.contact__or {
  margin: 1.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- footer --------------------------------------------- */

.footer { border-top: 1px solid var(--line); padding-block: 2.5rem; }
.footer__grid { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; font-size: 0.8125rem; color: var(--muted); }
.footer p { margin: 0; }
.footer__note { margin-left: auto; }

/* --- movimento ------------------------------------------- */

/* comparsa allo scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* apertura dell'hero, un elemento alla volta */
.hero-anim .hero__text > *,
.hero-anim .nrs { opacity: 0; animation: salita 0.75s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.hero-anim .hero__text > *:nth-child(1) { animation-delay: 0.05s; }
.hero-anim .hero__text > *:nth-child(2) { animation-delay: 0.14s; }
.hero-anim .hero__text > *:nth-child(3) { animation-delay: 0.26s; }
.hero-anim .hero__text > *:nth-child(4) { animation-delay: 0.36s; }
.hero-anim .nrs { animation-delay: 0.46s; }

@keyframes salita {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* il nastro si stende da sinistra, come si stende davvero un nastro */
.mark.is-taped::after {
  transform-origin: left center;
  animation: nastro 0.55s cubic-bezier(0.25, 0.8, 0.3, 1) both;
}
@keyframes nastro {
  from { transform: rotate(-1.1deg) scaleX(0); }
  to   { transform: rotate(-1.1deg) scaleX(1); }
}

/* micro-reazioni */
.case { transition: border-color 0.25s ease, transform 0.25s ease; }
.case:hover { border-color: rgba(255, 107, 26, 0.45); transform: translateY(-3px); }
.chips li { transition: border-color 0.2s ease, color 0.2s ease; }
.chips li:hover { border-color: var(--brand); color: var(--brand); }
.service { transition: border-color 0.25s ease; }
.service:hover { border-color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
