/* ============================================================
   handfactory / media — custom layer on top of UIkit 3.25
   Concept: "Il montaggio" — la pagina come timeline di editing
   ============================================================ */

/* ---------- 0. Font: Suisse Intl (self-hosted) -------------- */
/* Unico font del sito, niente mono. Il peso "bold" (700) non viene mai
   usato come tale: qui e' fatto corrispondere al file SemiBold, cosi'
   qualunque font-weight:700 nel sito rende visivamente come semibold. */
@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-LightItalic.ttf") format("truetype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-RegularItalic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-Regular.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-SemiBoldItalic.ttf") format("truetype");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-SemiBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-SemiBoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-BlackItalic.ttf") format("truetype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

/* ============================================================
   handfactory / media — homeV2 su YOOtheme Pro
   Porting di hfm.css: tutto è confinato alle sezioni con classe
   .hfm-sec, così header, footer e le altre pagine restano intatti.
   ============================================================ */

/* ---------- Ponte YOOtheme: neutralizza i wrapper del builder -- */
/* padding di .uk-section azzerato; le sezioni hfm impostano il proprio */
:where(.hfm-sec).uk-section {
  padding-top: 0;
  padding-bottom: 0;
}

/* righe e colonne del builder non generano box: gli elementi figli
   partecipano direttamente al layout della sezione (grid/flex originali) */
.hfm-sec > .uk-grid {
  display: contents;
}

.hfm-sec > .uk-grid > * {
  margin: 0;
  padding-left: 0;
}

.hfm-sec > .uk-grid > .hfm-pass,
.hfm-contents {
  display: contents;
}

.hfm-sec > .uk-grid > .hfm-shell {
  padding-inline: var(--gutter);
}

.hfm-sec > .uk-grid > .hfm-shell--wide {
  margin-inline: auto;
}

.hfm-sec > .uk-grid > .hfm-says-wrap {
  margin-top: clamp(3.5rem, 9vh, 6rem);
}

/* titoli di sezione resi con l'elemento Headline (h2.hfm-head) */
.hfm-sec h2.hfm-head {
  font-size: var(--t-base);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: normal;
  margin-top: 0;
  /* .uk-grid>*>:last-child azzera il margine quando il titolo è l'ultimo della colonna */
  margin-bottom: clamp(2.5rem, 6vh, 5rem);
}

.hfm-sec .hfm-head__title {
  display: block;
}

/* sottotitolo (elemento Text) */
.hfm-sec .hfm-hero__sub {
  margin-top: clamp(1.6rem, 4vh, 2.8rem) !important;
  margin-bottom: 0;
}

.hfm-sec .hfm-hero__sub > p {
  margin: 0;
}

/* ---------- 1. Tokens ------------------------------------- */
:root {
  --ink: #000000;
  /* nero pellicola, caldo */
  --ink-2: #111111;
  /* superfici sollevate */
  --ink-3: #222222;
  /* bordi su scuro */
  --paper: #FFFFFF;
  /* bianco carta */
  --paper-2: #DEDAD2;
  --ash: #8A857E;
  /* testo secondario */
  --amber: #F0A23C;
  /* key light / tungsten */
  --teal: #1D5C63;
  /* shadow grade */
  --white: #FBFAF8;

  --font-sans: "Suisse Intl", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* niente font mono nel sito: .hfm-mono riusa lo stesso stack Suisse */
  --font-mono: var(--font-sans);

  --fg: var(--paper);
  --bg: var(--ink);

  /* type scale — 1.333 perfect fourth, fluido */
  --t-xs: clamp(.68rem, .62rem + .18vw, .78rem);
  --t-sm: clamp(.82rem, .76rem + .2vw, .95rem);
  --t-base: clamp(1rem, .94rem + .3vw, 1.15rem);
  --t-lg: clamp(1.3rem, 1.1rem + .9vw, 2rem);
  --t-xl: clamp(2rem, 1.4rem + 2.6vw, 3.6rem);
  --t-2xl: clamp(2.6rem, 1.3rem + 5.6vw, 7rem);
  --t-3xl: clamp(3.2rem, 1rem + 9.4vw, 7rem);

  --gutter: clamp(1.15rem, 4vw, 4.5rem);
  --rule: 1px solid color-mix(in srgb, var(--fg) 16%, transparent);
  --ease: cubic-bezier(.19, 1, .22, 1);
  --ease-io: cubic-bezier(.65, .05, .36, 1);
}

/* Il sito è volutamente monotema (cinematografico): i token restano
   identici in light e dark, ma il background è sempre esplicito. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fg: var(--paper);
    --bg: var(--ink);
  }
}

:root[data-theme="dark"] {
  --fg: var(--paper);
  --bg: var(--ink);
}

/* ---------- 2. Base (scoped: solo sezioni hfm-sec, header/footer del sito intatti) */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body:has(.hfm-sec) {
  background: var(--ink);
}

body.is-locked {
  overflow: hidden;
}

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

:where(.hfm-sec) {
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--t-base);
  font-weight: 400;
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

:where(.hfm-sec) :is(img, video, canvas, svg) {
  display: block;
  max-width: 100%;
}

:where(.hfm-sec) a,
:where(.hfm-sec) a:hover {
  color: inherit;
  text-decoration: none;
}

:where(.hfm-sec) :is(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dd) {
  margin: 0;
}

/* default UIkit "vanilla" che l'originale eredita e il tema del sito cambia */
:where(.hfm-sec) dl {
  margin: 0 0 20px 0;
}



:where(.hfm-sec) :is(h1, h2, h3, h4, h5, h6) {
  color: inherit;
  font-family: inherit;
  text-transform: none;
}

.hfm-sec ::selection {
  background: var(--amber);
  color: var(--ink);
}

.hfm-sec :focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 2px;
}

