/* Font ospitati sul sito (licenza SIL OFL, vedi /fonts). Niente chiamate a servizi esterni. */
@font-face { font-family: "Unbounded"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/unbounded-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/unbounded-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/unbounded-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* Portfolio del team: direzione hi-tech.
   Layout: scena WebGL fissa a tutto schermo dietro, contenuti in HUD sopra,
   testo enorme e tagliente, pannelli di vetro solo dove servono.
   Tema unico scuro, scelto di proposito. */
:root {
  --void: #04050A;
  --ink: #EEF1F7;
  --ink-2: #B7BECC;
  --muted: #8B93A5;
  --line: rgba(238, 241, 247, 0.12);
  --line-strong: rgba(238, 241, 247, 0.28);
  --glass: rgba(14, 17, 28, 0.55);
  --signal: #7FE7FF;
  --spectrum: linear-gradient(90deg, #3A5BFF, #6FE6FF 40%, #C58CFF 75%, #FFB873);
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1320px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--void); }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
:focus-visible { outline: 1px solid var(--signal); outline-offset: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; line-height: 0.98; text-wrap: balance; }
p { margin: 0; }
::selection { background: var(--signal); color: var(--void); }

/* Scena e atmosfera */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.atmos {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 70% 35%, rgba(58, 91, 255, 0.22), transparent 70%),
    radial-gradient(40% 40% at 20% 80%, rgba(197, 140, 255, 0.12), transparent 70%);
}
.has-webgl .atmos { opacity: 0.6; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(4, 5, 10, 0.85)); }
.page { position: relative; z-index: 2; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--void); padding: 8px 12px; z-index: 20; }

/* HUD */
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(rgba(4, 5, 10, 0.75), transparent);
}
.hud .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 15px; letter-spacing: 0.02em; min-height: 44px; }
.brand-mark { width: 18px; height: 18px; border-radius: 50%; background: var(--spectrum); box-shadow: 0 0 18px rgba(111, 230, 255, 0.6); }
.nav { display: flex; gap: 2px; margin-right: -12px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink-2); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); margin-right: 8px; box-shadow: 0 0 8px var(--signal); }
@media (max-width: 520px) { .nav .hide-sm { display: none; } }

.corner { position: fixed; bottom: 20px; z-index: 5; color: var(--muted); pointer-events: none; padding-bottom: env(safe-area-inset-bottom, 0px); }
.corner-l { left: 32px; } .corner-r { right: 32px; text-align: right; }
@media (max-width: 899px) { .corner { display: none; } }

