/* ==========================================================================
   ProWebSolutions — stile del sito pubblico
   Scuro e cinematografico. Spazi solo dalla scala --fl-space-1…6 e --fl-section-y.
   ========================================================================== */

/* Caratteri ospitati nel tema (licenza SIL Open Font License), sottoinsiemi latin e latin-ext. */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-ext.woff2") format("woff2"); font-weight: 300 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin.woff2") format("woff2"); font-weight: 300 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --fl-ink: #0b0b0c;
  --fl-ink-2: #141416;
  --fl-ink-3: #1d1d20;
  --fl-line: #2a2a2e;
  --fl-paper: #f2f0eb;
  --fl-muted: #cfcdc8;          /* 84% dell'inchiostro sul fondo */
  --fl-accent: #c6ff3d;

  --fl-font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fl-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Titoli grandi: maiuscolo largo. */
  --fl-display: var(--fl-font);
  --fl-display-weight: 850;
  --fl-display-stretch: 125%;
  --fl-display-case: uppercase;
  --fl-display-track: -.01em;

  --fl-space-1: 8px;
  --fl-space-2: 16px;
  --fl-space-3: 24px;
  --fl-space-4: 40px;
  --fl-space-5: 64px;
  --fl-space-6: 96px;
  --fl-section-y: var(--fl-space-5);
  --fl-gutter: 20px;
  --fl-width: 1450px;
  --fl-header-h: 72px;

  --fl-ease: cubic-bezier(.2, .8, .2, 1);
  --fl-ease-in-out: cubic-bezier(.7, 0, .2, 1);
}


@media (max-width: 767px) {
  :root { --fl-gutter: 16px; --fl-section-y: var(--fl-space-4); --fl-header-h: 60px; }
}

/* --- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--fl-header-h); color-scheme: dark; }
body {
  margin: 0;
  background: var(--fl-ink);
  color: var(--fl-paper);
  font-family: var(--fl-font);
  font-size: 17px;
  line-height: 1.7;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (max-width: 767px) { body { font-size: 16px; } }

img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--fl-accent); color: var(--fl-ink); }
:focus-visible { outline: 2px solid var(--fl-accent); outline-offset: 3px; }

/* Grana da pellicola sopra tutto, ferma con «riduci animazioni». */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: .06;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: fl-grain 1s steps(4) infinite;
}
@keyframes fl-grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -1%); }
  100% { transform: translate(0, 0); }
}

.fl-shell { width: min(100% - 2 * var(--fl-gutter), var(--fl-width)); margin-inline: auto; }
.fl-main { display: block; min-height: 70vh; overflow-x: clip; }

.screen-reader-text,
.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 1000; top: var(--fl-space-2); left: var(--fl-space-2); padding: var(--fl-space-1) var(--fl-space-2); background: var(--fl-accent); color: var(--fl-ink); }

.fl-icon { width: 1.1em; height: 1.1em; flex: none; }

/* Etichette: carattere a spaziatura fissa, mai sotto 12px. */
.fl-label {
  margin: 0;
  font-family: var(--fl-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fl-muted);
}

.fl-text { max-width: 64ch; }
.fl-text p { margin: 0; }
.fl-text p + p { margin-top: 1.1em; }
.fl-text a { color: var(--fl-accent); text-underline-offset: .2em; }

/* Segnaposto della bozza. */
.fl-ph {
  display: inline-block;
  padding: 0 .4em;
  border: 1px dashed currentColor;
  border-radius: 4px;
  color: var(--fl-accent);
  font-family: var(--fl-mono);
  font-size: clamp(12px, .5em, 15px);
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: 0;
  line-height: 1.6;
  text-transform: none;
  vertical-align: middle;
}