.hfm-mono {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

.hfm-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 3. Layout ------------------------------------- */
.hfm-shell {
  padding-inline: var(--gutter);
}

.hfm-shell--wide {
  max-width: 1760px;
  margin-inline: auto;
}

.hfm-section {
  position: relative;
  padding-block: clamp(5rem, 11vh, 9.5rem);
}

.hfm-section--tight {
  padding-block: clamp(3.5rem, 7vh, 6rem);
}

.hfm-section--ink {
  background: var(--ink);
  color: var(--paper);
}

.hfm-section--paper {
  background: var(--paper);
  color: var(--ink);
}

.hfm-section--white {
  background: #fff;
  color: var(--ink);
}

.hfm-section--white ::selection {
  background: var(--ink);
  color: #fff;
}

.hfm-section--paper ::selection {
  background: var(--ink);
  color: var(--paper);
}

/* intestazione di sezione: numero clip + titolo, la struttura porta informazione */
.hfm-head {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 3rem);
  border-top: var(--rule);
  padding-top: 1.1rem;
  margin-bottom: clamp(2.5rem, 6vh, 5rem);
}

.hfm-head__meta {
  flex: none;
  opacity: .55;
}

.hfm-head__title {
  font-size: var(--t-lg);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.hfm-head__spacer {
  flex: 1 1 auto;
}

.hfm-head__aside {
  flex: none;
  opacity: .55;
  display: none;
}

@media (min-width: 960px) {
  .hfm-head__aside {
    display: block;
  }
}

/* display type */
.hfm-display {
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .88;
  text-wrap: balance;
}

/* reveal a maschera, usato solo sui titoli */
.hfm-reveal {
  display: block;
  overflow: hidden;
  /* con line-height .88 la maschera taglierebbe le discendenti (g, p, y):
     la allunghiamo sotto senza cambiare l'interlinea */
  padding-bottom: .14em;
  margin-bottom: -.14em;
}

.hfm-reveal>span {
  display: block;
  will-change: transform;
}

/* ---------- 4. Grana + vignettatura globali ---------------- */
.hfm-grain {
  position: fixed;
  inset: -150%;
  pointer-events: none;
  z-index: 9000;
  opacity: .32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  animation: hfm-grain 700ms steps(4) infinite;
}

@keyframes hfm-grain {
  0% {
    transform: translate3d(0, 0, 0);
  }

  25% {
    transform: translate3d(-3%, 2%, 0);
  }

  50% {
    transform: translate3d(2%, -3%, 0);
  }

  75% {
    transform: translate3d(-2%, -2%, 0);
  }

  100% {
    transform: translate3d(3%, 1%, 0);
  }
}

/* ---------- 6. Preloader (l'unica sequenza non richiesta) --- */
.hfm-boot {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-content: center;
  gap: 1.2rem;
  padding: var(--gutter);
}

.hfm-boot__mark {
  font-size: var(--t-xl);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: .9;
}

.hfm-boot__mark i {
  font-style: normal;
  opacity: .4;
  font-weight: 400;
}

.hfm-boot__bar {
  width: min(58vw, 460px);
  height: 1.5px;
  background: color-mix(in srgb, var(--paper) 18%, transparent);
  overflow: hidden;
}

.hfm-boot__bar b {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--amber);
}

.hfm-boot__tc {
  display: flex;
  justify-content: space-between;
  opacity: .6;
}

.hfm-boot__shutter {
  position: fixed;
  inset: 0;
  z-index: 9400;
  pointer-events: none;
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.hfm-boot__shutter i {
  display: block;
  background: var(--ink);
}

/* ---------- 7. Cursore -------------------------------------- */
.hfm-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9450;
  pointer-events: none;
  display: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 880px) {
  .hfm-cursor {
    display: block;
  }
}

.hfm-cursor__dot,
.hfm-cursor__ring {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.hfm-cursor__dot {
  width: 6px;
  height: 6px;
  background: var(--amber);
  transition: width .3s var(--ease), height .3s var(--ease), opacity .3s;
}

.hfm-cursor__ring {
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--paper) 45%, transparent);
  display: grid;
  place-content: center;
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .12em;
  color: var(--ink);
  background: transparent;
  transition: width .35s var(--ease), height .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}

.hfm-cursor__ring-text {
  grid-column: 1;
  grid-row: 1;
  opacity: 0;
  transition: opacity .25s;
}

html.is-paper .hfm-cursor__ring {
  border-color: color-mix(in srgb, var(--ink) 40%, transparent);
}

.hfm-cursor.is-play .hfm-cursor__ring {
  background: var(--amber);
  border-color: var(--amber);
}

.hfm-cursor.is-play .hfm-cursor__ring-text[data-state="play"] {
  opacity: 1;
}

.hfm-cursor.is-play .hfm-cursor__dot {
  opacity: 0;
}

/* badge "SHOWREEL 2026" con anello di testo rotante, stessa identita'
   visiva del bottone play dell'hero: sostituisce ring/dot quando il
   cursore e' sopra lo showreel aperto (stato is-close). */
.hfm-cursor__badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--paper) 45%, transparent);
  background: transparent;
  color: var(--paper);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .3s var(--ease);
}

.hfm-cursor.is-close .hfm-cursor__ring,
.hfm-cursor.is-close .hfm-cursor__dot {
  opacity: 0;
}

.hfm-cursor.is-close .hfm-cursor__badge {
  opacity: 1;
}

.hfm-cursor__badge-rot {
  position: absolute;
  inset: -1px;
  animation: hfm-cursor-spin 14s linear infinite;
}

.hfm-cursor__badge-rot text {
  fill: currentColor;
  font-family: var(--font-mono);
  font-size: 8.4px;
  letter-spacing: .26em;
}

@keyframes hfm-cursor-spin {
  to {
    transform: rotate(360deg);
  }
}

.hfm-cursor__badge-x {
  position: relative;
  z-index: 2;
  font-size: 1.3rem;
  line-height: 1;
}

.hfm-cursor.is-hover .hfm-cursor__ring {
  width: 64px;
  height: 64px;
  border-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 16%, transparent);
}

.hfm-cursor.is-hover .hfm-cursor__dot {
  width: 10px;
  height: 10px;
}

/* ---------- 8. Playhead / HUD ------------------------------- */
.hfm-hud {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 380;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(.7rem, 2vw, 1.6rem);
  padding: .55rem var(--gutter) .7rem;
  mix-blend-mode: difference;
  color: #fff;
}

