/* SlothQuery landing page motion and surface details */

:root {
  --sq-ink: #101216;
  --sq-muted: #64748b;
  --sq-line: rgba(15, 23, 42, 0.09);
  --sq-blue: #5b8cff;
  --sq-violet: #9b7cff;
}

html {
  scroll-padding-top: 88px;
}

body {
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

body::after {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.62;
  background:
    radial-gradient(520px circle at var(--pointer-x, 16%) var(--pointer-y, 8%), rgba(91, 140, 255, 0.11), transparent 68%),
    radial-gradient(460px circle at 84% 18%, rgba(155, 124, 255, 0.08), transparent 70%),
    radial-gradient(520px circle at 50% 78%, rgba(45, 212, 191, 0.055), transparent 70%);
  filter: blur(12px);
  animation: ambient-drift 18s ease-in-out infinite alternate;
}

::selection {
  background: #172033;
  color: white;
}

/* Custom Smooth Transitions */
a, button {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

nav {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.025), 0 12px 35px rgba(15, 23, 42, 0.025);
}

nav a:not([href*="github"]):hover {
  text-shadow: 0 0 18px rgba(91, 140, 255, 0.28);
}

.mobile-nav-panel {
  animation: mobile-menu-in 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Custom Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #fafafa;
}

::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

/* Accent Glow Animation */
@keyframes accent-glow {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.glow-effect {
  animation: accent-glow 8s ease-in-out infinite;
}

/* Scroll reveals are enabled only after JavaScript confirms support, so a
   disabled script never leaves the documentation hidden. */
html.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 760ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

html.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

html.motion-ready [data-reveal="scale"] {
  transform: translateY(20px) scale(0.985);
}

html.motion-ready [data-reveal="scale"].is-visible {
  transform: translateY(0) scale(1);
}

.flow-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #0c111c;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.flow-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(135deg, black, transparent 76%);
}

.flow-panel::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  top: -210px;
  right: -120px;
  z-index: -1;
  border-radius: 999px;
  border: 1px solid rgba(91, 140, 255, 0.22);
  box-shadow: 0 0 0 28px rgba(91, 140, 255, 0.025), 0 0 0 56px rgba(155, 124, 255, 0.02);
  animation: orbit-pulse 7s ease-in-out infinite;
}

.flow-step {
  position: relative;
  min-height: 156px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), border-color 360ms ease, background 360ms ease;
}

.flow-step:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 170, 255, 0.62);
  background: rgba(91, 140, 255, 0.09);
}

.flow-connector {
  position: relative;
  height: 1px;
  flex: 1;
  min-width: 22px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.28);
}

.flow-connector::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -35%;
  width: 35%;
  background: linear-gradient(90deg, transparent, #7daaff, transparent);
  animation: signal-flow 2.8s linear infinite;
}

.feature-slider {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  min-height: 520px;
}

.feature-slider-copy {
  position: relative;
  z-index: 2;
}

.feature-slider-count {
  color: #111827;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 13px;
  font-weight: 700;
}

.feature-slider-kicker {
  color: #5b8cff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.feature-slider-title {
  max-width: 28rem;
  margin-top: 1rem;
  color: #101216;
  font-size: clamp(2rem, 4vw, 3.65rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.feature-slider-description {
  max-width: 29rem;
  margin-top: 1.4rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.75;
}

.feature-slider-controls {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2rem;
}

.feature-slider-arrow {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: white;
  color: #334155;
  font-size: 1.1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.feature-slider-arrow:hover {
  border-color: #5b8cff;
  background: #5b8cff;
  color: white;
  transform: translateY(-2px);
}

.feature-slider-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.feature-slider-dot {
  width: 0.42rem;
  height: 0.42rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: width 300ms ease, background 300ms ease, transform 300ms ease;
}

.feature-slider-dot:hover {
  background: #94a3b8;
  transform: scale(1.25);
}

.feature-slider-dot.is-active {
  width: 1.6rem;
  background: #5b8cff;
}

.feature-slider-visual {
  position: relative;
  display: flex;
  min-height: 420px;
  align-items: center;
  justify-content: center;
  transform: perspective(1400px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) translateY(var(--lift, 0px));
  transform-style: preserve-3d;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-slider-visual:hover {
  --lift: -6px;
}

.feature-slider-glow {
  position: absolute;
  width: 74%;
  height: 74%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(91, 140, 255, 0.14), rgba(155, 124, 255, 0.06) 46%, transparent 72%);
  filter: blur(22px);
  animation: accent-glow 8s ease-in-out infinite;
}

.feature-slider-image-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 720px);
  min-height: 340px;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 1.6rem;
  background: rgba(248, 250, 252, 0.76);
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.12), 0 0 0 12px rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(4px);
}

