/* Motion layer. It activates only when JavaScript adds .raycast-preview. */

body.raycast-preview {
  --spot-x: 50vw;
  --spot-y: 28vh;
  --stage-rotate-x: 0deg;
  --stage-rotate-y: 0deg;
}

.preview-loader {
  display: grid;
  min-height: 100vh;
  place-items: center;
  margin: 0;
  color: #a7b1c2;
  background: #08090d;
  font: 500 14px/1.5 ui-monospace, "SF Mono", Menlo, monospace;
}

.raycast-spotlight {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(36rem circle at var(--spot-x) var(--spot-y), rgba(151, 124, 255, .14), transparent 48%);
  transition: background-position .22s cubic-bezier(.22, 1, .36, 1);
}

body.raycast-preview .site-header {
  border-bottom-color: rgba(201, 188, 255, .13);
  box-shadow: 0 10px 36px -28px rgba(0, 0, 0, .9);
}

body.raycast-preview .button,
body.raycast-preview .nav-download {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

body.raycast-preview .button-primary::before,
body.raycast-preview .nav-download::before {
  position: absolute;
  z-index: -1;
  inset: -1px;
  content: "";
  opacity: .55;
  background: linear-gradient(105deg, transparent 16%, rgba(255,255,255,.32) 46%, transparent 70%);
  transform: translateX(-105%);
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

body.raycast-preview .button-primary:hover::before,
body.raycast-preview .nav-download:hover::before { transform: translateX(105%); }

body.raycast-preview .product-stage .app-window {
  transform: perspective(1500px) rotateY(calc(-3deg + var(--stage-rotate-y))) rotateX(calc(1.2deg + var(--stage-rotate-x))) translateZ(0);
  transition: transform .32s cubic-bezier(.16, 1, .3, 1), box-shadow .32s cubic-bezier(.16, 1, .3, 1), border-color .32s ease;
  will-change: transform;
}

body.raycast-preview .product-stage:hover .app-window {
  border-color: rgba(206, 195, 255, .34);
  box-shadow: 0 59px 112px -44px rgba(0,0,0,.98), 0 0 0 1px rgba(180,160,255,.12) inset;
}

body.raycast-preview .metric-card {
  animation: raycast-float 4.8s cubic-bezier(.45, .05, .55, .95) infinite alternate;
}

body.raycast-preview .metric-card.roles { animation-delay: -1.7s; }
body.raycast-preview .metric-card.ready { animation-delay: -3.1s; }

body.raycast-preview .feature-card {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

body.raycast-preview .feature-card::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(18rem circle at var(--card-x, 50%) var(--card-y, 50%), rgba(151, 124, 255, .15), transparent 48%);
  transition: opacity .22s ease;
}

body.raycast-preview .feature-card:hover::after { opacity: 1; }

body.raycast-preview .feature-card:hover {
  border-color: rgba(197, 185, 255, .42);
  box-shadow: 0 29px 52px -34px rgba(0,0,0,.94), 0 0 0 1px rgba(139,109,255,.05) inset;
  transform: translateY(-5px) scale(1.006);
}

body.raycast-preview .proof-mark,
body.raycast-preview .workflow-index,
body.raycast-preview .feature-icon {
  box-shadow: 0 0 0 0 rgba(139,109,255,.16);
  transition: box-shadow .24s ease, transform .24s cubic-bezier(.22, 1, .36, 1);
}

body.raycast-preview .workflow-step:hover .workflow-index,
body.raycast-preview .feature-card:hover .feature-icon {
  box-shadow: 0 0 0 7px rgba(139,109,255,.08), 0 12px 24px -16px rgba(121,91,255,.85);
  transform: translateY(-2px);
}

body.raycast-preview .aaf-repair,
body.raycast-preview .final-cta {
  background-position: 50% 50%;
  transition: border-color .26s ease, box-shadow .26s ease, transform .26s cubic-bezier(.22, 1, .36, 1);
}

body.raycast-preview .aaf-repair:hover,
body.raycast-preview .final-cta:hover {
  border-color: rgba(197, 185, 255, .4);
  box-shadow: 0 42px 78px -50px rgba(96, 68, 226, .8);
  transform: translateY(-2px);
}

/* Give the embedded film the same restrained light treatment as the app stage. */
body.raycast-preview .film-frame,
body.raycast-preview .video-page-frame {
  transition: border-color .26s ease, box-shadow .26s ease, transform .26s cubic-bezier(.22, 1, .36, 1);
}

body.raycast-preview .film-frame:hover,
body.raycast-preview .video-page-frame:hover {
  border-color: rgba(201, 188, 255, .47);
  box-shadow: 0 48px 90px -48px rgba(101, 74, 234, .82), 0 0 0 1px rgba(180,160,255,.1) inset;
  transform: translateY(-2px);
}

body.raycast-preview .film-frame::after,
body.raycast-preview .video-page-frame::after {
  animation: film-sheen 9s cubic-bezier(.22, 1, .36, 1) infinite alternate;
}

/* The workflow becomes a small motion sequence instead of four plain labels. */
body.raycast-preview .workflow.premium-flow {
  padding: 12px 0 28px;
}

body.raycast-preview .workflow.premium-flow .workflow-rail {
  top: 61px;
  right: 10%;
  left: 10%;
  height: 2px;
  overflow: visible;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(98,160,255,.2), rgba(139,109,255,.68) 46%, rgba(255,147,204,.38));
  box-shadow: 0 0 18px rgba(139,109,255,.2);
}

body.raycast-preview .workflow.premium-flow .workflow-rail::before {
  position: absolute;
  top: -3px;
  left: 0;
  width: 24%;
  height: 8px;
  border-radius: 999px;
  content: "";
  opacity: .95;
  background: linear-gradient(90deg, transparent, rgba(202,192,255,.16) 19%, #f5d7ff 51%, #81b5ff 77%, transparent);
  box-shadow: 0 0 17px 3px rgba(153,123,255,.67);
  filter: saturate(1.24);
  transform: translateX(-130%);
  animation: flow-sweep 5.4s cubic-bezier(.3,.06,.3,1) infinite;
}

body.raycast-preview .workflow.premium-flow .workflow-rail::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 50%;
  content: "";
  background: #aa90ff;
  box-shadow: 0 0 0 5px rgba(157,126,255,.15), 0 0 22px 6px rgba(148,112,255,.6);
  transform: translate(-50%, -50%);
  animation: flow-particle 5.4s cubic-bezier(.3,.06,.3,1) infinite;
}

body.raycast-preview .workflow.premium-flow .workflow-step {
  padding: 0 14px;
}

body.raycast-preview .workflow.premium-flow .workflow-index {
  position: relative;
  width: 122px;
  height: 122px;
  overflow: hidden;
  border-color: rgba(207,215,250,.25);
  border-radius: 29px;
  color: #b9a9ff;
  background:
    radial-gradient(100% 80% at 25% 6%, rgba(160,138,255,.18), transparent 72%),
    linear-gradient(145deg, rgba(38,43,61,.98), rgba(14,16,25,.98));
  box-shadow: 0 22px 42px -30px rgba(0,0,0,.95), 0 0 0 7px rgba(8,9,13,.9), 0 0 42px -28px rgba(139,109,255,.9);
}

body.raycast-preview .workflow.premium-flow .workflow-index::before {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 21px;
  content: "";
  background: linear-gradient(140deg, rgba(255,255,255,.075), transparent 35%);
}

body.raycast-preview .workflow.premium-flow .workflow-index::after {
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(164,140,255,.28);
  border-radius: 37px;
  content: "";
  opacity: 0;
  transform: scale(.88);
  animation: node-aura 5.4s ease-out infinite;
}

body.raycast-preview .workflow.premium-flow .workflow-step:nth-child(2) .workflow-index { color: #c5b0ff; }
body.raycast-preview .workflow.premium-flow .workflow-step:nth-child(3) .workflow-index { color: #ff9fd4; }
body.raycast-preview .workflow.premium-flow .workflow-step:nth-child(4) .workflow-index { color: #74dfbd; }

body.raycast-preview .workflow.premium-flow .workflow-step:nth-child(2) .workflow-index::after { animation-delay: 1.35s; }
body.raycast-preview .workflow.premium-flow .workflow-step:nth-child(3) .workflow-index::after { animation-delay: 2.7s; }
body.raycast-preview .workflow.premium-flow .workflow-step:nth-child(4) .workflow-index::after { animation-delay: 4.05s; }

body.raycast-preview .workflow.premium-flow .workflow-icon {
  position: relative;
  z-index: 1;
  width: 53px;
  height: 53px;
  color: currentColor;
  filter: drop-shadow(0 8px 11px rgba(0,0,0,.32));
}

body.raycast-preview .workflow.premium-flow .workflow-app-icon {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 10px 13px rgba(66,77,255,.4));
}

body.raycast-preview .workflow.premium-flow .workflow-step h3 { margin-top: 25px; font-size: 18px; }
body.raycast-preview .workflow.premium-flow .workflow-step p { max-width: 260px; font-size: 13.5px; }

/* The final call to action is a centred closing frame. */
body.raycast-preview .final-cta {
  display: flex;
  width: min(920px, calc(100% - 48px));
  min-height: 474px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 24px auto 96px;
  padding: 70px 54px;
}

body.raycast-preview .final-cta h2 { max-width: 690px; }
body.raycast-preview .final-cta .hero-actions { justify-content: center; }
body.raycast-preview .final-cta::before { animation: cta-drift 8s ease-in-out infinite alternate; }
body.raycast-preview .final-cta::after { animation: cta-drift 10s ease-in-out -3s infinite alternate-reverse; }

.preview-motion-badge {
  position: fixed;
  z-index: 35;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(212, 204, 255, .22);
  border-radius: 999px;
  color: #cfc5ff;
  background: rgba(13, 16, 24, .86);
  box-shadow: 0 15px 35px -22px rgba(0,0,0,.95);
  backdrop-filter: blur(16px) saturate(1.25);
  font: 600 10.5px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .025em;
}

.preview-motion-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: #8b6dff;
  box-shadow: 0 0 0 4px rgba(139,109,255,.15);
}

.preview-motion-badge a {
  color: #f2f4f8;
  text-decoration: none;
}

.preview-motion-badge a:hover { text-decoration: underline; text-underline-offset: 3px; }

@keyframes raycast-float {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -6px, 0); }
}

