/* ============================================================
   ORVIYO — BACKGROUND VISUALS & DECORATIVE ELEMENTS
   Premium AI SaaS · Mesh gradients · Glow effects · 2025
   ============================================================ */

/* ── Hero background mesh ────────────────────────────────────── */
.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Fine dot-grid pattern */
.hero-mesh::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(67,97,238,0.09) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, black 20%, transparent 100%);
}

/* Subtle horizontal scan lines for futuristic depth */
.hero-mesh::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 39px,
    rgba(67,97,238,0.025) 39px,
    rgba(67,97,238,0.025) 40px
  );
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 0%, transparent 100%);
  pointer-events: none;
}

/* Soft radial glow behind hero content */
.hero-glow {
  position: absolute;
  top: -5%;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 700px;
  background: radial-gradient(ellipse at center,
    rgba(67,97,238,0.10) 0%,
    rgba(124,58,237,0.07) 35%,
    rgba(6,182,212,0.04) 60%,
    transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* ── Floating automation cards (hero right side) ─────────────── */
.hero-float-cards {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.float-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(67, 97, 238, 0.14);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 24px rgba(67,97,238,0.12), 0 1px 4px rgba(0,0,0,0.04),
              inset 0 1px 0 rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.float-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.float-card:nth-child(1) { animation: floatY 5s ease-in-out infinite; }
.float-card:nth-child(2) { animation: floatY 6s ease-in-out infinite 0.8s; }
.float-card:nth-child(3) { animation: floatY 4.5s ease-in-out infinite 1.6s; }

/* ── Connection lines SVG layer ──────────────────────────────── */
.connection-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
}

/* ── How-it-works visual connector ──────────────────────────── */
.how-visual-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  margin-top: 56px;
  position: relative;
}

.how-connector-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(67,97,238,0.15), rgba(124,58,237,0.25), rgba(67,97,238,0.15));
  border-radius: 2px;
  position: relative;
}

.how-connector-line::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid rgba(124,58,237,0.35);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* ── Section background patterns ────────────────────────────── */
.section-pattern-dots {
  position: relative;
  overflow: hidden;
}

.section-pattern-dots::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 480px;
  height: 480px;
  background-image: radial-gradient(circle, rgba(67,97,238,0.065) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* ── Workflow diagram (How It Works) ─────────────────────────── */
.workflow-diagram {
  position: relative;
  margin-top: 48px;
}

.workflow-track {
  position: absolute;
  top: 52px;
  left: calc(16.66% + 20px);
  right: calc(16.66% + 20px);
  height: 2px;
  background: linear-gradient(90deg,
    rgba(67,97,238,0.0) 0%,
    rgba(67,97,238,0.2) 15%,
    rgba(124,58,237,0.3) 50%,
    rgba(67,97,238,0.2) 85%,
    rgba(67,97,238,0.0) 100%);
  z-index: 0;
  pointer-events: none;
}

.workflow-track::before,
.workflow-track::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(124,58,237,0.25);
  border: 2px solid rgba(124,58,237,0.4);
}

.workflow-track::before { left: 0; }
.workflow-track::after  { right: 0; }

@keyframes trackPulse {
  0%   { left: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.workflow-track-dot {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 10px rgba(67,97,238,0.6);
  animation: trackPulse 3.5s ease-in-out infinite;
  pointer-events: none;
}

/* ── Dashboard mockup widget ─────────────────────────────────── */
.dash-widget {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(221,225,240,0.7);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 4px 24px rgba(67,97,238,0.08), 0 1px 4px rgba(8,8,24,0.04),
              inset 0 1px 0 rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dash-widget-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dash-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.dash-bar-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  width: 60px;
  flex-shrink: 0;
}

.dash-bar-track {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}

.dash-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--grad-brand);
  transform-origin: left;
  animation: barGrow 1.2s var(--ease-out) both;
}

@keyframes barGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.dash-bar-val {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* ── AI activity pulse indicator ─────────────────────────────── */
.ai-pulse-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-pulse-ring::before,
.ai-pulse-ring::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(67,97,238,0.3);
  animation: ringExpand 2.5s ease-out infinite;
}

.ai-pulse-ring::before { width: 100%; height: 100%; animation-delay: 0s; }
.ai-pulse-ring::after  { width: 100%; height: 100%; animation-delay: 0.8s; }

@keyframes ringExpand {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ── Industry card accent line ───────────────────────────────── */
.industry-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  opacity: 0;
  transition: opacity var(--t-slow);
}

.industry-card:hover::after { opacity: 1; }
.industry-card-cta::after   { display: none; }

/* ── Why Orviyo section — premium mesh background ────────────── */
.why-section-bg {
  position: relative;
  overflow: hidden;
}

.why-section-bg::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle,
    rgba(67,97,238,0.07) 0%,
    rgba(6,182,212,0.04) 40%,
    transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.why-section-bg::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle,
    rgba(124,58,237,0.06) 0%,
    rgba(67,97,238,0.03) 40%,
    transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── Results section visual accent ───────────────────────────── */
.results-section {
  position: relative;
  overflow: hidden;
}

.results-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(67,97,238,0.22), rgba(124,58,237,0.18), transparent);
}

.results-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(67,97,238,0.14), transparent);
}

/* ── Premium section mesh overlays ──────────────────────────── */
.section-mesh-bg {
  position: relative;
  overflow: hidden;
}

.section-mesh-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(67,97,238,0.055) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(ellipse 60% 50% at 80% 20%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 80% 20%, black 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ── Cyan glow accent (used on key sections) ─────────────────── */
.cyan-glow-accent {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
}

/* ── Glassmorphism card base ─────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 8px 32px rgba(67,97,238,0.10), 0 2px 8px rgba(67,97,238,0.06),
              inset 0 1px 0 rgba(255,255,255,0.85);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-float-cards { display: none; }
}

@media (max-width: 768px) {
  .workflow-track { display: none; }
  .hero-mesh::before { background-size: 24px 24px; }
  .hero-mesh::after  { display: none; }
}
