/* =========================================================
   Portfolio — look "sala di montaggio"
   Per cambiare i colori modifica le variabili qui sotto.
   ========================================================= */
/* Layout: hero a tutto schermo come un mirino di camera, poi sezioni che richiamano una timeline di montaggio */
:root {
  /* Brand identity — palette */
  --nero: #09080e;        /* Nero Pellicola: sfondo principale */
  --blu: #0f1633;         /* Blu Notte: sezioni e superfici */
  --rosso: #ff2d46;       /* Rosso REC: colore firma, accenti e testo evidenziato */
  --rosso-deep: #e0163a;  /* Rosso REC scuro: sfondo dei bottoni (testo bianco leggibile) */
  --giallo: #ffd23f;      /* Giallo Highlight: dettagli, etichette, fascia scorrevole */
  --viola: #8a4dff;       /* Viola Motion: grafiche, sfumature, clip */
  --rosa: #ff5ca8;        /* Rosa Neon: sfumature, hover, dettagli */
  --crema: #f6f2ea;       /* Bianco Crema: testo */
  --tramonto: linear-gradient(100deg, var(--viola) 0%, var(--rosa) 50%, var(--rosso) 100%);

  /* Ruoli */
  --bg: var(--nero);
  --bg-2: var(--blu);
  --surface: #13172e;
  --line: #262b4a;
  --text: var(--crema);
  --muted: #9c97a8;
  --accent: var(--rosso);
  --clip: #34427e;        /* clip della timeline: tono chiaro del blu notte */
  --radius: 16px;
  --font-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.no-scroll { overflow: hidden; }

img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--crema); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.display { font-family: var(--font-display); text-transform: uppercase; line-height: 0.9; letter-spacing: 0.005em; text-wrap: balance; }
.accent { color: var(--accent); }
.outline { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; margin: 0; }

/* Grana pellicola */
.grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.06;
  background-image: url("../assets/img/grana.png");
}

/* ---------- Cursore personalizzato (solo mouse) ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: grid; place-items: center; position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none;
    width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
    background: var(--text); box-shadow: 0 0 0 1.5px rgba(9, 8, 14, 0.55);
    will-change: transform;
    transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background 0.35s;
  }
  .cursor__label { font: 500 11px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; opacity: 0; transition: opacity 0.2s; }
  .cursor.is-big { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--accent); }
  .cursor.is-big .cursor__label { opacity: 1; }
  .cursor.is-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; background: rgba(246, 242, 234, 0.25); box-shadow: 0 0 0 1.5px var(--text); }
  .cursor.is-hidden { opacity: 0; }
  /* Il cursore di sistema sparisce solo quando quello personalizzato è attivo (classe messa da main.js) */
  .has-cursor, .has-cursor * { cursor: none !important; }
}

/* ---------- Barra timeline in alto ---------- */
.scrubber { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; background: rgba(255, 255, 255, 0.06); pointer-events: none; }
.scrubber__fill { height: 100%; background: var(--rosso); transform-origin: left; transform: scaleX(0); }
.scrubber__head { position: absolute; top: 0; left: 0; transform: translateX(-50%); }
.scrubber__head::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 10px; margin-left: -1px; background: var(--accent); }
.scrubber__head span {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); padding: 2px 6px; border-radius: 4px;
  background: var(--accent); color: #fff; font: 500 10px var(--font-mono); white-space: nowrap; font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity 0.3s;
}
.scrubber.is-active .scrubber__head span { opacity: 1; }
@media (max-width: 700px) { .scrubber__head span { display: none; } }