.hfm-hud__tc {
  opacity: .85;
  /* --font-mono è la sans: cifre tabellari + larghezza fissa,
     così la timeline non si allunga e accorcia col timecode */
  font-variant-numeric: tabular-nums;
  width: 11ch;
  white-space: nowrap;
}

.hfm-hud__clip {
  opacity: .6;
  text-align: right;
  width: 11ch;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
}

.hfm-hud__track {
  position: relative;
  height: 12px;
}

.hfm-hud__track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, .28);
}

.hfm-hud__fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 1px;
  width: 0%;
  background: #fff;
  transform-origin: left;
}

.hfm-hud__marks {
  position: absolute;
  inset: 0;
}

.hfm-hud__marks i {
  position: absolute;
  top: 50%;
  width: 1px;
  height: 7px;
  margin-top: -3.5px;
  background: rgba(255, 255, 255, .4);
}

.hfm-hud__marks i.is-end {
  right: 0;
}

@media (max-width: 640px) {
  .hfm-hud__clip {
    display: none;
  }

  .hfm-hud {
    grid-template-columns: auto 1fr;
  }
}

/* ---------- 9. Hero ---------------------------------------- */
.hfm-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: clamp(6rem, 14vh, 10rem);
  overflow: clip;
  background: var(--ink);
}

/* "frame" di fondo: light leak in grade tungsten/teal, no immagini esterne */
.hfm-hero__grade {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hfm-hero__grade::before,
.hfm-hero__grade::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.hfm-hero__grade::before {
  width: 75vw;
  height: 75vw;
  left: -18vw;
  top: -22vw;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--amber) 62%, transparent), transparent 62%);
  opacity: .5;
  animation: hfm-leak-a 22s var(--ease-io) infinite alternate;
}

.hfm-hero__grade::after {
  width: 66vw;
  height: 66vw;
  right: -16vw;
  bottom: -24vw;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--teal) 88%, transparent), transparent 64%);
  opacity: .72;
  animation: hfm-leak-b 26s var(--ease-io) infinite alternate;
}

@keyframes hfm-leak-a {
  to {
    transform: translate3d(14vw, 8vh, 0) scale(1.18);
  }
}

@keyframes hfm-leak-b {
  to {
    transform: translate3d(-12vw, -7vh, 0) scale(1.12);
  }
}

/* vignettatura + righe di scansione, tenui */
.hfm-hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 45%, transparent 38%, rgba(9, 7, 6, .92) 100%);
}

.hfm-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: clamp(3rem, 9vh, 6rem);
}

.hfm-hero__kicker {
  display: flex;
  gap: 1rem;
  align-items: center;
  opacity: .65;
  margin-bottom: clamp(1.4rem, 4vh, 2.6rem);
}

.hfm-hero__kicker i {
  display: block;
  width: clamp(28px, 6vw, 72px);
  height: 1px;
  background: currentColor;
}

.hfm-hero h1 {
  font-size: var(--t-3xl);
  max-width: 16ch;
}

.hfm-hero h1 em {
  font-style: normal;
  color: var(--amber);
}

.hfm-hero__sub {
  margin-top: clamp(1.6rem, 4vh, 2.8rem);
  max-width: 46ch;
  color: color-mix(in srgb, var(--paper) 72%, transparent);
  font-size: var(--t-base);
}

/* ---------- 10. Frame / placeholder video ------------------- */
/* Ogni "frame" è una grade duotone amber+teal: sostituire con <video> o <img> reali */
.hfm-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
  isolation: isolate;
}

.hfm-frame--portrait {
  aspect-ratio: 4 / 5;
}

.hfm-frame--square {
  aspect-ratio: 1;
}

.hfm-frame__fill {
  position: absolute;
  inset: 0;
  transform: scale(1.06);
  transition: transform 1.1s var(--ease), filter .7s var(--ease);
}

.hfm-frame__fill::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(60% 70% at 22% 28%, color-mix(in srgb, var(--amber) 82%, transparent), transparent 66%),
    radial-gradient(70% 80% at 78% 76%, color-mix(in srgb, var(--teal) 92%, transparent), transparent 70%),
    linear-gradient(126deg, #0A0908 0%, #241C16 52%, #0C1416 100%);
}

.hfm-frame__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: .35;
}

.hfm-frame video,
.hfm-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hfm-frame__meta {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  color: var(--paper);
  background: linear-gradient(to top, rgba(10, 8, 7, .72), transparent);
  opacity: .9;
}

.hfm-frame__badge {
  position: absolute;
  z-index: 3;
  top: .85rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--paper);
}

.hfm-frame__badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: hfm-rec 1.8s var(--ease-io) infinite;
}

@keyframes hfm-rec {
  50% {
    opacity: .15;
  }
}


/* ============================================================
   Componenti nativi YOOtheme
   Ogni blocco replica l'aspetto del mockup statico sul markup
   generato dagli elementi del builder (Panel, List, Panel Slider,
   Quotation, Grid, Accordion, Button, Description List).
   ============================================================ */

/* ---------- Hero · Panel "Showreel" ------------------------- */
.hfm-sec .hfm-hero__cta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.2rem);
  margin-top: clamp(2rem, 5vh, 3.2rem);
}

/* il titolo del Panel alimenta l'anello di testo rotante (vedi JS) */
.hfm-sec .hfm-hero__cta > .el-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  margin: 0 !important;
}

.hfm-sec .hfm-hero__cta > .el-content {
  margin: 0 !important;
  max-width: 24ch;
  opacity: .7;
  font-size: var(--t-sm);
}

.hfm-sec .hfm-hero__cta > .el-image {
  position: relative;
  flex: none;
  width: clamp(104px, 13vw, 148px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent);
  background: transparent;
  color: var(--paper) !important; /* l'icona del Panel ha .uk-text-emphasis */
  cursor: pointer;
  display: grid;
  place-items: center;
  will-change: transform;
  margin: 0 !important;
}

.hfm-sec .hfm-hero__cta > .el-image > svg:not(.hfm-play__rot) {
  display: none;
}

.hfm-sec .hfm-hero__cta > .el-image::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--amber);
  transform: scale(0);
  transition: transform .6s var(--ease);
}

