@import "tailwindcss";
@source "../../javascript/**/*.{js,ts,tsx}";
@source "../../views/**/*.html.erb";

@theme {
  --color-brand-50: #eef2ff;
  --color-brand-100: #e0e7ff;
  --color-brand-200: #c7d2fe;
  --color-brand-300: #a5b4fc;
  --color-brand-400: #818cf8;
  --color-brand-500: #6366f1;
  --color-brand-600: #4f46e5;
  --color-brand-700: #4338ca;
  --color-brand-800: #3730a3;
  --color-brand-900: #312e81;
  --color-brand-950: #1e1b4b;
}

/* ──────────────────────────────────────────
   Background effects
   ────────────────────────────────────────── */

.hero-glow {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 50% 50% at 85% 50%, rgba(6, 182, 212, 0.06), transparent),
    radial-gradient(ellipse 50% 50% at 15% 60%, rgba(139, 92, 246, 0.06), transparent);
}

.grid-bg {
  background-image:
    linear-gradient(to right, rgba(99, 102, 241, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 102, 241, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

.cta-bg {
  background: linear-gradient(160deg, #0f0a2e 0%, #1a1550 40%, #0f0a2e 100%);
  position: relative;
  overflow: hidden;
}

.cta-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 110%, rgba(99, 102, 241, 0.18), transparent),
    radial-gradient(ellipse 40% 30% at 20% 20%, rgba(6, 182, 212, 0.07), transparent);
  pointer-events: none;
}

/* ──────────────────────────────────────────
   Gradient text
   ────────────────────────────────────────── */

.text-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ──────────────────────────────────────────
   Upload zone animated border
   ────────────────────────────────────────── */

.upload-glow {
  position: relative;
  border-radius: 1rem;
}

.upload-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #6366f1, #06b6d4, #a78bfa, #6366f1);
  background-size: 300% 300%;
  animation: gradient-shift 6s ease infinite;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.upload-glow:hover::before {
  opacity: 1;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ──────────────────────────────────────────
   Fade-up animation
   ────────────────────────────────────────── */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up { animation: fade-up 0.7s ease-out both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }


/* ──────────────────────────────────────────
   Card hover lift
   ────────────────────────────────────────── */

.card-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.1);
}

/* ──────────────────────────────────────────
   Button shine sweep
   ────────────────────────────────────────── */

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.15) 45%,
    rgba(255, 255, 255, 0.15) 55%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover::after {
  transform: translateX(100%);
}

/* ──────────────────────────────────────────
   Flowchart steps
   ────────────────────────────────────────── */

.flow-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  box-shadow: 0 4px 14px -2px rgba(79, 70, 229, 0.4);
}

.flow-connector {
  flex-shrink: 0;
  width: 3rem;
  height: 2px;
  margin-top: 1.75rem;
  background: linear-gradient(90deg, #c7d2fe, #a5b4fc, #c7d2fe);
  position: relative;
}

.flow-connector::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid #a5b4fc;
}


/* ──────────────────────────────────────────
   FAQ accordion
   ────────────────────────────────────────── */

details summary::-webkit-details-marker,
details summary::marker {
  display: none;
}

details .faq-icon {
  transition: transform 0.25s ease;
}

details[open] .faq-icon {
  transform: rotate(45deg);
}

/* ──────────────────────────────────────────
   Custom spinner
   ────────────────────────────────────────── */

.spinner-ring {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2.5px solid #e0e7ff;
  border-top-color: #4f46e5;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
