/* =============================================================================
   Landing Page Styles
   Shared styles for landing pages (hero, beta landing, etc.)
   ============================================================================= */

/* Layout overrides for landing pages */
.landing main {
  padding-top: 0 !important;
}

.landing {
  background-color: transparent !important;
}

/* Smooth scroll behavior for anchor nav */
.landing {
  scroll-behavior: smooth;
}

.landing #how-it-works {
  scroll-margin-top: 2rem;
}

/* =============================================================================
   Shared Grid Background & Gradient
   Used by both the main landing hero and beta landing page
   ============================================================================= */

.landing-gradient {
  background: linear-gradient(to bottom, #f9fafb 0%, #f9fafb 40%, #fcfcfd 65%, #fefefe 80%, #ffffff 95%, #ffffff 100%) !important;
}

.landing-grid-bg {
  background-image:
    linear-gradient(rgba(156, 163, 175, 0.15) 2px, transparent 2px),
    linear-gradient(90deg, rgba(156, 163, 175, 0.15) 2px, transparent 2px);
  background-size: 60px 60px;
  position: relative;
}

.landing-grid-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.08) 2px, transparent 2px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.08) 2px, transparent 2px);
  background-size: 120px 120px;
}

.landing-grid-mask {
  background:
    /* Asymmetrical top fade */
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.3) 15%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.2) 85%, rgba(255, 255, 255, 0.7) 100%),
    /* Bottom fade to white */
    linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(255, 255, 255, 0.1) 65%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0.8) 90%, rgba(255, 255, 255, 1) 100%),
    /* Left edge stronger fade */
    linear-gradient(to right, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 8%, transparent 20%, transparent 80%, rgba(255, 255, 255, 0.1) 92%, rgba(255, 255, 255, 0.3) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Beta landing uses the same primitives, but with a softer read */
.beta-landing .landing-grid-bg {
  background-image:
    linear-gradient(rgba(156, 163, 175, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156, 163, 175, 0.1) 1px, transparent 1px);
  background-size: 68px 68px;
}

.beta-landing .landing-grid-bg::before {
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 136px 136px;
}

.beta-landing .landing-grid-mask {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(255, 255, 255, 0.58) 18%,
      transparent 32%,
      transparent 70%,
      rgba(255, 255, 255, 0.32) 86%,
      rgba(255, 255, 255, 0.82) 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      transparent 48%,
      rgba(255, 255, 255, 0.2) 66%,
      rgba(255, 255, 255, 0.5) 80%,
      rgba(255, 255, 255, 0.86) 92%,
      rgba(255, 255, 255, 1) 100%
    ),
    linear-gradient(
      to right,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.52) 9%,
      transparent 24%,
      transparent 76%,
      rgba(255, 255, 255, 0.24) 92%,
      rgba(255, 255, 255, 0.42) 100%
    );
}

/* =============================================================================
   Section Grid Fade – Reusable subtle grid background
   Draws a low-opacity grid strongest in the center, fading at all edges.
   Add `section-grid-fade` to any section. For bg-slate-50 sections also
   add `section-grid-fade-slate` so the mask matches the background color.
   ============================================================================= */

.section-grid-fade {
  position: relative;
  overflow: hidden;
}

.section-grid-fade::before {
  content: '';
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center;
  z-index: 0;
}

.section-grid-fade::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,    rgba(255,255,255,1) 0%, rgba(255,255,255,0) 25%, rgba(255,255,255,0) 75%, rgba(255,255,255,1) 100%),
    linear-gradient(to right,  rgba(255,255,255,1) 0%, rgba(255,255,255,0) 18%, rgba(255,255,255,0) 82%, rgba(255,255,255,1) 100%);
  z-index: 1;
  pointer-events: none;
}

.section-grid-fade > * {
  position: relative;
  z-index: 2;
}

/* =============================================================================
   Hero Section - Floating Shapes & Animations
   ============================================================================= */

.hero-floating-shapes {
  pointer-events: none;
  z-index: 1;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.35;
  filter: blur(1px);
}

.shape-1 {
  width: 120px;
  height: 120px;
  background: linear-gradient(45deg, rgba(59, 130, 246, 0.3), rgba(16, 185, 129, 0.2));
  top: 15%;
  right: 30%;
  animation: float1 25s ease-in-out infinite;
}

.shape-2 {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(59, 130, 246, 0.15));
  top: 65%;
  right: 20%;
  animation: float2 30s ease-in-out infinite 5s;
}

.shape-3 {
  width: 60px;
  height: 60px;
  background: rgba(59, 130, 246, 0.2);
  top: 35%;
  right: 5%;
  border-radius: 30%;
  animation: float3 20s ease-in-out infinite 10s;
}

.shape-4 {
  width: 100px;
  height: 100px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), transparent);
  bottom: 25%;
  right: 40%;
  border-radius: 40%;
  animation: float4 35s ease-in-out infinite 15s;
}

.shape-5 {
  width: 40px;
  height: 40px;
  background: rgba(16, 185, 129, 0.25);
  top: 75%;
  right: 15%;
  animation: float5 18s ease-in-out infinite 8s;
}

.shape-6 {
  width: 90px;
  height: 90px;
  background: linear-gradient(225deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.1));
  top: 45%;
  right: 25%;
  border-radius: 25%;
  animation: float6 28s ease-in-out infinite 12s;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -20px) rotate(45deg); }
  66% { transform: translate(-20px, 20px) rotate(90deg); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) rotate(15deg); }
  50% { transform: translate(-40px, -30px) rotate(75deg); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  25% { transform: translate(20px, 15px) scale(1.1) rotate(180deg); }
  75% { transform: translate(-15px, -10px) scale(0.9) rotate(360deg); }
}

@keyframes float4 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(25px, -15px) rotate(270deg); }
  80% { transform: translate(-30px, 10px) rotate(540deg); }
}

@keyframes float5 {
  0%, 100% { transform: translate(0, 0) rotate(-20deg); }
  33% { transform: translate(-15px, 20px) rotate(50deg); }
  66% { transform: translate(25px, -15px) rotate(120deg); }
}

@keyframes float6 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(-20px, 25px) rotate(360deg) scale(1.05); }
}

/* White drop shadow for text separation from grid */
.hero-text-shadow {
  filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.9))
          drop-shadow(0 0 20px rgba(255, 255, 255, 0.8))
          drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}