/* ---------- Bottoni ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 28px; border-radius: 999px; border: 1px solid var(--rosso-deep); overflow: hidden; isolation: isolate;
  background: var(--rosso-deep); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform 0.3s var(--ease), color 0.3s, border-color 0.3s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--text);
  transform: translateY(101%); transition: transform 0.45s var(--ease);
}
.btn:hover { transform: translateY(-2px); color: var(--bg); border-color: var(--text); }
.btn:hover::before { transform: none; }
.btn--ghost { background: rgba(9, 8, 14, 0.55); border-color: rgba(244, 241, 234, 0.35); }
.btn--small { padding: 10px 20px; font-size: 14px; }
.btn--full { width: 100%; }

/* ---------- Navigazione ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; transition: background 0.4s, border-color 0.4s; border-bottom: 1px solid transparent; }
.nav.is-scrolled, .nav.is-open { background: rgba(9, 8, 14, 0.94); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; text-transform: uppercase; letter-spacing: 0.02em; text-decoration: none; }
.nav__mark { width: auto; height: 38px; flex: none; transition: transform 0.4s var(--ease); }
/* Al passaggio del mouse il logo SAM ruota leggermente */
.nav__logo:hover .nav__mark { transform: rotate(-4deg) scale(1.05); }
.nav__name { display: grid; line-height: 1; }
.nav__agency { margin-top: 4px; font: 500 9px var(--font-mono); letter-spacing: 0.16em; color: var(--muted); }
.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a:not(.btn) { position: relative; text-decoration: none; color: rgba(244, 241, 234, 0.75); font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease); }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: transform 0.25s; }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav.is-open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; background: rgba(9, 8, 14, 0.97); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a:not(.btn) { padding: 16px 0; font-family: var(--font-display); font-size: 30px; text-transform: uppercase; border-bottom: 1px solid var(--line); }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links .btn { margin-top: 20px; }
}

/* ---------- HERO a tutto schermo ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; padding: 150px 0 120px; isolation: isolate; }
.hero__bg {
  position: absolute; inset: 0; z-index: -2; background-color: var(--bg-2); background-size: cover; background-position: center;
  background-image: radial-gradient(55% 55% at 78% 28%, rgba(255, 45, 70, 0.22), transparent 70%), linear-gradient(160deg, var(--blu), var(--nero) 70%);
}
/* Timeline animata dietro il titolo */
.hero__canvas {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none;
  opacity: 0; animation: fadeIn 1.2s ease 1.2s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }
@media (max-width: 700px) {
  .hero__canvas { animation-name: fadeInSoft; }
  @keyframes fadeInSoft { to { opacity: 0.5; } }
}
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(9, 8, 14, 0.55) 0%, rgba(9, 8, 14, 0.1) 35%, rgba(9, 8, 14, 0.55) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(9, 8, 14, 0.75) 0%, rgba(9, 8, 14, 0.15) 60%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
}
.hero__content { position: relative; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px;
  font: 500 13px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(246, 242, 234, 0.8);
}
.hero__eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.hero__title {
  font-family: var(--font-display); text-transform: uppercase; font-size: clamp(64px, 12.5vw, 196px);
  line-height: 0.86; letter-spacing: 0.005em; max-width: 12ch;
}
.hero__title .word { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.02em 0; margin-top: -0.04em; }
/* finché i font non sono pronti l'ingresso resta fermo: niente titolo che si reimpagina mentre si anima */
.is-loading .hero__title .char, .is-loading .hero__sub, .is-loading .hero__cta, .is-loading .hero__canvas { animation-play-state: paused; }
.hero__title .char { display: inline-block; animation: charIn 1s var(--ease) both; animation-delay: calc(0.25s + var(--i) * 28ms); }
.hero__title .word--accent .char { background: var(--tramonto); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes charIn { from { transform: translateY(105%) rotate(8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.hero__sub { font-size: clamp(17px, 1.6vw, 20px); color: rgba(244, 241, 234, 0.8); max-width: 52ch; margin: 28px 0 36px; animation: fadeUp 1s var(--ease) 0.9s both; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; animation: fadeUp 1s var(--ease) 1.05s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* Mirino della camera */
.viewfinder { position: absolute; inset: 92px var(--gutter) 28px; pointer-events: none; font: 500 12px var(--font-mono); letter-spacing: 0.08em; color: rgba(244, 241, 234, 0.85); }
.vf { position: absolute; width: 34px; height: 34px; border: 2px solid rgba(244, 241, 234, 0.75); }
.vf--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.vf--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.vf--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.vf--br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.vf__top { position: absolute; top: 14px; left: 52px; display: flex; align-items: center; gap: 18px; }
.vf__top--right { left: auto; right: 52px; gap: 14px; }
.rec { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 500; }
.rec__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.timecode { font-variant-numeric: tabular-nums; display: inline-block; width: 13ch; contain: strict; height: 1.4em; overflow: hidden; }
.battery { position: relative; width: 26px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; }
.battery::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: currentColor; }
.battery i { position: absolute; inset: 1.5px; right: 30%; background: currentColor; }
.vf__center { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; opacity: 0.45; }
.vf__center::before, .vf__center::after { content: ""; position: absolute; background: var(--text); }
.vf__center::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.vf__center::after { top: 50%; left: 0; right: 0; height: 1px; }
.meters { position: absolute; right: 14px; top: 50%; height: 140px; margin-top: -70px; display: flex; gap: 4px; }
.meters i {
  width: 6px; height: 100%; border-radius: 2px; background: rgba(255, 255, 255, 0.1); position: relative; overflow: hidden;
}
.meters i::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 100%; transform-origin: bottom;
  background: linear-gradient(to top, rgba(246, 242, 234, 0.75) 0 80%, var(--rosso) 80%);
  background-size: 100% 140px; background-position: bottom;
  animation: meter 0.9s ease-in-out infinite alternate;
}
.meters i:last-child::after { animation-duration: 0.7s; animation-delay: -0.3s; }
@keyframes meter { 0% { transform: scaleY(0.35); } 40% { transform: scaleY(0.72); } 70% { transform: scaleY(0.5); } 100% { transform: scaleY(0.88); } }
@media (max-width: 700px) {
  .viewfinder { inset: 84px 12px 16px; }
  .vf__top--right, .vf__center, .meters { display: none; }
  .vf__top { left: 44px; }
  .vf__top--right { right: 44px; }
}

.hero__scroll { position: absolute; right: calc(var(--gutter) + 20px); bottom: 64px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; font: 500 11px var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.hero__scroll span { writing-mode: vertical-rl; }
.hero__scroll i { position: relative; width: 1px; height: 54px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: var(--accent); transform: translateY(-100%); animation: drip 1.8s var(--ease) infinite; }
@keyframes drip { to { transform: translateY(250%); } }
@media (max-width: 700px) { .hero__scroll { display: none; } }

/* ---------- Fascia scorrevole ---------- */
.marquee { position: relative; z-index: 3; overflow: hidden; padding: 30px 0; margin: -48px 0 -20px; }
.marquee__track {
  margin-inline: -5vw; overflow: hidden; background: var(--rosso-deep); color: var(--crema); padding: 16px 0;
  transform: rotate(-2.2deg); box-shadow: 0 20px 60px rgba(255, 45, 70, 0.2);
}
.marquee__inner { display: flex; width: max-content; align-items: center; animation: marquee 32s linear infinite; }
.marquee__item { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 58px); text-transform: uppercase; line-height: 1; white-space: nowrap; }
.marquee__item:nth-child(even) span { color: transparent; -webkit-text-stroke: 1.5px var(--crema); }
.marquee__item svg { width: 0.55em; height: 0.55em; fill: var(--nero); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sezioni ---------- */
.section { padding-block: 130px; position: relative; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head { margin-bottom: 56px; }
.section__tc { display: inline-flex; align-items: center; gap: 10px; font: 500 12px var(--font-mono); color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.section__tc::before { content: ""; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); }
.section__head h2 { font-size: clamp(52px, 8vw, 120px); }
.section__lead { color: var(--muted); max-width: 58ch; margin: 22px 0 0; font-size: 18px; }
@media (max-width: 700px) { .section { padding-block: 90px; } }

@keyframes pulse { from { transform: scale(1); opacity: 0.5; } 70%, to { transform: scale(1.45); opacity: 0; } }

/* ---------- Numeri (righello) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 8px 0 64px; position: relative; }
.stats::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background:
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 100%) 0 0 / 25% 12px no-repeat repeat-x,
    repeating-linear-gradient(90deg, rgba(143, 140, 134, 0.5) 0 1px, transparent 1px 20px) 0 0 / 100% 6px no-repeat;
  border-top: 1px solid var(--line);
}
.stat { padding: 30px 16px 0 0; display: flex; flex-direction: column; gap: 6px; }
.stat__value { font-family: var(--font-display); font-size: clamp(54px, 7vw, 96px); line-height: 0.9; font-variant-numeric: tabular-nums; }
.stat:nth-child(odd) .stat__value { color: var(--text); }
.stat:nth-child(even) .stat__value { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.stat__label { color: var(--muted); font-size: 14px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: 20px; } }

/* ---------- Filtri ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -20px 0 36px; }
.chip-btn {
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.25s;
}
.chip-btn:hover { color: var(--text); border-color: var(--muted); }
.chip-btn.is-active { background: var(--crema); color: var(--nero); border-color: var(--crema); }

/* ---------- Lavori ---------- */
.works { columns: 3 300px; column-gap: 22px; }
@media (max-width: 600px) { .works { columns: 1; } }
.work {
  display: block; width: 100%; break-inside: avoid; margin: 0 0 22px; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer;
}
.work[hidden] { display: none; }
.work__media {
  display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); transition: border-color 0.4s, transform 0.5s var(--ease); isolation: isolate;
}
.work--v .work__media { aspect-ratio: 9 / 16; }
.work--h .work__media { aspect-ratio: 16 / 9; }
.work__media > img, .work__media > video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease), filter 0.5s; }
.work__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 8, 14, 0.35) 0%, transparent 30%, transparent 50%, rgba(9, 8, 14, 0.9) 100%); pointer-events: none; }
.work:hover .work__media { border-color: var(--rosso); transform: translateY(-4px); }
.work:hover .work__media > img, .work:hover .work__media > video, .work:hover .work__placeholder { transform: scale(1.07); }
.work__placeholder {
  width: 100%; height: 100%; transition: transform 0.9s var(--ease);
  background:
    radial-gradient(80% 60% at 30% 20%, color-mix(in srgb, var(--pa) 60%, transparent), transparent 70%),
    radial-gradient(70% 60% at 80% 90%, color-mix(in srgb, var(--pb) 50%, transparent), transparent 70%),
    var(--blu);
}
.work__badges { position: absolute; z-index: 2; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; font: 500 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.work__badges span { padding: 5px 9px; border-radius: 6px; background: rgba(9, 8, 14, 0.75); }
.work__badges span:first-child { color: var(--crema); }
.work__play {
  position: absolute; z-index: 2; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(9, 8, 14, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3); transition: transform 0.4s var(--ease), background 0.3s, opacity 0.3s;
}
.work__play svg { width: 22px; fill: #fff; margin-left: 3px; }
.work:hover .work__play { transform: scale(1.15); background: var(--rosso-deep); border-color: var(--rosso-deep); }
@media (hover: hover) and (pointer: fine) { .work:hover .work__play { opacity: 0; } }
.work__info { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.work__title { font-family: var(--font-display); font-size: clamp(26px, 2.4vw, 34px); text-transform: uppercase; line-height: 0.95; }
.work__client { color: rgba(244, 241, 234, 0.7); font-size: 14px; }
/* forma d'onda audio che compare al passaggio */
.work__wave {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 5px; background: var(--rosso);
  transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease);
}
.work:hover .work__wave { transform: scaleX(1); }

/* ---------- Modal player ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5, 5, 6, 0.92); backdrop-filter: blur(8px); }
.modal__box { position: relative; width: min(1040px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); animation: fadeUp 0.45s var(--ease); }
.modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, 0.6); cursor: pointer; font-size: 16px;
}
.modal__media { aspect-ratio: 16 / 9; background: #000; position: relative; }
.modal__media.is-vertical { aspect-ratio: 9 / 16; max-height: 72vh; margin: 0 auto; }
.modal__media.is-instagram { aspect-ratio: auto; height: min(75vh, 760px); max-width: 420px; }
.modal__media video, .modal__media iframe { width: 100%; height: 100%; border: 0; }
.modal__empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--text); padding: 24px; background-size: cover; background-position: center; }
.modal__empty::before { content: ""; position: absolute; inset: 0; background: rgba(9, 8, 14, 0.7); }
.modal__empty > * { position: relative; }
.modal__empty strong { font-family: var(--font-display); font-size: 34px; text-transform: uppercase; font-weight: 400; }
.modal__empty small { color: var(--muted); }
.modal__empty code { color: var(--rosso); }
.modal__info { padding: 22px 26px 26px; }
.modal__info .mono { color: var(--accent); }
.modal__info h3 { font-family: var(--font-display); font-size: 38px; text-transform: uppercase; line-height: 1; margin: 8px 0 10px; }
.modal__info p { color: var(--muted); margin: 0; }
.modal__ext { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--rosso); text-decoration: none; }
.modal__ext:hover { text-decoration: underline; }

/* ---------- Servizi come tracce ---------- */
.tracks { position: relative; display: grid; gap: 10px; padding-top: 34px; }
.tracks__ruler {
  position: absolute; top: 0; left: 82px; right: 0; height: 22px; border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12.5%) 0 100% / 100% 10px no-repeat,
              repeating-linear-gradient(90deg, rgba(143, 140, 134, 0.3) 0 1px, transparent 1px 2.5%) 0 100% / 100% 5px no-repeat;
  display: flex; font: 500 10px var(--font-mono); color: var(--muted);
}
.tracks__ruler span { flex: 1; padding-left: 4px; font-variant-numeric: tabular-nums; }
.tracks__playhead { position: absolute; top: 0; bottom: 0; left: 82px; will-change: transform; width: 2px; margin-left: -1px; background: var(--accent); z-index: 3; pointer-events: none; transition: transform 0.15s linear; }
.tracks__playhead::before { content: ""; position: absolute; top: 0; left: -6px; border: 7px solid transparent; border-top: 10px solid var(--accent); }
.track { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
.track__label {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); font: 500 13px var(--font-mono); color: var(--muted);
}
.track__label b { color: var(--text); font-weight: 500; }
.track__label i { width: 14px; height: 4px; border-radius: 2px; background: var(--clip); }
.clip {
  --c: var(--clip);
  border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--c) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); transition: transform 0.4s var(--ease), background 0.4s;
  min-width: 0;
}
.track:hover .clip { --c: var(--rosso-deep); transform: translateX(6px); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.clip__bar { display: flex; justify-content: space-between; gap: 12px; padding: 5px 14px; background: var(--c); color: var(--crema); font-weight: 500; font: 500 11px var(--font-mono); letter-spacing: 0.04em; }
.clip__bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: end; padding: 22px 24px 24px; }
.clip h3 { font-family: var(--font-display); font-size: clamp(32px, 3.6vw, 48px); text-transform: uppercase; line-height: 0.95; margin-bottom: 10px; }
.clip p { color: rgba(244, 241, 234, 0.72); margin: 0 0 14px; max-width: 54ch; }
.clip ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.clip li { padding: 4px 10px; border-radius: 999px; font-size: 13px; background: rgba(9, 8, 14, 0.45); border: 1px solid rgba(255, 255, 255, 0.08); }
.clip__price { text-align: right; }
.clip__price small { display: block; color: var(--muted); font: 500 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.clip__price strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(48px, 5vw, 72px); line-height: 1; }
@media (max-width: 700px) {
  .track { grid-template-columns: 1fr; }
  .track__label { flex-direction: row; justify-content: flex-start; padding: 6px 12px; }
  .tracks__ruler, .tracks__playhead { display: none; }
  .tracks { padding-top: 0; }
  .clip__body { grid-template-columns: 1fr; }
  .clip__price { text-align: left; }
}