.hfm-sec .hfm-hero__cta > .el-image:hover::before,
.hfm-sec .hfm-hero__cta > .el-image:focus-visible::before {
  transform: scale(1);
}

/* triangolo play */
.hfm-sec .hfm-hero__cta > .el-image::after {
  content: "";
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 13px solid currentColor;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  transition: color .4s;
}

.hfm-sec .hfm-hero__cta > .el-image:hover::after {
  border-left-color: var(--ink);
}

.hfm-play__rot {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  max-width: none;
  animation: hfm-spin 14s linear infinite;
}

.hfm-play__rot text {
  fill: currentColor;
  font-family: var(--font-mono);
  font-size: 8.4px;
  letter-spacing: .26em;
  transition: fill .4s;
}

/* in hover il disco ambra copre l'anello: la scritta passa in negativo */
.hfm-sec .hfm-hero__cta > .el-image:hover .hfm-play__rot text,
.hfm-sec .hfm-hero__cta > .el-image:focus-visible .hfm-play__rot text {
  fill: var(--ink);
}

/* from esplicito: .uk-icon > * ha transform: translate(0,0), e senza
   questo l'interpolazione verso rotate(360deg) resta ferma */
@keyframes hfm-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ---------- Marquee (List) ---------------------------------- */
.hfm-marquee {
  position: relative;
  z-index: 2;
  border-top: var(--rule);
  border-bottom: var(--rule);
  overflow: hidden;
  padding-block: .85rem;
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  backdrop-filter: blur(3px);
}

.hfm-sec .hfm-marquee__track,
.hfm-sec .hfm-clients__row {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

.hfm-sec .hfm-marquee__track > li {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 4vw, 3rem);
  padding-right: clamp(1.4rem, 4vw, 3rem);
  margin: 0;
  font-size: var(--t-sm);
  letter-spacing: -.01em;
  white-space: nowrap;
}

.hfm-sec .hfm-marquee__track .el-content {
  font-weight: 500;
}

.hfm-sec .hfm-marquee__track > li::after {
  content: "/";
  color: var(--amber);
}

/* ---------- Reel lavori (Panel Slider) ---------------------- */
.hfm-reel {
  background: var(--ink);
  overflow: hidden;
  --reel-gap: clamp(1rem, 2.4vw, 2.2rem);
}

.hfm-sec .hfm-reel__slider .uk-slider-items {
  align-items: center;
}

.hfm-sec .hfm-reel__slider .uk-slider-items > * {
  width: calc(clamp(280px, 62vw, 700px) + var(--reel-gap));
  padding-right: var(--reel-gap);
}

.hfm-sec .hfm-reel__slider .uk-slider-items > :nth-child(even) {
  width: calc(clamp(240px, 46vw, 520px) + var(--reel-gap));
}

@media (min-width: 960px) {

  /* la sezione viene bloccata: deve valere esattamente una schermata */
  .hfm-reel {
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 0;
  }

  .hfm-reel .hfm-reel__slider {
    margin-top: clamp(4.5rem, 12vh, 8rem);
  }

  /* da desktop il reel scorre con lo scroll (GSAP), non con il drag */
  .hfm-sec .hfm-reel__slider .uk-slider-items {
    width: max-content;
    padding-left: var(--gutter);
    padding-right: calc(var(--gutter) - var(--reel-gap));
  }
}

@media (max-width: 959px) {
  .hfm-sec .hfm-reel__slider {
    padding-left: var(--gutter);
    padding-bottom: 1rem;
  }

  .hfm-sec .hfm-reel__slider .uk-slider-items > *,
  .hfm-sec .hfm-reel__slider .uk-slider-items > :nth-child(even) {
    width: calc(min(84vw, 520px) + var(--reel-gap));
  }
}

.hfm-reel.hfm-sec .el-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  cursor: pointer;
}

.hfm-reel.hfm-sec .uk-inline-clip {
  grid-column: 1 / -1;
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  isolation: isolate;
  margin-bottom: .9rem;
  vertical-align: top;
}

.hfm-reel.hfm-sec .uk-inline-clip picture {
  display: block;
}

.hfm-reel.hfm-sec .el-image {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.06);
  transition: transform 1.1s var(--ease), filter .7s var(--ease);
}

.hfm-reel.hfm-sec .el-item:hover .el-image {
  transform: scale(1);
  filter: saturate(1.25);
}

/* grana sul fotogramma */
.hfm-reel.hfm-sec .uk-inline-clip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: .35;
}

/* filetto sopra le info: un solo elemento su tutta la larghezza della card */
.hfm-reel.hfm-sec .el-item::before {
  content: "";
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  border-top: var(--rule);
}

.hfm-reel.hfm-sec .el-title,
.hfm-reel.hfm-sec .el-content {
  grid-row: 2;
  padding-top: calc(.7rem + 1px);
}

.hfm-reel.hfm-sec .el-title {
  grid-column: 1;
  font-size: var(--t-lg);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.hfm-reel.hfm-sec .el-meta {
  grid-column: 1;
  grid-row: 3;
  font-size: var(--t-sm);
  font-weight: 400;
  line-height: 1.05;
  opacity: .55;
  letter-spacing: 0;
}

.hfm-reel.hfm-sec .el-content {
  grid-column: 2;
  grid-row: 2;
  /* senza JS: il margine negativo evita che i tag allunghino la riga */
  margin-bottom: -10em;
  padding-left: 1rem;
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}

.hfm-reel.hfm-sec .el-content > p {
  opacity: .55;
}

/* con JS titolo e cliente sono raggruppati (come nel mockup): i tag si
   allineano alla baseline del blocco e ne determinano l'altezza */
.hfm-reel.hfm-sec .hfm-work__head {
  grid-column: 1;
  grid-row: 2;
  padding-top: calc(.7rem + 1px);
}

.hfm-reel.hfm-sec .hfm-work__head > .el-title {
  padding-top: 0;
}

.hfm-reel.hfm-sec .el-item.is-grouped > .el-content {
  margin-bottom: 0;
}

/* specifiche e badge: scritti nel contenuto, spostati nel fotogramma dal JS */
.hfm-reel.hfm-sec .el-content .hfm-specs,
.hfm-reel.hfm-sec .el-content .hfm-badge {
  display: none;
}

.hfm-reel.hfm-sec .uk-inline-clip .hfm-specs {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: .85rem 1rem;
  list-style: none;
  color: var(--paper);
  background: linear-gradient(to top, rgba(10, 8, 7, .72), transparent);
  opacity: .9;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}

.hfm-reel.hfm-sec .uk-inline-clip .hfm-specs > li {
  margin: 0;
}

.hfm-reel.hfm-sec .uk-inline-clip .hfm-badge {
  position: absolute;
  z-index: 3;
  top: .85rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  line-height: 1.55;
}

.hfm-reel.hfm-sec .uk-inline-clip .hfm-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: hfm-rec 1.8s var(--ease-io) infinite;
}