/* Collegamento con freccia. */
.fl-link {
  display: inline-flex;
  align-items: center;
  gap: var(--fl-space-1);
  color: var(--fl-paper);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid var(--fl-line);
  padding-bottom: 2px;
  transition: border-color .3s, color .3s;
}
.fl-link .fl-icon { transition: transform .4s var(--fl-ease); }
.fl-link:hover { border-color: var(--fl-accent); color: var(--fl-accent); }
.fl-link:hover .fl-icon { transform: translateX(4px); }

.fl-button {
  display: inline-flex;
  align-items: center;
  gap: var(--fl-space-1);
  min-height: 48px;
  padding: 0 var(--fl-space-3);
  border-radius: 999px;
  background: var(--fl-accent);
  color: var(--fl-ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform .4s var(--fl-ease), background-color .3s;
}
.fl-button:hover { transform: translateY(-2px); background: var(--fl-paper); }

/* Elenchi a righe separate da filetto neutro. */
.fl-rows { margin: 0; padding: 0; list-style: none; }
.fl-rows li { padding: 10px 0; border-bottom: 1px solid var(--fl-line); }
.fl-rows li:first-child { border-top: 1px solid var(--fl-line); }

/* --- Logotipo ------------------------------------------------------------- */

.fl-logo { display: inline-block; white-space: nowrap; line-height: .9; }
.fl-logo b, .fl-logo i { font-style: normal; font-weight: inherit; color: var(--fl-accent); }
.fl-logo { font-family: var(--fl-font); font-weight: 850; font-stretch: 125%; text-transform: uppercase; letter-spacing: -.01em; }

/* Marchio: il nome come un tag, «<prowebsolutions/>». */
.fl-brand { font-family: var(--fl-mono); font-weight: 700; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }
.fl-brand i { font-style: normal; color: var(--fl-accent); }
.fl-brand__br { font-weight: 500; color: var(--fl-muted); transition: color .3s; }
.fl-header__brand:hover .fl-brand__br { color: var(--fl-accent); }
.fl-logo--stacked { white-space: normal; }
.fl-logo__line { display: block; white-space: nowrap; }

/* --- Intestazione --------------------------------------------------------- */

.fl-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  background: linear-gradient(to bottom, rgba(11, 11, 12, .92), rgba(11, 11, 12, 0));
  transition: transform .5s var(--fl-ease);
  view-transition-name: fl-header;
}
.admin-bar .fl-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .fl-header { top: 46px; } }
.fl-header.is-hidden { transform: translateY(-110%); }
.fl-header__inner { height: var(--fl-header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--fl-space-3); }
.fl-header__brand { text-decoration: none; font-size: 18px; }
@media (max-width: 767px) {
  .fl-header__brand { font-size: 14px; }
}

.fl-nav__list { display: flex; gap: var(--fl-space-3); margin: 0; padding: 0; list-style: none; }
.fl-nav a {
  position: relative;
  display: inline-block;
  padding: var(--fl-space-1) 0;
  font-family: var(--fl-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}
.fl-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  background: var(--fl-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--fl-ease);
}
.fl-nav a:hover::after,
.fl-nav .current-menu-item > a::after,
.fl-nav .current-menu-ancestor > a::after,
.fl-nav .current_page_parent > a::after { transform: scaleX(1); transform-origin: left; }
.fl-nav a { white-space: nowrap; }
@media (max-width: 767px) { .fl-nav__list { gap: 12px; } .fl-nav a { font-size: 11px; letter-spacing: .06em; } }

/* --- Copertine dei lavori ------------------------------------------------ */

.fl-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--work, var(--fl-ink-2));
  isolation: isolate;
}
.fl-media__img,
.fl-media__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fl-media__video { opacity: 0; transition: opacity .6s; }
.fl-media__video.is-playing { opacity: 1; }

