/* Base: fonts, tokens, reset, night-sky background layers, typography, motion primitives. */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/space-grotesk-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-latin.woff2) format('woff2');
}

@property --spin {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg-0: #07061a;
  --bg-1: #0e0c2b;
  --bg-2: #15123a;
  --bg-3: #1c1848;
  --panel: rgba(18, 16, 52, 0.62);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.075);
  --glass-3: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-3: rgba(255, 255, 255, 0.22);
  --ink: #f4f5ff;
  --ink-2: #b7bbe4;
  --ink-3: #8186b3;
  --ink-4: #5d6190;

  --tg: #2aabee;
  --tg-2: #229ed9;
  --tg-ink: #7fd0fa;
  --teal: #5eead4;
  --eth: #627eea;
  --lav: #8a92ff;
  --pink: #f0a8ff;
  --cyan: #7df9ff;
  --ok: #4ade80;
  --ok-ink: #86efac;
  --warn: #fbbf24;
  --warn-ink: #fcd571;
  --bad: #fb7185;
  --burn: #ff8a5c;

  --grad-brand: linear-gradient(135deg, #36b6f3 0%, #2aabee 40%, #229ed9 100%);
  --grad-head: linear-gradient(92deg, #2aabee 0%, #45c6e8 45%, #5eead4 100%);
  --grad-prism: linear-gradient(115deg, #7df9ff 0%, #8a92ff 38%, #f0a8ff 70%, #627eea 100%);
  --grad-card: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022));

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --font-display: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: 24px;
  --hdr-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr-h) + 16px);
  background: var(--bg-0);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-0);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
