:root {
  --bg: #050507;
  --surface: #0c0c11;
  --surface-2: #121219;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f7;
  --muted: #8d8d9e;
  --violet: #8b5cf6;
  --blue: #3b6cff;
  --cyan: #22d3ee;
  --lime: #d9ff43;
  --grad: linear-gradient(100deg, #a78bfa 0%, #22d3ee 45%, #d9ff43 100%);
  --display: "Bricolage Grotesque", "Geist", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1240px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 6px; }
::selection { background: var(--lime); color: #000; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

.grad {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite alternate;
  /* il corsivo sporge fuori dal box: spazio extra perché la sfumatura copra
     anche le code delle lettere (es. la "g"), compensato coi margini */
  padding: 0 0.12em 0.12em 0.16em;
  margin: 0 -0.04em -0.12em -0.16em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@keyframes shimmer { to { background-position: 100% 0; } }

/* ---------- Overlays ---------- */
.grain {
  position: fixed; inset: -50%;
  z-index: 100; pointer-events: none;
  opacity: 0.06;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-4%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-2%, -4%); }
}

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }

/* Rocket cursor (desktop only) */
.rocket, .trail { display: none; }
.has-rocket, .has-rocket * { cursor: none !important; }
.has-rocket .rocket {
  display: block;
  position: fixed; top: 0; left: 0; z-index: 102;
  pointer-events: none;
  transform-origin: 14px 0;
  opacity: 0;
  transition: opacity 0.3s;
  filter: drop-shadow(0 0 6px rgba(217, 255, 67, 0.35)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  will-change: transform;
}
.has-rocket .rocket.on { opacity: 1; }
.rocket .thrust { transform-box: fill-box; transform-origin: 50% 0; }
.rocket .flame { transform-box: fill-box; transform-origin: 50% 0; animation: flame 0.09s ease-in-out infinite alternate; }
@keyframes flame { from { transform: scale(0.85, 0.8); } to { transform: scale(1.05, 1.15); } }
.has-rocket .trail {
  display: block;
  position: fixed; inset: 0; z-index: 101;
  width: 100%; height: 100%;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 16px; left: 50%;
  z-index: 50;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 920px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 20px;
  background: rgba(12, 12, 17, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: transform 0.5s var(--ease), background 0.3s;
}
.nav.hidden { transform: translate(-50%, -140%); }
.logo { display: flex; align-items: center; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.logo-mark {
  width: 34px; height: 34px; margin: -6px 8px -6px -6px;
  transition: transform 0.6s var(--ease);
}
.logo:hover .logo-mark { transform: translate(3px, -3px) rotate(-8deg); }
.logo-space, .footer-tagline {
  background: linear-gradient(90deg, #2f9bff, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-tagline { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; }
.boot-logo { display: block; width: 72px; height: 72px; margin: 0 0 18px -8px; animation: fadeUp 0.6s var(--ease) both; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  font-size: 14px; color: var(--muted);
  padding: 8px 14px; border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-cta {
  font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px;
  background: var(--text); color: #000;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--lime); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px;
  padding: 16px 26px; border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s var(--ease), border-color 0.35s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn svg { transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--lime); color: #000; }
.btn-primary::before { background: #fff; }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost::before { background: var(--text); }
.btn-ghost:hover { color: #000; }
.btn-xl { font-size: clamp(18px, 2.4vw, 24px); padding: 22px 36px; }
.btn-xl:hover svg { transform: translate(3px, -3px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: 120px;
  overflow: hidden;
}
.aurora { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.b1 { width: 55vw; height: 55vw; left: -10vw; top: -20vw; background: #5b2bff; animation: float1 18s ease-in-out infinite alternate; }
.b2 { width: 45vw; height: 45vw; right: -12vw; top: 0; background: #0ea5c6; animation: float2 22s ease-in-out infinite alternate; opacity: 0.4; }
.b3 { width: 35vw; height: 35vw; left: 35vw; bottom: -18vw; background: #9dc21a; animation: float3 20s ease-in-out infinite alternate; opacity: 0.22; }
@keyframes float1 { to { transform: translate(18vw, 12vw) scale(1.15); } }
@keyframes float2 { to { transform: translate(-16vw, 14vw) scale(0.9); } }
@keyframes float3 { to { transform: translate(-12vw, -10vw) scale(1.2); } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 55%, var(--bg) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(5, 5, 7, 0.6) 100%);
}
#particles { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }

.hero-content {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  letter-spacing: 0.04em;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  margin: 0 0 28px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--lime);
  animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping { to { transform: scale(3); opacity: 0; } }

.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(46px, 10.5vw, 158px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin: 0;
}
.line { display: block; overflow: hidden; padding: 0 0.1em 0.08em 0.16em; margin: 0 0 -0.08em -0.16em; }
.word { display: inline-block; }
.rotator { display: inline-grid; }
.rotator > span {
  grid-area: 1 / 1;
  white-space: nowrap;
  transform: translateY(105%);
  opacity: 0;
  transition: transform 0.9s var(--ease), opacity 0.6s var(--ease), filter 0.6s;
  filter: blur(8px);
}
.rotator > span.active { transform: none; opacity: 1; filter: none; }
.rotator > span.out { transform: translateY(-105%); opacity: 0; filter: blur(8px); }
.rotator .grad { font-size: 1.08em; letter-spacing: -0.03em; }

.hero-bottom {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap;
  margin-top: 48px;
}
.hero-text { max-width: 440px; color: var(--muted); font-size: clamp(16px, 1.5vw, 18px); margin: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Intro animation (page load) */
.intro { opacity: 0; }
.word.intro { opacity: 1; transform: translateY(110%); }
.loaded .intro { animation: fadeUp 1s var(--ease) forwards; animation-delay: calc(var(--d) * 0.1s + 0.15s); }
.loaded .word.intro { animation: slideUp 1.2s var(--ease) forwards; animation-delay: calc(var(--d) * 0.1s + 0.15s); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { to { transform: none; } }

/* Marquee */
.marquee {
  position: relative; z-index: 2;
  margin-top: clamp(48px, 8vh, 90px);
  padding: 22px 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: flex; align-items: center; gap: 28px; padding-right: 28px;
  font-family: var(--display); font-size: clamp(18px, 2vw, 24px); font-weight: 500;
  color: var(--muted); white-space: nowrap;
}
.marquee-item::after { content: "✦"; font-size: 0.7em; color: var(--lime); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(90px, 14vw, 170px) 0; }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 22px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--lime); }
.h2 {
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 84px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0;
  max-width: 900px;
}
.h2 .grad { font-size: 1.1em; }

/* Statement (scroll-lit) */
.statement {
  font-family: var(--display);
  font-size: clamp(28px, 4.4vw, 60px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 0 clamp(60px, 9vw, 120px);
  max-width: 1100px;
}
.statement .w { opacity: 0.14; transition: opacity 0.4s ease, color 0.4s; }
.statement .w.on { opacity: 1; }
.statement .w.hl.on { color: var(--lime); }

/* Spotlight cards */
.spot {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  --x: -500px; --y: -500px;
}
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(139, 92, 246, 0.16), transparent 45%);
}
.spot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: radial-gradient(320px circle at var(--x) var(--y), rgba(217, 255, 67, 0.7), rgba(34, 211, 238, 0.3) 35%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service { padding: 34px 30px 36px; min-height: 260px; display: flex; flex-direction: column; }
.service-num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.service h3 {
  font-family: var(--display); font-size: clamp(24px, 2.4vw, 30px); font-weight: 650;
  letter-spacing: -0.03em; margin: 0 0 10px; padding-top: 64px;
}
.service p { color: var(--muted); margin: 0; }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  border: 1px solid var(--line); border-radius: 24px;
  overflow: hidden;
}
.stat { padding: 34px 30px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-value {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(48px, 6vw, 80px); line-height: 1; letter-spacing: -0.05em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--muted); margin-top: 8px; font-size: 15px; }

/* Team */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.member { perspective: 900px; }
.member-card {
  height: 100%;
  padding: 30px;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
  will-change: transform;
}
.member-card:hover { transition: transform 0.12s linear; }
.avatar {
  position: relative;
  width: 112px; height: 112px;
  border-radius: 50%;
  margin-bottom: 28px;
  transform: translateZ(40px);
}
.avatar::before {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from var(--a, 0deg), var(--violet), var(--cyan), var(--lime), var(--violet));
  animation: spin 6s linear infinite;
  opacity: 0.85;
}
.avatar-inner {
  position: relative; width: 100%; height: 100%;
  border-radius: 50%; overflow: hidden;
  border: 3px solid var(--surface);
  background: radial-gradient(circle at 30% 25%, #2a2440, var(--surface-2));
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: -0.04em;
}
.avatar-inner img { width: 100%; height: 100%; object-fit: cover; }
.member-role {
  display: inline-block;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  transform: translateZ(25px);
}
.member-role.dev { color: var(--lime); border-color: rgba(217, 255, 67, 0.35); }
.member h3 {
  font-family: var(--display); font-size: 26px; font-weight: 650; letter-spacing: -0.03em;
  margin: 14px 0 0; line-height: 1.15;
  transform: translateZ(30px);
}
.member-links { display: flex; gap: 14px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.member-links a:hover { color: var(--lime); }

/* Projects */
.projects { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.project { position: relative; border-bottom: 1px solid var(--line); }
.project-row {
  position: relative;
  display: grid; grid-template-columns: 70px 1.1fr 1.4fr auto; gap: 24px; align-items: center;
  padding: 36px 8px;
  z-index: 1;
  transition: padding 0.5s var(--ease);
}
.project::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.12), rgba(34, 211, 238, 0.06) 60%, transparent);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.5s var(--ease);
}
.project:hover::before { transform: scaleY(1); }
.project:hover .project-row { padding-left: 24px; padding-right: 24px; }
.project-num { font-family: var(--mono); color: var(--muted); font-size: 14px; }
.project-name {
  font-family: var(--display); font-size: clamp(26px, 3.4vw, 44px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.05;
  margin: 0;
}
.project-desc { color: var(--muted); margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chip { font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); color: var(--text); }
.project-side { display: flex; align-items: center; gap: 18px; justify-self: end; }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.status-live { color: var(--lime); }
.status-dev { color: var(--cyan); }
.status-soon { color: #a78bfa; }
.project-arrow {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  transition: background 0.4s var(--ease), color 0.4s, transform 0.5s var(--ease), border-color 0.4s;
}
.project:hover .project-arrow { background: var(--lime); color: #000; border-color: var(--lime); transform: rotate(-45deg); }
.project-arrow.disabled { opacity: 0.3; }
a.project-link { position: absolute; inset: 0; z-index: 2; }

/* Contact */
.contact { text-align: center; overflow: hidden; }
.contact .eyebrow { justify-content: center; }
.contact-glow {
  position: absolute; left: 50%; top: 55%;
  width: 70vw; height: 40vw; max-width: 1000px; max-height: 560px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(91, 43, 255, 0.35), rgba(14, 165, 198, 0.15) 50%, transparent);
  filter: blur(40px);
  pointer-events: none;
  animation: breathe 7s ease-in-out infinite alternate;
}
@keyframes breathe { to { transform: translate(-50%, -50%) scale(1.15); opacity: 0.7; } }
.contact .container { position: relative; }
.contact-title {
  font-family: var(--display);
  font-size: clamp(54px, 11vw, 170px);
  font-weight: 700; line-height: 0.92; letter-spacing: -0.055em;
  margin: 0 0 48px;
}
.contact-title .grad { font-size: 1.05em; }
.socials { list-style: none; padding: 0; margin: 40px 0 0; display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; color: var(--muted); }
.socials a { position: relative; }
.socials a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.socials a:hover { color: var(--text); }
.socials a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Footer */
.footer { position: relative; overflow: hidden; padding: 0 clamp(16px, 4vw, 48px) 28px; }
.wordmark {
  font-family: var(--display); font-weight: 800;
  font-size: 15.6vw; line-height: 0.8; letter-spacing: -0.06em;
  text-align: center;
  color: rgba(255, 255, 255, 0.035);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.12);
  user-select: none;
  pointer-events: none;
  margin: 0 -2vw 28px;
  white-space: nowrap;
}
.footer-row {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.footer-row a:hover { color: var(--text); }

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Space: warp starfield ---------- */
.space { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }

/* ---------- Planet (hero) ---------- */
.planet-scene {
  position: absolute; z-index: 1;
  right: clamp(16px, 7vw, 140px);
  top: clamp(100px, 15vh, 170px);
  width: clamp(200px, 29vw, 420px);
  aspect-ratio: 1;
  perspective: 1400px;
  pointer-events: none;
  animation: bob 9s ease-in-out infinite alternate;
}
@keyframes bob { to { transform: translateY(-22px); } }
.planet-wrap {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateZ(-18deg);
  transition: transform 1.2s var(--ease);
}
.planet {
  position: absolute; inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 32% 28%, #c4b5fd 0%, #7c4dff 20%, #3b1d9e 46%, #120a33 74%, #05030f 100%);
  box-shadow:
    inset -26px -34px 70px rgba(0, 0, 0, 0.7),
    0 0 90px rgba(124, 77, 255, 0.45),
    0 0 220px rgba(34, 211, 238, 0.14);
}
.planet::before {
  content: ""; position: absolute; inset: -40% -100%;
  background: repeating-linear-gradient(172deg,
    rgba(255, 255, 255, 0.07) 0 4%, transparent 4% 9%,
    rgba(34, 211, 238, 0.07) 9% 11%, transparent 11% 17%);
  animation: bands 40s linear infinite;
}
@keyframes bands { to { transform: translateX(50%); } }
.planet::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 78% 82%, transparent 35%, rgba(0, 0, 0, 0.6) 78%);
}
.ring {
  position: absolute; left: 50%; top: 50%;
  width: 176%; height: 176%; margin: -88% 0 0 -88%;
  border-radius: 50%;
  border: 2px solid rgba(217, 255, 67, 0.6);
  box-shadow:
    0 0 0 9px rgba(167, 139, 250, 0.12),
    0 0 0 20px rgba(34, 211, 238, 0.06),
    0 0 34px rgba(217, 255, 67, 0.25);
  transform: rotateX(76deg);
}
.orbit {
  position: absolute; left: 50%; top: 50%;
  width: 250%; height: 250%; margin: -125% 0 0 -125%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  transform-style: preserve-3d;
  animation: orbit 16s linear infinite;
}
@keyframes orbit {
  from { transform: rotateX(68deg) rotateZ(0deg); }
  to { transform: rotateX(68deg) rotateZ(360deg); }
}
.moon {
  position: absolute; left: 50%; top: -9px;
  width: 18px; height: 18px; margin-left: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #d9ff43 45%, #4f6b00);
  box-shadow: 0 0 22px rgba(217, 255, 67, 0.8);
  animation: moon 16s linear infinite;
}
@keyframes moon {
  from { transform: rotateZ(0deg) rotateX(-68deg); }
  to { transform: rotateZ(-360deg) rotateX(-68deg); }
}

/* ---------- Boot intro ---------- */
.boot {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: var(--bg);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s var(--ease);
}
.boot.done { clip-path: inset(0 0 100% 0); }
.boot-term { width: min(88vw, 470px); font-family: var(--mono); font-size: 14px; color: var(--muted); }
.boot-line { white-space: pre; overflow: hidden; text-overflow: clip; animation: fadeUp 0.35s var(--ease) both; }
.boot-line .ok { color: var(--lime); }
.boot-line .hl { color: var(--text); }
.boot-bar { height: 2px; margin-top: 20px; background: var(--line); border-radius: 2px; overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width 0.3s var(--ease); }
.boot-skip { margin-top: 14px; font-size: 12px; color: rgba(141, 141, 158, 0.6); }

/* ---------- Launch rocket ---------- */
.launch {
  position: fixed; left: 50%; bottom: -170px; z-index: 250;
  width: 84px; margin-left: -42px;
  pointer-events: none;
  animation: launch 1.7s cubic-bezier(0.55, 0, 0.75, 0.2) forwards;
  filter: drop-shadow(0 0 22px rgba(217, 255, 67, 0.55));
}
.launch svg { display: block; width: 84px; height: 138px; position: relative; z-index: 1; }
.launch::after {
  content: ""; position: absolute; left: 50%; top: 88%;
  width: 30px; height: 70vh; margin-left: -15px;
  background: linear-gradient(to bottom, rgba(255, 247, 194, 0.9), rgba(217, 255, 67, 0.55) 12%, rgba(34, 211, 238, 0.2) 45%, transparent);
  filter: blur(7px);
  border-radius: 50% 50% 0 0;
}
@keyframes launch {
  0% { transform: translateY(0); }
  18% { transform: translateY(-8vh); }
  100% { transform: translateY(-150vh); }
}
.shake main { animation: shake 0.55s linear; }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, -1px); }
  80% { transform: translate(2px, 1px); }
}

/* ---------- Terminal ---------- */
.term {
  max-width: 920px;
  background: rgba(10, 10, 15, 0.86);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55), 0 0 80px rgba(91, 43, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.term-bar span { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.term-bar span:nth-child(2) { background: #febc2e; }
.term-bar span:nth-child(3) { background: #28c840; }
.term-bar p { margin: 0 auto; padding-right: 52px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.term-body {
  height: 360px; overflow-y: auto;
  padding: 18px 20px 22px;
  font-family: var(--mono); font-size: 14px; line-height: 1.75;
  cursor: text;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.ln { white-space: pre-wrap; word-break: break-word; min-height: 1.75em; }
.prompt { white-space: nowrap; }
.prompt b { color: var(--lime); font-weight: 500; }
.prompt i { color: var(--cyan); font-style: normal; }
.term-line { display: flex; align-items: center; gap: 10px; }
.term-line input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none; padding: 0;
  color: var(--text); font: inherit;
  caret-color: var(--lime);
}
.c-muted { color: var(--muted); }
.c-lime { color: var(--lime); }
.c-cyan { color: var(--cyan); }
.c-violet { color: #a78bfa; }
.c-red { color: #ff6b6b; }
.ln a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.term-chips button {
  font-family: var(--mono); font-size: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.term-chips button:hover { border-color: var(--lime); color: var(--lime); background: rgba(217, 255, 67, 0.06); }

/* ---------- Gioca: Orbit Run ---------- */
.game-grid { display: grid; grid-template-columns: 1fr auto; gap: clamp(40px, 7vw, 110px); align-items: center; }
.game-text { color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); max-width: 480px; margin: 28px 0; }
.game-text strong { color: var(--text); font-weight: 600; }
.game-keys { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; color: var(--muted); }
kbd {
  display: inline-block;
  font-family: var(--mono); font-size: 12px; line-height: 1;
  padding: 5px 8px; margin-right: 4px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong); border-bottom-width: 3px;
  border-radius: 7px;
}
.game-best { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0; display: flex; align-items: baseline; gap: 12px; }
#game-best {
  font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -0.04em; text-transform: none;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.phone-wrap { perspective: 1600px; animation: phoneFloat 6s ease-in-out infinite alternate; }
@keyframes phoneFloat { to { transform: translateY(-16px); } }
.phone {
  position: relative;
  width: min(330px, 84vw);
  aspect-ratio: 9 / 19;
  padding: 11px;
  border-radius: 54px;
  background: linear-gradient(145deg, #34343f, #0d0d12 38%, #1d1d26 70%, #2c2c36);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.14),
    inset 0 0 0 4px #0a0a0e,
    0 60px 120px rgba(0, 0, 0, 0.65),
    0 0 140px rgba(91, 43, 255, 0.28);
  transform: rotateY(-16deg) rotateX(7deg) rotateZ(1deg);
  transition: transform 0.9s var(--ease), box-shadow 0.6s;
}
.phone:hover, .phone.playing { transform: none; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), inset 0 0 0 4px #0a0a0e, 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 180px rgba(217, 255, 67, 0.22); }
.phone::before, .phone::after {
  content: ""; position: absolute; width: 3px; border-radius: 3px;
  background: linear-gradient(#3a3a46, #1c1c24);
}
.phone::before { right: -3px; top: 150px; height: 84px; }
.phone::after { left: -3px; top: 120px; height: 120px; box-shadow: 0 -50px 0 -1px #2a2a35; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 44px; overflow: hidden; background: #07061a; }
#game { display: block; width: 100%; height: 100%; touch-action: none; -webkit-user-select: none; user-select: none; cursor: pointer; }
.island {
  position: absolute; top: 11px; left: 50%;
  width: 92px; height: 27px; margin-left: -46px;
  border-radius: 20px; background: #000;
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .game-grid { grid-template-columns: 1fr; }
  .phone-wrap { justify-self: center; }
  .phone { transform: none; }
}
@media (max-width: 960px) {
  .planet-scene { width: 38vw; right: -4vw; top: 96px; opacity: 0.75; }
}
@media (max-width: 680px) {
  .planet-scene { width: 52vw; right: -10vw; top: 84px; opacity: 0.6; }
  .term-body { height: 320px; font-size: 13px; padding: 14px; }
  .term-line input { font-size: 16px; }
  .term-bar p { padding-right: 0; }
}
@media (max-width: 960px) {
  .services, .team { grid-template-columns: repeat(2, 1fr); }
  .project-row { grid-template-columns: 50px 1fr auto; }
  .project-info { grid-column: 2 / 4; grid-row: 2; }
  .project-side { grid-column: 3; grid-row: 1; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav { padding: 8px 8px 8px 16px; }
  .services, .team, .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .service { min-height: 0; }
  .service h3 { padding-top: 28px; }
  .hero-bottom { margin-top: 32px; }
  .project-row { grid-template-columns: 1fr auto; padding: 28px 4px; gap: 14px 16px; }
  .project-num { display: none; }
  .project-info { grid-column: 1 / 3; }
  .project-side { grid-column: 2; }
  .project-arrow { width: 44px; height: 44px; }
  .project:hover .project-row { padding-left: 4px; padding-right: 4px; }
  .btn { padding: 14px 22px; }
  .btn-xl { padding: 18px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .intro, .word.intro { opacity: 1; transform: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .rotator > span { transition: none; filter: none; }
  .statement .w { opacity: 1; }
}