/* Copertina tipografica: nome del lavoro, luce radente, vignettatura. */
.fl-media--type {
  background:
    radial-gradient(120% 90% at 18% 10%, color-mix(in srgb, var(--work) 70%, #fff 14%) 0%, transparent 55%),
    radial-gradient(140% 120% at 100% 100%, color-mix(in srgb, var(--work) 60%, #000) 0%, var(--work) 70%);
}
.fl-media__type {
  position: absolute;
  right: 6%;
  bottom: 7%;
  left: 6%;
  font-family: var(--fl-display);
  font-weight: var(--fl-display-weight);
  font-stretch: var(--fl-display-stretch);
  text-transform: var(--fl-display-case);
  letter-spacing: var(--fl-display-track);
  font-size: clamp(28px, 7cqi, 140px);
  line-height: 1.05;
  color: color-mix(in srgb, var(--fl-paper) 88%, transparent);
  text-wrap: balance;
}
.fl-media { container-type: inline-size; }
.fl-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(130% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, .45));
}

/* --- Home: nome animato --------------------------------------------------- */

.fl-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--fl-header-h) + var(--fl-space-4)) 0 var(--fl-space-4);
  overflow: hidden;
}
.fl-hero::before {
  /* Luce di scena che segue il puntatore (posizione dal JavaScript, centrata senza). */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60vmax 45vmax at var(--mx, 70%) var(--my, 30%), rgba(198, 255, 61, .09), transparent 70%);
  transition: background-position .3s;
}
.fl-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--fl-space-3); }
.fl-hero__name {
  margin: 0;
  font-size: min(22vw, 36svh);
  font-weight: inherit;
  line-height: .88;
}
.fl-hero__name .fl-logo { display: block; line-height: inherit; }
.fl-hero__name .fl-logo__line { width: max-content; max-width: none; }
.fl-hero__name .fl-ch { display: inline-block; }
.fl-hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--fl-space-3) var(--fl-space-5);
  padding-top: var(--fl-space-3);
  border-top: 1px solid var(--fl-line);
}
.fl-hero__text { max-width: 44ch; margin: 0; font-size: 20px; line-height: 1.6; color: var(--fl-muted); }
.fl-hero__text p { margin: 0; }
.fl-hero__text p + p { margin-top: 1.1em; }
@media (max-width: 767px) { .fl-hero__text { font-size: 18px; } }
.fl-hero__scroll {
  font-family: var(--fl-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fl-accent);
}
.fl-hero__scroll span { display: inline-block; }

/* Entrata: lettere che salgono da sotto la linea, poi ruolo e piede. Solo con JavaScript. */
.js .fl-hero__name .fl-logo__line { overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
.js .fl-hero__name .fl-ch {
  transform: translateY(105%);
  animation: fl-rise 1.1s var(--fl-ease) forwards;
  animation-delay: calc(.25s + var(--i) * .045s);
}
.js .fl-hero__role,
.js .fl-hero__foot { opacity: 0; animation: fl-fade 1s var(--fl-ease) forwards; animation-delay: 1s; }
.js .fl-hero__role { animation-delay: .1s; }
.fl-hero__scroll span { animation: fl-nudge 2.4s var(--fl-ease-in-out) 2.4s infinite; }
@keyframes fl-rise { to { transform: translateY(0); } }
@keyframes fl-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fl-nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(5px); } }

/* Larghezza e peso variabili per lettera, guidati dal puntatore (variabili dal JavaScript). */
.fl-hero__name.is-live .fl-ch { transition: font-variation-settings .5s var(--fl-ease), font-stretch .5s var(--fl-ease), font-weight .5s var(--fl-ease); }
.fl-hero__name.is-live .fl-ch { font-stretch: var(--w, 125%); }
.fl-hero__name.is-live .fl-ch { font-weight: var(--g, inherit); }

/* --- Home: lavori scelti in sequenza -------------------------------------- */

.fl-reel { padding-top: var(--fl-section-y); }
.fl-reel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fl-space-3);
  padding-bottom: var(--fl-space-3);
}