/* inclinazione 3D all'hover (solo puntatore fine, vedi initTilt) */
@media (hover: hover) and (pointer: fine) {
  .hfm-reel.hfm-sec .el-item {
    transform-style: preserve-3d;
    will-change: transform;
  }

  .hfm-reel.hfm-sec .uk-inline-clip,
  .hfm-reel.hfm-sec .el-title,
  .hfm-reel.hfm-sec .el-meta,
  .hfm-reel.hfm-sec .el-content {
    transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  }

  .hfm-reel.hfm-sec .el-item:hover .uk-inline-clip {
    transform: translateZ(38px);
    box-shadow: 0 46px 80px -34px rgba(0, 0, 0, .82);
  }

  .hfm-reel.hfm-sec .el-item:hover :is(.el-title, .el-meta, .el-content) {
    transform: translateZ(18px);
  }
}

.hfm-work__glare {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s var(--ease);
  mix-blend-mode: soft-light;
  background: radial-gradient(42% 52% at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .5), transparent 72%);
}

.hfm-reel.hfm-sec .el-item:hover .hfm-work__glare {
  opacity: 1;
}

/* ---------- Cifre (Grid) ----------------------------------- */
.hfm-sec .hfm-figures > .uk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  border-top: var(--rule);
}

@media (min-width: 760px) {
  .hfm-sec .hfm-figures > .uk-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hfm-sec .hfm-figures > .uk-grid > * {
  display: block;
  width: auto;
  margin: 0;
  padding: clamp(1.6rem, 4vh, 2.6rem) 0;
  border-bottom: var(--rule);
  container-type: inline-size;
}

@media (min-width: 760px) {
  .hfm-sec .hfm-figures > .uk-grid > * {
    padding-inline: clamp(.7rem, 2vw, 1.8rem);
    border-bottom: 0;
    border-left: var(--rule);
  }

  .hfm-sec .hfm-figures > .uk-grid > :first-child {
    padding-left: 0;
    border-left: 0;
  }
}

.hfm-sec .hfm-figures .el-title {
  display: block;
  margin: 0 !important;
  font-weight: 700;
  line-height: .86;
  font-size: min(clamp(3.6rem, 1.4rem + 8.4vw, 9.5rem), 25cqw);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hfm-sec .hfm-figures .el-title i {
  font-style: normal;
  font-size: .5em;
  letter-spacing: 0;
  vertical-align: baseline;
}

.hfm-sec .hfm-figures .el-content {
  margin-top: .9rem !important;
  opacity: .5;
  max-width: 22ch;
  font-size: var(--t-sm);
}

/* ---------- Manifesto (Quotation) --------------------------- */
.hfm-sec blockquote.hfm-manifesto {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
  line-height: inherit;
  font-style: normal;
  color: inherit;
}

.hfm-manifesto > p {
  font-size: var(--t-xl);
  font-weight: 500;
  line-height: 1.16;
  max-width: 22ch;
}

.hfm-manifesto .w {
  color: color-mix(in srgb, var(--ink) 18%, transparent);
  transition: color .25s linear;
}

.hfm-manifesto .w.is-lit {
  color: var(--ink);
}

.hfm-sec .hfm-manifesto > footer {
  margin-top: clamp(2rem, 5vh, 3.4rem);
  display: flex;
  gap: .8rem;
  align-items: center;
  opacity: .5;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.hfm-sec .hfm-manifesto > footer::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  display: block;
  flex: none;
}

.hfm-sec .hfm-manifesto cite {
  font-style: normal;
  font-size: var(--t-sm);
}

/* ---------- Competenze (Accordion) -------------------------- */
.hfm-sec .hfm-skills {
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  counter-reset: hfm-skill;
}

.hfm-sec .hfm-skills > .el-item {
  position: relative;
  margin: 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  padding: clamp(1.1rem, 2.6vh, 1.9rem) 0;
  transition: padding-inline .55s var(--ease), color .4s;
  counter-increment: hfm-skill;
}

@media (hover: hover) {
  .hfm-sec .hfm-skills > .el-item:hover {
    padding-inline: clamp(.5rem, 1.6vw, 1.4rem);
  }
}

.hfm-sec .hfm-skills .uk-accordion-title {
  display: flex;
  align-items: baseline;
  gap: clamp(.8rem, 2.4vw, 2rem);
  padding: 0;
  margin: 0;
  color: inherit;
  text-decoration: none;
  text-transform: none;
  font-family: inherit;
  font-size: var(--t-lg);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.05;
  overflow: visible;
  background: none;
  border: 0;
}

.hfm-sec .hfm-skills .uk-accordion-title::before {
  content: counter(hfm-skill, decimal-leading-zero);
  order: -1;
  flex: none;
  width: auto;
  height: auto;
  margin: 0;
  background: none;
  float: none;
  opacity: .4;
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}

.hfm-sec .hfm-skills [uk-accordion-icon] {
  margin-left: auto;
  flex: none;
  opacity: .4;
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.55;
  transition: transform .5s var(--ease);
}

.hfm-sec .hfm-skills [uk-accordion-icon] > svg {
  display: none;
}

.hfm-sec .hfm-skills [uk-accordion-icon]::before {
  content: "+";
}

.hfm-sec .hfm-skills > .uk-open [uk-accordion-icon] {
  transform: rotate(135deg);
}

.hfm-sec .hfm-skills .uk-accordion-content {
  margin: 0;
  padding: 0;
}

.hfm-sec .hfm-skills .el-content p {
  max-width: 58ch;
  padding-top: 1rem;
  opacity: .7;
  font-size: var(--t-sm);
}

/* card media che seguono il mouse (vedi initSkillCards): il media resta
   nel campo Immagine della voce, qui non si vede mai */
.hfm-sec .hfm-skills .uk-accordion-content > :is(picture, .el-image) {
  display: none;
}

.hfm-sec .hfm-skills .uk-accordion-content > .el-content {
  margin-top: 0 !important;
}

.hfm-skillcard {
  --w: clamp(220px, 20vw, 340px);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  width: var(--w);
  pointer-events: none;
  will-change: transform;
}

/* ogni voce ha la sua misura; il formato lo dà il media stesso */
.hfm-skillcard[data-i="0"] { --w: clamp(260px, 25vw, 440px); }
.hfm-skillcard[data-i="1"] { --w: clamp(190px, 15vw, 270px); }
.hfm-skillcard[data-i="2"] { --w: clamp(280px, 28vw, 480px); }
.hfm-skillcard[data-i="3"] { --w: clamp(200px, 18vw, 310px); }
.hfm-skillcard[data-i="4"] { --w: clamp(170px, 13vw, 230px); }

/* il puntatore sta esattamente nell'angolo in basso a sinistra della card,
   che si apre a destra lasciando libero il testo dell'accordion;
   vicino ai bordi passa sull'altro lato (.is-flip-x / .is-flip-y) */
.hfm-skillcard__tilt {
  transform-style: preserve-3d;
  transform-origin: 0 100%;
  will-change: transform;
  translate: 0 -100%;
  transition: translate .6s var(--ease);
}

.hfm-skillcard.is-flip-x .hfm-skillcard__tilt {
  transform-origin: 100% 100%;
  translate: -100% -100%;
}

.hfm-skillcard.is-flip-y .hfm-skillcard__tilt {
  transform-origin: 0 0;
  translate: 0 0;
}

.hfm-skillcard.is-flip-x.is-flip-y .hfm-skillcard__tilt {
  transform-origin: 100% 0;
  translate: -100% 0;
}

.hfm-skillcard__media {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  opacity: 0;
  transform: translateZ(0) scale(.82);
  transform-origin: inherit;
  transition: opacity .35s var(--ease), transform .7s var(--ease), box-shadow .7s var(--ease);
}

.hfm-skillcard.is-on .hfm-skillcard__media {
  opacity: 1;
  transform: translateZ(38px) scale(1);
  box-shadow: 0 46px 80px -34px rgba(0, 0, 0, .82);
}

.hfm-skillcard__media :is(img, video) {
  display: block;
  width: 100%;
  height: auto;
}

.hfm-skillcard.is-on .hfm-work__glare {
  opacity: 1;
}

/* ---------- Processo (Grid) -------------------------------- */
.hfm-sec .hfm-steps > .uk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  counter-reset: hfm-step;
}

@media (min-width: 900px) {
  .hfm-sec .hfm-steps > .uk-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hfm-sec .hfm-steps > .uk-grid > * {
  position: relative;
  display: block;
  width: auto;
  margin: 0;
  padding: 1.6rem 0 2rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  counter-increment: hfm-step;
}

@media (min-width: 900px) {
  .hfm-sec .hfm-steps > .uk-grid > * {
    padding-right: clamp(1rem, 2.4vw, 2.2rem);
  }
}

/* barra di avanzamento (animata dal JS tramite --bar) */
.hfm-sec .hfm-steps > .uk-grid > *::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  width: var(--bar, 0%);
  background: var(--ink);
}

.hfm-sec .hfm-steps .el-item::before {
  content: counter(hfm-step, decimal-leading-zero);
  display: block;
  opacity: .45;
  margin-bottom: .9rem;
  font-size: var(--t-xs);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

.hfm-sec .hfm-steps .el-title {
  margin: 0 !important;
  font-size: var(--t-base);
  font-weight: 600;
  letter-spacing: -.02em;
}

.hfm-sec .hfm-steps .el-content {
  margin-top: .5rem !important;
}

.hfm-sec .hfm-steps .el-content p {
  font-size: var(--t-sm);
  opacity: .65;
  max-width: 30ch;
}

/* ---------- Clienti (List) --------------------------------- */
.hfm-sec .hfm-clients__row > li {
  display: flex;
  align-items: center;
  margin: 0;
}

.hfm-sec .hfm-clients__row .el-content {
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 2.9rem);
  letter-spacing: -.04em;
  padding-inline: clamp(.8rem, 2.2vw, 1.8rem);
  white-space: nowrap;
  color: color-mix(in srgb, var(--paper) 42%, transparent);
  transition: color .4s;
}

.hfm-sec .hfm-clients__row .el-content:hover {
  color: var(--amber);
}

.hfm-sec .hfm-clients__row > li::after {
  content: "/";
  opacity: .22;
}

.hfm-sec .hfm-clients__row + .hfm-clients__row {
  margin-top: .4rem;
}

/* ---------- Clienti: loghi SVG (List con immagini) --------- */
.hfm-sec .hfm-clients__row--logos > li::after {
  content: none;
}

.hfm-sec .hfm-clients__row--logos > li > .uk-grid {
  margin-left: 0;
}

.hfm-sec .hfm-clients__row--logos > li > .uk-grid > * {
  padding-left: 0;
}

/* la cella testo del List resta vuota: la nascondiamo */
.hfm-sec .hfm-clients__row--logos > li > .uk-grid > :not(.uk-width-auto) {
  display: none;
}

.hfm-sec .hfm-clients__row--logos .el-image {
  display: block;
  width: auto;
  height: clamp(4.5rem, 9vw, 7.5rem);
  margin-inline: clamp(.4rem, 1.4vw, 1.2rem);
  opacity: .72;
  transition: opacity .4s;
}

.hfm-sec .hfm-clients__row--logos > li:hover .el-image {
  opacity: 1;
}

.hfm-sec .hfm-clients__row--logos + .hfm-clients__row--logos {
  margin-top: clamp(.5rem, 1.5vw, 1rem);
}

/* ---------- Recensioni (Panel Slider) ---------------------- */
.hfm-says {
  --says-gap: clamp(1.5rem, 3vw, 2.5rem);
}

.hfm-sec .hfm-says .uk-slider-items {
  transition: transform .6s var(--ease);
}

.hfm-sec .hfm-says .uk-slider-items > * {
  width: 100%;
}

/* lo spazio fra le card e' un padding interno alla card compensato da un
   margine negativo sulla lista: un "gap" sfalserebbe gli scatti del carosello */
@media (min-width: 880px) {
  .hfm-sec .hfm-says .uk-slider-items {
    margin-inline: calc(var(--says-gap) / -2);
  }

  .hfm-sec .hfm-says .uk-slider-items > * {
    width: 33.3333%;
    padding-inline: calc(var(--says-gap) / 2);
  }
}

.hfm-sec .hfm-says .el-content {
  font-size: var(--t-lg);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.24;
  max-width: 30ch;
  font-style: italic;
  color: #333;
}

.hfm-sec .hfm-says .el-meta {
  margin-top: 1.4rem !important;
  opacity: .55;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

.hfm-sec .hfm-says .uk-slider-nav {
  display: flex;
  gap: .6rem;
  margin: clamp(1.6rem, 4vw, 2.4rem) 0 0 !important;
  padding: 0;
}

.hfm-sec .hfm-says .uk-slider-nav > * {
  padding: 0;
  margin: 0;
}

.hfm-sec .hfm-says .uk-slider-nav:empty {
  display: none;
}

.hfm-sec .hfm-says .uk-slider-nav > * > * {
  display: block;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--fg) 28%, transparent);
  transition: background .35s var(--ease);
  text-indent: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.hfm-sec .hfm-says .uk-slider-nav > * > :hover {
  background: color-mix(in srgb, var(--fg) 55%, transparent);
}

.hfm-sec .hfm-says .uk-slider-nav > .uk-active > * {
  background: var(--amber);
}

.hfm-sec .hfm-says > .uk-margin-top {
  margin-top: 0 !important;
}

/* ---------- CTA finale ------------------------------------- */
.hfm-cta {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}

/* luce calda dal basso (era un div .hfm-cta__grade) */
.hfm-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  pointer-events: none;
  background: radial-gradient(60% 90% at 50% 120%, color-mix(in srgb, var(--amber) 70%, transparent), transparent 70%);
}

