:root {
  --bg: #05060f;
  --bg-2: #0a0c1d;
  --panel: rgba(17, 20, 48, 0.55);
  --line: rgba(140, 150, 255, 0.14);
  --line-strong: rgba(140, 150, 255, 0.3);
  --text: #e8eaff;
  --muted: #9097c8;
  --cyan: #22d3ee;
  --violet: #a855f7;
  --pink: #f472b6;
  --grad: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--pink));
  --radius: 18px;
  --sans: "Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: min(1180px, calc(100% - 40px));
}

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

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

body {
  margin: 0;
  background: radial-gradient(1200px 700px at 80% -10%, rgba(168, 85, 247, 0.16), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(34, 211, 238, 0.1), transparent 60%), var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

::selection { background: var(--violet); color: #fff; }

#space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--wrap);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 10, 26, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled { background: rgba(8, 10, 26, 0.82); border-color: var(--line-strong); }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.logo b { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo svg { animation: spin 18s linear infinite; }
.tagline {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 12px;
  margin-left: 2px;
  border-left: 1px solid var(--line-strong);
  line-height: 1.2;
}

.links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.links a:not(.btn) { color: var(--muted); transition: color 0.2s; }
.links a:not(.btn):hover { color: var(--text); }

.nav-right { display: none; align-items: center; gap: 8px; margin-left: 18px; }

.burger { display: none; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, top 0.3s; }
.burger span:first-child { top: 15px; }
.burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s, border-color 0.2s, background 0.2s;
  font-family: inherit;
  color: var(--text);
  background: transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 14px; background: rgba(255, 255, 255, 0.06); }
.btn-sm:hover { border-color: var(--cyan); }
.btn-ghost:hover { border-color: var(--cyan); background: rgba(34, 211, 238, 0.06); }
.btn-glow {
  position: relative;
  border: 0;
  color: #050614;
  background: var(--grad);
  background-size: 200% 100%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 10px 40px -10px rgba(168, 85, 247, 0.7), 0 0 30px -5px rgba(34, 211, 238, 0.5);
  animation: shift 6s ease infinite;
}
.btn-glow:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 16px 50px -8px rgba(168, 85, 247, 0.9), 0 0 50px -5px rgba(34, 211, 238, 0.7); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 130px 0 100px;
}
.hero-inner { width: var(--wrap); margin: 0 auto; position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 12, 30, 0.5);
  backdrop-filter: blur(6px);
  margin: 0 0 28px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 12px #34d399; animation: pulse 2s infinite; }

h1 {
  font-size: clamp(44px, 8.2vw, 108px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 700;
  margin: 0 0 28px;
  max-width: 14ch;
}
@media (min-width: 761px) { .type-wrap { white-space: nowrap; } }
.caret { color: var(--cyan); font-weight: 400; animation: blink 1s steps(1) infinite; margin-left: 4px; }

.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); max-width: 58ch; margin: 0 0 40px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }

.orbit-wrap {
  position: absolute;
  right: max(-120px, calc((100vw - 1180px) / 2 - 160px));
  top: 50%;
  width: min(620px, 60vw);
  aspect-ratio: 1;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}
.planet {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #b3f5ff 0%, #22d3ee 18%, #7c3aed 55%, #1e1145 80%);
  box-shadow: 0 0 80px 10px rgba(124, 58, 237, 0.45), 0 0 200px 40px rgba(34, 211, 238, 0.18), inset -30px -40px 80px rgba(0, 0, 0, 0.6);
  animation: float 8s ease-in-out infinite;
}
.ring {
  position: absolute;
  border: 1px solid rgba(140, 150, 255, 0.22);
  border-radius: 50%;
  animation: spin linear infinite;
}
.ring.r1 { inset: 20%; animation-duration: 22s; }
.ring.r2 { inset: 8%; animation-duration: 36s; animation-direction: reverse; border-style: dashed; }
.ring.r3 { inset: -4%; animation-duration: 60s; border-color: rgba(34, 211, 238, 0.12); }
.sat {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font: 600 12px var(--mono);
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--text);
  background: rgba(15, 18, 45, 0.85);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.35);
}

.grid-floor {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: -2px;
  height: 46%;
  background-image: linear-gradient(rgba(168, 85, 247, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.28) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  animation: grid 3s linear infinite;
  z-index: 0;
  opacity: 0.55;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  z-index: 3;
}
.scroll-hint span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--cyan);
  animation: scroll 1.8s ease-in-out infinite;
}

