/* ============================================
   LANDING PAGE - Enhanced Visual Styles
   ============================================ */

/* ----- KEYFRAME ANIMATIONS ----- */

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

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

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

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

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ----- BASE STYLES ----- */

html {
  background-color: #f8fafc;
}

body {
  color: #0f172a;
  min-height: 100vh;
  background-color: #f8fafc;
}

/* ----- TYPOGRAPHY FIXES ----- */

.hero-headline {
  font-size: clamp(3.5rem, 12vw, 9rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.hero-headline .gradient-text-animated {
  display: block;
}

.section-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.step-number {
  font-size: 4rem;
  font-weight: 900;
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 1rem;
}

.step-number.blue { color: #2563eb; }
.step-number.purple { color: #7c3aed; }
.step-number.teal { color: #14b8a6; }

.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.step-desc {
  color: #475569;
  line-height: 1.6;
}

.subheadline {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: #475569;
  line-height: 1.6;
  max-width: 36rem;
}

.feature-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.feature-desc {
  font-size: 0.875rem;
  color: #475569;
}

.notify-headline {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

/* ----- FULL PAGE ANIMATED GRADIENT ----- */

.page-gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background-color: #f0f4ff;
  background-image:
    radial-gradient(ellipse 80% 60% at 10% 10%, rgba(37, 99, 235, 0.5) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(124, 58, 237, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 5% 80%, rgba(20, 184, 166, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 85% 90%, rgba(37, 99, 235, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(124, 58, 237, 0.25) 0%, transparent 60%);
  background-size: 200% 200%;
  animation: gradient-shift 12s ease-in-out infinite;
}

/* Grid pattern overlay */
.page-gradient-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(100, 116, 139, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

/* Ensure content is above the gradient */
nav, section, footer, main, header, article {
  position: relative;
  z-index: 1;
}

/* ----- GRADIENT BACKGROUNDS ----- */

.gradient-mesh {
  background:
    radial-gradient(at 40% 20%, rgba(37, 99, 235, 0.35) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(124, 58, 237, 0.25) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(20, 184, 166, 0.2) 0px, transparent 50%),
    radial-gradient(at 80% 80%, rgba(37, 99, 235, 0.15) 0px, transparent 50%);
}

.gradient-mesh-animated {
  background:
    radial-gradient(at 40% 20%, rgba(37, 99, 235, 0.35) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(124, 58, 237, 0.25) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(20, 184, 166, 0.2) 0px, transparent 50%);
  background-size: 200% 200%;
  animation: gradient-shift 15s ease infinite;
}

.gradient-dark {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

.gradient-cta {
  background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 50%, #1e3a8a 100%);
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

/* CTA section with dark overlay */
.cta-section {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 27, 75, 0.9) 50%, rgba(15, 23, 42, 0.85) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ----- GRADIENT TEXT ----- */

.gradient-text {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-animated {
  background: linear-gradient(135deg, #2563eb, #7c3aed, #06b6d4, #2563eb);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease infinite;
}

/* ----- GLASS MORPHISM ----- */

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -2px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.glass-card-strong {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ----- GRADIENT BORDERS ----- */

.gradient-border {
  position: relative;
  background: white;
  border-radius: 1.5rem;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(1.5rem + 2px);
  background: linear-gradient(135deg, #2563eb, #7c3aed, #06b6d4);
  z-index: -1;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
  opacity: 1;
}

/* ----- FLOATING ANIMATIONS ----- */

.float {
  animation: float 6s ease-in-out infinite;
}

.float-slow {
  animation: float-slow 8s ease-in-out infinite;
}

.float-delay-1 {
  animation-delay: -2s;
}

.float-delay-2 {
  animation-delay: -4s;
}

/* ----- REVEAL ANIMATIONS ----- */
/* Elements are visible by default, hidden only when JS is ready */

.js-ready .reveal-element {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-element {
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-element.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.js-ready .reveal-scale {
  opacity: 0;
  transform: scale(0.95);
}

.reveal-scale {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ----- NAVIGATION ----- */

#main-nav {
  position: relative;
}

#main-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}

#main-nav.nav-scrolled::before {
  opacity: 1;
}

.nav-link {
  color: #475569;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  transition: color 0.3s ease;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(37, 99, 235, 0.2);
  opacity: 0.4;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link:hover {
  color: #2563eb;
}

/* ----- BUTTONS ----- */

.btn-cta-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: white;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 4px 15px rgba(37, 99, 235, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-cta-primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 35px rgba(37, 99, 235, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-cta-primary:active {
  transform: translateY(0);
  box-shadow:
    0 2px 10px rgba(37, 99, 235, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-cta-primary:hover::before {
  opacity: 1;
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 1rem;
  border: 2px solid #e2e8f0;
  color: #475569;
  background: transparent;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-cta-secondary:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}

/* ----- STEP CARDS ----- */

.step-card {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-card.step-visible:hover {
  transform: translateY(-8px);
}

/* Sequential step reveal animation */
@keyframes step-slide-up {
  0% {
    opacity: 0;
    transform: translateY(80px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Steps start hidden */
.step-reveal {
  opacity: 0;
  transform: translateY(80px) scale(0.9);
}

/* Animate in when visible */
.step-reveal.step-visible {
  animation: step-slide-up 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Feature items reveal animation */
.feature-reveal {
  opacity: 0;
  transform: translateX(-40px);
}

.feature-reveal.feature-visible {
  animation: feature-slide-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes feature-slide-in {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.step-number {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Step connector line */
.step-connector {
  position: absolute;
  top: 50%;
  left: 100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  opacity: 0.3;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .step-connector {
    display: none;
  }
}

/* ----- FEATURE SECTIONS ----- */

.feature-visual {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.feature-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(124, 58, 237, 0.15) 0%, transparent 50%);
}

/* ----- SOCIAL ICONS ----- */

.social-icon {
  color: #94a3b8;
  transition: all 0.3s ease;
}

.social-icon:hover {
  color: #2563eb;
  transform: translateY(-2px);
}

/* ----- DECORATIVE ELEMENTS ----- */

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: pulse-glow 4s ease-in-out infinite;
}

.glow-orb-blue {
  background: rgba(37, 99, 235, 0.4);
}

.glow-orb-purple {
  background: rgba(124, 58, 237, 0.3);
}

.glow-orb-teal {
  background: rgba(20, 184, 166, 0.3);
}

/* Grid pattern overlay */
.grid-pattern {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ----- STATS COUNTER ----- */

.stat-value {
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----- RTL SUPPORT ----- */

[dir="rtl"] {
  text-align: right;
  unicode-bidi: plaintext;
}

[dir="rtl"] .hero-headline {
  text-align: right;
  line-height: 1.2;
  letter-spacing: 0;
  unicode-bidi: plaintext;
  direction: rtl;
}

[dir="rtl"] .hero-headline span {
  unicode-bidi: plaintext;
  direction: rtl;
}

[dir="rtl"] .section-headline {
  text-align: right;
  line-height: 1.4;
  letter-spacing: 0;
  overflow: visible;
}

[dir="rtl"] .section-headline .gradient-text {
  line-height: 1.5;
  overflow: visible;
  display: inline-block;
  padding-bottom: 0.15em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

[dir="rtl"] .subheadline {
  text-align: right;
}

[dir="rtl"] .step-title,
[dir="rtl"] .step-desc {
  text-align: right;
}

[dir="rtl"] .feature-title,
[dir="rtl"] .feature-desc {
  text-align: right;
}

/* Flip flex directions for RTL */
[dir="rtl"] .nav-link {
  margin-left: 0;
  margin-right: auto;
}