/* Bottoni */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: rgba(238, 241, 247, 0.04);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .25s, background .25s, color .25s;
  cursor: pointer;
}
.btn:hover { border-color: var(--ink); background: rgba(238, 241, 247, 0.1); }
.btn-signal { color: var(--void); background: var(--ink); border-color: var(--ink); box-shadow: 0 0 22px rgba(111, 230, 255, 0.35), 0 0 48px rgba(197, 140, 255, 0.2); }
.btn-signal:hover { background: #FFFFFF; color: var(--void); box-shadow: 0 0 28px rgba(111, 230, 255, 0.6), 0 0 64px rgba(197, 140, 255, 0.35); }
.btn[aria-disabled="true"] { background: transparent; color: var(--muted); border-color: var(--line); box-shadow: none; pointer-events: none; }
.arrow { display: inline-block; transition: transform .25s; }
a:hover .arrow { transform: translate(3px, -3px); }

/* Home: hero */
.hero { display: flex; flex-direction: column; justify-content: flex-start; padding-block: clamp(104px, 15vh, 150px) 72px; }
.hero-kicker { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); margin-bottom: 28px; }
.hero-kicker .live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal); margin-right: 8px; vertical-align: 1px; animation: pulse 2.4s infinite; }
.hero h1 { font-size: clamp(2.6rem, 10.5vw, 9.5rem); font-weight: 300; letter-spacing: -0.045em; line-height: 0.92; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .line > span { display: inline-block; animation: rise 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .24s; }
.hero h1 em { font-style: normal; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-foot { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; }
.hero-foot p { max-width: 42ch; color: var(--ink-2); font-size: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes pulse { 50% { opacity: 0.3; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Sezioni */
.section { padding-block: 112px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 300; }
.section-head .mono { color: var(--muted); }

/* Elenco progetti come righe enormi */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index li { border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 8px 24px;
  padding-block: 28px; transition: padding .35s cubic-bezier(.2, .8, .2, 1), background .35s;
}
.row .num { color: var(--muted); }
.row h3 { font-size: clamp(1.7rem, 4.6vw, 4rem); font-weight: 300; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.row .meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.row .line-1 { grid-column: 2 / -1; color: var(--ink-2); max-width: 60ch; font-size: 16px; }
.row:hover h3 { transform: translateX(14px); }
.row:hover { background: linear-gradient(90deg, rgba(111, 230, 255, 0.05), transparent 60%); }
@media (max-width: 699px) {
  .row { grid-template-columns: minmax(0, 1fr); padding-block: 24px; }
  .row .meta { justify-content: flex-start; order: -1; }
  .row .num { display: none; }
  .row .line-1 { grid-column: auto; }
}
.chip { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-2); white-space: nowrap; }
.chip-signal { border-color: rgba(127, 231, 255, 0.5); color: var(--signal); }
.chip-warn { border-color: rgba(255, 184, 115, 0.55); color: #FFC892; }

.cursor-preview {
  position: fixed; left: 0; top: 0; z-index: 9; pointer-events: none;
  width: 340px; aspect-ratio: 16 / 10; margin: -110px 0 0 28px;
  border-radius: 14px; border: 1px solid var(--line-strong); overflow: hidden;
  background: radial-gradient(120% 120% at 30% 20%, rgba(58, 91, 255, 0.55), rgba(4, 5, 10, 0.9) 70%);
  display: flex; align-items: flex-end; padding: 16px; color: var(--ink-2);
  opacity: 0; scale: 0.92; transition: opacity .25s, scale .35s cubic-bezier(.2, .8, .2, 1);
}
.cursor-preview.on { opacity: 1; scale: 1; }
.cursor-preview.adult { background: repeating-linear-gradient(135deg, rgba(238, 241, 247, 0.04) 0 10px, transparent 10px 20px), #0B0D15; }

/* Capacità */
.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.cap { background: rgba(6, 8, 14, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 32px; display: flex; flex-direction: column; gap: 14px; min-height: 260px; }
.cap .mono { color: var(--signal); }
.cap h3 { font-size: 24px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.15; }
.cap p { color: var(--ink-2); font-size: 16px; margin-top: auto; }

.about { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-end; margin-bottom: 48px; }
.about h2 { flex: 2 1 520px; font-size: clamp(1.8rem, 4.2vw, 3.4rem); font-weight: 300; line-height: 1.08; }
.about p { flex: 1 1 280px; color: var(--ink-2); }

/* Contatto finale */
.outro { padding-block: 120px 80px; text-align: left; }
.outro .mono { color: var(--muted); }
.outro h2 { margin-top: 20px; font-size: clamp(2.6rem, 11vw, 10rem); font-weight: 300; letter-spacing: -0.05em; line-height: 0.9; }
.outro .mail { display: inline-block; margin-top: 36px; font-family: var(--display); font-weight: 300; font-size: clamp(1.1rem, 3.2vw, 2rem); border-bottom: 1px solid var(--line-strong); padding-bottom: 6px; overflow-wrap: anywhere; transition: border-color .25s; }
.outro .mail:hover { border-color: var(--signal); }

.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 24px 32px; color: var(--muted); }
.foot a { color: var(--muted); } .foot a:hover { color: var(--ink); }

/* Pagine interne */
.page-head { padding-block: 160px 48px; }
.page-head h1 { font-size: clamp(2.6rem, 9vw, 8rem); font-weight: 300; letter-spacing: -0.045em; }
.page-head .lead { margin-top: 24px; max-width: 52ch; color: var(--ink-2); font-size: 19px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); margin-bottom: 24px; }
.back:hover { color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filters a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.filters a[aria-current="true"] { background: var(--ink); color: var(--void); border-color: var(--ink); }

/* Scheda progetto */
.p-hero { padding-block: 150px 40px; }
.p-hero .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.p-hero h1 { font-size: clamp(2.8rem, 11vw, 10rem); font-weight: 300; letter-spacing: -0.05em; line-height: 0.9; }
.p-hero .lead { margin-top: 28px; max-width: 46ch; font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-2); }
.p-body { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-bottom: 40px; }
.p-media { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.frame {
  position: relative; border-radius: 18px; border: 1px solid var(--line-strong); overflow: hidden; max-width: 100%;
  background: radial-gradient(120% 120% at 20% 10%, rgba(58, 91, 255, 0.35), rgba(6, 8, 14, 0.9) 65%);
  display: flex; align-items: flex-end; padding: 18px; color: var(--muted);
}
.frame::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, rgba(4, 5, 10, 0.6)); }
.frame span { position: relative; }
.frame.adult { align-items: center; justify-content: center; text-align: center; flex-direction: column; gap: 10px; background: repeating-linear-gradient(135deg, rgba(238, 241, 247, 0.035) 0 12px, transparent 12px 24px), #090B13; }
.frame.adult strong { font-family: var(--display); font-weight: 300; font-size: 56px; color: var(--ink); position: relative; }
.r-16-9 { aspect-ratio: 16 / 9; } .r-4-3 { aspect-ratio: 4 / 3; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.panel {
  flex: 1 1 340px; min-width: 0; position: sticky; top: 96px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line-strong); border-radius: 18px; padding: 28px;
  display: flex; flex-direction: column; gap: 24px;
}
@media (max-width: 999px) { .panel { position: static; } }
.panel dl { margin: 0; display: grid; gap: 18px; }
.panel dt { color: var(--muted); margin-bottom: 6px; }
.panel dd { margin: 0; }
.panel .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.panel .btn { width: 100%; }
.status { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(4, 5, 10, 0.4); font-size: 15px; color: var(--ink-2); }
.status .dot { flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; }
.status .dot.cold { background: #FFB873; box-shadow: 0 0 10px #FFB873; animation: pulse 1.8s infinite; }
.status .dot.ok { background: var(--signal); box-shadow: 0 0 10px var(--signal); }
.status .dot.lock { background: #C58CFF; box-shadow: 0 0 10px #C58CFF; }
.status a { color: var(--ink); border-bottom: 1px solid var(--line-strong); }

.story { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 48px; padding-block: 96px 120px; }
.story .mono { color: var(--signal); margin-bottom: 18px; }
.story p { font-family: var(--display); font-weight: 300; font-size: clamp(1.25rem, 2.4vw, 1.9rem); line-height: 1.25; letter-spacing: -0.015em; }

/* Conferma età */
.gate { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 120px 16px 64px; }
.gate-box {
  width: 100%; max-width: 560px; padding: 36px;
  background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line-strong); border-radius: 22px;
  display: flex; flex-direction: column; gap: 20px;
}
.gate-box .big { font-family: var(--display); font-weight: 300; font-size: 88px; line-height: 0.9; letter-spacing: -0.05em; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate-box h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 400; line-height: 1.1; }
.gate-box p { color: var(--ink-2); }
.check { display: flex; gap: 14px; align-items: center; min-height: 48px; cursor: pointer; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--signal); }

/* Contatti */
.contact { display: flex; flex-wrap: wrap; gap: 24px; padding-bottom: 120px; }
.contact > * { flex: 1 1 340px; min-width: 0; }
.c-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.c-list li { border-bottom: 1px solid var(--line); padding-block: 22px; display: flex; flex-direction: column; gap: 6px; }
.c-list .mono { color: var(--muted); }
.c-list a, .c-list .val { font-family: var(--display); font-weight: 300; font-size: clamp(1.2rem, 3vw, 1.9rem); overflow-wrap: anywhere; }
.c-list a:hover { color: var(--signal); }
.glass { background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line-strong); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.glass h2 { font-size: 22px; font-weight: 400; }
.glass ul { margin: 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 8px; }

/* Apparizione delle sezioni: visibili a riposo, entrano solo se lo scroll le rivela. */
.reveal { animation: fadeup .9s cubic-bezier(.2, .8, .2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* Vetrina dei progetti: finestre di browser vive, la prima in evidenza.
   Da telefono le altre scorrono di lato come un espositore. */
.corner .live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal); margin-right: 8px; vertical-align: 1px; animation: pulse 2.4s infinite; }
.showcase { display: grid; gap: 28px; }
.rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 28px; }
@media (max-width: 699px) {
  .rail { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin-inline: -16px; padding: 0 16px 8px; gap: 14px; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail .show { scroll-snap-align: start; }
}
.show { display: flex; flex-direction: column; gap: 18px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); transform-style: preserve-3d; }
.show.feat { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; align-items: end; }
@media (max-width: 899px) { .show.feat { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.show-media { transition: transform .5s cubic-bezier(.2, .8, .2, 1), border-color .4s, box-shadow .4s;
  position: relative; display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-strong);
  background: #070912; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.show:hover .show-media { border-color: rgba(127, 231, 255, 0.6); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(127, 231, 255, 0.25), 0 0 60px rgba(58, 91, 255, 0.35); }
.win-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(14, 17, 28, 0.9); color: var(--muted); }
.win-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(238, 241, 247, 0.18); }
.win-bar .mono { margin-left: 10px; font-size: 11px; text-transform: none; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.win-bar .live { margin-left: auto; color: var(--signal); text-transform: uppercase; flex: none; }
.win-bar .live::before { content: "●"; margin-right: 6px; animation: pulse 2s infinite; }
.win-view {
  position: relative; aspect-ratio: 16 / 10; display: flex; align-items: flex-end; padding: 16px; color: rgba(238, 241, 247, 0.7);
  background:
    radial-gradient(40% 55% at var(--x1, 30%) var(--y1, 40%), hsla(var(--h), 95%, 60%, 0.75), transparent 70%),
    radial-gradient(45% 50% at var(--x2, 75%) var(--y2, 65%), hsla(calc(var(--h) + 60), 95%, 62%, 0.6), transparent 70%),
    linear-gradient(160deg, #0A0D1C, #05060B);
  transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}
.win-view::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(238, 241, 247, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(238, 241, 247, 0.06) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); }
.win-view span { position: relative; }
.show.feat .win-view { aspect-ratio: 16 / 9; }
.show:hover .win-view { transform: scale(1.04); }
@property --x1 { syntax: "<percentage>"; initial-value: 30%; inherits: false; }
@property --y1 { syntax: "<percentage>"; initial-value: 40%; inherits: false; }
@property --x2 { syntax: "<percentage>"; initial-value: 75%; inherits: false; }
@property --y2 { syntax: "<percentage>"; initial-value: 65%; inherits: false; }
@keyframes drift { 33% { --x1: 60%; --y1: 30%; --x2: 35%; --y2: 70%; } 66% { --x1: 40%; --y1: 70%; --x2: 70%; --y2: 30%; } }
.win-view:not(.adult) { animation: drift 14s ease-in-out infinite; }
.win-view.adult { align-items: center; justify-content: center; flex-direction: column; gap: 8px; text-align: center; background: repeating-linear-gradient(135deg, rgba(238, 241, 247, 0.04) 0 12px, transparent 12px 24px), #090B13; }
.win-view.adult::before { display: none; }
.win-view.adult strong { font-family: var(--display); font-weight: 300; font-size: 64px; line-height: 1; color: var(--ink); }
.glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(35% 45% at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.16), transparent 70%); opacity: 0; transition: opacity .4s; }
.show:hover .glare { opacity: 1; }
.show-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.show-info .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.show-info h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 300; }
.show.feat .show-info h3 { font-size: clamp(2rem, 4.4vw, 4.2rem); }
.show-info p { color: var(--ink-2); max-width: 46ch; }
.show-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn-sm { min-height: 46px; padding: 0 20px; font-size: 12px; }
.note { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.note .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.note .dot.ok { background: var(--signal); box-shadow: 0 0 8px var(--signal); }
.note .dot.cold { background: #FFB873; box-shadow: 0 0 8px #FFB873; animation: pulse 1.8s infinite; }
.note .dot.lock { background: #C58CFF; box-shadow: 0 0 8px #C58CFF; }
@media (prefers-reduced-motion: reduce) { .win-view { animation: none; } }

/* Riga di stato nel piede della pagina */
.foot-status { color: var(--ink-2); }
.foot .live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal); margin-right: 8px; vertical-align: 1px; animation: pulse 2.4s infinite; }

/* Vetrina a scorrimento orizzontale: la sezione si ferma e i progetti
   passano uno alla volta mentre si scorre. Senza JS o da telefono
   resta una fila che si sfoglia col dito. */
.gallery { position: relative; padding-block: 96px 64px; }
.gallery-pin { display: flex; flex-direction: column; gap: 40px; }
.gallery-head { width: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.gallery-head h2 { font-size: clamp(2.2rem, 6vw, 5rem); font-weight: 300; letter-spacing: -0.04em; }
.gallery-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; color: var(--muted); }
.gallery-ctrl [data-gal-i] { color: var(--ink); }
.gallery-ctrl a { color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.gallery-ctrl a:hover { color: var(--ink); }
.gal-bar { position: relative; width: 120px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.gal-bar i { position: absolute; inset: 0 auto 0 0; width: 25%; background: var(--spectrum); box-shadow: 0 0 10px var(--signal); }
.gallery-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 8px 16px 24px; scroll-padding-inline: 16px;
}
.gallery-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 min(88vw, 1120px); scroll-snap-align: start; display: grid; gap: 22px; align-content: start; }
@media (min-width: 700px) { .gallery-track { padding-inline: 32px; scroll-padding-inline: 32px; gap: 28px; } }
@media (min-width: 900px) {
  .slide { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; align-items: center; flex-basis: min(80vw, 1180px); }
}

/* Modalità fissata (attivata dallo script su schermi larghi) */
.gallery.pinned { height: calc(var(--n) * 90vh + 20vh); padding: 0; }
.gallery.pinned .gallery-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; justify-content: center; gap: clamp(20px, 4vh, 44px); padding-top: 64px; }
.gallery.pinned .gallery-track { overflow: visible; padding: 0; gap: 7vw; will-change: transform; scroll-snap-type: none; }
.gallery.pinned .slide { transition: opacity .6s, filter .6s; opacity: 0.28; filter: saturate(0.4); }
.gallery.pinned .slide.is-active { opacity: 1; filter: none; }
.gallery.pinned .slide .device { transition: transform .8s cubic-bezier(.2, .8, .2, 1); transform: scale(0.92); }
.gallery.pinned .slide.is-active .device { transform: none; }

.slide-media { position: relative; display: block; border-radius: 18px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.slide-media .glare { border-radius: 18px; }
.slide-media:hover .glare { opacity: 1; }
.slide-media:hover .device { border-color: rgba(127, 231, 255, 0.6); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 70px rgba(58, 91, 255, 0.35); }
.slide-info { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.slide-n {
  font-family: var(--display); font-weight: 300; font-size: clamp(4rem, 9vw, 8.5rem); line-height: 0.8; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(238, 241, 247, 0.35); margin-bottom: 4px;
}
.slide-info .kind { color: var(--signal); }
.slide-info h3 { font-size: clamp(2rem, 3.6vw, 3.4rem); font-weight: 300; letter-spacing: -0.035em; }
.slide-info h3 a:hover { color: var(--signal); }
.slide-info .desc { color: var(--ink-2); max-width: 40ch; font-size: 18px; }
.slide-info .meta { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 899px) { .slide-n { position: absolute; right: 0; top: -6px; font-size: 3.6rem; } }

/* Finestra del dispositivo con l'anteprima disegnata dentro */
.device {
  container-type: inline-size; position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line-strong); background: #070912;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(127, 231, 255, 0.06);
  transition: border-color .4s, box-shadow .4s;
}
.show-media .device { border: 0; border-radius: 0; box-shadow: none; }
.p-media > .device { border-radius: 18px; }

.mk { position: relative; aspect-ratio: 16 / 10; overflow: hidden; --a: hsl(var(--h, 220) 95% 64%); --b: hsl(calc(var(--h, 220) + 55) 95% 66%); }
.mk s { display: block; height: 2.2cqw; border-radius: 1cqw; background: rgba(238, 241, 247, 0.85); text-decoration: none; }
.mk s.dim { background: rgba(238, 241, 247, 0.3); }
.mk .w90 { width: 90%; } .mk .w80 { width: 80%; } .mk .w70 { width: 70%; } .mk .w40 { width: 40%; }

/* A: sito vetrina */
.mk-landing { display: flex; flex-direction: column; gap: 4cqw; padding: 3.4cqw 4.4cqw; background: radial-gradient(70% 90% at 80% 30%, hsl(var(--h) 80% 22%), transparent 70%), linear-gradient(165deg, #0B0F22, #05060B); }
.mk-nav { display: flex; align-items: center; gap: 2.4cqw; }
.mk-nav b { width: 3cqw; height: 3cqw; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); margin-right: auto; }
.mk-nav i { width: 6cqw; height: 1.1cqw; border-radius: 1cqw; background: rgba(238, 241, 247, 0.4); }
.mk-nav u { width: 11cqw; height: 3.4cqw; border-radius: 3cqw; border: 1px solid rgba(238, 241, 247, 0.5); }
.mk-hero { flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 3cqw; }
.mk-copy { display: flex; flex-direction: column; gap: 1.6cqw; }
.mk-copy s:not(.dim) { height: 4.2cqw; border-radius: 1.2cqw; }
.mk-copy em { display: block; margin-top: 1.6cqw; width: 18cqw; height: 4.6cqw; border-radius: 4cqw; background: linear-gradient(90deg, var(--a), var(--b)); box-shadow: 0 0 4cqw hsl(var(--h) 95% 60% / 0.5); }
.mk-orb { justify-self: center; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0 4%, var(--b) 18%, var(--a) 46%, hsl(var(--h) 90% 18%) 72%);
  box-shadow: 0 0 9cqw hsl(var(--h) 95% 55% / 0.55), inset -3cqw -4cqw 6cqw rgba(0, 0, 0, 0.45);
  animation: orb 7s ease-in-out infinite; }
@keyframes orb { 50% { transform: translateY(-3%) rotate(14deg) scale(1.03); } }
.mk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; }
.mk-cards span { height: 9cqw; border-radius: 1.6cqw; border: 1px solid rgba(238, 241, 247, 0.16); background: linear-gradient(160deg, rgba(238, 241, 247, 0.1), rgba(238, 241, 247, 0.02)); position: relative; }
.mk-cards span::before { content: ""; position: absolute; left: 1.6cqw; top: 1.6cqw; width: 2.6cqw; height: 2.6cqw; border-radius: 0.8cqw; background: var(--a); opacity: 0.85; }
.mk-cards span::after { content: ""; position: absolute; left: 1.6cqw; right: 3cqw; bottom: 1.8cqw; height: 1.1cqw; border-radius: 1cqw; background: rgba(238, 241, 247, 0.35); }

/* B: applicazione con dati */
.mk-dash { display: grid; grid-template-columns: 15cqw 1fr; background: linear-gradient(165deg, #0A0D19, #05060B); }
.mk-side { display: flex; flex-direction: column; gap: 2.2cqw; padding: 3.2cqw 2.4cqw; background: rgba(238, 241, 247, 0.04); border-right: 1px solid rgba(238, 241, 247, 0.1); }
.mk-side b { width: 4cqw; height: 4cqw; border-radius: 1.2cqw; background: linear-gradient(135deg, var(--a), var(--b)); margin-bottom: 1.6cqw; }
.mk-side i { height: 1.4cqw; border-radius: 1cqw; background: rgba(238, 241, 247, 0.28); }
.mk-side i.on { background: var(--a); box-shadow: 0 0 2cqw var(--a); }
.mk-main { display: flex; flex-direction: column; gap: 2.4cqw; padding: 3.2cqw; min-width: 0; }
.mk-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; }
.mk-kpis span { display: flex; flex-direction: column; gap: 1.2cqw; padding: 2cqw; border-radius: 1.6cqw; border: 1px solid rgba(238, 241, 247, 0.14); background: rgba(238, 241, 247, 0.05); }
.mk-kpis s { height: 1.2cqw; }
.mk-kpis strong { font-family: var(--display); font-weight: 400; font-size: 3.6cqw; line-height: 1; color: var(--ink); }
.mk-kpis span:first-child strong { color: var(--a); }
.mk-chart { flex: 1; display: flex; align-items: flex-end; gap: 1.2cqw; padding: 2cqw; border-radius: 1.6cqw; border: 1px solid rgba(238, 241, 247, 0.1);
  background: repeating-linear-gradient(rgba(238, 241, 247, 0.06) 0 1px, transparent 1px 25%); }
.mk-chart span { flex: 1; height: calc(var(--v) * 1%); border-radius: 0.8cqw 0.8cqw 0 0; background: linear-gradient(var(--b), var(--a) 60%, hsl(var(--h) 90% 30%)); transform-origin: bottom; animation: bar 4s ease-in-out infinite; }
.mk-chart span:nth-child(3n) { animation-delay: -1.3s; } .mk-chart span:nth-child(3n+1) { animation-delay: -2.6s; }
@keyframes bar { 50% { transform: scaleY(0.78); } }
.mk-rows { display: grid; gap: 1.2cqw; }
.mk-rows s { height: 1.4cqw; background: rgba(238, 241, 247, 0.22); }

/* C: app privata, si vede la schermata di accesso */
.mk-login { display: grid; place-items: center; background: linear-gradient(165deg, #0D0A1C, #05060B); }
.mk-blur { position: absolute; inset: 0; display: grid; grid-template-columns: 15cqw 1fr; filter: blur(0.5cqw); opacity: 0.55; }
.mk-blur .mk-cards { grid-template-columns: repeat(2, 1fr); }
.mk-blur .mk-cards span { height: 14cqw; }
.mk-login::after { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 50%, hsl(var(--h) 90% 50% / 0.28), rgba(5, 6, 11, 0.6) 80%); }
.mk-card {
  position: relative; z-index: 1; width: 44cqw; display: flex; flex-direction: column; align-items: center; gap: 1.8cqw; padding: 3.6cqw 3.6cqw 3.2cqw;
  border-radius: 2.4cqw; border: 1px solid rgba(238, 241, 247, 0.25); background: rgba(12, 14, 26, 0.82);
  box-shadow: 0 3cqw 8cqw rgba(0, 0, 0, 0.6), 0 0 6cqw hsl(var(--h) 95% 60% / 0.25); color: var(--a);
}
.mk-card svg { width: 5cqw; height: 5cqw; }
.mk-card strong { font-family: var(--display); font-weight: 400; font-size: 2.6cqw; color: var(--ink); letter-spacing: -0.01em; }
.mk-field { width: 100%; padding: 1.4cqw 1.8cqw; border-radius: 1.2cqw; border: 1px solid rgba(238, 241, 247, 0.2); background: rgba(238, 241, 247, 0.04); font-family: var(--mono); font-size: 1.8cqw; color: var(--muted); }
.mk-btn { width: 100%; padding: 1.5cqw; border-radius: 1.2cqw; text-align: center; font-family: var(--mono); font-size: 1.8cqw; letter-spacing: 0.06em; text-transform: uppercase; color: var(--void); background: linear-gradient(90deg, var(--a), var(--b)); }

/* D: 18+, niente immagini */
.mk-adult { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqw; text-align: center; color: var(--muted);
  background: repeating-linear-gradient(135deg, rgba(238, 241, 247, 0.04) 0 1.4cqw, transparent 1.4cqw 2.8cqw), radial-gradient(60% 60% at 50% 50%, rgba(255, 184, 115, 0.14), transparent), #090B13; }
.mk-adult strong { font-family: var(--display); font-weight: 300; font-size: 13cqw; line-height: 0.9; letter-spacing: -0.05em; background: linear-gradient(90deg, #FFB873, #C58CFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mk-adult .mono { font-size: max(11px, 1.6cqw); }

/* Lo studio: un percorso in quattro tappe collegate, come la rete sullo sfondo */
.studio { min-height: 100svh; padding-block: 140px 120px; display: flex; flex-direction: column; justify-content: center; gap: 72px; }
.studio-head { display: grid; gap: 22px; max-width: 900px; }
.kicker { color: var(--signal); }
.studio-head h2 { font-size: clamp(2.2rem, 5.6vw, 5rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.studio-head .lead { color: var(--ink-2); font-size: clamp(17px, 1.6vw, 20px); max-width: 52ch; }
.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; position: relative; }
.path::before { content: ""; position: absolute; left: 7px; right: 0; top: 7px; height: 1px; background: linear-gradient(90deg, var(--signal), #C58CFF 60%, rgba(255, 184, 115, 0.2)); box-shadow: 0 0 12px rgba(127, 231, 255, 0.5); }
.path li { position: relative; display: flex; flex-direction: column; gap: 10px; padding-top: 40px; padding-right: 12px; }
.node { position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--void); border: 1px solid var(--signal); box-shadow: 0 0 14px rgba(127, 231, 255, 0.6); }
.node::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--signal); animation: pulse 2.4s infinite; }
.path li:nth-child(2) .node::after { animation-delay: .6s; } .path li:nth-child(3) .node::after { animation-delay: 1.2s; } .path li:nth-child(4) .node::after { animation-delay: 1.8s; }
.path .mono { color: var(--muted); }
.path h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); font-weight: 300; letter-spacing: -0.02em; }
.path p { color: var(--ink-2); font-size: 16px; }
@media (max-width: 799px) {
  .path { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-left: 36px; }
  .path::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 1px; height: auto; background: linear-gradient(var(--signal), #C58CFF 60%, rgba(255, 184, 115, 0.2)); }
  .path li { padding-top: 0; }
  .node { left: -36px; top: 4px; }
}

/* Chiusura */
.outro { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: 140px 96px; }
.outro .lead { margin-top: 28px; max-width: 40ch; color: var(--ink-2); font-size: clamp(18px, 1.8vw, 22px); }
.outro .btn-row { margin-top: 36px; }
.mail-line { margin-top: 28px; color: var(--muted); text-transform: none; letter-spacing: 0.04em; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .mk-orb, .mk-chart span { animation: none; } }

/* Leggibilità sopra la scena: un alone scuro dietro i testi, senza riquadri. */
.slide-info::before { content: ""; position: absolute; inset: -60px -80px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(4, 5, 10, 0.82), rgba(4, 5, 10, 0.5) 60%, transparent); }
.path li { background: linear-gradient(transparent 30px, rgba(6, 8, 14, 0.62) 30px); border-radius: 0 0 14px 14px; padding-bottom: 18px; backdrop-filter: none; }
@media (max-width: 799px) { .path li { background: rgba(6, 8, 14, 0.55); border-radius: 12px; padding: 12px 14px; } }

/* Media veri dentro la finestra: video in loop o immagine al posto dell'anteprima disegnata. */
.device video, .device img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #070912; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.shots figure { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-strong); background: #070912; }
.shots img { display: block; width: 100%; height: auto; }
.shots figcaption { padding: 10px 14px; color: var(--muted); font-size: 14px; }

/* Filtri dell'archivio */
.filters button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; }
.filters button:hover { color: var(--ink); border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--void); border-color: var(--ink); }
.show[hidden] { display: none; }

/* Testi lunghi (privacy) */
.prose { max-width: 72ch; padding-bottom: 120px; display: grid; gap: 18px; color: var(--ink-2); }
.prose h2 { margin-top: 28px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 400; color: var(--ink); line-height: 1.2; }
.prose a { color: var(--ink); border-bottom: 1px solid var(--line-strong); }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Pagina non trovata */
.lost { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 24px; padding-block: 120px 80px; }
.lost h1 { font-size: clamp(3rem, 14vw, 12rem); font-weight: 300; letter-spacing: -0.05em; line-height: 0.9; }
.lost p { color: var(--ink-2); max-width: 44ch; font-size: 19px; }