/* Pannelli a tutto schermo che si impilano scorrendo. */
.fl-reel__item {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--fl-ink);
}
.fl-reel__link { position: relative; display: block; height: 100%; color: var(--fl-paper); text-decoration: none; }
.fl-reel__item .fl-media { position: absolute; inset: 0; aspect-ratio: auto; }
.fl-reel__item .fl-media__img { transition: transform 1.6s var(--fl-ease); }
.fl-reel__link:hover .fl-media__img { transform: scale(1.03); }
.fl-reel__item .fl-media::after {
  background:
    linear-gradient(to top, rgba(11, 11, 12, .96) 0%, rgba(11, 11, 12, .82) 30%, rgba(11, 11, 12, .2) 62%, transparent 75%),
    radial-gradient(130% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, .45));
}
.fl-reel__item .fl-media__type { display: none; }
.fl-reel__caption {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: var(--fl-space-5);
  left: 0;
  display: grid;
  justify-items: start;
  gap: var(--fl-space-2);
}
.fl-reel__title {
  display: block;
  max-width: 14ch;
  font-family: var(--fl-display);
  font-weight: var(--fl-display-weight);
  font-stretch: var(--fl-display-stretch);
  text-transform: var(--fl-display-case);
  letter-spacing: var(--fl-display-track);
  font-size: clamp(44px, 8vw, 150px);
  line-height: 1.05;
  text-wrap: balance;
}
.fl-reel__summary { max-width: 52ch; font-size: 20px; line-height: 1.6; color: var(--fl-muted); }
.fl-reel__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--fl-space-1);
  font-family: var(--fl-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fl-accent);
}
.fl-reel__cta .fl-icon { transition: transform .4s var(--fl-ease); }
.fl-reel__link:hover .fl-reel__cta .fl-icon { transform: translateX(6px); }
@media (max-width: 767px) {
  .fl-reel__item { height: 88svh; }
  .fl-reel__summary { font-size: 18px; }
  .fl-reel__caption { bottom: var(--fl-space-4); }
}

/* --- Chiusura della Home -------------------------------------------------- */

.fl-close { padding: var(--fl-section-y) 0; }
.fl-close__title {
  max-width: 18ch;
  margin: 0 0 var(--fl-space-3);
  font-family: var(--fl-display);
  font-weight: var(--fl-display-weight);
  font-stretch: var(--fl-display-stretch);
  text-transform: var(--fl-display-case);
  letter-spacing: var(--fl-display-track);
  font-size: clamp(36px, 5.5vw, 96px);
  line-height: 1.05;
}
.fl-close__text { max-width: 64ch; font-size: 20px; line-height: 1.6; color: var(--fl-muted); }
.fl-close__text p { margin: 0; }
.fl-close__text p + p { margin-top: 1.1em; }

/* --- Testate di pagina ---------------------------------------------------- */

.fl-page-head { padding: calc(var(--fl-header-h) + var(--fl-space-6)) 0 var(--fl-space-5); }
.fl-page-title {
  margin: 0;
  font-family: var(--fl-display);
  font-weight: var(--fl-display-weight);
  font-stretch: var(--fl-display-stretch);
  text-transform: var(--fl-display-case);
  letter-spacing: var(--fl-display-track);
  font-size: clamp(56px, 12vw, 220px);
  line-height: .92;
}
.fl-page-title__count {
  margin-left: .15em;
  font-family: var(--fl-mono);
  font-size: max(14px, .14em);
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: 0;
  vertical-align: top;
  color: var(--fl-accent);
}
.fl-page-head__intro { max-width: 64ch; margin-top: var(--fl-space-3); font-size: 20px; line-height: 1.6; color: var(--fl-muted); }
.fl-page-head__intro p { margin: 0; }
.fl-page-head__intro p + p { margin-top: 1.1em; }
.fl-section-title {
  margin: 0 0 var(--fl-space-4);
  font-family: var(--fl-display);
  font-weight: var(--fl-display-weight);
  font-stretch: var(--fl-display-stretch);
  text-transform: var(--fl-display-case);
  letter-spacing: var(--fl-display-track);
  font-size: clamp(36px, 5vw, 80px);
  line-height: 1.05;
}