@keyframes flow-sweep {
  0%, 12% { opacity: 0; transform: translateX(-130%); }
  19% { opacity: 1; }
  78% { opacity: 1; }
  88%, 100% { opacity: 0; transform: translateX(520%); }
}

@keyframes flow-particle {
  0%, 14% { opacity: 0; left: 0; }
  18% { opacity: 1; }
  78% { opacity: 1; }
  86%, 100% { opacity: 0; left: 100%; }
}

@keyframes node-aura {
  0%, 13%, 100% { opacity: 0; transform: scale(.87); }
  20% { opacity: .68; }
  44% { opacity: 0; transform: scale(1.18); }
}

@keyframes cta-drift {
  from { transform: translate3d(-10px, -2px, 0) scale(.98); }
  to { transform: translate3d(24px, 12px, 0) scale(1.09); }
}

@keyframes film-sheen {
  from { opacity: .34; transform: translateX(-3%); }
  to { opacity: .68; transform: translateX(3%); }
}

@media (max-width: 780px) {
  body.raycast-preview .product-stage .app-window { transform: none; }
  body.raycast-preview .workflow.premium-flow .workflow-rail {
    top: 32px;
    right: auto;
    bottom: 28px;
    left: 37px;
    width: 2px;
    height: auto;
    background: linear-gradient(#62a0ff, #8b6dff 47%, #ff93cc 78%, #74dfbd);
  }
  body.raycast-preview .workflow.premium-flow .workflow-rail::before {
    top: 0;
    left: -3px;
    width: 8px;
    height: 24%;
    background: linear-gradient(transparent, #f5d7ff 50%, #81b5ff, transparent);
    transform: translateY(-130%);
    animation-name: flow-sweep-mobile;
  }
  body.raycast-preview .workflow.premium-flow .workflow-rail::after {
    top: 0;
    left: 50%;
    animation-name: flow-particle-mobile;
  }
  body.raycast-preview .workflow.premium-flow .workflow-index {
    width: 74px;
    height: 74px;
    border-radius: 19px;
  }
  body.raycast-preview .workflow.premium-flow .workflow-index::before { inset: 6px; border-radius: 14px; }
  body.raycast-preview .workflow.premium-flow .workflow-icon { width: 37px; height: 37px; }
  body.raycast-preview .workflow.premium-flow .workflow-app-icon { width: 44px; height: 44px; }
  body.raycast-preview .workflow.premium-flow .workflow-step { grid-template-columns: 74px 1fr; column-gap: 20px; }
  body.raycast-preview .workflow.premium-flow .workflow-step h3 { margin-top: 0; }
  body.raycast-preview .final-cta { width: min(620px, calc(100% - 30px)); min-height: 420px; padding: 50px 25px; }
  .preview-motion-badge { right: 10px; bottom: 10px; }
}

@media (max-width: 540px) {
  body.raycast-preview .workflow.premium-flow .workflow-rail { left: 29px; }
  body.raycast-preview .workflow.premium-flow .workflow-index { width: 58px; height: 58px; border-radius: 15px; }
  body.raycast-preview .workflow.premium-flow .workflow-icon { width: 30px; height: 30px; }
  body.raycast-preview .workflow.premium-flow .workflow-app-icon { width: 36px; height: 36px; }
  body.raycast-preview .workflow.premium-flow .workflow-step { grid-template-columns: 58px 1fr; column-gap: 15px; }
}

@keyframes flow-sweep-mobile {
  0%, 12% { opacity: 0; transform: translateY(-130%); }
  19% { opacity: 1; }
  78% { opacity: 1; }
  88%, 100% { opacity: 0; transform: translateY(520%); }
}

@keyframes flow-particle-mobile {
  0%, 14% { opacity: 0; top: 0; }
  18% { opacity: 1; }
  78% { opacity: 1; }
  86%, 100% { opacity: 0; top: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  body.raycast-preview.motion-ready .motion-reveal {
    opacity: 0;
    transform: translateY(18px) scale(.988);
    transition: opacity .62s cubic-bezier(.16, 1, .3, 1), transform .62s cubic-bezier(.16, 1, .3, 1);
  }

  body.raycast-preview.motion-ready .motion-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.raycast-preview *,
  body.raycast-preview *::before,
  body.raycast-preview *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