.hfm-cta__inner {
  position: relative;
  z-index: 2;
}

.hfm-cta h2 {
  font-size: var(--t-2xl);
  max-width: 14ch;
}

/* email (Button) */
.hfm-sec .hfm-cta__mail .uk-button {
  display: inline-block;
  margin-top: clamp(2rem, 5vh, 3rem);
  padding: 0 0 .25rem;
  min-height: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 35%, transparent);
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  font-size: var(--t-lg);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.55;
  text-transform: none;
  vertical-align: baseline;
  transition: color .4s, border-color .4s;
}

.hfm-sec .hfm-cta__mail .uk-button:hover,
.hfm-sec .hfm-cta__mail .uk-button:focus {
  background: none;
  color: var(--amber);
  border-color: var(--amber);
}

/* info (Description List) */
.hfm-sec .hfm-cta__grid {
  display: grid;
  gap: 1.6rem 3rem;
  grid-template-columns: 1fr;
  margin: clamp(3rem, 8vh, 5rem) 0 20px;
  padding: 1.4rem 0 0;
  list-style: none;
  border-top: var(--rule);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 760px) {
  .hfm-sec .hfm-cta__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hfm-sec .hfm-cta__grid > li {
  margin: 0;
}

.hfm-sec .hfm-cta__grid .el-title {
  opacity: .5;
  margin: 0 0 .35rem !important;
  font-weight: 700;
}

.hfm-sec .hfm-cta__grid .el-content {
  font-size: var(--t-sm);
}

/* ---------- 20. Showreel (overlay fullscreen) --------------- */
.hfm-showreel {
  position: fixed;
  inset: 0;
  z-index: 9400;
  background: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--ease), visibility 0s .5s;
}

