body {
  background-color: var(--bg, #030303);
  color: var(--text, #ffffff);
  -webkit-font-smoothing: antialiased;
}

/* Local hero scene — used when Unicorn Studio project cannot load */
.hero-bg-fallback {
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(56, 189, 248, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, #050505 0%, #030303 45%, #020617 100%);
  pointer-events: none;
}

.hero-bg-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 60% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, black 20%, transparent 70%);
  animation: hero-grid-drift 28s linear infinite;
}

.hero-bg-fallback::after {
  content: "";
  position: absolute;
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  top: 18%;
  right: 8%;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow:
    0 0 0 40px rgba(56, 189, 248, 0.04),
    0 0 80px rgba(56, 189, 248, 0.15),
    inset 0 0 60px rgba(56, 189, 248, 0.08);
  animation: hero-orbit-pulse 6s ease-in-out infinite;
}

@keyframes hero-grid-drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(72px);
  }
}

@keyframes hero-orbit-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

/* When Unicorn fails / times out, keep fallback dominant */
body.unicorn-fallback [data-unicorn-root] {
  opacity: 0;
  pointer-events: none;
}

body.unicorn-ready .hero-bg-fallback {
  opacity: 0.35;
}

[data-theme="light"] .hero-bg-fallback {
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(2, 132, 199, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 50%, #e2e8f0 100%);
}

[data-theme="light"] .hero-bg-fallback::before {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

[data-theme="light"] .hero-bg-fallback::after {
  border-color: rgba(2, 132, 199, 0.25);
  box-shadow:
    0 0 0 40px rgba(2, 132, 199, 0.04),
    0 0 80px rgba(2, 132, 199, 0.12),
    inset 0 0 60px rgba(2, 132, 199, 0.06);
}

.text-glow {
  text-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

.grid-bg {
  background-size: 100px 200px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.monotone-logo {
  filter: grayscale(100%) brightness(150%) contrast(0.5);
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.monotone-logo:hover {
  opacity: 1;
  filter: grayscale(100%) brightness(200%);
}

.beam-line {
  stroke-dasharray: 80 1000;
  stroke-linecap: round;
}

@keyframes sonar-wave {
  0% {
    r: 10px;
    opacity: 0.8;
    stroke-width: 1px;
  }
  100% {
    r: 80px;
    opacity: 0;
    stroke-width: 0px;
  }
}

.animate-sonar {
  animation: sonar-wave 3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.delay-1000 {
  animation-delay: 1s;
}

.delay-2000 {
  animation-delay: 2s;
}

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

@property --gradient-angle-offset {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --gradient-percent {
  syntax: "<percentage>";
  initial-value: 20%;
  inherits: false;
}

@property --gradient-shine {
  syntax: "<color>";
  initial-value: #38bdf8;
  inherits: false;
}

.shiny-cta {
  --gradient-angle: 0deg;
  --gradient-angle-offset: 0deg;
  --gradient-percent: 20%;
  --gradient-shine: #38bdf8;
  --shadow-size: 2px;
  position: relative;
  overflow: hidden;
  border-radius: 9999px;
  padding: 1.25rem 2.5rem;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 500;
  color: #ffffff;
  background:
    linear-gradient(#030303, #030303) padding-box,
    conic-gradient(
      from calc(var(--gradient-angle) - var(--gradient-angle-offset)),
      transparent 0%,
      #0ea5e9 5%,
      var(--gradient-shine) 15%,
      #0ea5e9 30%,
      transparent 40%,
      transparent 100%
    )
    border-box;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px #1a1818;
  outline: none;
  transition:
    --gradient-angle-offset 800ms cubic-bezier(0.25, 1, 0.5, 1),
    --gradient-percent 800ms cubic-bezier(0.25, 1, 0.5, 1),
    --gradient-shine 800ms cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.3s;
  cursor: pointer;
  isolation: isolate;
  outline-offset: 4px;
  font-family: "Inter", "Helvetica Neue", sans-serif;
  z-index: 0;
  animation: border-spin 2.5s linear infinite;
}

@keyframes border-spin {
  to {
    --gradient-angle: 360deg;
  }
}

.shiny-cta:active {
  transform: translateY(1px);
}

.shiny-cta::before {
  content: "";
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  --size: calc(100% - 6px);
  --position: 2px;
  --space: 4px;
  width: var(--size);
  height: var(--size);
  background: radial-gradient(
    circle at var(--position) var(--position),
    white 0.5px,
    transparent 0
  )
  padding-box;
  background-size: var(--space) var(--space);
  background-repeat: space;
  mask-image: conic-gradient(
    from calc(var(--gradient-angle) + 45deg),
    black,
    transparent 10% 90%,
    black
  );
  border-radius: inherit;
  opacity: 0.4;
}

.shiny-cta::after {
  content: "";
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(-50deg, transparent, #0ea5e9, transparent);
  mask-image: radial-gradient(circle at bottom, transparent 40%, black);
  opacity: 0.6;
  animation: shimmer 4s linear infinite;
  animation-play-state: running;
}

.shiny-cta span {
  position: relative;
  z-index: 2;
  display: inline-block;
}

.shiny-cta span::before {
  content: "";
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  --size: calc(100% + 1rem);
  width: var(--size);
  height: var(--size);
  box-shadow: inset 0 -1ex 2rem 4px #0ea5e9;
  opacity: 0;
  border-radius: inherit;
  transition: opacity 800ms cubic-bezier(0.25, 1, 0.5, 1);
  animation: breathe 4.5s linear infinite;
}

@keyframes shimmer {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

[style*="--border-gradient"]::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: var(--border-radius-before, inherit);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background: var(--border-gradient);
  pointer-events: none;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  animation: marquee 40s linear infinite;
}

.mask-gradient-fade {
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}
