:root {
  --accent: #5865f2; --on-accent: #fff; --corner: squircle;
  --panel: #2b2d31; --raise: #383a40; --line: rgb(255 255 255 / .1); --text: #e7e7ea; --soft: #a7a9b0; --faint: #72757e;
  --display: -apple-system, 'SF Pro Display', 'Segoe UI Variable Display', 'Segoe UI', sans-serif;
  --body: -apple-system, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, sans-serif;
  --mono: var(--body);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: #0f1014 radial-gradient(90% 60% at 20% 0, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%) no-repeat; color: var(--text); font: 17px/1.55 var(--body); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; padding: 8px 12px; background: #fff; color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kicker { margin: 0 0 12px; font: 13px var(--mono); color: var(--accent); }

.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 12px clamp(16px, 4vw, 44px); background: rgb(15 16 20 / .72); backdrop-filter: blur(24px) saturate(170%); box-shadow: 0 .5px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font: 650 16px var(--display); letter-spacing: -.01em; text-decoration: none; color: #fff; }
.nav nav { display: flex; gap: 20px; margin-left: auto; font-size: 14.5px; }
.nav nav a { text-decoration: none; color: var(--soft); transition: color .15s; }
.nav nav a:hover { color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; background: var(--raise); color: #fff; border-radius: 14px; corner-shape: var(--corner); font-weight: 600; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); transition: transform .16s cubic-bezier(.2, .9, .25, 1), background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); background: #222226; }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.primary:hover { background: var(--accent); box-shadow: 0 0 50px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.small { min-height: 36px; padding: 0 15px; font-size: 14px; }

.hero { padding: clamp(40px, 7vw, 92px) clamp(16px, 4vw, 44px) 0; max-width: 1400px; margin: 0 auto; }
h1 { margin: 0; font: 700 clamp(46px, 8.6vw, 124px)/1 var(--display); letter-spacing: -.04em; color: #fff; }
h1 em { font-style: normal; background: linear-gradient(100deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #ff7ac6)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 56ch; margin: 26px 0 0; font-size: clamp(17px, 1.5vw, 21px); color: var(--soft); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* Il ponte di comando, disegnato in CSS */
.deck { --a1: #e5539b; --a2: #38d98a; --a3: #2aa7d8; display: grid; grid-template: 28px minmax(0, 1fr) / 50px 170px minmax(0, 1fr) 240px; gap: 7px; height: clamp(380px, 46vw, 560px); margin-top: clamp(40px, 6vw, 74px); padding: 0 7px 7px; background: #1e1f22; border-radius: 22px 22px 0 0; corner-shape: var(--corner); box-shadow: inset 0 0 0 1px var(--line), 0 -30px 120px color-mix(in srgb, var(--accent) 10%, transparent); font-size: 13px; }
.d-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 6px; font: 11px var(--mono); color: var(--faint); white-space: nowrap; overflow: hidden; }
.d-bar b { font: 650 12px var(--display); color: #fff; }
.d-bar u { text-decoration: none; color: var(--text); }
.d-bar .grow { flex: 1; }
.d-bar i { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #38d98a; box-shadow: 0 0 6px #38d98a; }
.d-dock, .d-side, .d-chat, .d-reel { background: var(--panel); border-radius: 14px; corner-shape: var(--corner); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.d-dock { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 7px 0; }
.d-dock s { width: 34px; height: 34px; border-radius: 9px; corner-shape: var(--corner); box-shadow: inset 0 0 0 1px var(--line); font: 600 11px/34px var(--display); text-align: center; text-decoration: none; }
.d-dock s.on { background: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent); }
.d-dock s.srv { background: #fff; color: #000; box-shadow: none; }
.d-dock s.two { background: #2aa7d8; color: #fff; }
.d-dock s.three { background: #e5539b; color: #fff; }
.d-dock hr { width: 22px; margin: 2px 0; border: 0; border-top: 1px solid var(--line); }
.d-side { padding: 11px 9px; }
.d-side h4 { margin: 0 0 10px; font: 600 14px var(--display); color: #fff; }
.d-side small { display: block; margin: 12px 3px 4px; font: 10px var(--mono); color: var(--faint); }
.d-side p { position: relative; display: flex; align-items: center; gap: 6px; margin: 0; padding: 3px 6px; color: var(--soft); border-radius: 5px; }
.d-side p.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: #fff; }
.d-side p.sub { padding-left: 16px; font-size: 12px; }
.d-side p.talk span { box-shadow: 0 0 0 2px #38d98a; }
.d-side span, .d-msg > span, .d-lfg span { flex: none; display: block; border-radius: 30%; }
.d-side span { width: 16px; height: 16px; }
.a1 { background: var(--a1); }
.a2 { background: var(--a2); }
.a3 { background: var(--a3); }
.d-chat { display: flex; flex-direction: column; gap: 14px; padding: 16px; min-width: 0; }
.d-msg { display: flex; gap: 10px; }
.d-msg > span { width: 32px; height: 32px; }
.d-msg b { color: #fff; margin-right: 7px; }
.n1 { color: var(--a1) !important; }
.n2 { color: var(--a2) !important; }
.d-msg time { font: 10px var(--mono); color: var(--faint); }
.d-msg p { margin: 0; color: var(--text); }
.d-lfg { align-self: flex-start; margin-left: 42px; padding: 10px 12px; background: var(--raise); box-shadow: inset 2px 0 0 var(--accent); border-radius: 6px; }
.d-lfg b { display: block; font: 600 14px var(--display); color: #fff; }
.d-lfg small { font: 10.5px var(--mono); color: var(--soft); }
.d-lfg div { display: flex; gap: 5px; margin-top: 7px; }
.d-lfg span, .d-lfg i { width: 22px; height: 22px; }
.d-lfg i { border: 1px dashed var(--faint); border-radius: 30%; }
.d-input { margin-top: auto; padding: 9px 12px; color: var(--faint); background: #131316; border-radius: 9px; corner-shape: var(--corner); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 16%, transparent); }
.d-reel { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff; }
.d-reel .scene, .reel::before { position: absolute; inset: 0; content: ''; background: radial-gradient(70% 45% at 50% 22%, color-mix(in srgb, var(--accent) 50%, transparent), transparent 70%), linear-gradient(170deg, #1b1b20, #000 72%); }
.d-reel p { position: relative; margin: 0; font-weight: 600; }
.tag { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 2px 7px; background: rgb(0 0 0 / .72); border-radius: 5px; font: 11px var(--mono); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1400px; margin: 0 auto; box-shadow: 0 1px 0 var(--line), 0 -1px 0 var(--line); }
.stats div { padding: clamp(22px, 3.5vw, 44px) clamp(16px, 3vw, 44px); }
.stats div + div { box-shadow: -1px 0 0 var(--line); }
.stats b { display: block; font: 600 clamp(34px, 5vw, 66px)/1 var(--display); letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 6px; font: 13px var(--mono); color: var(--soft); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 90px); align-items: center; max-width: 1400px; margin: 0 auto; padding: clamp(60px, 10vw, 140px) clamp(16px, 4vw, 44px); }
.split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.flip .copy { order: 2; }
h2 { margin: 0; font: 700 clamp(34px, 5vw, 68px)/1.04 var(--display); letter-spacing: -.035em; color: #fff; text-wrap: balance; }
.copy p:not(.kicker) { max-width: 52ch; margin: 18px 0 0; color: var(--soft); text-wrap: pretty; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; padding: 0; list-style: none; font: 12.5px var(--mono); }
.sources li { padding: 4px 9px; border-radius: 6px; corner-shape: var(--corner); box-shadow: inset 0 0 0 1px var(--line); }

.reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.reel { position: relative; display: flex; align-items: flex-end; aspect-ratio: 9 / 16; padding: 12px; background: var(--panel); border-radius: 16px; corner-shape: var(--corner); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; font-size: 13.5px; }
.reel.r1 { transform: translateY(-34px); }
.reel.r3 { transform: translateY(26px); }
.reel p { position: relative; margin: 0; color: #fff; }
.reel p b { display: block; }

.swatches { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.swatches button { width: 40px; height: 40px; padding: 0; background: var(--c); border: 0; border-radius: 9px; corner-shape: var(--corner); cursor: pointer; transition: transform .15s; }
.swatches button:hover { transform: scale(1.1); }
.swatches button.on { box-shadow: 0 0 0 2px #000, 0 0 0 3.5px #fff; }
.swatches.shapes button { width: auto; height: 36px; padding: 0 12px; background: var(--raise); color: var(--text); font: 13px var(--body); box-shadow: inset 0 0 0 1px var(--line); }
.swatches.shapes button.on { background: var(--accent); color: var(--on-accent); box-shadow: none; }

.profile { max-width: 430px; justify-self: center; width: 100%; background: linear-gradient(170deg, color-mix(in srgb, var(--accent) 24%, #000), #000 70%); border-radius: 22px; corner-shape: var(--corner); box-shadow: inset 0 0 0 1px var(--line), 0 0 90px color-mix(in srgb, var(--accent) 16%, transparent); overflow: hidden; transition: background .25s; }
.p-banner { height: 150px; background: repeating-linear-gradient(115deg, color-mix(in srgb, var(--accent) 34%, #000) 0 2px, transparent 2px 15px), #08080a; }
.p-av { display: grid; place-items: center; width: 92px; height: 92px; margin: -48px 0 0 20px; position: relative; background: var(--accent); color: var(--on-accent); font: 700 38px var(--display); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.p-body { margin: 10px; padding: 16px; background: rgb(0 0 0 / .55); border-radius: 12px; }
.p-body h3 { margin: 0; font: 600 26px var(--display); color: var(--accent); }
.p-body small { font: 12.5px var(--mono); color: var(--soft); }
.p-body p { margin: 10px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; font-size: 13px; }
.chips span { padding: 2px 8px; background: rgb(255 255 255 / .1); border-radius: 5px; }
.chips b { font: 600 11px var(--mono); opacity: .65; }
.chips .ok::before { content: '✓ '; color: #38d98a; font-weight: 700; }

.telemetry { margin: 0; font-family: var(--mono); }
.telemetry div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 18px 2px; box-shadow: 0 1px 0 var(--line); }
.telemetry div:first-child { box-shadow: 0 1px 0 var(--line), 0 -1px 0 var(--line); }
.telemetry dt { color: var(--accent); }
.telemetry dd { margin: 0; font: 600 clamp(17px, 2vw, 24px)/1.2 var(--display); color: #fff; }

.invite { padding: 22px; background: var(--panel); border-radius: 18px; corner-shape: var(--corner); box-shadow: inset 0 0 0 1px var(--line); }
.invite small { font: 12px var(--mono); color: var(--faint); }
.invite > div { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; padding: 14px; background: #000; border-radius: 12px; corner-shape: var(--corner); }
.invite .srv { display: grid; place-items: center; width: 56px; height: 56px; background: var(--accent); color: var(--on-accent); border-radius: 13px; corner-shape: var(--corner); font: 700 18px var(--display); }
.invite p { flex: 1; margin: 0; min-width: 130px; }
.invite b { display: block; font: 600 19px var(--display); color: #fff; }
.invite i { font: 12px var(--mono); color: var(--soft); }
.invite em { padding: 9px 18px; background: #38d98a; color: #04170d; border-radius: 8px; corner-shape: var(--corner); font-style: normal; font-weight: 700; }

.final { padding: clamp(70px, 12vw, 170px) 16px; text-align: center; background: radial-gradient(60% 70% at 50% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%); }
.final h2 { font-size: clamp(46px, 9.4vw, 138px); line-height: .94; margin-bottom: 34px; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 20px clamp(16px, 4vw, 44px) 28px; box-shadow: 0 -1px 0 var(--line); font-size: 13.5px; color: var(--faint); }
.foot span { flex: 1 1 320px; }
.foot a { color: var(--soft); }

.reveal { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .7s, transform .8s cubic-bezier(.2, .9, .25, 1); }
.reveal.seen { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .deck { grid-template: 26px minmax(0, 1fr) / 44px minmax(0, 1fr); height: 430px; }
  .d-side, .d-reel { display: none; }
  .d-dock s { width: 30px; height: 30px; line-height: 30px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(3) { box-shadow: none; }
  .stats div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .split, .split.flip { grid-template-columns: minmax(0, 1fr); }
  .split.flip .copy { order: 0; }
  .reel.r1, .reel.r3 { transform: none; }
  .cta .btn { flex: 1 1 200px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .swatches button { transition: none; }
}