/* ---------- Processo con keyframe ---------- */
.ruler {
  height: 14px; border-bottom: 1px solid var(--muted);
  background: repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 25%) 0 100% / 100% 14px no-repeat,
              repeating-linear-gradient(90deg, rgba(143, 140, 134, 0.45) 0 1px, transparent 1px 2.5%) 0 100% / 100% 6px no-repeat;
}
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.process li { position: relative; padding: 38px 8px 0 0; }
.process li::before {
  content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; background: var(--accent);
  transform: rotate(45deg); box-shadow: 0 0 0 4px var(--bg-2), 0 0 18px rgba(255, 45, 70, 0.6);
}
.process__n { font: 500 12px var(--font-mono); color: var(--accent); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.process h3 { font-family: var(--font-display); font-size: 40px; text-transform: uppercase; line-height: 1; margin: 10px 0 10px; }
.process p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; } .ruler { display: none; } .process li { border-top: 1px solid var(--line); } }
@media (max-width: 480px) { .process { grid-template-columns: 1fr; } }

/* ---------- Chi sono ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.about__photo { position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.about__photo::after { content: "CAM A · 50mm · f/1.8"; position: absolute; left: 14px; bottom: 12px; font: 500 11px var(--font-mono); letter-spacing: 0.08em; color: rgba(244, 241, 234, 0.7); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__placeholder {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(70% 60% at 50% 30%, rgba(255, 45, 70, 0.22), transparent 70%), var(--blu);
}
.about__placeholder span { font-family: var(--font-display); font-size: clamp(110px, 14vw, 180px); line-height: 1; }
.about__placeholder small { color: var(--muted); font: 500 12px var(--font-mono); }
.about__text { min-width: 0; }
.about__text .section__head { margin-bottom: 32px; }
.about__text p { color: rgba(244, 241, 234, 0.78); font-size: 18px; max-width: 60ch; }
.about__text p:first-child { font-size: clamp(21px, 2vw, 26px); color: var(--text); font-weight: 600; line-height: 1.4; }
.about__label { font: 500 12px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 32px 0 14px; }
/* Scheda personale stile metadati della clip */
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 20px; margin: 28px 0 0; }
.info:empty { display: none; }
.info div { padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.info dt { font: 500 11px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.info dd { margin: 4px 0 0; font-size: 17px; font-weight: 700; }
/* Skills come keyframe */
.skills { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .skills { grid-template-columns: minmax(0, 1fr); } }
.skills li {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: baseline; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color 0.3s;
}
.skills li:hover { border-color: var(--rosso); }
.skills li i { width: 9px; height: 9px; transform: translateY(-1px) rotate(45deg); background: var(--rosso); grid-row: span 2; align-self: start; margin-top: 7px; }
.skills strong { font-size: 16px; }
.skills span { grid-column: 2; color: var(--muted); font-size: 14px; line-height: 1.5; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 600; background: var(--surface); }
.chips li i { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font: 700 11px var(--font-body); font-style: normal; }

/* Grafiche animate dietro e attorno alla foto */
.about__stage { position: relative; isolation: isolate; margin: 6% 9% 8% 6%; }
/* Su desktop la foto resta ferma mentre si legge la colonna di testo */
@media (min-width: 861px) {
  .about { align-items: start; }
  .about__stage { position: sticky; top: 120px; }
}
.about__photo img { filter: contrast(1.05); }
.about__fx { position: absolute; inset: 0; z-index: -1; }
.about__fx > * { position: absolute; }
.fx-block { inset: 9% -7% -6% 14%; border-radius: var(--radius); background: var(--rosso-deep); animation: fxDrift 7s ease-in-out infinite alternate; }
.fx-dots {
  left: -10%; bottom: -11%; width: 46%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(246, 242, 234, 0.4) 1.5px, transparent 2px) 0 0 / 16px 16px;
  animation: fxDrift 9s ease-in-out infinite alternate-reverse;
}
.fx-ring { right: -19%; top: -15%; width: 58%; overflow: visible; fill: none; stroke: rgba(246, 242, 234, 0.4); stroke-width: 1; animation: fxSpin 50s linear infinite; }
.fx-ring__arc { stroke: var(--rosso); stroke-width: 3; stroke-linecap: round; animation: fxSpin 9s linear infinite reverse; transform-origin: center; }
.fx-keys { left: -9%; top: 12%; display: grid; gap: 22px; }
.fx-keys i { width: 12px; height: 12px; transform: rotate(45deg); background: var(--crema); opacity: 0.25; animation: fxKey 3.6s infinite; }
.fx-keys i:nth-child(2) { animation-delay: 1.2s; }
.fx-keys i:nth-child(3) { animation-delay: 2.4s; }
@keyframes fxDrift { to { transform: translate(10px, -12px); } }
@keyframes fxSpin { to { transform: rotate(360deg); } }
@keyframes fxKey { 0%, 30%, 100% { opacity: 0.25; background: var(--crema); } 10% { opacity: 1; background: var(--rosso); } }

.fx-chip {
  position: absolute; z-index: 1; display: grid; gap: 2px; min-width: 132px; padding: 12px 14px; border-radius: 12px;
  background: rgba(9, 8, 14, 0.94); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: fxFloat 6s ease-in-out infinite alternate;
}
.fx-chip--a { right: -16%; top: 7%; }
.fx-chip--b { left: -9%; bottom: 13%; animation-delay: -3s; }
.fx-chip__label { font: 500 10px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fx-chip strong { font: 400 34px/1 var(--font-display); }
.fx-chip svg { width: 100%; height: 34px; margin-top: 4px; overflow: visible; }
.fx-line { fill: none; stroke: var(--rosso); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; animation: fxDraw 4.5s var(--ease) infinite; }
.fx-eq { display: flex; align-items: flex-end; gap: 4px; height: 30px; margin-top: 6px; }
.fx-eq i { flex: 1; height: 100%; border-radius: 2px; background: var(--clip); transform-origin: bottom; animation: fxEq 1.6s ease-in-out infinite alternate; }
.fx-eq i:nth-child(2n) { animation-duration: 1.1s; }
.fx-eq i:nth-child(3n) { animation-duration: 2s; animation-delay: -0.7s; }
.fx-eq i:last-child { background: var(--rosso); }
@keyframes fxFloat { to { transform: translateY(-12px); } }
@keyframes fxDraw { 0% { stroke-dashoffset: 1; } 45%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes fxEq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about__stage { max-width: 420px; margin: 8% 10% 10% 7%; }
  .fx-chip { min-width: 112px; padding: 10px 12px; }
  .fx-chip strong { font-size: 28px; }
  .fx-chip__label { font-size: 9px; letter-spacing: 0.06em; }
  .fx-chip--a { top: -5%; right: -11%; }
}

/* ---------- Contatti ---------- */
.section--contact { padding-top: 100px; overflow: hidden; }
.contact__big { font-size: clamp(78px, 17vw, 270px); line-height: 0.82; margin-bottom: 56px; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.contact__intro .section__lead { margin: 0 0 28px; }
.contact__quick { display: grid; gap: 10px; }
.quick {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color 0.3s, transform 0.4s var(--ease), background 0.3s;
  min-width: 0;
}
.quick:hover { border-color: var(--accent); transform: translateX(6px); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.quick svg { width: 26px; height: 26px; flex: none; fill: var(--rosso); }
.quick span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.quick small { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick__arrow { font-style: normal; font-size: 20px; color: var(--muted); transition: transform 0.3s var(--ease), color 0.3s; }
.quick:hover .quick__arrow { transform: translateX(4px); color: var(--accent); }

.form { display: grid; gap: 18px; padding: clamp(22px, 4vw, 34px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 8px; font: 500 12px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font: 400 16px var(--font-body); text-transform: none; letter-spacing: 0; transition: border-color 0.2s, box-shadow 0.2s;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 45, 70, 0.2); }
.form__status { margin: 0; font-size: 14px; min-height: 1.2em; color: var(--muted); }
.form__status.is-ok { color: #6ee7a8; }
.form__status.is-error { color: #ff8a73; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 28px; color: var(--muted); font-size: 14px; overflow: hidden; }
.footer__name { font-size: 15.5vw; line-height: 0.8; white-space: nowrap; text-align: center; color: transparent; -webkit-text-stroke: 1px rgba(244, 241, 234, 0.18); margin-bottom: 28px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer a { text-decoration: none; }
.footer__links { display: inline-flex; gap: 20px; }
.footer a:hover { color: var(--text); }

/* ---------- WhatsApp fluttuante ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); transition: transform 0.3s var(--ease);
}
.wa-float:hover { transform: scale(1.1) rotate(-6deg); }
.wa-float svg { width: 30px; fill: #fff; }

/* Animazioni continue in pausa fuori schermo */
.is-offscreen, .is-offscreen *, .is-offscreen *::before, .is-offscreen *::after { animation-play-state: paused !important; }

/* ---------- Animazioni all'ingresso (elementi sempre visibili a riposo) ---------- */
/* main.js mette .is-waiting solo a ciò che sta sotto lo schermo: senza JavaScript resta tutto visibile */
.reveal.is-waiting { opacity: 0; }
.reveal.in { animation: reveal 0.9s var(--ease) both; animation-delay: var(--d, 0s); }
.reveal--title.in { animation-name: revealTitle; animation-duration: 1.1s; }
@keyframes reveal { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes revealTitle {
  from { opacity: 0; transform: translateY(0.35em) skewY(3deg); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__bg { transform: none; }
  .hero__canvas { opacity: 1; }
}
