:root {
  --bg: #05070d;
  --fg: #e8ecf5;
  --muted: #8a93a8;
  --line: rgba(140, 170, 255, 0.14);
  --cyan: #46e6ff;
  --violet: #8b5cff;
  --card: rgba(14, 18, 30, 0.55);
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 5vw, 64px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: var(--mono);
}

/* ---------- Background layers ---------- */

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

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 75% 35%, rgba(70, 230, 255, 0.10), transparent 70%),
    radial-gradient(50% 50% at 15% 90%, rgba(139, 92, 255, 0.10), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
  opacity: 0.55;
}

.backdrop::after {
  /* slow scanning line */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 140px;
  top: -140px;
  background: linear-gradient(to bottom, transparent, rgba(70, 230, 255, 0.07), transparent);
  animation: scan 9s linear infinite;
}

@keyframes scan {
  to { transform: translateY(calc(100vh + 140px)); }
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(5, 7, 13, 0.8), rgba(5, 7, 13, 0));
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 14px;
}

.mark {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(70, 230, 255, 0.5);
}

.mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--cyan);
}

.nav nav {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  font-size: 14px;
  color: var(--muted);
}

.nav nav a {
  transition: color 0.2s;
}

.nav nav a:hover {
  color: var(--fg);
}

/* ---------- Layout ---------- */

main {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px var(--gutter) 80px;
  max-width: 1280px;
  margin: 0 auto;
}

h1 {
  margin: 0;
  font-size: clamp(56px, 11vw, 148px);
  line-height: 0.92;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.grad {
  background: linear-gradient(100deg, var(--cyan) 0%, #9fb4ff 45%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 34ch;
  margin: 32px 0 0;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 300;
  color: var(--muted);
}

.actions {
  margin-top: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid rgba(70, 230, 255, 0.4);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  background: rgba(70, 230, 255, 0.06);
  transition: background 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.btn:hover {
  background: rgba(70, 230, 255, 0.14);
  border-color: var(--cyan);
  box-shadow: 0 0 32px rgba(70, 230, 255, 0.25);
}

.btn span {
  transition: transform 0.25s;
}

.btn:hover span {
  transform: translateX(4px);
}

.readout {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 72px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.readout b {
  color: var(--fg);
  font-weight: 500;
  margin-left: 6px;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 120px var(--gutter);
}

.label {
  margin: 0 0 40px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  padding: 36px 32px 40px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.card::before {
  /* glow that follows the cursor */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgba(70, 230, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  border-color: rgba(70, 230, 255, 0.35);
  transform: translateY(-4px);
}

.card:hover::before {
  opacity: 1;
}

.card .num {
  font-size: 12px;
  color: var(--cyan);
}

.card h2 {
  margin: 48px 0 10px;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Contact ---------- */

.contact h2 {
  margin: 0;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.email {
  display: inline-block;
  margin-top: 28px;
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--cyan);
  border-bottom: 1px solid rgba(70, 230, 255, 0.3);
  padding-bottom: 4px;
  transition: border-color 0.2s;
}

.email:hover {
  border-color: var(--cyan);
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .card h2 {
    margin-top: 28px;
  }

  .section {
    padding: 88px var(--gutter);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .backdrop::after {
    animation: none;
  }
}
