:root {
  --bg: #01020c;
  --ink: #e9eeff;
  --dim: #9aa4cc;
  --line: rgba(140, 160, 255, .18);
  --accent: #4da3ff;
  --g: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 "Space Grotesk", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 50; padding: 12px 18px; background: var(--ink); color: var(--bg); font-weight: 500; transform: translateY(-200%); transition: transform .3s var(--ease); }
.skip:focus { transform: none; }
.mono { font: 400 12.5px/1.5 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

#space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; cursor: grab; touch-action: pan-y; }
#space:active { cursor: grabbing; }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at center, transparent 50%, rgba(1,2,12,.85)); }

/* HUD */
.hud { position: fixed; inset: 14px; z-index: 5; pointer-events: none; }
.hud .c { position: absolute; width: 22px; height: 22px; border: 1px solid rgba(160, 180, 255, .45); }
.hud .tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hud .tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hud .bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hud .br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.hud-top { position: absolute; top: 14px; left: 34px; right: 34px; display: flex; justify-content: space-between; align-items: center; pointer-events: auto; }
.hud-top .brand { display: flex; align-items: center; gap: 12px; font: 500 15px "Space Grotesk"; letter-spacing: .02em; color: var(--ink); text-transform: none; }
.hud-top .brand img { width: 30px; height: 30px; border-radius: 8px; }
.hud-top nav { display: flex; gap: 6px; }
.hud-top nav a { padding: 10px 8px; }
.hud-top nav a { transition: color .3s; }
.hud-top nav a:hover { color: var(--ink); }
.hud-bottom { position: absolute; bottom: 14px; left: 34px; right: 34px; display: flex; justify-content: space-between; align-items: center; }
.progress { display: flex; gap: 6px; }
.progress i { width: 18px; height: 2px; background: rgba(160, 180, 255, .2); transition: background .4s, width .6s var(--ease); }
.progress i.on { width: 36px; background: var(--accent); }
.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #3dffa0; margin-right: 8px; box-shadow: 0 0 8px #3dffa0; animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* SCENE */
main { position: relative; z-index: 3; pointer-events: none; }
main a, main button { pointer-events: auto; }
.scene { min-height: 100svh; display: flex; align-items: center; padding: 100px var(--g); }
.scene.right { justify-content: flex-end; }
.scene.center { justify-content: center; text-align: center; }
.panel { max-width: 540px; }
.panel .mono.idx { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.panel .mono.idx::after { content: ""; flex: 0 0 60px; height: 1px; background: var(--line); }
.center .panel .mono.idx { justify-content: center; }

h1, h2.h1 { font-size: clamp(46px, 7.4vw, 116px); line-height: .95; letter-spacing: -.045em; font-weight: 500; }
h1 .thin, h2.h1 .thin { font-weight: 300; color: rgba(233, 238, 255, .8); }
h2 { font-size: clamp(36px, 5vw, 72px); line-height: 1; letter-spacing: -.04em; font-weight: 500; }
.lead { margin-top: 26px; font-size: clamp(17px, 1.7vw, 20px); color: var(--dim); max-width: min(470px, 60ch); }
.center .lead { margin-left: auto; margin-right: auto; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.center .btns { justify-content: center; }
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; font: 500 13px "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); background: rgba(10, 14, 40, .5); backdrop-filter: blur(10px); transition: border-color .3s, background .3s, color .3s; }
.btn::before, .btn::after { content: ""; position: absolute; width: 7px; height: 7px; border: 1px solid var(--accent); transition: all .4s var(--ease); }
.btn::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.btn::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.btn:hover { border-color: var(--accent); }
.btn:hover::before, .btn:hover::after { width: 100%; height: 100%; }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.big-quote { font-size: clamp(28px, 3.6vw, 52px); line-height: 1.15; letter-spacing: -.03em; max-width: 900px; }
.big-quote span { color: var(--dim); }

/* scheda app in stile terminale */
.app-panel { max-width: 560px; padding: 36px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(10, 14, 40, .72), rgba(4, 6, 24, .6)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: relative; }
.app-panel::before { content: ""; position: absolute; top: -1px; left: -1px; width: 60px; height: 2px; background: var(--a); box-shadow: 0 0 16px var(--a); }
.app-panel .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 30px; }
.app-panel .row > .mono:last-child { white-space: nowrap; }
.app-panel .tag { color: var(--a); }
.app-panel h2 { font-size: clamp(44px, 6vw, 84px); }
.app-panel .claim { margin-top: 12px; font-size: 21px; }
.app-panel .desc { margin-top: 14px; color: var(--dim); max-width: 60ch; }
.status.ver { border-style: solid; }
.status { display: inline-block; margin-left: 10px; padding: 3px 8px; border: 1px dashed currentColor; letter-spacing: .08em; }
.spec { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.spec li { position: relative; padding: 13px 0 13px 26px; border-bottom: 1px solid var(--line); font-size: 16px; }
.spec li::before { content: ""; position: absolute; left: 2px; top: 22px; width: 6px; height: 6px; background: var(--a); transform: rotate(45deg); box-shadow: 0 0 8px var(--a); }
.app-panel .link { display: inline-flex; margin-top: 26px; color: var(--a); font: 500 13px "JetBrains Mono"; letter-spacing: .08em; text-transform: uppercase; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--a) 45%, transparent); text-underline-offset: 5px; }
.app-panel .link:hover { text-decoration-color: var(--a); }

.timeline { list-style: none; padding: 0; margin-bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 48px; max-width: 1100px; border-top: 1px solid var(--line); }
.timeline > li { padding: 28px 28px 0 0; position: relative; }
.timeline > li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border: 1px solid var(--dim); background: var(--bg); transform: rotate(45deg); }
.timeline > li.now::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.timeline > li.now .mono { color: var(--accent); }
.timeline h3 { font-size: 22px; font-weight: 500; margin: 14px 0 10px; letter-spacing: -.02em; }
.timeline p:not(.mono) { color: var(--dim); font-size: 16px; }
.wide-panel { max-width: 1100px; width: 100%; }