/* --- Archivio e filtri ---------------------------------------------------- */

.fl-filters {
  display: grid;
  gap: var(--fl-space-2);
  padding: var(--fl-space-3) 0;
  border-top: 1px solid var(--fl-line);
  border-bottom: 1px solid var(--fl-line);
}
.fl-filters__group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fl-space-1); }
.fl-filters__label { width: 120px; flex: none; }
.fl-filters__status { color: var(--fl-accent); }
@media (max-width: 767px) { .fl-filters__label { width: 100%; } }

.fl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--fl-line);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  color: var(--fl-muted);
  transition: border-color .3s, color .3s, background-color .3s;
}
.fl-chip:hover { border-color: var(--fl-paper); color: var(--fl-paper); }
.fl-chip[aria-current="true"] { border-color: var(--fl-accent); background: var(--fl-accent); color: var(--fl-ink); }
.fl-chip__count { font-family: var(--fl-mono); font-size: 12px; opacity: .84; }

.fl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fl-space-5) var(--fl-space-3);
  padding: var(--fl-space-5) 0 var(--fl-section-y);
}
@media (min-width: 1280px) { .fl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .fl-grid { grid-template-columns: minmax(0, 1fr); gap: var(--fl-space-4); } }
.fl-card[hidden] { display: none; }
.fl-card__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--fl-space-2) var(--fl-space-2);
  align-items: start;
  color: var(--fl-paper);
  text-decoration: none;
}
.fl-card .fl-media { grid-column: 1 / -1; border-radius: 6px; }
.fl-card .fl-media__img { transition: transform 1.2s var(--fl-ease), filter .6s; filter: saturate(.85); }
.fl-card__link:hover .fl-media__img,
.fl-card__link:focus-visible .fl-media__img { transform: scale(1.04); filter: saturate(1); }
.fl-card__meta { display: grid; gap: 4px; }
.fl-card__title {
  font-family: var(--fl-display);
  font-weight: 700;
  font-stretch: var(--fl-display-stretch);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.fl-card__info { font-size: 15px; color: var(--fl-muted); }
.fl-card__link > .fl-icon { margin-top: 6px; color: var(--fl-accent); transform: translateX(-6px); opacity: 0; transition: transform .5s var(--fl-ease), opacity .3s; }
.fl-card__link:hover > .fl-icon,
.fl-card__link:focus-visible > .fl-icon { transform: none; opacity: 1; }
.fl-empty { padding-bottom: var(--fl-section-y); color: var(--fl-muted); }
.fl-empty .fl-link { margin-left: var(--fl-space-1); }

/* --- Caso studio ---------------------------------------------------------- */

.fl-case__head { padding: calc(var(--fl-header-h) + var(--fl-space-5)) 0 var(--fl-space-5); }
.fl-back { display: inline-block; margin-bottom: var(--fl-space-4); text-decoration: none; transition: color .3s; }
.fl-back:hover { color: var(--fl-accent); }
.fl-case__title {
  margin: 0;
  font-family: var(--fl-display);
  font-weight: var(--fl-display-weight);
  font-stretch: var(--fl-display-stretch);
  text-transform: var(--fl-display-case);
  letter-spacing: var(--fl-display-track);
  font-size: clamp(48px, 9vw, 170px);
  line-height: 1.05;
  text-wrap: balance;
}
.fl-case__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fl-space-3) var(--fl-space-5);
  margin-top: var(--fl-space-4);
}
.fl-case__summary { max-width: 52ch; margin: 0; font-size: 20px; line-height: 1.6; color: var(--fl-muted); }
.fl-case__summary p { margin: 0; }
.fl-case__summary p + p { margin-top: 1.1em; }
@media (max-width: 767px) { .fl-case__summary { font-size: 18px; } }

