:root {
  --bg: #0a0a0b;
  --surface: #131316;
  --border: #232328;
  --text: #ededed;
  --muted: #8a8a90;
  --accent: #a5a6f6;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient background: drifting aurora, flowing grid, cursor spotlight, film grain */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg .orb {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  will-change: transform;
}

.bg .orb-1 {
  top: -25vmax;
  left: -10vmax;
  background: radial-gradient(circle, #6d6ef5, transparent 65%);
  animation: drift-1 32s ease-in-out infinite alternate;
}

.bg .orb-2 {
  top: 10vh;
  right: -25vmax;
  background: radial-gradient(circle, #3b9fc4, transparent 65%);
  opacity: 0.2;
  animation: drift-2 38s ease-in-out infinite alternate;
}

.bg .orb-3 {
  bottom: -30vmax;
  left: 25vw;
  background: radial-gradient(circle, #a35fd6, transparent 65%);
  opacity: 0.18;
  animation: drift-3 44s ease-in-out infinite alternate;
}

.bg .grid {
  position: absolute;
  inset: -64px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  animation: grid-flow 24s linear infinite;
}

.bg .spot {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--x, 50%) var(--y, 35%),
    rgba(165, 166, 246, 0.07),
    transparent 60%
  );
  transition: opacity 0.6s ease;
}

.bg .grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  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");
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.brand svg {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
}

.nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav a[aria-current="page"] {
  color: var(--text);
}

/* Main */
main {
  flex: 1;
  display: flex;
  align-items: center;
}

.hero {
  padding-block: clamp(3rem, 10vh, 6rem);
}

/* Staggered entrance */
.hero > * {
  animation: fade-up 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero > :nth-child(2) { animation-delay: 0.12s; }
.hero > :nth-child(3) { animation-delay: 0.24s; }
.hero > :nth-child(4) { animation-delay: 0.36s; }
.hero > :nth-child(5) { animation-delay: 0.48s; }
.hero > :nth-child(n + 6) { animation-delay: 0.6s; }

/* Slow light sweep across the headline */
.shine {
  background: linear-gradient(
    110deg,
    var(--text) 0%,
    var(--text) 40%,
    #ffffff 47%,
    var(--accent) 50%,
    #ffffff 53%,
    var(--text) 60%,
    var(--text) 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sheen 7s ease-in-out 1.2s infinite;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0.6rem var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

h1 {
  margin: 1.5rem 0 1rem;
  font-size: clamp(2.4rem, 7vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}

h1 .dim {
  color: var(--muted);
}

.lead {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}

.lead strong {
  color: var(--text);
  font-weight: 500;
}

.prose {
  max-width: 40rem;
}

.prose h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.prose p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.prose a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.prose a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Footer */
.site-footer .wrap {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}

@keyframes sheen {
  0% { background-position: 100% 0; }
  45%, 100% { background-position: 0% 0; }
}

@keyframes grid-flow {
  to { transform: translate3d(64px, 64px, 0); }
}

@keyframes drift-1 {
  to { transform: translate3d(18vw, 12vh, 0) scale(1.15); }
}

@keyframes drift-2 {
  to { transform: translate3d(-16vw, 18vh, 0) scale(0.9); }
}

@keyframes drift-3 {
  to { transform: translate3d(-12vw, -14vh, 0) scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