.js .rv { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.in .rv, .rv.in { opacity: 1; transform: none; }
.in .rv:nth-child(2) { transition-delay: .08s; } .in .rv:nth-child(3) { transition-delay: .16s; } .in .rv:nth-child(4) { transition-delay: .24s; }

/* team */
.member { display: grid; grid-template-columns: minmax(200px, 270px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; margin-top: 36px; max-width: 860px; }
.member-photo { position: relative; margin: 0; padding: 8px; border: 2px solid transparent; background: linear-gradient(#050818, #050818) padding-box, linear-gradient(135deg, #12c8ff, #3d7bff 50%, #7c5cff) border-box; box-shadow: 0 0 70px -18px var(--accent), 0 24px 60px -30px #000; }
.member-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; display: block; filter: saturate(.92) contrast(1.03); }
.member-photo::before, .member-photo::after { content: ""; position: absolute; width: 26px; height: 26px; border: 1px solid var(--accent); pointer-events: none; }
.member-photo::before { top: -14px; left: -14px; border-right: 0; border-bottom: 0; }
.member-photo::after { bottom: -14px; right: -14px; border-left: 0; border-top: 0; }
.member-body h3 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; letter-spacing: -.03em; margin: 8px 0 12px; }
.member-bio { color: var(--dim); max-width: 46ch; }
.socials { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.socials a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); background: rgba(10, 14, 40, .5); backdrop-filter: blur(10px); transition: border-color .3s, background .3s; }
.socials a:hover { border-color: var(--accent); background: rgba(20, 28, 70, .6); }
.socials b { font: 500 12.5px "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.socials span { font-size: 14px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 860px) {
  .vignette { background: linear-gradient(180deg, transparent 25%, rgba(1,2,12,.55) 50%, rgba(1,2,12,.9) 75%); }
  .lead, .big-quote { text-shadow: 0 2px 16px rgba(1,2,12,.9); }
  .hud-top nav, .hud-bottom .live, .hud-bottom #clock { display: none; }
  .hud-bottom { justify-content: center; }
  .scene, .scene.right { justify-content: flex-start; align-items: flex-end; padding-bottom: 80px; }
  .app-panel { padding: 26px; }
  .member { grid-template-columns: 124px minmax(0, 1fr); align-items: end; gap: 18px; }
  .member-photo { padding: 6px; }
  .member-body { display: contents; }
  .member-body > .mono, .member-body > h3 { grid-column: 2; margin: 0; align-self: end; }
  .member-bio, .socials { grid-column: 1 / -1; }
  .member-bio { margin-top: 4px; }

  .socials { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line); }
  .timeline > li { padding: 0 0 32px 24px; }
  .timeline > li::before { top: 6px; left: -5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live::before { animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .btn::before, .btn::after, .progress i { transition: none; }
}