.fl-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 var(--fl-space-3);
  margin: var(--fl-space-5) 0 0;
  border-top: 1px solid var(--fl-line);
}
.fl-facts__row { padding: var(--fl-space-2) 0; border-bottom: 1px solid var(--fl-line); }
.fl-facts dd { margin: 4px 0 0; font-size: 15px; }
.fl-facts dd a { color: var(--fl-accent); text-underline-offset: .2em; }

.fl-case__cover .fl-media { aspect-ratio: 16 / 9; max-height: 92svh; width: 100%; }
@media (max-width: 767px) { .fl-case__cover .fl-media { aspect-ratio: 4 / 3; } }

/* Cornici computer e telefono. */
.fl-devices {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  align-items: end;
  gap: var(--fl-space-4);
  padding: var(--fl-section-y) 0 0;
}
@media (max-width: 899px) { .fl-devices { grid-template-columns: minmax(0, 1fr); } .fl-device--phone { width: min(300px, 80%); margin-inline: auto; } }
.fl-device { margin: 0; }
.fl-device--desktop { border: 1px solid var(--fl-line); border-radius: 10px; overflow: hidden; background: var(--fl-ink-2); }
.fl-device__bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 var(--fl-space-2); border-bottom: 1px solid var(--fl-line); }
.fl-device__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--fl-line); }
.fl-device__bar em { margin-left: var(--fl-space-2); font-family: var(--fl-mono); font-size: 12px; font-style: normal; color: var(--fl-muted); }
.fl-device__screen { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--fl-ink-3); }
.fl-device__screen .fl-media { position: absolute; inset: 0; aspect-ratio: auto; }
.fl-device__screen iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; transform-origin: 0 0; background: #fff; }
.fl-device--phone .fl-device__screen { aspect-ratio: 9 / 19.5; border: 8px solid var(--fl-ink-3); border-radius: 36px; box-shadow: 0 0 0 1px var(--fl-line); }
.fl-device--phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.fl-device__caption { display: flex; align-items: center; gap: var(--fl-space-1); padding: var(--fl-space-2); }
.fl-device--phone .fl-device__caption { justify-content: center; }

/* Capitoli: titolo a sinistra fermo, testo a destra. */
.fl-chapter { padding-top: var(--fl-section-y); }
.fl-chapter__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--fl-space-3) var(--fl-space-5);
  align-items: start;
}
@media (max-width: 899px) { .fl-chapter__inner { grid-template-columns: minmax(0, 1fr); } }
.fl-chapter__title {
  position: sticky;
  top: calc(var(--fl-header-h) + var(--fl-space-3));
  margin: 0;
  font-family: var(--fl-display);
  font-weight: var(--fl-display-weight);
  font-stretch: var(--fl-display-stretch);
  text-transform: var(--fl-display-case);
  letter-spacing: var(--fl-display-track);
  font-size: clamp(30px, 3.6vw, 56px);
  line-height: 1.05;
}
@media (max-width: 899px) { .fl-chapter__title { position: static; } }
.fl-chapter__text { padding-top: 6px; }
.fl-chapter__image { margin: var(--fl-space-5) auto 0; }
.fl-chapter__image img { width: 100%; border-radius: 6px; }

.fl-backoffice { padding-top: var(--fl-section-y); }
.fl-strip {
  display: flex;
  gap: var(--fl-space-3);
  margin: var(--fl-space-5) 0 0;
  padding: 0 var(--fl-gutter) var(--fl-space-2);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--fl-gutter);
  scrollbar-color: var(--fl-line) transparent;
}
.fl-strip__item { flex: 0 0 min(70vw, 1100px); scroll-snap-align: start; }
@media (max-width: 899px) { .fl-strip__item { flex-basis: 88vw; } }
.fl-strip__item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--fl-line); border-radius: 6px; }