/* ---------- STATS ---------- */
.stats {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.stat { padding: 30px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b {
  display: block;
  font-size: clamp(34px, 4vw, 50px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 10px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat > span { color: var(--muted); font-size: 15px; }

/* ---------- SECTIONS ---------- */
.section { width: var(--wrap); margin: 0 auto; padding: 130px 0 0; }
.section-head { margin-bottom: 56px; max-width: 760px; }
.kicker { color: var(--cyan); font-size: 13px; letter-spacing: 0.04em; margin: 0 0 14px; text-transform: lowercase; }
h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1.04; letter-spacing: -0.04em; margin: 0; font-weight: 700; }
h3 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 10px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  --x: 50%;
  --y: 50%;
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), border-color 0.3s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(34, 211, 238, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(260px circle at var(--x) var(--y), rgba(168, 85, 247, 0.9), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); }
.card:hover::before,
.card:hover::after { opacity: 1; }
.card p { color: var(--muted); margin: 0 0 20px; font-size: 16px; }

.icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.16));
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 30px -8px rgba(34, 211, 238, 0.5);
}
.icon svg { width: 26px; height: 26px; fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: #c4c9f2; background: rgba(255, 255, 255, 0.03); }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: 27px;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
  opacity: 0.5;
}
.step { position: relative; padding-top: 76px; }
.step .num {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  font-size: 15px;
  box-shadow: 0 0 0 6px var(--bg), 0 0 30px -4px rgba(34, 211, 238, 0.5);
}
.step p { color: var(--muted); margin: 0; font-size: 16px; }

/* marquee */
.stack .section-head { margin-bottom: 40px; }
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  padding: 8px 0;
}
.track { display: flex; gap: 14px; width: max-content; animation: marquee 50s linear infinite; }
.marquee.reverse .track { animation-direction: reverse; animation-duration: 60s; }
.marquee:hover .track { animation-play-state: paused; }
.track span {
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: #c9cdf5;
  white-space: nowrap;
}

/* ---------- CONTACT ---------- */
.contact { padding-bottom: 120px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-info h2 { margin-bottom: 20px; }
.contact-info .lead { margin-bottom: 28px; }
.mail-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  transition: border-color 0.2s, box-shadow 0.3s;
}
.mail-link svg { fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linejoin: round; }
.mail-link:hover { border-color: var(--cyan); box-shadow: 0 0 30px -6px rgba(34, 211, 238, 0.6); }

.terminal {
  margin-top: 32px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(5, 6, 18, 0.8);
  overflow: hidden;
  font-size: 13px;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; font-size: 12px; }
.terminal pre { margin: 0; padding: 16px; min-height: 150px; color: #b9c0f0; white-space: pre-wrap; line-height: 1.7; }
.terminal .ok { color: #34d399; }
.terminal .cy { color: var(--cyan); }

.form {
  padding: 34px;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(25, 28, 70, 0.7), rgba(10, 12, 32, 0.7));
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 120px -40px rgba(124, 58, 237, 0.55);
  display: grid;
  gap: 18px;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span,
.field legend { font-size: 14px; color: var(--muted); font-weight: 500; padding: 0; }
input,
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(5, 6, 18, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { resize: vertical; min-height: 130px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: var(--bg-2); }
input::placeholder,
textarea::placeholder { color: #5b6194; }
input:focus,
select:focus,
textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12); }
.field.invalid input,
.field.invalid textarea { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.12); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 8px; width: 100%; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label span {
  display: inline-block;
  font-size: 14px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(5, 6, 18, 0.5);
  color: #c4c9f2;
  transition: all 0.2s;
}
.chips label:hover span { border-color: var(--line-strong); }
.chips input:checked + span { color: #050614; background: var(--grad); border-color: transparent; font-weight: 600; }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.4); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.submit { width: 100%; padding: 17px; font-size: 17px; margin-top: 4px; }
.submit .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(5, 6, 20, 0.3); border-top-color: #050614; animation: spin 0.7s linear infinite; }
.submit.loading .spinner { display: inline-block; }
.submit.loading { pointer-events: none; opacity: 0.85; }
.status { margin: 0; min-height: 1.4em; font-size: 14px; text-align: center; }
.status.ok { color: #34d399; }
.status.err { color: var(--pink); }

/* ---------- FOOTER ---------- */
.footer {
  width: var(--wrap);
  margin: 0 auto;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.footer p { margin: 0; }
.footer a:hover { color: var(--cyan); }
.logo.small { font-size: 17px; color: var(--text); }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(26px); filter: blur(6px); transition: opacity 0.9s cubic-bezier(.2,.8,.2,1), transform 0.9s cubic-bezier(.2,.8,.2,1), filter 0.9s; }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- KEYFRAMES ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: 0.4; } }
@keyframes shift { 50% { background-position: 100% 0; } }
@keyframes grid { to { background-position: 0 60px; } }
@keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .timeline::before { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .orbit-wrap { opacity: 0.45; right: -30%; width: 90vw; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --wrap: calc(100% - 32px); }
  body { font-size: 16px; }
  .burger { display: block; }
  .nav-right { display: flex; }
  .nav .tagline { display: none; }
  .nav { border-radius: 22px; flex-wrap: wrap; }
  .links {
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s;
  }
  .nav.open .links { max-height: 320px; padding: 14px 0 6px; }
  .links a { padding: 10px 6px; font-size: 17px; }
  .links .btn { margin-top: 6px; }
  .hero { padding-top: 120px; }
  .orbit-wrap { top: 22%; right: -45%; width: 120vw; opacity: 0.35; }
  .cards,
  .timeline,
  .row { grid-template-columns: 1fr; }
  .section { padding-top: 100px; }
  .form { padding: 22px; border-radius: 20px; }
  .stat { padding: 22px 18px; }
  .footer { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
