@font-face { font-family: "Bricolage"; src: url(/assets/fonts/bricolage-grotesque-latin.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Pixelify"; src: url(/assets/fonts/pixelify-sans-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #1c1621;
  --plum: #2a2330;
  --plum-2: #372d3d;
  --cream: #fff3e4;
  --cream-2: #f3e3cf;
  --coral: #f0566a;
  --orange: #f5823f;
  --amber: #f9ab3c;
  --pink: #e2457c;
  --teal: #3fc9c2;
  --muted: #b3a5b5;
  --display: "Bricolage", "Arial Black", Arial, sans-serif;
  --pixel: "Pixelify", ui-monospace, Menlo, monospace;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1240px;
  --gutter: 32px;
  --grain: 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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--cream); font: 18px/1.55 var(--display); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 800; }
code { font-family: var(--mono); font-size: .86em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.px { font-family: var(--pixel); font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }

/* Superficie a tramonto con la grana del logo */
.sunset {
  position: relative; isolation: isolate; overflow: hidden; color: var(--ink);
  background:
    radial-gradient(60% 70% at 8% 0%, #ff5f73 0%, transparent 70%),
    radial-gradient(55% 65% at 95% 20%, #ffb347 0%, transparent 70%),
    radial-gradient(70% 60% at 55% 55%, #f77a45 0%, transparent 75%),
    linear-gradient(170deg, #f25a6c 0%, #f5843f 55%, #e8603f 100%);
}
.sunset::after, .grain::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: var(--grain); mix-blend-mode: multiply; opacity: .55;
}
.grain { position: relative; isolation: isolate; }
.grain::after { opacity: .22; mix-blend-mode: soft-light; }
.embers { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.sunset > :not(.embers), .grain > * { position: relative; z-index: 3; }
.sunset > .bar { z-index: 10; }

/* Barra di navigazione */
.bar { display: flex; align-items: center; gap: 28px; max-width: var(--wrap); margin: 0 auto; padding: 26px var(--gutter); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 21px; letter-spacing: -.02em; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 6px 18px rgba(28, 22, 33, .35); }
.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; font: 500 15px/1 var(--pixel); letter-spacing: .05em; text-transform: uppercase; }
.nav-links a { text-decoration: none; opacity: .8; }
.nav-links a:hover { opacity: 1; }
.lang { display: inline-flex; border: 2px solid var(--ink); }
.nav-links .lang > * { display: block; padding: 6px 9px; opacity: 1; }
.nav-links .lang > span { background: var(--ink); color: var(--amber); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 2px solid var(--ink); background: none; color: var(--ink); font: 700 20px/1 var(--display); cursor: pointer; }

/* Hero */
.hero { min-height: 100svh; }
.hero-copy { max-width: var(--wrap); margin: 0 auto; padding: 7vh var(--gutter) calc(max(220px, 30vh) + 150px); }
.tag { display: inline-block; padding: 8px 12px; background: var(--ink); color: var(--amber); font-size: 15px; line-height: 1; }
.hero h1 { margin-top: 26px; max-width: 11ch; font-size: clamp(54px, 9vw, 136px); line-height: .86; letter-spacing: -.055em; }
.hero .lede { max-width: 580px; margin-top: 30px; font-size: 21px; line-height: 1.45; font-weight: 500; color: rgba(28, 22, 33, .86); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 34px; }

.skyline { position: absolute !important; left: 0; right: 0; bottom: 0; height: 30vh; min-height: 220px; display: flex; align-items: flex-end; gap: 6px; padding: 0 6px; }
.skyline i { flex: 1; min-width: 3px; background: var(--c); transform-origin: bottom; animation: rise 1.1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d); }
@keyframes rise { from { transform: scaleY(0); } }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px; border: 0; background: var(--ink); color: var(--cream); font: 700 17px/1 var(--display); text-decoration: none; cursor: pointer; box-shadow: 6px 6px 0 rgba(28, 22, 33, .28); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(28, 22, 33, .28); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-light { background: var(--cream); color: var(--ink); box-shadow: 6px 6px 0 var(--coral); }
.btn-light:hover { box-shadow: 8px 8px 0 var(--coral); }
.btn-coffee { background: #ffdd00; color: var(--ink); box-shadow: 6px 6px 0 rgba(0, 0, 0, .35); }
.link { font: 500 15px/1 var(--pixel); letter-spacing: .05em; text-transform: uppercase; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 4px; }

/* Lo schermo: la cornice del monitor del logo */
.screen { background: var(--plum); border-radius: 28px; padding: 22px 22px 0; box-shadow: 0 40px 80px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .06); }
.screen .view { display: block; border-radius: 10px; border: 3px solid #141017; overflow: hidden; cursor: zoom-in; }
.screen .view img { width: 100%; }
.deck { display: flex; align-items: center; gap: 22px; padding: 20px 14px 22px; }
.deck .track { flex: 1; height: 12px; border-radius: 6px; background: #19141d; position: relative; overflow: hidden; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .5); }
.deck .track::before { content: ""; position: absolute; inset: 3px auto 3px 3px; width: var(--fill, 64%); border-radius: 3px; background: linear-gradient(90deg, #ece4dc, #fff3e4 80%, var(--coral)); }
.deck .knob { flex: none; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #b9b2ad 55%, #6f6870); box-shadow: 0 3px 8px rgba(0, 0, 0, .5); }
.deck .label { color: #a79aa9; font-size: 14px; }
.screen-sm { border-radius: 20px; padding: 14px 14px 0; }
.screen-sm .deck { padding: 14px 8px 16px; gap: 14px; }
.screen-sm .deck .knob { width: 30px; height: 30px; }
.hero-screen { position: relative; z-index: 4; max-width: 1180px; margin: -170px auto 0; padding: 0 var(--gutter); }

/* Sezioni */
section { padding: 130px 0; }
.on-cream { background: var(--cream); color: var(--ink); }
.on-plum { background: var(--plum); }
.kicker { display: block; font-size: 15px; color: var(--amber); margin-bottom: 20px; }
.on-cream .kicker { color: var(--coral); }
.title { font-size: clamp(42px, 6.4vw, 92px); line-height: .9; letter-spacing: -.05em; max-width: 14ch; }
.title .soft { color: var(--coral); }
.on-cream .title .soft { color: var(--orange); }
.intro { max-width: 620px; margin-top: 26px; font-size: 20px; line-height: 1.5; color: rgba(255, 243, 228, .78); }
.on-cream .intro { color: rgba(28, 22, 33, .78); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 64px; align-items: start; margin-top: 64px; }
.points { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 18px; }
.points li { position: relative; padding-left: 28px; font-size: 17px; line-height: 1.5; color: rgba(255, 243, 228, .8); }
.points li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; background: var(--coral); }
.points strong { color: var(--cream); }
.on-cream .points li { color: rgba(28, 22, 33, .8); }
.on-cream .points strong { color: var(--ink); }
.more { display: inline-block; margin-top: 8px; }

/* Remux: l'animazione delle forme d'onda */
.sync { margin-top: 64px; background: #16111a; border-radius: 28px; padding: 30px 30px 26px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .04); }
.sync-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 14px; color: var(--muted); }
.sync-head .state { color: var(--coral); }
.sync-head .state.ok { color: var(--teal); }
.sync canvas { display: block; width: 100%; height: 300px; margin: 18px 0 10px; }
.sync-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--c); vertical-align: -1px; }
.replay { border: 2px solid var(--plum-2); background: none; color: var(--cream); padding: 9px 14px; font-size: 13px; cursor: pointer; }
.replay:hover { border-color: var(--muted); }

.ops { width: 100%; border-collapse: collapse; font: 15px/1.3 var(--mono); }
.ops th { text-align: left; padding: 0 14px 12px 0; font: 500 13px/1 var(--pixel); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--plum-2); }
.ops td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--plum-2); color: rgba(255, 243, 228, .62); white-space: nowrap; transition: color .3s, background .3s; }
.ops td:first-child { padding-left: 10px; }
.ops .t { color: var(--coral); }
.ops .t.ins { color: var(--amber); }
.ops tr.on td { color: var(--cream); background: rgba(240, 86, 106, .1); }
.ops tr.on .t { color: var(--coral); }
.ops tr.on .t.ins { color: var(--amber); }
.table-scroll { overflow-x: auto; }
.note { margin-top: 18px; font-size: 15px; color: var(--muted); }

.methods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 90px; }
.method { background: #16111a; padding: 22px 20px; border-top: 4px solid var(--c, var(--plum-2)); }
.method h3 { font-size: 20px; letter-spacing: -.02em; line-height: 1.1; }
.method p { margin-top: 10px; font-size: 15px; line-height: 1.45; color: rgba(255, 243, 228, .7); }
.method .cost { display: block; margin-top: 14px; font-size: 12px; color: var(--muted); }

/* Split: il GOP a pixel */
.gop { margin: 34px 0 30px; }
.gop-row { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; }
.gop-row i { height: 44px; background: var(--c); transform-origin: bottom; }
.gop-row i.cut { box-shadow: -6px 0 0 -2px var(--coral); }
.gop-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 13px; }
.gop-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; background: var(--c); vertical-align: -1px; }

/* Metadata: le regole */
.rules { margin: 0 0 32px; background: #16111a; padding: 8px 22px; }
.rule { padding: 14px 0; font: 15px/1.6 var(--mono); color: rgba(255, 243, 228, .7); }
.rule + .rule { border-top: 1px solid var(--plum-2); }
.rule .kw { color: var(--coral); font-weight: 700; }
.rule .fld { color: var(--cream); }
.rule .val { color: var(--teal); }

/* Galleria */
.reel {
  --inset: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  display: grid; grid-auto-flow: column; grid-auto-columns: min(820px, 84%); gap: 28px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--inset) 26px; scroll-padding: 0 var(--inset);
  margin-top: 56px; scrollbar-width: thin; scrollbar-color: var(--plum-2) transparent;
}
.reel figure { margin: 0; scroll-snap-align: start; }
.reel figcaption { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* Download */
.get .title { max-width: none; }
.get-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; margin-top: 56px; }
.editions { font-size: 19px; line-height: 1.5; font-weight: 500; color: rgba(28, 22, 33, .86); }
.platforms { list-style: none; padding: 0; margin: 28px 0 34px; display: flex; flex-wrap: wrap; gap: 10px; }
.platforms li { padding: 10px 14px; background: var(--ink); color: var(--cream); font-size: 14px; }
.platforms li span { color: var(--amber); margin-left: 6px; }
.req { margin-top: 30px; font-size: 16px; color: rgba(28, 22, 33, .8); }
.req a { font-weight: 700; }
.tabs { display: flex; gap: 6px; }
.tab { padding: 10px 16px; border: 0; background: rgba(28, 22, 33, .18); color: var(--ink); font: 500 14px/1 var(--pixel); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--amber); }
.panel[hidden] { display: none; }
.panel p { margin-top: 14px; font-size: 16px; color: rgba(28, 22, 33, .82); }
.panel a { font-weight: 700; }
pre.code { position: relative; margin: 0; background: var(--ink); color: var(--cream); padding: 22px 24px; overflow-x: auto; font: 14px/1.7 var(--mono); box-shadow: 8px 8px 0 rgba(28, 22, 33, .28); }
pre.code .c { color: #8d7f8f; }
.copy-btn { position: absolute; top: 10px; right: 10px; padding: 6px 10px; border: 0; background: var(--plum-2); color: var(--cream); font: 500 12px/1 var(--pixel); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.copy-btn:hover { background: var(--coral); color: var(--ink); }

/* Documentazione */
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 56px; margin-top: 64px; }
.docs h3 { padding-bottom: 12px; border-bottom: 3px solid var(--ink); font: 500 15px/1 var(--pixel); letter-spacing: .05em; text-transform: uppercase; color: var(--coral); }
.docs ul { list-style: none; padding: 0; margin: 14px 0 0; }
.docs li { padding: 5px 0; }
.docs a { font-size: 20px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.docs a:hover { color: var(--coral); }
.docs-cta { margin-top: 56px; }

/* Supporto e piè di pagina */
.support { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 40px; align-items: end; }
.support .title { font-size: clamp(38px, 5vw, 72px); }
.support-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.support .btn:not(.btn-coffee) { background: var(--cream); color: var(--ink); box-shadow: 6px 6px 0 var(--coral); }
footer { padding: 34px 0 44px; border-top: 2px solid var(--plum); font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; }
footer .brand { color: var(--cream); font-size: 17px; }
footer .brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: none; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; font: 500 14px/1 var(--pixel); letter-spacing: .05em; text-transform: uppercase; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--cream); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 40px 80px; background: rgba(20, 15, 23, .96); }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 130px); border: 3px solid #141017; border-radius: 8px; cursor: zoom-out; }
.lightbox figcaption { margin-top: 16px; font: 500 14px/1.5 var(--pixel); letter-spacing: .04em; color: var(--muted); text-align: center; }
.lb-btn { position: absolute; width: 48px; height: 48px; border: 0; background: var(--cream); color: var(--ink); font: 700 26px/1 var(--display); cursor: pointer; box-shadow: 4px 4px 0 var(--coral); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 1040px) {
  .cols, .get-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .bar { position: relative; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; z-index: 20; top: 86px; left: 16px; right: 16px;
    flex-direction: column; align-items: flex-start; gap: 0; padding: 12px 18px 18px;
    background: var(--ink); color: var(--cream); box-shadow: 6px 6px 0 rgba(28, 22, 33, .3);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 0; font-size: 16px; }
  .nav-links .lang { margin-top: 10px; border-color: var(--cream); }
  .nav-links .lang > span { background: var(--cream); color: var(--ink); }
  .hero-copy { padding-top: 5vh; padding-bottom: calc(max(140px, 22vh) + 70px); }
  .hero .lede { font-size: 18px; }
  .skyline { height: 22vh; min-height: 140px; gap: 3px; padding: 0 3px; }
  .hero-screen { margin-top: -90px; padding: 0 12px; }
  .screen { border-radius: 18px; padding: 10px 10px 0; }
  .deck { padding: 14px 6px 16px; gap: 12px; }
  .deck .knob { width: 30px; height: 30px; }
  .deck .label { display: none; }
  section { padding: 84px 0; }
  .intro { font-size: 18px; }
  .sync { padding: 18px 14px 16px; border-radius: 18px; }
  .sync canvas { height: 220px; }
  .methods { grid-template-columns: minmax(0, 1fr); margin-top: 56px; }
  .gop-row { gap: 2px; }
  .gop-row i { height: 32px; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .reel { grid-auto-columns: 90%; gap: 16px; }
  .lightbox { padding: 64px 8px 16px; }
  .lb-prev, .lb-next { display: none; }
  footer nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skyline i { animation: none; }
}

/* GOP: colori per ruolo */
.gop-row i.k { --c: var(--ink); }
.gop-row i.cp { --c: rgba(28, 22, 33, .16); }
.gop-row i.re { --c: var(--amber); }
.gop-legend .k { --c: var(--ink); }
.gop-legend .cp { --c: rgba(28, 22, 33, .16); }
.gop-legend .re { --c: var(--amber); }
.gop-legend .cut { --c: var(--coral); }
.sync .table-scroll { margin-top: 30px; }
.sync .note { margin-top: 14px; }
.reel .screen .deck .label { display: none; }

/* Discord nella barra: sempre visibile, anche su mobile */
.discord { order: 3; display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; background: var(--ink); color: var(--cream); text-decoration: none; font-size: 15px; line-height: 1; box-shadow: 4px 4px 0 rgba(28, 22, 33, .28); transition: transform .15s, box-shadow .15s, background .15s; }
.discord:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(28, 22, 33, .28); background: #5865f2; }
.discord svg { width: 20px; height: 20px; flex: none; }
.nav-links { order: 2; }
.nav-toggle { order: 4; }
@media (max-width: 760px) {
  .discord { margin-left: auto; padding: 12px; }
  .discord .px { display: none; }
  .nav-toggle { margin-left: 10px; }
}
