/* OmationFlow — Light Theme Animations */

/* Easing curves (Composio-style) */
:root {
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out-soft: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-tick: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Selection */
::selection { background: #99BADD; color: #ffffff; }

/* Focus ring */
*:focus-visible { outline: 2px solid #5B8ECC; outline-offset: 3px; }

/* Hero gradient blob — follows cursor via JS, fallback centered */
.hero-blob {
  position: absolute;
  width: 700px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(153,186,221,0.4) 0%,
    rgba(111,168,214,0.25) 25%,
    rgba(78,198,160,0.12) 50%,
    transparent 75%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  will-change: left, top;
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pulse cascade — items stagger in */
.pulse-item {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.pulse-item.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for pulse cascade */
.pulse-item:nth-child(1) { transition-delay: 0s; }
.pulse-item:nth-child(2) { transition-delay: 0.1s; }
.pulse-item:nth-child(3) { transition-delay: 0.2s; }
.pulse-item:nth-child(4) { transition-delay: 0.3s; }
.pulse-item:nth-child(5) { transition-delay: 0.4s; }
.pulse-item:nth-child(6) { transition-delay: 0.5s; }
.pulse-item:nth-child(7) { transition-delay: 0.6s; }
.pulse-item:nth-child(8) { transition-delay: 0.7s; }

/* Pulse line connecting items */
.pulse-line {
  width: 2px;
  background: linear-gradient(to bottom, #5B8ECC, #4EC6A0);
  height: 0;
  transition: height 0.8s ease;
  margin: 0 auto;
}
.pulse-line.visible { height: 40px; }

/* Button hover glow */
.btn-glow {
  transition: box-shadow 0.2s ease;
}
.btn-glow:hover {
  box-shadow: 0 0 20px rgba(0,0,0,0.08);
}

/* ========== Hero aurora — mouse-reactive fluid ==========
   A pool of 4 colored blobs, each a big soft radial gradient. JS moves them
   toward the cursor with different lag rates, producing a layered "push
   through water" feel. When the cursor leaves the hero, blobs drift back to
   preset home positions with gentle sine-wave motion so the cloud never
   feels frozen. A faint grid rides on top for texture. */
.aurora-stage {
  overflow: hidden;
  background: linear-gradient(180deg, #F0FAFF 0%, #FFFFFF 100%);
}
.aurora-blob {
  position: absolute;
  top: 0; left: 0;
  width: 780px;
  height: 780px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;                 /* dialed back from 0.75 — quieter for contractor audience */
  transform: translate(-50%, -50%);
  will-change: transform;
  mix-blend-mode: multiply;      /* colors MIX when they overlap instead of just stacking */
}
.aurora-blob--cyan {
  background: radial-gradient(circle, #6EE4F0 0%, rgba(110,228,240,0.45) 40%, transparent 72%);
}
.aurora-blob--sky {
  background: radial-gradient(circle, #7AB8E8 0%, rgba(122,184,232,0.45) 40%, transparent 72%);
}
.aurora-blob--deep {
  background: radial-gradient(circle, #3B7AD9 0%, rgba(59,122,217,0.40) 40%, transparent 72%);
}
.aurora-blob--mint {
  background: radial-gradient(circle, #9FE0CC 0%, rgba(159,224,204,0.40) 40%, transparent 72%);
}
.aurora-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.55;
  mask-image: radial-gradient(closest-side, #000 55%, transparent 90%);
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 90%);
  pointer-events: none;
}

/* Legacy aurora-bg kept for any other pages that still use it. */
.aurora-bg {
  background:
    radial-gradient(600px 400px at 20% 30%, rgba(91,142,204,0.3), transparent 60%),
    radial-gradient(500px 360px at 75% 35%, rgba(78,198,160,0.25), transparent 60%),
    radial-gradient(700px 500px at 50% 80%, rgba(153,186,221,0.25), transparent 70%),
    linear-gradient(to bottom, #F5FBFF, #FFFFFF);
  filter: blur(2px);
}

/* ========== Hero — Inline word rotator (Composio-style) ==========
   All candidate words sit in the same grid cell. Only the one with
   `.is-on` is visible; the others fade out with a soft blur. Because
   inline-grid sizes the cell to the WIDEST child, the headline never
   reflows as the word swaps. */
.word-rotator {
  display: inline-grid;
  grid-template-areas: "stack";
  vertical-align: baseline;
  color: var(--accent, #5B8ECC);          /* accent color for the rotating word */
}
.word-rotator .word {
  grid-area: stack;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.08em);
  transition: opacity 520ms var(--ease-in-out-soft),
              filter   520ms var(--ease-in-out-soft),
              transform 520ms var(--ease-in-out-soft);
  white-space: nowrap;
}
.word-rotator .word.is-on {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* ========== Animation 2 — Self-ticking checklist ========== */
.task { display:flex; align-items:center; gap:.75rem; font-size:.95rem; color:#111; }
.task__indicator {
  width:18px; height:18px; border-radius:9999px;
  border:2px solid #D1D5DB;
  position:relative; flex:none;
  transition: border-color 250ms var(--ease-tick), background 250ms var(--ease-tick);
}
.task.is-active .task__indicator {
  border-color: transparent;
  background: conic-gradient(#5B8ECC 0 75%, transparent 75% 100%);
  animation: spin 900ms linear infinite;
}
.task.is-done .task__indicator {
  border-color: #4EC6A0;
  background: #4EC6A0;
  animation: none;
}
.task.is-done .task__indicator::after {
  content:''; position:absolute; inset:0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'><path d='M7.6 13.5L4 9.9l1.4-1.4 2.2 2.2 6-6 1.4 1.4z'/></svg>") center/12px no-repeat;
}
.task__icons { display:flex; gap:-4px; }
.task__icons img { width:20px; height:20px; border-radius:4px; }
.task__text { transition: color 300ms var(--ease-tick), opacity 300ms var(--ease-tick); }
.task.is-done .task__text { color:#9CA3AF; text-decoration: line-through; opacity:.75; }
.task.is-fading { opacity: 0; transition: opacity 400ms var(--ease-tick); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Animation 3 — Orbiting task chips ========== */
.orbit__blob {
  background: radial-gradient(60% 50% at 50% 50%,
              rgba(91,142,204,0.3) 0%, rgba(91,142,204,0) 60%),
              radial-gradient(40% 40% at 45% 55%,
              rgba(78,198,160,0.25) 0%, rgba(78,198,160,0) 70%);
  filter: blur(22px);
}
.orbit__hub-avatar {
  width:64px; height:64px; border-radius:9999px;
  background:#fff; box-shadow: 0 4px 12px rgba(0,0,0,.08);
  display:grid; place-items:center;
}
.orbit__hub-label { margin-top:6px; }
.orbit__hub-plus {
  position:absolute; bottom:-4px; right:-4px;
  width:22px; height:22px; border-radius:50%;
  background:#5B8ECC; color:#fff; font-size:14px; font-weight:700;
  display:grid; place-items:center; border:2px solid #fff;
  cursor:pointer;
}
.chip {
  position:absolute;
  /* --x / --y are percentages of the orbit container.
     `left`/`top` percentages are parent-relative (unlike `translate()` %s,
     which refer to the chip's own size), so this actually scatters the
     chips around the hub. `translate(-50%,-50%)` then center-anchors each chip
     on its (left,top) point. */
  left: calc(50% + var(--x));
  top:  calc(50% + var(--y));
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.45rem .8rem; border-radius:9999px;
  background:#fff; font-size:.8rem; color:#111;
  box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 10px rgba(15,23,42,.04);
  transform: translate(-50%, -50%);
  animation: chip-float 7s ease-in-out infinite;
  animation-delay: var(--d);
  white-space: nowrap;
}
.chip img { width:14px; height:14px; }
@keyframes chip-float {
  0%,100% { transform: translate(-50%,                 -50%); }
  50%     { transform: translate(calc(-50% + 6px),     calc(-50% - 8px)); }
}

/* ========== Animation 5 — Multi-account connector ========== */
.wire { fill:none; stroke:#D1D5DB; stroke-width:1.5; }
.pulse-dot { fill:#5B8ECC; filter: drop-shadow(0 0 4px rgba(91,142,204,.6)); }

/* ========== Animation 7 — Agent-swap hub ========== */
.fade-layer { transition: opacity 600ms var(--ease-in-out-soft); opacity:0; position:absolute; inset:0; }
.fade-layer.is-on { opacity:1; position:relative; }
.swap-hub__top { position:relative; width:56px; height:56px; display:grid; place-items:center; }

/* ========== Animation 6 — Guardrails line pulse ========== */
@keyframes line-pulse { 0%,100%{opacity:.2;} 50%{opacity:.8;} }
