/* Portfolio di Tommaso Belfiori — stile comune a tutte le pagine.
   Le classi .c-<categoria> con i loro colori le aggiunge build.mjs in fondo al file. */

/* Inter servito dal sito (file variabile di Google Fonts, licenza OFL): niente richieste
   a server esterni prima del testo, e nessun indirizzo dei visitatori passato a Google. */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/inter-latin.woff2) format("woff2");
  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: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/inter-latin-ext.woff2) format("woff2");
  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; }

:root {
  --bg: #F5F4FA; --surface: #FFFFFF; --ink: #16181D; --muted: #5B5970; --line: #DFDDEB; --soft: #ECEAF5;
  --pad: clamp(16px, 4.2vw, 80px); --max: 1760px; --r: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --cc: var(--ink); --ct: var(--ink); --ti: var(--soft); --su: var(--bg);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0A0919; --surface: #110F27; --ink: #EEEBFF; --muted: #A09BCC; --line: #27234F; --soft: #19163A; color-scheme: dark; }
}

/* ---------- cielo «galassia» (come il tema di Code) ---------- */
.cielo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cielo svg, .cielo-piede svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* pianeti che girano per tutta la pagina: due moti con periodi diversi, così non si fermano mai e non ripassano mai dallo stesso punto */
.pianeta { position: absolute; left: var(--l); top: var(--t); width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); animation: vaX var(--tx) ease-in-out var(--fx) infinite alternate; will-change: transform; }
.pianeta > .y { position: relative; width: 100%; height: 100%; animation: vaY var(--ty) ease-in-out var(--fy) infinite alternate; will-change: transform; }
.pianeta svg { display: block; width: 100%; height: 100%; overflow: visible; }
@keyframes vaX { from { transform: translateX(calc(var(--dx) * -1)); } to { transform: translateX(var(--dx)); } }
@keyframes vaY { from { transform: translateY(calc(var(--dy) * -1)); } to { transform: translateY(var(--dy)); } }
.orbita { position: absolute; left: 50%; top: 50%; width: var(--o); height: var(--o); margin: calc(var(--o) / -2) 0 0 calc(var(--o) / -2); animation: gira var(--tg) linear infinite; }
.luna { position: absolute; left: 50%; top: 0; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #ECE8FF; box-shadow: 0 0 6px rgba(236, 232, 255, .8); }
@keyframes gira { to { transform: rotate(360deg); } }
.cadente { position: absolute; top: 12%; left: 82%; width: 150px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95)); rotate: 155deg; opacity: 0; animation: cade 19s ease-in 5s infinite; }
@keyframes cade { 0% { opacity: 0; translate: 0 0; } 1.5% { opacity: 1; } 6% { opacity: 0; translate: -42vw 20vh; } 100% { opacity: 0; translate: -42vw 20vh; } }
/* la deriva dei pianeti è tutta qui, solo trasformazioni: a pagina ferma il computer non lavora. Con JavaScript le stelle cadenti nascono a caso e moto.js sceglie, a ogni visita, dove partono i pianeti */
/* i pianeti compaiono in dissolvenza solo quando moto.js li ha messi al loro punto di partenza: niente salti all'avvio */
@media (prefers-reduced-motion: no-preference) {
  html.js .pianeta { opacity: 0; transition: opacity 1.8s ease; }
  html.js.pianeti-liberi .pianeta { opacity: 1; }
}
.pianeti-liberi .cadente { display: none; }
.cadente-js { position: absolute; border-radius: 2px; pointer-events: none; opacity: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95)); }
@media (prefers-color-scheme: light) {
  .cadente-js { background: linear-gradient(90deg, rgba(75, 63, 176, 0), rgba(75, 63, 176, .55)); }
}
@media (prefers-color-scheme: light) {
  .luna { background: #6E66B5; box-shadow: none; }
  .cielo .anello path { stroke: #C98B4F; }
  .cadente { background: linear-gradient(90deg, rgba(75, 63, 176, 0), rgba(75, 63, 176, .55)); }
}
@media (prefers-color-scheme: light) {
  .cielo .c-fondo, .cielo .c-polvere { display: none; }
  .cielo .c-neb { opacity: .55; }
  .cielo .c-stelle circle { fill: #4B3FB0; }
  .cielo .c-stelle { opacity: .42; }
}
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.salta { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.salta:focus { left: 16px; }
.num { font-variant-numeric: tabular-nums; }
.solo-lettori { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- testata e menu ---------- */
.testata { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); view-transition-name: testata; }
.testata .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; font-weight: 700; font-size: 16px; text-decoration: none; letter-spacing: -.01em; }
.sigla { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: conic-gradient(from 200deg, #2F5BEA, #7048E8, #D6336C, #E8590C, #2F5BEA); transition: transform .5s var(--ease); }
.logo:hover .sigla { transform: rotate(-12deg) scale(1.06); }
.menu { display: flex; align-items: center; gap: 2px; }
.menu a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .2s, background .2s; }
.menu a:hover { color: var(--ink); background: var(--soft); }
.menu a[aria-current="page"] { color: var(--ink); background: var(--soft); }
.pallino { width: 8px; height: 8px; border-radius: 50%; background: var(--cc); flex: none; }
.menu .contatta { margin-left: 8px; color: var(--bg); background: var(--ink); }
.menu .contatta:hover { color: var(--bg); background: var(--ink); opacity: .88; }
/* IT · EN: sempre in vista nella barra, anche quando il menu diventa a comparsa */
.lingue { display: inline-flex; flex: none; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.lingue a { display: inline-grid; place-items: center; min-width: 40px; min-height: 36px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--muted); text-decoration: none; transition: color .2s, background .2s; }
.lingue a:hover { color: var(--ink); }
.lingue a[aria-current="true"] { color: var(--ink); background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.apri-menu { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.apri-menu .barre { width: 16px; height: 10px; position: relative; }
.apri-menu .barre::before, .apri-menu .barre::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.apri-menu .barre::before { top: 0; } .apri-menu .barre::after { top: 8px; }
.apri-menu[aria-expanded="true"] .barre::before { top: 4px; transform: rotate(45deg); }
.apri-menu[aria-expanded="true"] .barre::after { top: 4px; transform: rotate(-45deg); }
@media (max-width: 1080px) {
  html.js .apri-menu { display: inline-flex; }
  html.js .menu { display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px var(--pad) 22px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px -24px rgba(0,0,0,.35); }
  html.js .menu.aperto { display: flex; animation: cala .32s var(--ease) both; }
  html.js .menu a { min-height: 48px; font-size: 16px; padding: 0 14px; }
  html.js .menu .contatta { margin: 8px 0 0; justify-content: center; }
  html:not(.js) .testata .wrap { flex-wrap: wrap; padding-block: 10px; }
  html:not(.js) .menu { flex-wrap: wrap; }
}
/* sul telefono il nome resta su una riga: il pulsante del menu diventa solo icona (la parola resta per i lettori di schermo) */
@media (max-width: 480px) {
  .testata .wrap { gap: 10px; }
  .apri-menu { flex: none; width: 44px; padding: 0; justify-content: center; }
  .apri-menu-testo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lingue a { min-width: 36px; padding: 0 8px; }
}
@keyframes cala { from { opacity: 0; translate: 0 -10px; } }

/* ---------- elementi comuni ---------- */
.occhiello { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vivo { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #23A85F; }
.vivo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #23A85F; opacity: 0; animation: pulsa 2.4s ease-out infinite; will-change: transform, opacity; }
@keyframes pulsa { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(3.5); opacity: 0; } }
h1 { margin: 16px 0 0; font-size: 35px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; max-width: 24ch; }
h2 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .25s var(--ease), background .2s, opacity .2s; }
.btn.pieno { background: var(--ink); color: var(--bg); }
.btn.vuoto { border: 1px solid var(--line); background: var(--surface); }
.btn:hover { transform: translateY(-2px); }
.freccia { display: inline-block; transition: transform .3s var(--ease); }
a:hover > .freccia, a:hover .freccia { transform: translateX(4px); }
.freccia.su { transform: none; }
a:hover .freccia.su { transform: translate(3px, -3px); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li, .chips a { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; }
.chips a { display: inline-flex; align-items: center; gap: 6px; transition: background .2s; }
.chips a:hover { background: var(--ti); }
.sezione { padding: 80px 0 24px; }
.sezione-testa { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: 28px; }
.sezione-testa p { margin: 8px 0 0; max-width: 62ch; color: var(--muted); font-size: 16px; }
.link-freccia { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: none; }

/* ---------- entrata e comparsa ---------- */
.entra { animation: sale .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes sale { from { opacity: 0; translate: 0 18px; } }
html.js [data-rivela] { opacity: 0; translate: 0 28px; transition: opacity .8s var(--ease), translate .8s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
html.js [data-rivela].visto { opacity: 1; translate: 0 0; }

/* ---------- home: apertura ---------- */
.hero { padding: 72px 0 0; }
.hero-griglia { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px 96px; align-items: end; }
.intro { margin: 20px 0 0; max-width: 60ch; font-size: 18px; color: var(--muted); }
.azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.numeri { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.numero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 20px; border-radius: var(--r); background: var(--ti); text-decoration: none; transition: transform .3s var(--ease); }
.numero:hover { transform: translateY(-3px); }
.numero b { font-size: 35px; line-height: 1; font-weight: 700; color: var(--ct); letter-spacing: -.02em; }
.numero span { font-size: 14px; font-weight: 600; text-align: right; }
.numero.totale { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line); }
.numero.totale b { color: var(--ink); }
@media (max-width: 1060px) { .hero-griglia { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  h1 { font-size: 28px; } .hero { padding-top: 44px; } .intro { font-size: 16px; }
  .numero { flex-direction: column; align-items: flex-start; gap: 6px; } .numero b { font-size: 28px; } .numero span { text-align: left; }
  .numero.totale { flex-direction: row; align-items: flex-end; }
}

/* nastro delle tecnologie */
.nastro { margin-top: 64px; padding: 16px 0; border-block: 1px solid var(--line); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.nastro-pista { display: flex; width: max-content; animation: scorri 70s linear infinite; }
.nastro:hover .nastro-pista { animation-play-state: paused; }
.giro { display: flex; flex: none; }
.nastro span { display: inline-flex; align-items: center; gap: 36px; padding-right: 36px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.nastro span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
@keyframes scorri { to { transform: translateX(-50%); } }

/* ---------- home: primo piano ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.pp { grid-column: span var(--span, 6); display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.pp:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -36px rgba(10, 20, 40, .45); }
.pp-media { position: relative; display: block; height: var(--h, 380px); background: var(--c); overflow: hidden; isolation: isolate; }
.pp-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.16), transparent 60%); }
.pp-testo { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 22px 24px 24px; }
.pp-testo h3 { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
.pp-testo h3 a { text-decoration: none; }
.pp-testo p { margin: 0; max-width: 64ch; font-size: 15px; color: var(--muted); }
.pp-piede { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.apri { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 14px; font-weight: 600; color: var(--ct); text-decoration: none; }
.apri:hover { text-decoration: underline; text-underline-offset: 3px; }
.occhiello .pallino { width: 8px; height: 8px; }

/* finestra del browser */
.finestra { position: absolute; top: 40px; left: 6%; right: 6%; bottom: -26px; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: #0D0F14; box-shadow: 0 30px 60px -24px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); transition: transform .6s var(--ease); }
.finestra-barra { flex: none; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #1C1F26; }
.finestra-barra i { width: 9px; height: 9px; border-radius: 50%; background: #FF5F57; }
.finestra-barra i:nth-child(2) { background: #FEBC2E; } .finestra-barra i:nth-child(3) { background: #28C840; }
.finestra-barra span { margin-left: 10px; padding: 3px 12px; border-radius: 999px; background: #2A2E37; color: #B7BDC9; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finestra img { flex: 1; min-height: 0; width: 100%; object-fit: cover; object-position: left top; transition: transform 1.2s var(--ease); }
.pp:hover .finestra { transform: translateY(-12px); }
.pp:hover .finestra img { transform: scale(1.025); }

/* telefoni */
.telefoni { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding-top: 38px; }
.telefono { flex: none; width: calc(var(--h, 380px) * .44); aspect-ratio: 1206 / 2622; margin-inline: calc(var(--h, 380px) * -.045); padding: 6px; border-radius: 30px; background: #0B0B0D; box-shadow: 0 30px 50px -22px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.1); transition: transform .7s var(--ease); }
.telefono img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
.telefono:nth-child(1) { transform: rotate(-7deg) translateY(30px); }
.telefono:nth-child(2) { position: relative; z-index: 2; }
.telefono:nth-child(3) { transform: rotate(7deg) translateY(30px); }
.pp:hover .telefono:nth-child(1) { transform: rotate(-11deg) translate(-26px, 22px); }
.pp:hover .telefono:nth-child(2) { transform: translateY(-10px); }
.pp:hover .telefono:nth-child(3) { transform: rotate(11deg) translate(26px, 22px); }

/* immagine piena e icona */
.pp-media .pieno { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.pp:hover .pp-media .pieno { transform: scale(1.05); }
.icona-grande { position: absolute; inset: 0; display: grid; place-items: center; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; }
.icona-grande img { width: 132px; height: 132px; border-radius: 30px; box-shadow: 0 0 70px 6px rgba(63, 200, 255, .35), 0 20px 40px -16px rgba(0,0,0,.7); animation: galleggia 6s ease-in-out infinite; }
@keyframes galleggia { 50% { translate: 0 -12px; } }

@media (max-width: 1200px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp { grid-column: span var(--span-m, 1); }
}
@media (max-width: 720px) {
  .bento { grid-template-columns: 1fr; gap: 18px; }
  .pp { grid-column: auto; }
  .pp-media { --h: 300px !important; }
  .finestra { top: 28px; left: 5%; right: 5%; }
}

/* ---------- home: categorie ---------- */
.categorie { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tessera { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 280px; padding: 26px; border-radius: 22px; background: var(--ti); text-decoration: none; overflow: hidden; isolation: isolate; transition: transform .45s var(--ease); }
.tessera::before { content: ""; position: absolute; z-index: -1; right: -18%; bottom: -34%; width: 64%; aspect-ratio: 1; border-radius: 50%; background: var(--cc); opacity: .16; transition: transform .8s var(--ease), opacity .4s; }
.tessera:hover { transform: translateY(-5px); }
.tessera:hover::before { transform: scale(1.6); opacity: .22; }
.tessera .conta { font-size: 35px; line-height: 1; font-weight: 700; color: var(--ct); letter-spacing: -.02em; }
.tessera h3 { margin: 0; font-size: 20px; font-weight: 700; }
.tessera p { margin: 0; font-size: 14px; }
.tessera .nomi { color: var(--muted); font-size: 13px; }
.tessera .vai { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ct); }
@media (max-width: 1200px) { .categorie { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .categorie { grid-template-columns: 1fr; } .tessera { min-height: 0; } }

/* ---------- pagine di categoria ---------- */
.cat-hero { position: relative; overflow: hidden; isolation: isolate; padding: 52px 0 44px; background: color-mix(in srgb, var(--ti) 80%, transparent); }
.cat-hero::before { content: ""; position: absolute; z-index: -1; right: -6%; top: -60%; width: min(560px, 60vw); aspect-ratio: 1; border-radius: 50%; background: var(--cc); opacity: .14; animation: respira 9s ease-in-out infinite; }
@keyframes respira { 50% { transform: scale(1.08) translate(-2%, 4%); } }
.briciole { margin: 0; font-size: 14px; color: var(--muted); }
.briciole a { text-decoration: none; font-weight: 600; } .briciole a:hover { text-decoration: underline; }
.cat-hero .intro { color: var(--ink); opacity: .82; }
.cat-conta { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 15px; font-weight: 600; }
.cat-conta b { font-size: 28px; color: var(--ct); }
.schede-cat { display: flex; flex-wrap: wrap; gap: 8px; }
.schede-cat a, .filtro { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.schede-cat a:hover, .filtro:hover { border-color: var(--cc); }
.schede-cat a[aria-current="page"], .filtro[aria-pressed="true"] { background: var(--cc); border-color: var(--cc); color: var(--su); }
.schede-cat a[aria-current="page"] .pallino, .filtro[aria-pressed="true"] .pallino { background: var(--su); }
.barra-cat { padding: 28px 0 8px; }

.griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 24px; }
.scheda { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; transition: transform .4s var(--ease), border-color .3s, box-shadow .4s var(--ease); }
.scheda:hover { transform: translateY(-4px); border-color: var(--cc); box-shadow: 0 24px 48px -32px rgba(10, 20, 40, .4); }
.scheda:target { border-color: var(--cc); box-shadow: 0 0 0 3px var(--ti); }
.scheda-media { position: relative; height: 190px; display: grid; place-items: center; overflow: hidden; background: var(--ti); }
.scheda-media .foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform 1s var(--ease); }
.scheda:hover .scheda-media .foto { transform: scale(1.05); }
.scheda-media .icona { width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 18px 30px -16px rgba(0,0,0,.45); transition: transform .6s var(--ease); }
.scheda:hover .scheda-media .icona { transform: translateY(-6px) rotate(-4deg); }
.scheda-media .iniziale { position: relative; width: 84px; height: 84px; display: grid; place-items: center; border-radius: 26px; background: var(--cc); color: var(--su); font-size: 30px; font-weight: 700; letter-spacing: -.02em; transition: transform .6s var(--ease), border-radius .6s var(--ease); }
.scheda:hover .scheda-media .iniziale { transform: rotate(-6deg) scale(1.05); border-radius: 42px; }
.scheda-media.tipo::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--cc) 22%, transparent) 1.2px, transparent 1.4px); background-size: 18px 18px; }
.marchio { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 4px 10px; border-radius: 999px; background: rgba(12, 14, 18, .86); color: #fff; font-size: 11px; font-weight: 600; }
.scheda-corpo { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.scheda-alto { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cat-nome { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ct); }
.stato { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--ti); color: var(--ct); }
.scheda h3 { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.scheda p { margin: 0; font-size: 14px; color: var(--muted); }
.scheda-piede { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.stack { font-size: 12px; font-weight: 600; }
.con { font-size: 12px; color: var(--muted); }

/* ---------- telefono ---------- */
@media (max-width: 720px) { .pianeta { scale: .72; } }

/* ---------- piè di pagina ---------- */
.piede { position: relative; isolation: isolate; overflow: hidden; margin-top: 96px; padding: 72px 0 36px; background: #07061A; color: #F1F0EC; }
.cielo-piede { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.piede-griglia { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px 96px; }
.piede h2 { font-size: 30px; }
.piede p { margin: 12px 0 0; max-width: 54ch; color: #A9AEB7; font-size: 16px; }
.contatti { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.contatti a { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; background: rgba(38, 34, 80, .84); color: #EEEBFF; font-size: 15px; font-weight: 600; text-decoration: none; transition: background .25s, transform .25s var(--ease); }
.contatti a:hover { background: rgba(58, 52, 112, .85); transform: translateY(-2px); }
.contatti a.primo { background: #EEEBFF; color: #0A0919; }
.piede nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; align-content: start; }
.piede nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: #C9CDD4; font-size: 15px; text-decoration: none; }
.piede nav a:hover { color: #fff; }
.piede .firma { margin-top: 56px; padding-top: 24px; border-top: 1px solid #262A31; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: #8C929C; font-size: 13px; }
.piede :focus-visible { outline-color: #fff; }
@media (max-width: 900px) { .piede-griglia { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) { .piede { border-top: 1px solid var(--line); } }

/* ---------- movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js [data-rivela] { opacity: 1; translate: none; }
  .nastro { -webkit-mask-image: none; mask-image: none; }
  .nastro-pista { width: auto; }
  .giro { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; row-gap: 8px; padding-inline: var(--pad); }
  .nastro-pista [aria-hidden="true"] { display: none; }
}

/* colori delle categorie (da progetti.json) */
.c-app{--cc:#2F5BEA;--ct:#2448C4;--ti:#E7EDFF;--su:#FFFFFF}
.c-web{--cc:#7048E8;--ct:#5B37D0;--ti:#EEE8FF;--su:#FFFFFF}
.c-strumenti{--cc:#E8590C;--ct:#B54308;--ti:#FFEDE0;--su:#16181D}
.c-grafica{--cc:#D6336C;--ct:#B02355;--ti:#FFE6EE;--su:#FFFFFF}
@media (prefers-color-scheme: dark){.c-app{--ct:#9DB4FF;--ti:#1B2547}.c-web{--ct:#B9A5FF;--ti:#261E45}.c-strumenti{--ct:#FFAE7A;--ti:#3A2114}.c-grafica{--ct:#FF9EBF;--ti:#3D1826}}
html:not(.js) .filtri{display:none}
