:root {
  --bg: #060608;
  --bg-elev: #0C0C10;
  --fg: #F4F4F6;
  --muted: #9A9AA6;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, 'SF Mono', monospace;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;

  --radius: 20px;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header */

.site-header {
  padding: var(--space-3) 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand .domain { color: var(--muted); }

.site-header nav a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* Hero */

.hero {
  padding: var(--space-6) 0 var(--space-5);
  position: relative;
  overflow: clip;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(42% 55% at 30% 20%, rgba(78, 91, 255, 0.16), transparent 70%),
    radial-gradient(38% 50% at 72% 12%, rgba(255, 77, 216, 0.10), transparent 70%);
  pointer-events: none;
}

/* Scroll parallax — the aurora lags behind the headline and dims as the
   hero leaves. Scroll-driven animation stays off the main thread; browsers
   without animation-timeline keep the static aurora. */
@supports (animation-timeline: scroll()) {
  .hero::before {
    animation: aurora-drift linear both;
    animation-timeline: scroll(root);
    animation-range: 0 600px;
  }
}

@keyframes aurora-drift {
  to { transform: translate3d(0, 14%, 0); opacity: 0.45; }
}

.hero .wrap { position: relative; }

.kicker {
  margin: 0 0 var(--space-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.lede {
  margin: var(--space-3) 0 0;
  max-width: 34rem;
  font-size: 17px;
  color: var(--muted);
}

/* Cards */

.grid-section { padding: var(--space-4) 0 var(--space-6); }

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: clip;
  transition: transform var(--transition), border-color var(--transition);
  /* backwards, not both: a forwards fill keeps the final keyframe's
     transform winning over the :hover lift after the entrance ends. */
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.11s; }
.card:nth-child(3) { animation-delay: 0.17s; }
.card:nth-child(4) { animation-delay: 0.23s; }
.card:nth-child(5) { animation-delay: 0.29s; }
.card:nth-child(6) { animation-delay: 0.35s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.card > a {
  display: block;
  text-decoration: none;
  height: 100%;
}

.art {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: clip;
  border-bottom: 1px solid var(--line);
}

.art::before {
  content: '';
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(45% 55% at 38% 42%, color-mix(in srgb, var(--g1) 55%, transparent), transparent 72%),
    radial-gradient(50% 60% at 66% 62%, color-mix(in srgb, var(--g2) 42%, transparent), transparent 72%);
  filter: saturate(1.2);
  /* Pointer parallax rides the separate translate property, so per-frame
     updates from motion.js bypass the 600ms transform transition below. */
  translate: var(--bloom-x, 0px) var(--bloom-y, 0px);
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover .art::before { transform: scale(1.12); }

.art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 30%);
}

.glyph {
  position: relative;
  width: 44px;
  height: 44px;
  color: var(--fg);
  opacity: 0.92;
  /* Counter-move against the bloom for depth; set by motion.js. */
  translate: var(--glyph-x, 0px) var(--glyph-y, 0px);
}

.body { padding: var(--space-3); }

.meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.body p {
  margin: var(--space-1) 0 0;
  font-size: 14.5px;
  color: var(--muted);
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.status.live { color: #7CE7B4; }
.status.live .dot { background: #7CE7B4; box-shadow: 0 0 8px rgba(124, 231, 180, 0.6); }

.status.pending { color: #E7C97C; }
.status.pending .dot {
  background: #E7C97C;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-4) 0;
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.site-footer a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* Responsive */

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
  .hero { padding: var(--space-5) 0 var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .status.pending .dot { animation: none; }
  .card, .card:hover .art::before { transition: none; transform: none; }
  .hero::before { animation: none; }
  .art::before, .glyph { translate: none; }
}
