/* ============================================
   Health.AI Design System - CureMyBills Aesthetic
   ============================================ */

/* --- CSS Variables --- */
:root {
  --brand-blue: #3b82f6;
  --brand-cyan: #06b6d4;
  --brand-gradient: linear-gradient(135deg, #3b82f6, #06b6d4);
  --brand-gradient-hover: linear-gradient(135deg, #2563eb, #0891b2);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
  --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.35);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
  --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* --- Gradient Text --- */
.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Glass Morphism --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-subtle {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
}

/* --- Brand Gradient Button --- */
.btn-brand {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-brand:hover {
  background: var(--brand-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.btn-brand:active {
  transform: translateY(0);
}

/* --- CTA Glow Effect --- */
.cta-glow {
  position: relative;
}

.cta-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--brand-gradient);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  filter: blur(12px);
  transition: opacity 0.3s ease;
}

.cta-glow:hover::after {
  opacity: 0.5;
}

/* --- Card Hover Effect --- */
.card-hover {
  transition: var(--transition-smooth);
  box-shadow: var(--card-shadow);
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

/* --- Focus Ring --- */
.focus-brand:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

.focus-brand:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Override default browser focus for inputs */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--brand-blue);
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Smooth Transitions --- */
.transition-smooth {
  transition: var(--transition-smooth);
}

/* --- Gradient Border --- */
.gradient-border {
  position: relative;
  border: none;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--brand-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* --- Scroll Reveal JS Initializer --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { will-change: opacity, transform; }
}

/* --- Utility: Gradient Background --- */
.bg-brand-gradient {
  background: var(--brand-gradient);
}

.bg-brand-gradient-hover:hover {
  background: var(--brand-gradient-hover);
}