/* Lavoro successivo: copertina che si apre al passaggio. */
.fl-next { margin-top: var(--fl-section-y); border-top: 1px solid var(--fl-line); }
.fl-next__link { position: relative; display: block; color: var(--fl-paper); text-decoration: none; overflow: hidden; }
.fl-next__text { position: relative; z-index: 2; display: grid; gap: var(--fl-space-1); padding: var(--fl-space-5) 0; }
.fl-next__title {
  font-family: var(--fl-display);
  font-weight: var(--fl-display-weight);
  font-stretch: var(--fl-display-stretch);
  text-transform: var(--fl-display-case);
  letter-spacing: var(--fl-display-track);
  font-size: clamp(40px, 7vw, 130px);
  line-height: 1.05;
  transition: color .4s;
}
.fl-next .fl-media { position: absolute; inset: 0; aspect-ratio: auto; opacity: 0; transition: opacity .7s var(--fl-ease); }
.fl-next .fl-media__type { display: none; }
.fl-next .fl-media::after { background: linear-gradient(to right, rgba(11, 11, 12, .85), rgba(11, 11, 12, .2)); }
.fl-next__link:hover .fl-media,
.fl-next__link:focus-visible .fl-media { opacity: 1; }
.fl-next__link:hover .fl-label { color: var(--fl-accent); }

/* --- Chi sono ------------------------------------------------------------- */

.fl-about__label { margin-bottom: var(--fl-space-3); }
.fl-about__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--fl-space-1) var(--fl-space-2); margin: 0 0 var(--fl-space-4); font-family: var(--fl-display); font-weight: var(--fl-display-weight); font-stretch: var(--fl-display-stretch); text-transform: var(--fl-display-case); letter-spacing: var(--fl-display-track); font-size: clamp(28px, 4vw, 56px); line-height: 1.05; }
.fl-about__name span { font-family: var(--fl-mono); font-size: 12px; font-weight: 500; font-stretch: 100%; letter-spacing: .1em; color: var(--fl-accent); }
.fl-about__intro {
  max-width: 22ch;
  margin: 0;
  font-family: var(--fl-display);
  font-weight: 700;
  font-stretch: var(--fl-display-stretch);
  letter-spacing: var(--fl-display-track);
  font-size: clamp(32px, 5vw, 80px);
  line-height: 1.08;
}
.fl-about__body {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--fl-space-5);
  align-items: start;
}
.fl-about__body--nophoto { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.fl-about__body--nophoto .fl-about__text { grid-column: 2; }
@media (max-width: 899px) {
  .fl-about__body, .fl-about__body--nophoto { grid-template-columns: minmax(0, 1fr); }
  .fl-about__body--nophoto .fl-about__text { grid-column: auto; }
}
.fl-about__photo { margin: 0; }
.fl-about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; filter: grayscale(1) contrast(1.05); }
.fl-about__links { display: flex; flex-wrap: wrap; gap: var(--fl-space-3); margin: var(--fl-space-4) 0 0; padding: 0; list-style: none; }
.fl-about__section { padding-top: var(--fl-section-y); }
.fl-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--fl-space-4) var(--fl-space-3); }
.fl-stack__group .fl-label { margin: 0 0 var(--fl-space-2); color: var(--fl-accent); }
.fl-path { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--fl-line); }
.fl-path__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 5fr) minmax(0, 4fr);
  gap: var(--fl-space-1) var(--fl-space-3);
  align-items: baseline;
  padding: var(--fl-space-3) 0;
  border-bottom: 1px solid var(--fl-line);
}
.fl-path__role { font-size: 20px; font-weight: 600; }
.fl-path__where { color: var(--fl-muted); }
@media (max-width: 767px) { .fl-path__row { grid-template-columns: minmax(0, 1fr); } }

/* --- Pagine semplici e 404 ----------------------------------------------- */