.hfm-showreel.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s var(--ease);
}

.hfm-showreel__stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform: scale(.94);
  opacity: 0;
  transition: transform .6s var(--ease), opacity .5s var(--ease);
}

.hfm-showreel.is-open .hfm-showreel__stage {
  transform: scale(1);
  opacity: 1;
}

.hfm-showreel .hfm-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}


/* ---------- HF ai lab (sezione con immagini fisiche) --------- */
.hfm-sec.hfm-ailab {
  --ai-size: 100px;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: clamp(4rem, 10vh, 6rem);
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

@media (min-width: 640px) {
  .hfm-sec.hfm-ailab {
    --ai-size: 250px;
  }
}

/* luce fredda al centro, dietro a tutto */
.hfm-ailab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(55% 60% at 50% 45%, color-mix(in srgb, var(--teal) 28%, transparent), transparent 72%);
}

/* livello immagini: davanti allo sfondo, dietro ai contenuti */
.hfm-sec > .uk-grid > .hfm-ailab__stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: auto;
  pointer-events: none;
}

.hfm-sec .hfm-ailab__items {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
  /* composizione statica (reduced motion o senza JS): una fila sul fondo */
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
}

.hfm-sec .hfm-ailab__items > li {
  flex: none;
  width: var(--ai-size);
  /* le dieci immagini si sovrappongono quanto basta per stare nella larghezza */
  margin: 0 min(calc(var(--ai-size) * -.08), calc((100% - var(--ai-size) * 10) / 20));
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.hfm-sec .hfm-ailab__items > li:nth-child(odd) { transform: rotate(-9deg); }
.hfm-sec .hfm-ailab__items > li:nth-child(3n) { transform: rotate(14deg) translateY(8%); }
.hfm-sec .hfm-ailab__items > li:nth-child(4n) { transform: rotate(-4deg) translateY(12%); }

/* markup del List YOOtheme: resta solo l'immagine */
.hfm-sec .hfm-ailab__items > li > .uk-grid {
  display: block;
  margin: 0;
}

.hfm-sec .hfm-ailab__items > li > .uk-grid > * {
  padding: 0;
}

.hfm-sec .hfm-ailab__items > li > .uk-grid > :not(.uk-width-auto) {
  display: none;
}

.hfm-sec .hfm-ailab__items .el-image {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* con il motore fisico attivo: posizioni governate dal JS */
.hfm-ailab.is-physics .hfm-ailab__items > li {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  transform: translate3d(0, -300%, 0);
  transform-origin: 50% 50%;
  visibility: hidden;
  will-change: transform;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
}

.hfm-ailab.is-physics .hfm-ailab__items > li.is-in {
  visibility: visible;
}

html.hfm-ailab-grabbing,
html.hfm-ailab-grabbing * {
  cursor: grabbing !important;
}

/* contenuti: sopra le immagini, ma lasciano passare i gesti nelle aree vuote */
.hfm-sec > .uk-grid > .hfm-ailab__content {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: 60rem;
  text-align: center;
  pointer-events: none;
}

.hfm-ailab__content a,
.hfm-ailab__content button {
  pointer-events: auto;
}

.hfm-ailab h2 {
  font-size: var(--t-3xl);
}

.hfm-sec .hfm-ailab__sub {
  margin: clamp(1.4rem, 3.5vh, 2.4rem) auto 0;
  max-width: 46ch;
  color: color-mix(in srgb, var(--paper) 78%, transparent);
  font-size: var(--t-base);
  text-shadow: 0 1px 18px color-mix(in srgb, var(--ink) 80%, transparent);
}

.hfm-sec .hfm-ailab__sub > p {
  margin: 0;
}

/* bottone ad anello (AI lab, Contatti): stesso disco del bottone Showreel dell'hero,
   con freccia (Panel + icona arrow-right); anello costruito da hfm-v2.js */
.hfm-sec .hfm-ring-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.2rem);
  margin-top: clamp(2rem, 5vh, 3.2rem);
}

