/* ==================================================================
   Prompt Popularity — shared design system
   ================================================================== */

:root {
  --aurora-1: #ff4d8d; /* signal magenta */
  --aurora-2: #7c5cff; /* electric violet */
  --aurora-3: #34e6b4; /* mint signal */
  --ink: #030304;
}

html, body {
  background: var(--ink);
  color: #fff;
  font-family: 'Barlow', sans-serif;
  scroll-behavior: smooth;
}

::selection {
  background: var(--aurora-2);
  color: #fff;
}

/* ------------------------------------------------------------ */
/* Aurora backdrop -- the one signature atmosphere element        */
/* ------------------------------------------------------------ */
.aurora-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.aurora-blob.b1 {
  width: 42vw;
  height: 42vw;
  background: var(--aurora-1);
  top: -12%;
  left: -8%;
  animation: drift1 22s ease-in-out infinite;
}

.aurora-blob.b2 {
  width: 38vw;
  height: 38vw;
  background: var(--aurora-2);
  top: 10%;
  right: -10%;
  animation: drift2 26s ease-in-out infinite;
}

.aurora-blob.b3 {
  width: 30vw;
  height: 30vw;
  background: var(--aurora-3);
  bottom: -14%;
  left: 24%;
  animation: drift3 30s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vw) scale(1.08); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vw, 6vw) scale(1.05); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, -5vw) scale(1.1); }
}

.aurora-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 0%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 75%);
}

.text-gradient {
  background: linear-gradient(90deg, var(--aurora-1), var(--aurora-2) 55%, var(--aurora-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------ */
/* Liquid glass -- subtle variant                                */
/* ------------------------------------------------------------ */
.liquid-glass {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  background-blend-mode: luminosity;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.15) 80%,
    rgba(255, 255, 255, 0.45) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* ------------------------------------------------------------ */
/* Liquid glass -- strong variant                                */
/* ------------------------------------------------------------ */
.liquid-glass-strong {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  background-blend-mode: luminosity;
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.liquid-glass-strong::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.2) 80%,
    rgba(255, 255, 255, 0.5) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* ------------------------------------------------------------ */
/* Prompt bar -- signature hero element                          */
/* ------------------------------------------------------------ */
.prompt-bar {
  position: relative;
  overflow: hidden;
}

.prompt-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #fff;
  margin-left: 2px;
  vertical-align: -0.15em;
  animation: caret-blink 1s step-end infinite;
}

@keyframes caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.answer-pill {
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
}

/* ------------------------------------------------------------ */
/* Reveal on load / on scroll                                    */
/* ------------------------------------------------------------ */
[data-reveal] {
  filter: blur(10px);
  opacity: 0;
  transform: translateY(20px);
}

[data-reveal].is-visible {
  filter: blur(0px);
  opacity: 1;
  transform: translateY(0);
  transition: filter 0.8s ease-out, opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* ------------------------------------------------------------ */
/* Nav underline                                                 */
/* ------------------------------------------------------------ */
.nav-link {
  position: relative;
}
.nav-link.active {
  color: #fff;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--aurora-1), var(--aurora-2));
}

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