/* Hero: a grid of keycaps lit by a flashlight that follows the pointer, with the headline on top. */

.hero {
  position: relative;
  height: clamp(640px, calc(100svh - var(--header-h)), 880px);
  overflow: hidden;
  --mx: 72%;
  --my: 28%;
}

.hero-keys {
  position: absolute;
  inset: 16px 16px 0;
  display: grid;
  grid-template-columns: repeat(var(--cols, 18), minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.key {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--key);
  box-shadow: 0 6px 0 var(--key-edge);
  color: var(--key-label);
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.key.is-down {
  background: var(--accent);
  box-shadow: 0 2px 0 var(--accent-side);
  transform: translateY(4px);
  color: #fff;
  font-weight: 800;
}

.hero-lamp,
.hero-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Flashlight: a blue glow around the pointer over a dim (not black) keyboard. */
.hero-lamp {
  background:
    radial-gradient(circle 320px at var(--mx) var(--my), rgba(61, 123, 255, 0.22) 0%, rgba(61, 123, 255, 0) 70%),
    radial-gradient(circle 420px at var(--mx) var(--my), rgba(14, 13, 20, 0) 0%, rgba(14, 13, 20, 0.35) 55%, rgba(14, 13, 20, 0.6) 100%);
}

/* Keeps the centred headline readable and blends the keyboard into the page at the bottom. */
.hero-fade {
  background:
    radial-gradient(ellipse 760px 380px at 50% 50%, rgba(14, 13, 20, 0.88) 0%, rgba(14, 13, 20, 0.55) 55%, rgba(14, 13, 20, 0) 100%),
    linear-gradient(180deg, rgba(14, 13, 20, 0) 70%, var(--bg) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding-inline: var(--gutter);
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  padding: 8px 16px;
  border: 1px solid rgba(61, 123, 255, 0.35);
  border-radius: 999px;
  background: rgba(61, 123, 255, 0.10);
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #C9D6FF;
}

.hero-title {
  margin: 0;
  max-width: 1100px;
  font-size: clamp(46px, 7.6vw, 116px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.hero-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 20px;
  margin: 0;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column;
  padding: 0 36px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
}

.stat dd {
  order: -1;
  margin: 0;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat dt {
  font-size: 15px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero-fade {
    background: radial-gradient(ellipse 120% 60% at 50% 50%, rgba(14, 13, 20, 0.9) 0%, rgba(14, 13, 20, 0.6) 60%, rgba(14, 13, 20, 0.2) 100%);
  }

  .hero-content {
    gap: 28px;
  }

  .stat {
    padding: 0 18px;
  }

  .stat:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .stat dd {
    font-size: 34px;
  }

  .stat dt {
    font-size: 13px;
  }
}
