Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

2.3 KB
Raw Blame
'use client'

import { useReducedMotion } from 'motion/react'
import { useTheme } from 'next-themes'
import { useEffect, useState } from 'react'
import UnicornScene from 'unicornstudio-react/next'

export function StateOfStartupsAuroraHeader() {
  const [shaderLoaded, setShaderLoaded] = useState(false)
  const prefersReducedMotion = useReducedMotion()

  return (
    <header
      className="relative w-full overflow-hidden min-h-[26rem] md:min-h-[50vh]"
      style={{ background: 'var(--background-alternative-default)' }}
    >
      {/* Aurora shader scene — hidden when user prefers reduced motion */}
      {!prefersReducedMotion && (
        <div aria-hidden="true" className="absolute inset-0">
          <UnicornScene
            jsonFilePath={'/images/state-of-startups/aurora-dithered-shader.json'}
            width="100%"
            height="100%"
            className="w-full h-full"
            dpi={1.5}
            fps={24}
            onLoad={() => setShaderLoaded(true)}
          />
        </div>
      )}

      {/* Placeholder — visible until shader loads, fades out on load */}
      <div
        aria-hidden="true"
        className="absolute inset-0 pointer-events-none transition-opacity [transition-duration:1200ms]"
        style={{
          opacity: shaderLoaded ? 0 : 1,
          background: 'var(--background-alternative-default)',
        }}
      />

      <div
        aria-hidden="true"
        className="absolute inset-0 pointer-events-none"
        style={{
          background:
            'linear-gradient(to top, var(--background-alternative-default) 0%, oklch(from var(--background-alternative-default) l c h / 0.9) 15%, transparent 90%)',
        }}
      />

      {/* Content — constrained to default container */}
      <div className="relative z-10 max-w-240 mx-auto px-8 pt-20 flex flex-col gap-4 justify-end pb-16 md:pb-18 min-h-[26rem] md:min-h-[50vh]">
        <p className="font-mono uppercase tracking-wide text-sm text-foreground-light">
          Supabase Presents
        </p>
        <h1 className="text-5xl md:text-6xl xl:text-8xl font-light text-foreground leading-[0.92] tracking-tight">
          The State
          <br />
          of Startups <span className="text-brand-500 dark:text-primary font-medium">2026</span>
        </h1>
      </div>
    </header>
  )
}