body.noscroll {
  overflow: hidden;
}
img,
svg,
canvas {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
::selection {
  background: rgba(42, 171, 238, 0.4);
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--tg);
  outline-offset: 3px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- background */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, #1a1650 0%, rgba(26, 22, 80, 0) 60%),
    radial-gradient(90% 60% at 100% 100%, #120f3a 0%, rgba(18, 15, 58, 0) 70%),
    linear-gradient(180deg, #0b0a24 0%, var(--bg-0) 45%, #0a0822 100%);
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.bg-blob.b1 {
  width: 620px;
  height: 620px;
  left: -180px;
  top: -160px;
  background: radial-gradient(circle, rgba(98, 126, 234, 0.75), rgba(98, 126, 234, 0) 70%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.bg-blob.b2 {
  width: 560px;
  height: 560px;
  right: -160px;
  top: 8%;
  background: radial-gradient(circle, rgba(240, 168, 255, 0.45), rgba(240, 168, 255, 0) 70%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.bg-blob.b3 {
  width: 680px;
  height: 680px;
  left: 30%;
  bottom: -320px;
  background: radial-gradient(circle, rgba(42, 171, 238, 0.42), rgba(125, 249, 255, 0) 70%);
  animation: drift3 38s ease-in-out infinite alternate;
}
@keyframes drift1 {
  to {
    transform: translate(140px, 90px) scale(1.12);
  }
}
@keyframes drift2 {
  to {
    transform: translate(-120px, 140px) scale(0.92);
  }
}
@keyframes drift3 {
  to {
    transform: translate(-160px, -80px) scale(1.08);
  }
}

.bg-stars {
  position: absolute;
  inset: -50%;
  background-repeat: repeat;
}
.bg-stars.s1 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='23' cy='41' r='.8' opacity='.7'/%3E%3Ccircle cx='97' cy='12' r='.6' opacity='.5'/%3E%3Ccircle cx='160' cy='88' r='1' opacity='.8'/%3E%3Ccircle cx='245' cy='34' r='.7' opacity='.6'/%3E%3Ccircle cx='331' cy='71' r='.9' opacity='.7'/%3E%3Ccircle cx='395' cy='19' r='.6' opacity='.5'/%3E%3Ccircle cx='54' cy='154' r='.7' opacity='.6'/%3E%3Ccircle cx='128' cy='201' r='.5' opacity='.5'/%3E%3Ccircle cx='211' cy='166' r='.8' opacity='.7'/%3E%3Ccircle cx='288' cy='219' r='.6' opacity='.5'/%3E%3Ccircle cx='372' cy='176' r='1.1' opacity='.9'/%3E%3Ccircle cx='18' cy='274' r='.6' opacity='.5'/%3E%3Ccircle cx='91' cy='322' r='.9' opacity='.8'/%3E%3Ccircle cx='183' cy='287' r='.6' opacity='.6'/%3E%3Ccircle cx='254' cy='351' r='.7' opacity='.6'/%3E%3Ccircle cx='339' cy='306' r='.5' opacity='.5'/%3E%3Ccircle cx='404' cy='388' r='.8' opacity='.7'/%3E%3Ccircle cx='60' cy='402' r='.6' opacity='.5'/%3E%3Ccircle cx='146' cy='379' r='.5' opacity='.4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 420px 420px;
  opacity: 0.55;
  animation: twinkle 7s ease-in-out infinite alternate;
}
.bg-stars.s2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640'%3E%3Cg fill='%23cfd6ff'%3E%3Ccircle cx='71' cy='93' r='1.2' opacity='.9'/%3E%3Ccircle cx='301' cy='47' r='1' opacity='.8'/%3E%3Ccircle cx='522' cy='130' r='1.3' opacity='.9'/%3E%3Ccircle cx='190' cy='281' r='.9' opacity='.7'/%3E%3Ccircle cx='447' cy='336' r='1.2' opacity='.85'/%3E%3Ccircle cx='609' cy='452' r='.9' opacity='.7'/%3E%3Ccircle cx='96' cy='503' r='1.1' opacity='.8'/%3E%3Ccircle cx='338' cy='588' r='1' opacity='.75'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 640px 640px;
  opacity: 0.45;
  animation: twinkle 11s ease-in-out -4s infinite alternate, starDrift 160s linear infinite;
}
@keyframes twinkle {
  0% {
    opacity: 0.25;
  }
  100% {
    opacity: 0.7;
  }
}
@keyframes starDrift {
  to {
    transform: translate3d(-320px, 160px, 0);
  }
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(138, 146, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 146, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 0%, transparent 75%);
}
.bg-grain {
  position: absolute;
  inset: -100px;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- layout + type */

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.view {
  flex: 1;
  outline: none;
  min-height: 60vh;
}
.page {
  padding: 40px 0 96px;
}
.page-head {
  display: grid;
  gap: 14px;
  margin-bottom: 36px;
  max-width: 760px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tg-ink);
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.h1 {
  font: 700 clamp(36px, 5.4vw, 64px) / 1.02 var(--font-display);
  letter-spacing: -0.035em;
}
.h2 {
  font: 700 clamp(30px, 4vw, 48px) / 1.06 var(--font-display);
  letter-spacing: -0.03em;
}
.h3 {
  font: 600 22px/1.2 var(--font-display);
  letter-spacing: -0.015em;
}
.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 62ch;
}
.muted {
  color: var(--ink-3);
}
.mono {
  font-family: var(--font-mono);
}
.grad-text {
  background: var(--grad-head);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.prism-text {
  background: var(--grad-prism);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: prismShift 8s ease-in-out infinite alternate;
}
@keyframes prismShift {
  to {
    background-position: 100% 0;
  }
}
.section {
  padding: 96px 0;
  position: relative;
}
.section-head {
  display: grid;
  gap: 14px;
  margin-bottom: 44px;
  max-width: 720px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  justify-items: center;
}
.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- motion */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease),
    filter 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}
.view.leaving {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}
.view.entering {
  animation: viewIn 0.5s var(--ease) both;
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes spin {
  to {
    --spin: 360deg;
  }
}
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.85);
    opacity: 0.55;
  }
}
@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  80%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes shimmer {
  from {
    background-position: -200% 0;
  }
  to {
    background-position: 200% 0;
  }
}
.skel {
  display: inline-block;
  min-width: 60px;
  height: 1em;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  vertical-align: middle;
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
    --hdr-h: 60px;
  }
  .section {
    padding: 64px 0;
  }
  .page {
    padding: 24px 0 72px;
  }
  .bg-blob {
    filter: blur(70px);
    opacity: 0.45;
  }
  .bg-blob.b1 {
    width: 380px;
    height: 380px;
  }
  .bg-blob.b2 {
    width: 340px;
    height: 340px;
  }
  .bg-blob.b3 {
    width: 420px;
    height: 420px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