.feature-slider-image-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: linear-gradient(rgba(91, 140, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(91, 140, 255, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(135deg, black, transparent 72%);
  pointer-events: none;
}

.feature-slider-image-wrap img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  border-radius: 0.55rem;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.2);
  transition: opacity 220ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-slider-image-wrap img.is-changing {
  opacity: 0;
  transform: translateX(18px) scale(0.985);
}

.feature-slider-caption {
  position: absolute;
  right: 0;
  bottom: 0.4rem;
  color: #94a3b8;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.download-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #080b12;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.16);
}

.download-panel::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  background: radial-gradient(circle at 75% 48%, rgba(91, 140, 255, 0.22), transparent 30%), radial-gradient(circle at 94% 12%, rgba(155, 124, 255, 0.16), transparent 24%);
  animation: ambient-drift 14s ease-in-out infinite alternate;
}

.download-panel::after {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  right: -120px;
  bottom: -390px;
  border: 1px solid rgba(125, 170, 255, 0.32);
  border-radius: 999px;
  box-shadow: 0 0 0 28px rgba(125, 170, 255, 0.04), 0 0 0 56px rgba(155, 124, 255, 0.035), 0 0 0 84px rgba(125, 170, 255, 0.025);
  animation: orbit-pulse 8s ease-in-out infinite;
}

.download-command {
  position: relative;
  display: flex;
  width: min(100%, 25rem);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.45rem 0.45rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.download-command code {
  color: #e2e8f0;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.75rem;
  white-space: nowrap;
}

.download-command button {
  flex: 0 0 auto;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 0.7rem;
  font-weight: 800;
}

.download-command button:hover {
  background: #bfdbfe;
  transform: translateY(-1px);
}

.feature-card {
  position: relative;
  padding: 1.25rem;
  border: 1px solid transparent;
  border-radius: 1rem;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), border-color 360ms ease, background 360ms ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--sq-line);
  background: rgba(255, 255, 255, 0.72);
}

.feature-card::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--sq-blue), var(--sq-violet), transparent);
  transition: transform 420ms ease;
}

.feature-card:hover::after {
  transform: scaleX(1);
}

@keyframes ambient-drift {
  0% { transform: translate3d(-1%, -1%, 0) scale(1); }
  100% { transform: translate3d(1%, 1%, 0) scale(1.04); }
}

@keyframes orbit-pulse {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.96); opacity: 0.7; }
  50% { transform: translate3d(-18px, 22px, 0) scale(1.04); opacity: 1; }
}

@keyframes signal-flow {
  from { transform: translateX(0); }
  to { transform: translateX(390%); }
}

@keyframes mobile-menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .feature-slider {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: 0;
  }

  .feature-slider-copy {
    max-width: 42rem;
  }

  .feature-slider-visual {
    min-height: 360px;
  }
}

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

  .flow-step {
    min-height: 0;
  }

  .feature-slider-title {
    font-size: 2.7rem;
  }

  .feature-slider-visual {
    min-height: 280px;
  }

  .feature-slider-image-wrap {
    min-height: 250px;
    padding: 0.75rem;
    border-radius: 1.1rem;
  }

  .feature-slider-caption {
    right: 0.5rem;
    bottom: -1.35rem;
    font-size: 8px;
  }

  .download-command {
    width: 100%;
  }

  .download-command code {
    font-size: 0.66rem;
  }
}

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

  html.motion-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
