:root {
  --bg: #0a0a0b;
  --bg-soft: #101013;
  --line: rgba(255, 255, 255, 0.09);
  --text: #ededf0;
  --muted: #8a8a94;
  --accent: #818cf8;
  --accent-2: #22d3ee;
  --radius: 14px;
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #0a0a0b; }

.skip {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 100;
  background: var(--accent);
  color: #0a0a0b;
  padding: 8px 14px;
  border-radius: 8px;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  mix-blend-mode: difference;
}
.cursor__dot,
.cursor__ring {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor__dot {
  width: 6px;
  height: 6px;
  background: #fff;
}
.cursor__ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s;
}
.cursor.is-hover .cursor__ring {
  width: 54px;
  height: 54px;
  border-color: #fff;
}
.cursor.is-down .cursor__ring { width: 24px; height: 24px; }

/* ---------- Spotlight + grid ---------- */
.spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 20%),
    rgba(129, 140, 248, 0.14),
    rgba(34, 211, 238, 0.05) 40%,
    transparent 70%
  );
  transition: background 0.15s linear;
}
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.5;
}

/* ---------- Layout ---------- */
.nav, main, .footer { position: relative; z-index: 1; }

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.nav__brand i { color: var(--accent); font-style: normal; font-weight: 400; }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 0.92rem; }
.nav__links a { color: var(--muted); transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  transition: border-color 0.2s, background 0.2s;
}
.nav__cta:hover { border-color: var(--accent); background: rgba(129, 140, 248, 0.1); }

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 24px;
}
.section__head { margin-bottom: 48px; }
.section__head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section__head p { color: var(--muted); margin-top: 8px; max-width: 46ch; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 24px 60px;
}
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--accent-2);
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}
.hero__title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.hero__title span {
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  margin-top: 26px;
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 52ch;
}
.hero__actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero__meta {
  margin-top: 40px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s;
  will-change: transform;
}
.btn--primary { background: var(--text); color: #0a0a0b; }
.btn--primary:hover { background: #fff; }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.card:hover { border-color: rgba(129, 140, 248, 0.4); transform: translateY(-4px); }
.card__n {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--accent-2);
}
.card h3 { margin: 16px 0 8px; font-size: 1.15rem; font-weight: 600; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Lab list ---------- */
.lab { list-style: none; border-top: 1px solid var(--line); }
.lab__item {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.25s var(--ease), background 0.25s;
}
.lab__item:hover { padding-left: 16px; background: rgba(255, 255, 255, 0.02); }
.lab__name { font-weight: 600; color: inherit; transition: color 0.2s; }
a.lab__name:hover { color: var(--accent-2); }
.lab__arrow { color: var(--muted); font-weight: 400; transition: color 0.2s; }
a.lab__name:hover .lab__arrow { color: var(--accent-2); }
.lab__desc { color: var(--muted); font-size: 0.95rem; }
.lab__tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.lab__tag[data-state="live"] { color: var(--accent-2); border-color: rgba(34, 211, 238, 0.4); }
.lab__tag[data-state="stable"] { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.35); }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}
.steps span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--accent);
}
.steps h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.steps p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact__intro h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.contact__intro p { color: var(--muted); margin-top: 14px; max-width: 40ch; }
.contact__alt a { color: var(--accent-2); }

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
}
.field input,
.field textarea {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  resize: vertical;
}
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form button { align-self: flex-start; margin-top: 4px; }
.form__status { font-size: 0.9rem; min-height: 1.2em; }
.form__status.is-ok { color: #6ee7b7; }
.form__status.is-err { color: #fca5a5; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 60px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer__brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.footer__brand i { color: var(--accent); font-style: normal; font-weight: 400; }

/* ---------- Reveal (only when JS is on, so content never stays hidden) ---------- */
.reveal { transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .cards, .steps { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; gap: 32px; }
  .lab__item { grid-template-columns: 1fr auto; }
  .lab__desc { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .cards, .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 20px; }
  .hero { padding: 40px 20px; }
}

@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .spotlight, .cursor { display: none; }
}