.hfm-sec.hfm-ailab .hfm-ring-cta {
  justify-content: center;
}

/* didascalia accanto al disco (contenuto del Panel), come nell'hero */
.hfm-sec .hfm-ring-cta > .el-content {
  margin: 0 !important;
  max-width: 24ch;
  opacity: .7;
  font-size: var(--t-sm);
}

/* il titolo del Panel alimenta l'anello di testo rotante (vedi hfm-v2.js) */
.hfm-sec .hfm-ring-cta > .el-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  margin: 0 !important;
}

.hfm-sec .hfm-ring-cta > a {
  position: relative;
  flex: none;
  width: clamp(104px, 13vw, 148px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent);
  color: var(--paper);
  display: grid;
  place-items: center;
  will-change: transform;
}

.hfm-sec .hfm-ring-cta > a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--amber);
  transform: scale(0);
  transition: transform .6s var(--ease);
}

.hfm-sec .hfm-ring-cta > a:hover::before,
.hfm-sec .hfm-ring-cta > a:focus-visible::before {
  transform: scale(1);
}

/* freccia (icona UIkit arrow-right) al posto del triangolo play */
.hfm-sec .hfm-ring-cta .el-image {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
  color: var(--paper) !important; /* l'icona del Panel ha .uk-text-emphasis */
  transition: color .4s, transform .5s var(--ease);
}

.hfm-sec .hfm-ring-cta .el-image > svg {
  width: 28px;
  height: 28px;
}

.hfm-sec .hfm-ring-cta > a:hover .el-image,
.hfm-sec .hfm-ring-cta > a:focus-visible .el-image {
  color: var(--ink) !important;
  transform: translateX(4px);
}

.hfm-sec .hfm-ring-cta > a:hover .hfm-play__rot text,
.hfm-sec .hfm-ring-cta > a:focus-visible .hfm-play__rot text {
  fill: var(--ink);
}

/* ---------- Footer (sezione YOOtheme "Footer") -------------- */
.hfm-sec.hfm-footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 6vh, 4rem) 0 5.5rem;
  border-top: var(--rule);
}

.hfm-sec .hfm-footer__top {
  margin: 0;
}

.hfm-sec .hfm-footer__top > .uk-grid {
  row-gap: 2.4rem;
}

.hfm-sec .hfm-footer__logo .el-image {
  display: block;
  height: clamp(1.4rem, 2.2vw, 1.9rem);
  width: auto;
  margin: 0;
}

.hfm-sec .hfm-footer__addr {
  font-size: var(--t-sm);
  opacity: .55;
  max-width: 34ch;
  margin: 1.2rem 0 0;
}

.hfm-sec h3.hfm-footer__h {
  font-size: var(--t-xs);
  font-family: var(--font-mono);
  line-height: 1.55;
  letter-spacing: .04em;
  opacity: .45;
  margin: 0 0 1rem;
  font-weight: 400;
}

.hfm-sec .hfm-footer__nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}

.hfm-sec .hfm-footer__nav > li {
  margin: 0;
  padding: 0;
}

.hfm-sec .hfm-footer__legal {
  margin: clamp(2.5rem, 6vh, 4rem) 0 0;
  border-top: var(--rule);
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2rem;
  opacity: .45;
}

/* link con roll-up (come nel mockup) */
.hfm-sec .hfm-link {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1.25;
  text-decoration: none;
}

.hfm-sec .hfm-link span {
  display: block;
  transition: transform .5s var(--ease);
}

.hfm-sec .hfm-link span::after {
  content: attr(data-t);
  position: absolute;
  left: 0;
  top: 100%;
}

.hfm-sec .hfm-link:hover span,
.hfm-sec .hfm-link:focus-visible span {
  transform: translateY(-100%);
}

/* ---------- 21. Stato paper per HUD/cursore ---------------- */
html.is-paper body:has(.hfm-sec) {
  background: var(--paper);
}

/* ---------- 22. Riduzione movimento ------------------------ */
@media (prefers-reduced-motion: reduce) {

  .hfm-sec *,
  .hfm-sec *::before,
  .hfm-sec *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .hfm-grain {
    display: none;
  }


}

.hfm-figures--gap {
  margin-top: clamp(3rem, 8vh, 5rem);
}