.fl-page { padding-bottom: var(--fl-section-y); }
.fl-page__content { max-width: 64ch; }
.fl-page__content h2 { margin: 1.6em 0 .5em; font-size: 24px; line-height: 1.2; }
.fl-page__list { max-width: 64ch; }
.fl-notfound { min-height: 80svh; display: grid; align-content: end; gap: var(--fl-space-3); padding: calc(var(--fl-header-h) + var(--fl-space-5)) 0 var(--fl-section-y); }
.fl-notfound__code {
  margin: 0;
  font-family: var(--fl-display);
  font-weight: var(--fl-display-weight);
  font-stretch: var(--fl-display-stretch);
  font-size: 32vw;
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px var(--fl-line);
}

/* --- Piede: contatti ------------------------------------------------------ */

.fl-footer { padding: var(--fl-section-y) 0 var(--fl-space-4); border-top: 1px solid var(--fl-line); }
.fl-footer__title {
  margin: 0 0 var(--fl-space-4);
  font-family: var(--fl-display);
  font-weight: var(--fl-display-weight);
  font-stretch: var(--fl-display-stretch);
  text-transform: var(--fl-display-case);
  letter-spacing: var(--fl-display-track);
  font-size: clamp(48px, 10vw, 180px);
  line-height: .92;
}
.fl-contacts { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--fl-line); }
.fl-contacts li { border-bottom: 1px solid var(--fl-line); }
.fl-contacts__link {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--fl-space-3);
  padding: var(--fl-space-3) 0;
  text-decoration: none;
  transition: color .3s, padding .5s var(--fl-ease);
}
.fl-contacts__label { font-family: var(--fl-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--fl-muted); }
.fl-contacts__value { font-size: clamp(20px, 2.6vw, 40px); font-weight: 600; font-stretch: 112%; overflow-wrap: anywhere; }
.fl-contacts__link .fl-icon { width: 28px; height: 28px; transition: transform .5s var(--fl-ease); }
.fl-contacts__link:hover { color: var(--fl-accent); padding-left: var(--fl-space-2); }
.fl-contacts__link:hover .fl-icon { transform: rotate(-45deg); }
@media (max-width: 767px) { .fl-contacts__link { grid-template-columns: minmax(0, 1fr) auto; } .fl-contacts__label { grid-column: 1 / -1; } }
.fl-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--fl-space-2);
  margin-top: var(--fl-space-5);
  font-family: var(--fl-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fl-muted);
}
.fl-footer__bottom a { text-decoration: none; }
.fl-footer__bottom a:hover { color: var(--fl-accent); }

/* --- Comparsa allo scorrimento (solo con JavaScript) ---------------------- */

.js .fl-reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--fl-ease), transform 1.2s var(--fl-ease); }
.js .fl-reveal.is-visible { opacity: 1; transform: none; }

/* --- Transizioni tra pagine ---------------------------------------------- */

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation: none; }
.fl-main { view-transition-name: fl-main; }
::view-transition-old(fl-main) { animation: fl-vt-out .35s var(--fl-ease-in-out) both; }
::view-transition-new(fl-main) { animation: fl-vt-in .6s var(--fl-ease) .1s both; }
::view-transition-group(*) { animation-duration: .7s; animation-timing-function: var(--fl-ease); }
@keyframes fl-vt-out { to { opacity: 0; transform: translateY(-24px); } }
@keyframes fl-vt-in { from { opacity: 0; transform: translateY(32px); } }

/* Filtri dell'archivio: solo le schede si muovono. */
.is-filtering::view-transition-old(fl-main),
.is-filtering::view-transition-new(fl-main) { animation: none; }
.is-filtering::view-transition-group(*) { animation-duration: .5s; }

/* --- Riduci animazioni: tutto fermo, cambi immediati ---------------------- */

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  body::after { animation: none; }
  .js .fl-reveal { opacity: 1; transform: none; }
  .js .fl-hero__name .fl-ch { transform: none; }
  .js .fl-hero__role, .js .fl-hero__foot { opacity: 1; }
  .fl-reel__item { position: relative; }
}
