/*
 * vibeASO — Electric Indie Design System
 * Custom styles that extend Tailwind
 */

/* ===== Gradient text ===== */
.gradient-text {
  background: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-brand {
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Glow effects ===== */
.glow-brand {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15), 0 0 60px rgba(139, 92, 246, 0.05);
}

.glow-accent {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15), 0 0 60px rgba(16, 185, 129, 0.05);
}

/* Card hover glow */
.card-glow {
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.card-glow:hover {
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.1), 0 4px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(139, 92, 246, 0.3);
}

/* ===== Button shine sweep ===== */
.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  transform: rotate(45deg) translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.btn-shine:hover::after {
  transform: rotate(45deg) translateX(100%);
}

/* ===== Gradient border bottom (nav) ===== */
.gradient-border-b {
  position: relative;
  border-bottom: none;
}

.gradient-border-b::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), rgba(236, 72, 153, 0.2), transparent);
}

/* ===== Dot grid pattern ===== */
.dot-pattern {
  background-image: radial-gradient(circle, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ===== Hero gradient mesh ===== */
.hero-gradient {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(139, 92, 246, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
}

/* ===== Staggered entrance animation delays ===== */
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-delay-500 { animation-delay: 500ms; }
.animate-delay-600 { animation-delay: 600ms; }
.animate-delay-700 { animation-delay: 700ms; }
.animate-delay-800 { animation-delay: 800ms; }

/* Ensure elements start hidden when using slide-up animation */
.animate-on-load {
  opacity: 0;
}

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #334155 #0f172a;
}

/* ===== Focus ring override ===== */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.5);
}

/* ===== Decorative floating orbs (hero) ===== */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.orb-violet {
  background: rgba(139, 92, 246, 0.3);
}

.orb-pink {
  background: rgba(236, 72, 153, 0.15);
}

.orb-blue {
  background: rgba(59, 130, 246, 0.12);
}

/* ===== Film grain overlay ===== */
.grain::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 1;
}

/* ===== Scroll reveal ===== */
.reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children via data attribute */
.reveal-item[data-delay="1"] { transition-delay: 100ms; }
.reveal-item[data-delay="2"] { transition-delay: 200ms; }
.reveal-item[data-delay="3"] { transition-delay: 300ms; }
.reveal-item[data-delay="4"] { transition-delay: 400ms; }
.reveal-item[data-delay="5"] { transition-delay: 500ms; }

/* ===== Score ring / issue reveal ===== */
.issue-reveal {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.issue-reveal.revealed {
  opacity: 1;
  transform: translateX(0);
}

.badge-reveal {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-reveal.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ===== Typing cursor blink ===== */
.typing-cursor::after {
  content: '▋';
  display: inline;
  animation: cursor-blink 0.7s steps(1) infinite;
  color: rgba(139, 92, 246, 0.7);
  font-weight: 300;
  margin-left: 1px;
}

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

/* ===== Pulse ring behind score ===== */
.score-pulse {
  animation: score-pulse-ring 2.5s ease-in-out infinite;
}

@keyframes score-pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.15); }
  50% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
}

/* ===== Flow line (connects steps on desktop) ===== */
.flow-line {
  position: relative;
}

.flow-line::after {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(50% + 32px);
  width: calc(100% - 64px);
  height: 2px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.4), rgba(245, 158, 11, 0.4));
  pointer-events: none;
}

@media (max-width: 768px) {
  .flow-line::after { display: none; }
}

/* ===== Shimmer loading bar ===== */
.shimmer-bar {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.08) 25%, rgba(139, 92, 246, 0.2) 50%, rgba(139, 92, 246, 0.08) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Warm gradient text (amber-rose) ===== */
.gradient-text-warm {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 50%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Geometric accent line ===== */
.accent-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #a78bfa, #f59e0b);
  border-radius: 2px;
}

/* ===== Auth split panel gradient ===== */
.auth-panel-gradient {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 60%),
    linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
}

/* ===== Step connector line ===== */
.step-connector {
  position: relative;
}
.step-connector::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -1rem;
  width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.3), transparent);
}
@media (max-width: 768px) {
  .step-connector::after { display: none; }
}
