/* AM MotionKit — website
   Same visual system as the panel: cool near-black, one violet accent. */

:root {
  --bg: #0c0c0e;
  --bg-alt: #111113;
  --surface: #18181b;
  --surface-hi: #202023;
  --line: #28272b;
  --line-soft: #1c1c1f;

  --text: #e4e3ec;
  --text-mid: #9693a3;
  --text-dim: #696775;

  --accent: #9d8cff;
  --accent-hi: #b6a9ff;
  --accent-text: #c7bdff;
  --accent-deep: #6b4fe6;
  --on-accent: #0e0b24;

  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
b { font-weight: 600; color: var(--text); }

::selection { background: rgba(157, 140, 255, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap.narrow { max-width: 820px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--accent-hi), var(--accent) 55%, var(--accent-deep));
  color: var(--on-accent);
  font: 600 15px/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 24px -6px rgba(157, 140, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn > * { position: relative; z-index: 1; }

/* A sheen that sweeps across on hover */
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg) translateX(0);
  pointer-events: none;
}
.btn:hover::after { transform: skewX(-20deg) translateX(420%); transition: transform 0.75s var(--ease); }

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(157, 140, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.08s; }

/* The download arrow drops into the tray */
.btn:hover .dl-icon path { animation: drop 0.6s var(--ease); }
@keyframes drop {
  0% { transform: translateY(0); }
  40% { transform: translateY(4px); }
  100% { transform: translateY(0); }
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-lg { padding: 15px 24px; font-size: 16px; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
  box-shadow: none;
}
.btn-ghost:hover { border-color: rgba(157, 140, 255, 0.45); background: var(--surface); box-shadow: 0 0 0 4px rgba(157, 140, 255, 0.06); }
.btn-ghost::after { background: linear-gradient(100deg, transparent, rgba(157, 140, 255, 0.18), transparent); }

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav.is-scrolled {
  background: rgba(12, 12, 14, 0.78);
  border-bottom-color: var(--line-soft);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font: 700 19px/1 var(--display);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand em { font-style: normal; font-weight: 500; color: var(--text-mid); }

.brand-mark {
  width: 40px;
  height: 20px;
  fill: var(--accent);
  filter: drop-shadow(0 2px 10px rgba(157, 140, 255, 0.45));
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  padding: 4px 0;
  color: var(--text-mid);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.is-current::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.is-current { color: var(--text); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
}

/* Soft violet light behind the demo */
.hero::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -10%;
  width: 70%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(157, 140, 255, 0.13), transparent 70%);
  pointer-events: none;
}

/* Faint grid, like a graph editor */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}

/* A huge ease curve drawing itself across the hero */
.hero-curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-curve-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  opacity: 0.22;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.4s 0.3s var(--ease) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--text-mid);
  font-size: 15px;
}

.pill {
  padding: 4px 10px;
  background: rgba(157, 140, 255, 0.1);
  border: 1px solid rgba(157, 140, 255, 0.35);
  border-radius: 999px;
  color: var(--accent-text);
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: var(--display); margin: 0; }

h1 {
  font-size: clamp(31px, 9.4vw, 80px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

/* Two lines: the headline is a pair, not a paragraph. Below 400px it may
   wrap as a last resort, so it can never push the page sideways.
   Each line is a mask the words slide up through on load. */
.h1-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.h1-in { display: inline-block; }
@media (min-width: 400px) { .h1-line { white-space: nowrap; } }
@media (min-width: 981px) { h1 { font-size: clamp(56px, 6vw, 80px); } }

.accent {
  background: linear-gradient(100deg, var(--accent-hi), var(--accent) 45%, #7f5cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 540px;
  margin: 26px 0 34px;
  color: var(--text-mid);
  font-size: 19px;
  line-height: 1.6;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-meta {
  margin: 18px 0 0;
  color: var(--text-dim);
  font: 400 13px/1.5 var(--mono);
}

/* --- Live demo --------------------------------------------------------- */

.hero-demo {
  width: 100%;
  max-width: 340px;
  margin: 0;
  justify-self: center;
}

.demo-frame {
  --rx: 2deg;
  --ry: -5deg;
  width: 100%;
  overflow: hidden;
  background: #111113;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 60px -10px rgba(157, 140, 255, 0.15);
  transform: perspective(1400px) rotateY(var(--ry)) rotateX(var(--rx));
  transition: transform 0.9s var(--ease), box-shadow 0.4s var(--ease);
}
.hero-demo:hover .demo-frame {
  --rx: 0deg;
  --ry: 0deg;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(157, 140, 255, 0.18), 0 0 80px -10px rgba(157, 140, 255, 0.25);
}

.demo-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  background: #19191c;
  border-bottom: 1px solid #232226;
}
.demo-bar span { width: 9px; height: 9px; border-radius: 50%; background: #2f2e34; }
.demo-bar b {
  margin-left: 8px;
  color: var(--text-dim);
  font: 500 11px/1 var(--body);
}

.demo-frame iframe {
  width: 100%;
  height: 580px;
  border: 0;
  background: #111113;
}

.hero-demo figcaption {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 340px;
  margin: 18px auto 0;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.5;
}

.live-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(157, 140, 255, 0.6);
  animation: live 2s infinite;
}
@keyframes live {
  70%  { box-shadow: 0 0 0 8px rgba(157, 140, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(157, 140, 255, 0); }
}

/* ==========================================================================
   Strip
   ========================================================================== */

.strip {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-alt);
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.strip-grid > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 28px 0;
}
.strip-grid > div + div { padding-left: 28px; border-left: 1px solid var(--line-soft); }

.strip b {
  color: var(--accent);
  font: 800 38px/1 var(--display);
  letter-spacing: -0.03em;
}
.strip span { color: var(--text-mid); font-size: 15px; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.section-head { max-width: 680px; margin-bottom: 56px; }

.kicker {
  margin: 0 0 14px;
  color: var(--accent-text);
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.section-sub { margin: 18px 0 0; color: var(--text-mid); font-size: 18px; }

/* --- Modules ------------------------------------------------------------ */

.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.module {
  position: relative;
  padding: 32px;
  background: linear-gradient(180deg, var(--surface), #141416);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.module:hover { border-color: #24203a; transform: translateY(-3px); }

.module-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  background: linear-gradient(145deg, var(--accent-hi), var(--accent-deep));
  border-radius: 11px;
  box-shadow: 0 6px 18px -6px rgba(157, 140, 255, 0.6);
}
.module-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.module > p { margin: 10px 0 20px; color: var(--text-mid); }

.module ul {
  margin: 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid var(--line-soft);
}

.module li {
  position: relative;
  padding: 5px 0 5px 20px;
  color: var(--text-mid);
  font-size: 15.5px;
}
.module li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

/* --- Details ------------------------------------------------------------ */

.details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 36px;
}

.detail { padding-top: 22px; border-top: 1px solid var(--line); position: relative; }
.detail::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--accent);
}
.detail h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; }
.detail p { margin: 10px 0 0; color: var(--text-mid); font-size: 15.5px; }

/* --- Install ------------------------------------------------------------ */

.os-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 36px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

.os-tabs button {
  padding: 8px 20px;
  background: none;
  border: 0;
  border-radius: 999px;
  color: var(--text-mid);
  font: 500 14.5px/1 var(--body);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.os-tabs button[aria-selected="true"] { background: var(--surface-hi); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0,0.4); }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps[hidden] { display: none; }

.step {
  position: relative;
  padding: 0 0 38px 64px;
  counter-increment: step;
}
.step:last-child { padding-bottom: 0; }

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -4px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid #27204a;
  border-radius: 50%;
  color: var(--accent-text);
  font: 700 17px/1 var(--display);
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 19.5px;
  top: 44px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.step h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; }
.step p { margin: 8px 0 0; color: var(--text-mid); }
.step .hint { font-size: 14.5px; color: var(--text-dim); }

.code {
  position: relative;
  margin: 12px 0 0;
  background: #08080a;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.code pre {
  margin: 0;
  padding: 16px 92px 16px 18px;
  overflow-x: auto;
  color: #d2cde9;
  font: 400 13.5px/1.7 var(--mono);
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  background: var(--surface-hi);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-mid);
  font: 500 12.5px/1 var(--body);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.copy:hover { color: var(--text); border-color: #42404a; }
.copy.is-done { color: #8fd6a4; border-color: #2f5a3b; }

.install-note {
  margin: 40px 0 0;
  padding: 16px 18px;
  background: rgba(157, 140, 255, 0.06);
  border-left: 2px solid var(--accent);
  border-radius: 0 10px 10px 0;
  color: var(--text-mid);
  font-size: 15.5px;
}

/* --- FAQ ------------------------------------------------------------------ */

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }

.faq summary {
  position: relative;
  padding: 22px 40px 22px 0;
  font: 600 18px/1.4 var(--body);
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--accent); }
.faq summary:hover { color: var(--accent-text); }

.faq details p { margin: -6px 0 24px; max-width: 680px; color: var(--text-mid); }

/* --- Final CTA ---------------------------------------------------------- */

.final {
  position: relative;
  padding: 128px 0;
  overflow: hidden;
  text-align: center;
}
.final::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 900px;
  height: 500px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(157, 140, 255, 0.14), transparent);
  pointer-events: none;
}

.final-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.final-mark { width: 96px; height: 48px; fill: var(--accent); margin-bottom: 30px; filter: drop-shadow(0 6px 24px rgba(157, 140, 255, 0.45)); }
.final h2 { margin-bottom: 34px; font-size: clamp(36px, 5.5vw, 64px); }

/* --- Footer --------------------------------------------------------------- */

.footer { border-top: 1px solid var(--line-soft); padding: 32px 0 40px; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-dim);
  font-size: 14px;
}
.footer p { margin: 0; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* --- Toast ---------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  padding: 11px 18px;
  background: #1c1b1f;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 14.5px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* --- Scroll reveal -------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Entrance choreography (only when JS is on — without it, all is visible)
   ========================================================================== */

.js .nav { opacity: 0; transform: translateY(-12px); }
.js.is-ready .nav { opacity: 1; transform: none; transition: opacity 0.8s var(--ease) 0.05s, transform 0.8s var(--ease) 0.05s, background 0.3s var(--ease), border-color 0.3s var(--ease); }

.js .enter { opacity: 0; transform: translateY(18px); }
.js.is-ready .enter {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease) calc(var(--d) * 110ms + 120ms),
              transform 0.9s var(--ease) calc(var(--d) * 110ms + 120ms);
}

.js .enter-line { transform: translateY(112%); }
.js.is-ready .enter-line {
  transform: none;
  transition: transform 1.15s cubic-bezier(0.2, 0.85, 0.2, 1) calc(var(--d) * 130ms + 60ms);
}

.js .enter-demo { opacity: 0; transform: translateY(46px) scale(0.95); }
.js.is-ready .enter-demo {
  opacity: 1;
  transform: none;
  transition: opacity 1.2s var(--ease) 0.5s, transform 1.5s cubic-bezier(0.2, 0.85, 0.2, 1) 0.5s;
}

/* Headings reveal word by word, each word rising through its own mask */
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.split .w > span { display: inline-block; }
.js .split .w > span {
  transform: translateY(108%);
  transition: transform 0.95s cubic-bezier(0.2, 0.85, 0.2, 1) calc(var(--wi) * 55ms + 80ms);
}
.js .is-in .split .w > span { transform: none; }

/* Scroll progress */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-hi));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* The AM blades hop, one after another */
.blades > * { transform-box: fill-box; transform-origin: 50% 100%; }
.brand:hover .blades > * { animation: blade 0.75s var(--ease) calc(var(--i) * 60ms); }
@keyframes blade {
  0%   { transform: none; }
  30%  { transform: translateY(-16%) scaleY(1.08); }
  60%  { transform: translateY(5%) scaleY(0.94); }
  100% { transform: none; }
}
.blades-loop > * { animation: blade-loop 4.2s var(--ease) calc(var(--i) * 90ms) infinite; }
.final-inner:hover .blades-loop > * { animation-duration: 1.4s; }
@keyframes blade-loop {
  0%, 68%, 100% { transform: none; }
  76% { transform: translateY(-18%) scaleY(1.08); }
  85% { transform: translateY(6%) scaleY(0.93); }
  92% { transform: translateY(-2%); }
}

.final::before { animation: glow 7s ease-in-out infinite; }
@keyframes glow { 50% { opacity: 0.55; transform: translate(-50%, -50%) scale(1.12); } }

/* Strip numbers */
.strip b { font-variant-numeric: tabular-nums; }
.strip-grid > div { transition: background 0.3s var(--ease); }
.strip-grid > div:hover b { text-shadow: 0 0 24px rgba(157, 140, 255, 0.5); }

/* Module cards: a spotlight follows the cursor */
.module { overflow: hidden; }
.module::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(157, 140, 255, 0.11), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.module:hover::after { opacity: 1; }
.module-icon { transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.module:hover .module-icon { transform: rotate(-8deg) scale(1.1); }
.module li::before { transition: background 0.3s var(--ease); }
.module:hover li::before { background: var(--accent); }
.module:hover li:nth-child(2)::before { transition-delay: 60ms; }
.module:hover li:nth-child(3)::before { transition-delay: 120ms; }
.module:hover li:nth-child(4)::before { transition-delay: 180ms; }

/* Details: the violet rule draws in, and runs full width on hover */
.js .detail::before { width: 0; transition: width 0.9s var(--ease) 0.25s; }
.js .detail.is-in::before { width: 36px; }
.js .detail.is-in:hover::before, .detail:hover::before { width: 100%; transition-delay: 0s; }
.detail h3 { transition: color 0.3s var(--ease); }
.detail:hover h3 { color: var(--accent-text); }

/* Install: numbers pop, connectors draw */
.js .step::before { transform: scale(0.4); opacity: 0; transition: transform 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) 0.1s, opacity 0.3s 0.1s; }
.js .step.is-in::before { transform: none; opacity: 1; }
.js .step:not(:last-child)::after { transform: scaleY(0); transform-origin: top; transition: transform 1s var(--ease) 0.4s; }
.js .step.is-in:not(:last-child)::after { transform: none; }
.code { transition: border-color 0.3s var(--ease); }
.code:hover { border-color: #32303d; }

.os-tabs { position: relative; }
.os-tabs button { position: relative; z-index: 1; }
.os-tabs button[aria-selected="true"] { background: none; box-shadow: none; }
.os-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--pw, 86px);
  transform: translateX(var(--px, 4px));
  background: var(--surface-hi);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(157, 140, 255, 0.2);
  transition: transform 0.45s cubic-bezier(0.3, 1.3, 0.5, 1), width 0.45s var(--ease);
}

.faq-a { overflow: hidden; }
.faq details { transition: background 0.3s var(--ease); }
.faq summary { transition: color 0.2s var(--ease), padding-left 0.3s var(--ease); }
.faq summary:hover { padding-left: 6px; }

/* ==========================================================================
   How it works — flow
   ========================================================================== */

.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 0 0 72px;
  padding: 0;
  list-style: none;
}

.flow-step {
  position: relative;
  padding: 26px 26px 24px;
  background: linear-gradient(180deg, var(--surface), #141416);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.flow-step:hover { border-color: #24203a; transform: translateY(-3px); }

.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 54px;
  right: -22px;
  width: 22px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 8px);
  opacity: 0.6;
}

.flow-step h3 { margin-top: 18px; font-size: 22px; letter-spacing: -0.02em; }
.flow-step p { margin: 8px 0 0; color: var(--text-mid); font-size: 15.5px; }

.flow-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: #17151f;
  border: 1px solid #24203a;
  border-radius: 15px;
}
.flow-icon svg { width: 40px; height: 40px; overflow: visible; }

.fi-select .marquee { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 3; }
.fi-select .sel-a, .fi-select .sel-b { fill: var(--accent); opacity: 0.35; }
.is-in .fi-select .marquee { animation: ants 1s linear infinite; }
.is-in .fi-select .sel-a { animation: blink 2.4s ease-in-out infinite; }
.is-in .fi-select .sel-b { animation: blink 2.4s ease-in-out 0.6s infinite; }
@keyframes ants { to { stroke-dashoffset: -14; } }
@keyframes blink { 50% { opacity: 1; } }

.fi-click .btnshape { fill: #18142a; stroke: var(--accent); stroke-width: 1.5; }
.fi-click .ring { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.fi-click .arrow { fill: #fff; stroke: #0c0c0e; stroke-width: 1; transform-box: fill-box; transform-origin: 0 0; }
.is-in .fi-click .ring { animation: ring 1.8s var(--ease) infinite; }
.is-in .fi-click .arrow { animation: press 1.8s var(--ease) infinite; }
@keyframes ring { 0%, 18% { opacity: 0; transform: scale(0.4); } 22% { opacity: 1; } 70%, 100% { opacity: 0; transform: scale(2.2); } }
@keyframes press { 0%, 12%, 30%, 100% { transform: none; } 20% { transform: scale(0.85); } }

.fi-done .c { fill: none; stroke: #6fc48a; stroke-width: 2; opacity: 0.4; }
.fi-done .tick { fill: none; stroke: #6fc48a; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-in .fi-done .tick { animation: tick 2.4s var(--ease) 0.4s infinite; }
.is-in .fi-done .c { animation: cpulse 2.4s var(--ease) 0.4s infinite; }
@keyframes tick { 0% { stroke-dashoffset: 1; } 30%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes cpulse { 25% { opacity: 1; } 60%, 100% { opacity: 0.4; } }

/* ==========================================================================
   How it works — the film
   ========================================================================== */

.film { margin: 0 0 72px; }
.film-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0b0b0e;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02), 0 0 120px -50px rgba(157, 140, 255, 0.35);
}
.film-frame video { display: block; width: 100%; height: 100%; object-fit: cover; background: #0b0b0e; }

.film-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 20px;
  padding: clamp(18px, 4vw, 44px);
  border: 0;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(11, 11, 14, 0) 45%, rgba(11, 11, 14, 0.85)),
    url("/motionkit/video/poster-bb19bd13.jpg") center / cover no-repeat;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.film.is-playing .film-play { opacity: 0; visibility: hidden; }

.film-btn {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(58px, 7vw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--accent-hi), var(--accent) 55%, var(--accent-deep));
  color: var(--on-accent);
  box-shadow: 0 16px 40px -10px rgba(157, 140, 255, 0.7);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.film-btn svg { width: 42%; height: 42%; margin-left: 8%; fill: currentColor; }
.film-btn::before, .film-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: film-ring 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.film-btn::after { animation-delay: 1.2s; }
@keyframes film-ring { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.9); opacity: 0; } }
.film-play:hover .film-btn, .film-play:focus-visible .film-btn { transform: scale(1.12); }

.film-label { display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; }
.film-label b { font: 700 clamp(20px, 2.6vw, 32px)/1.05 var(--display); letter-spacing: -0.03em; }
.film-label span { color: var(--text-mid); font-size: clamp(13px, 1.4vw, 15.5px); }

.film-chaps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.film-chap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-mid);
  font: 500 13.5px/1 var(--body);
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.film-chap b { color: var(--accent-text); font: 500 12px/1 var(--mono); }
.film-chap:hover { color: var(--text); border-color: rgba(157, 140, 255, 0.5); transform: translateY(-2px); }
.film-chap.is-on { color: var(--text); background: rgba(157, 140, 255, 0.12); border-color: rgba(157, 140, 255, 0.55); }

.play-icon { width: 16px; height: 16px; fill: currentColor; }

/* ==========================================================================
   How it works — feature tour (one stage, auto-advancing tabs)
   ========================================================================== */

.tour {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 40px;
  align-items: center;
}

.tour-stage { isolation: isolate; }
.tour-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(7%) scale(0.97);
  transition: opacity 0.45s var(--ease), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.9s;
}
.tour-slide.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0.06s, 0.06s, 0s; z-index: 1; }
.tour-slide.is-off { transform: translateX(-7%) scale(0.97); }

.tour-list { display: flex; flex-direction: column; gap: 4px; }
.tour-tab {
  position: relative;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px 16px 14px 26px;
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: var(--text-mid);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.tour-tab:hover { background: rgba(255, 255, 255, 0.025); color: var(--text); }
.tour-tab[aria-selected="true"] { background: linear-gradient(90deg, rgba(157, 140, 255, 0.1), rgba(157, 140, 255, 0.02)); color: var(--text); }

.tour-bar {
  position: absolute;
  left: 10px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}
.tour-bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: 50% 0; transform: scaleY(0); }
.tour-tab[aria-selected="true"] .tour-bar i { box-shadow: 0 0 10px var(--accent); }

.tour-where { color: var(--text-dim); font: 500 11.5px/1 var(--mono); letter-spacing: 0.05em; transition: color 0.35s var(--ease); }
.tour-tab[aria-selected="true"] .tour-where { color: var(--accent-text); }
.tour-title { font: 700 19px/1.15 var(--display); letter-spacing: -0.02em; }
.tour-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s var(--ease);
}
.tour-body > span { overflow: hidden; color: var(--text-mid); font-size: 15px; line-height: 1.5; }
.tour-tab[aria-selected="true"] .tour-body { grid-template-rows: 1fr; opacity: 1; transition-delay: 0.1s; }

.js .tour.reveal { opacity: 1; transform: none; }
.js .tour.reveal .tour-stage { transform: translateY(30px) scale(0.96); opacity: 0; transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s var(--ease); }
.js .tour.reveal .tour-tab { transform: translateX(24px); opacity: 0; transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease); }
.js .tour.reveal.is-in .tour-stage, .js .tour.reveal.is-in .tour-tab { transform: none; opacity: 1; }
.js .tour.reveal.is-in .tour-tab:nth-child(2) { transition-delay: 0.06s, 0.06s, 0s, 0s; }
.js .tour.reveal.is-in .tour-tab:nth-child(3) { transition-delay: 0.12s, 0.12s, 0s, 0s; }
.js .tour.reveal.is-in .tour-tab:nth-child(4) { transition-delay: 0.18s, 0.18s, 0s, 0s; }
.js .tour.reveal.is-in .tour-tab:nth-child(5) { transition-delay: 0.24s, 0.24s, 0s, 0s; }
.js .tour.reveal.is-in .tour-tab:nth-child(6) { transition-delay: 0.3s, 0.3s, 0s, 0s; }

/* ==========================================================================
   Scenes (560×350 design space, scaled to fit by demos.js)
   ========================================================================== */

.scene-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 560 / 350;
  overflow: hidden;
  background: #101012;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.scene-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.scene {
  position: absolute;
  left: 0;
  top: 0;
  width: 560px;
  height: 350px;
  transform-origin: 0 0;
  color: var(--text);
  font-family: var(--body);
  font-size: 11px;
  line-height: 1.3;
}
.scene * { will-change: auto; }

.sc-card {
  position: absolute;
  background: #17171a;
  border: 1px solid #242327;
  border-radius: 10px;
}

.sc-label {
  position: absolute;
  left: 12px;
  top: 11px;
  color: var(--text-dim);
  font: 500 8.5px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Cursor */
.cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  width: 20px;
  height: 20px;
  transform-origin: 2px 1px;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
.cursor svg { width: 20px; height: 20px; }
.cursor path { fill: #fff; stroke: #0c0c0e; stroke-width: 1.2; stroke-linejoin: round; }
.ripple {
  position: absolute;
  left: -14px;
  top: -15px;
  width: 32px;
  height: 32px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
}

/* --- 1 · Ease ----------------------------------------------------------- */
.a-graph { left: 24px; top: 24px; width: 236px; height: 236px; }
.a-graph svg { width: 236px; height: 236px; overflow: visible; }
.a-graph .grid line { stroke: #222125; stroke-width: 1; }
.a-graph .lin { stroke: #605e6b; stroke-width: 1; stroke-dasharray: 3 4; }
.a-graph .ph { stroke: #c9c6d8; stroke-width: 1; }
.a-graph .arm { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: 0.5; }
.a-graph .crv { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(157, 140, 255, 0.45)); }
.a-graph .hd { fill: var(--accent); stroke: #17171a; stroke-width: 2.5; }
.a-graph .dot { fill: #fff; filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7)); }

.a-stage { left: 276px; top: 24px; width: 260px; height: 236px; }
.lane { position: absolute; left: 0; right: 0; height: 60px; }
.lane.l1 { top: 58px; }
.lane.l2 { top: 138px; }
.lane-name { position: absolute; left: 20px; top: 0; color: var(--text-dim); font: 500 9.5px/1 var(--mono); }
.lane .track { position: absolute; left: 20px; right: 20px; top: 34px; height: 1px; background: #2b2a30; }
.lane .sq { position: absolute; left: 20px; top: 20px; width: 28px; height: 28px; border-radius: 7px; }
.lane .ghost { background: #605e6b; }
.lane .accent { background: linear-gradient(145deg, var(--accent-hi), var(--accent-deep)); box-shadow: 0 4px 16px rgba(157, 140, 255, 0.5); }

.a-sliders {
  left: 24px;
  top: 276px;
  width: 512px;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--text-dim);
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.a-sl { position: relative; flex: 1 1 0; height: 3px; background: #2b2a30; border-radius: 2px; }
.a-sl i { position: absolute; display: block; }
.a-sl .fill { left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 2px; }
.a-sl .knob { top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); border: 2px solid #17171a; }
.a-sliders b { width: 34px; color: var(--accent-text); font: 600 11px/1 var(--body); letter-spacing: 0; text-align: right; }

/* --- 2 · Anchor --------------------------------------------------------- */
.b-stage { left: 24px; top: 24px; width: 328px; height: 302px; }
.b-svg { position: absolute; left: 0; top: 0; width: 328px; height: 302px; overflow: visible; }
.b-layer { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5)); }
.b-anchor circle, .b-anchor line { fill: none; stroke: #fff; }
.b-anchor circle { stroke-width: 2; }
.b-anchor line { stroke-width: 1.5; }
.b-anchor { filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.9)); }

.b-panel { left: 368px; top: 24px; width: 168px; height: 302px; }
.b-grid {
  position: absolute;
  left: 24px;
  top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 36px);
  gap: 6px;
}
.b-grid i {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
}
/* the layer's bounds, with the nine points on them — like the panel */
.b-grid::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(157, 140, 255, 0.45);
  border-radius: 6px;
  background:
    linear-gradient(rgba(157, 140, 255, 0.14), rgba(157, 140, 255, 0.14)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(157, 140, 255, 0.14), rgba(157, 140, 255, 0.14)) 0 50% / 100% 1px no-repeat,
    linear-gradient(145deg, rgba(182, 169, 255, 0.16), rgba(107, 79, 230, 0.1));
  box-shadow: 0 8px 22px -10px rgba(157, 140, 255, 0.5);
}
.b-grid i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #2a2733;
  border: 1.5px solid #8b82c7;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1), background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.b-grid i.on::after { background: var(--accent); border-color: #fff; transform: scale(1.6); box-shadow: 0 0 10px var(--accent); }

.b-status {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 226px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  background: #15201a;
  border: 1px solid #2f5a3b;
  border-radius: 8px;
  color: #bfe3c9;
  font: 500 11px/1 var(--body);
  opacity: 0;
}
.b-status svg { width: 13px; height: 13px; fill: none; stroke: #6fc48a; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* --- 3 · Elastic & Bounce ----------------------------------------------- */
.c-chips { position: absolute; left: 24px; top: 22px; display: flex; gap: 6px; }
.c-chip {
  padding: 7px 14px;
  background: linear-gradient(180deg, #1a1a20, #16161b);
  border: 1px solid #1d1d23;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  color: var(--text-mid);
  font: 550 11px/1 var(--body);
  transition: background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.c-chip.on {
  background: linear-gradient(180deg, #221e36, #1b182b);
  border-color: rgba(157, 140, 255, 0.55);
  color: var(--accent-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 0 14px -6px rgba(157, 140, 255, 0.8);
}

.c-stage { left: 24px; top: 64px; width: 512px; height: 262px; overflow: hidden; }
.c-pop {
  position: absolute;
  left: 70px;
  top: 86px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #dcd5ff, var(--accent) 55%, var(--accent-deep));
  box-shadow: 0 10px 30px rgba(157, 140, 255, 0.35);
}
.c-slide, .c-ghost {
  position: absolute;
  left: 0;
  top: 103px;
  width: 56px;
  height: 56px;
  border-radius: 13px;
}
.c-slide { background: linear-gradient(145deg, var(--accent-hi), var(--accent-deep)); box-shadow: 0 8px 22px rgba(157, 140, 255, 0.35); }
.c-ghost { background: var(--accent); }
.c-floor { position: absolute; left: 150px; right: 150px; top: 216px; height: 2px; background: #32313a; border-radius: 1px; }
.c-shadow { position: absolute; left: 226px; top: 211px; width: 60px; height: 10px; border-radius: 50%; background: #000; filter: blur(3px); }
.c-ball {
  position: absolute;
  left: 234px;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #dcd5ff, var(--accent) 55%, var(--accent-deep));
  transform-origin: 50% 100%;
}

/* --- 4 · Sequence ------------------------------------------------------- */
.d-stage { left: 24px; top: 24px; width: 512px; height: 170px; overflow: hidden; }
.d-tile {
  position: absolute;
  top: 48px;
  width: 80px;
  height: 100px;
  overflow: hidden;
  background: linear-gradient(160deg, #1f1d2b, #19181d);
  border: 1px solid #26223d;
  border-radius: 10px;
}
.d-tile::before { content: ""; position: absolute; left: 10px; right: 10px; top: 12px; height: 34px; border-radius: 6px; background: linear-gradient(145deg, var(--accent-hi), var(--accent-deep)); }
.d-tile::after { content: ""; position: absolute; left: 10px; top: 56px; width: 46px; height: 6px; border-radius: 3px; background: #39364a; box-shadow: 0 12px 0 -1px #2e2b3a, 0 24px 0 -1px #2e2b3a; }
.d-tile:nth-child(3)::before { filter: hue-rotate(-12deg) brightness(0.92); }
.d-tile:nth-child(4)::before { filter: hue-rotate(10deg) brightness(1.05); }
.d-tile:nth-child(5)::before { filter: hue-rotate(-20deg) brightness(0.85); }
.d-tile:nth-child(6)::before { filter: hue-rotate(18deg); }

.d-btn, .e-btn, .f-btn {
  background: linear-gradient(145deg, var(--accent-hi), var(--accent-deep));
  color: var(--on-accent);
  font: 600 11px/1 var(--body);
  box-shadow: 0 4px 12px rgba(157, 140, 255, 0.35);
  transition: transform 0.1s, filter 0.1s;
}
.d-btn { position: absolute; right: 14px; top: 12px; padding: 7px 12px; border-radius: 6px; }
.is-press { transform: scale(0.92); filter: brightness(1.15); }

.d-tl { left: 24px; top: 206px; width: 512px; height: 120px; overflow: hidden; }
.d-row { position: absolute; left: 0; right: 0; height: 17px; }
.d-row span { position: absolute; left: 12px; top: 3px; color: var(--text-dim); font: 500 9.5px/1 var(--mono); }
.d-bar {
  position: absolute;
  display: block;
  left: 92px;
  top: 0;
  width: 150px;
  height: 17px;
  background: linear-gradient(90deg, rgba(157, 140, 255, 0.5), rgba(157, 140, 255, 0.22));
  border: 1px solid rgba(157, 140, 255, 0.55);
  border-radius: 4px;
}
.d-ph { position: absolute; left: 0; top: 6px; bottom: 6px; width: 1.5px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, 0.6); }

/* --- 5 · Tidy ----------------------------------------------------------- */
.k-comp  { --k: #6fc48a; }
.k-pre   { --k: #e89a4a; }
.k-foot  { --k: #5a9fd4; }
.k-audio { --k: #a882d8; }
.k-solid { --k: #e5786c; }

.e-proj { left: 24px; top: 24px; width: 320px; height: 302px; overflow: hidden; }
.e-item, .e-folder {
  position: absolute;
  left: 14px;
  top: 0;
  height: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-mid);
  font: 500 11px/1 var(--body);
  white-space: nowrap;
}
.e-item i { width: 9px; height: 9px; border-radius: 2px; background: #42414a; transition: background 0.35s; }
.e-item.is-filed { color: var(--text); }
.e-item.is-filed i { background: var(--k); box-shadow: 0 0 6px var(--k); }
.e-folder { color: var(--text); font-weight: 600; opacity: 0; }
.e-folder svg { width: 14px; height: 14px; fill: none; stroke: var(--text-mid); stroke-width: 1.3; stroke-linejoin: round; }

.e-side { left: 360px; top: 24px; width: 176px; height: 302px; }
.e-btn { position: absolute; left: 16px; top: 40px; width: 144px; height: 34px; display: grid; place-items: center; border-radius: 8px; font-size: 12px; }
.e-result { position: absolute; left: 18px; right: 16px; top: 100px; margin: 0; padding: 0; list-style: none; }
.e-result li { display: flex; align-items: center; gap: 9px; height: 26px; color: var(--text-mid); font: 500 11px/1 var(--body); opacity: 0; }
.e-result i { width: 9px; height: 9px; border-radius: 2px; background: var(--k); }

/* --- 6 · SRT ------------------------------------------------------------ */
.f-srt { left: 24px; top: 24px; width: 200px; height: 302px; }
.f-code { position: absolute; left: 10px; right: 10px; top: 32px; color: var(--text-mid); font: 400 9px/1.45 var(--mono); }
.f-cue { margin: 0 0 8px; padding: 6px 7px; border: 1px solid transparent; border-radius: 6px; transition: background 0.3s, border-color 0.3s; }
.f-cue span { display: block; }
.f-cue span:first-child { color: var(--text-dim); }
.f-cue span:nth-child(2) { color: #7a778a; font-size: 8px; }
.f-cue span:last-child { color: var(--text); }
.f-cue.on { background: rgba(157, 140, 255, 0.1); border-color: rgba(157, 140, 255, 0.45); }
.f-btn { position: absolute; left: 12px; right: 12px; bottom: 14px; height: 32px; display: grid; place-items: center; border-radius: 8px; font-size: 11.5px; }

.f-stage { left: 240px; top: 24px; width: 296px; height: 166px; overflow: hidden; }
.f-video { position: absolute; inset: 0; background: linear-gradient(135deg, #16122b, #15171d); }
.f-video i { position: absolute; border-radius: 50%; filter: blur(18px); opacity: 0.7; }
.f-video i:nth-child(1) { left: 20px; top: 20px; width: 110px; height: 110px; background: #6b4fe6; animation: drift1 9s ease-in-out infinite; }
.f-video i:nth-child(2) { left: 150px; top: 40px; width: 120px; height: 90px; background: #3d4a6b; animation: drift2 11s ease-in-out infinite; }
.f-video i:nth-child(3) { left: 90px; top: 90px; width: 80px; height: 80px; background: #9d8cff; opacity: 0.4; animation: drift1 7s ease-in-out infinite reverse; }
@keyframes drift1 { 50% { transform: translate(30px, 12px) scale(1.1); } }
@keyframes drift2 { 50% { transform: translate(-26px, -10px) scale(0.9); } }
.f-sub { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; }
.f-sub span {
  display: inline-block;
  padding: 6px 11px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 5px;
  color: #fff;
  font: 600 13px/1.2 var(--display);
  letter-spacing: -0.01em;
  opacity: 0;
}

.f-tl { left: 240px; top: 204px; width: 296px; height: 122px; overflow: hidden; }
.f-row { position: absolute; left: 0; right: 0; height: 18px; }
.f-row span { position: absolute; left: 12px; top: 4px; color: var(--text-dim); font: 500 9.5px/1 var(--mono); }
.f-bar {
  position: absolute;
  display: block;
  height: 18px;
  background: linear-gradient(90deg, rgba(157, 140, 255, 0.55), rgba(157, 140, 255, 0.25));
  border: 1px solid rgba(157, 140, 255, 0.6);
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.f-ph { position: absolute; left: 0; top: 6px; bottom: 6px; width: 1.5px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, 0.6); }


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .hero-copy { text-align: center; }
  .eyebrow, .hero-cta { justify-content: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .demo-frame { transform: none; }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tour { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .js .tour.reveal .tour-tab { transform: translateY(16px); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .hero { padding: 40px 0 72px; }
  .lede { font-size: 17px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .modules { grid-template-columns: 1fr; }
  .module { padding: 26px 22px; }
  .details { grid-template-columns: 1fr; gap: 30px; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-grid > div { padding: 20px 0; }
  .strip-grid > div + div { padding-left: 0; border-left: 0; }
  .strip-grid > div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line-soft); }
  .strip-grid > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .strip b { font-size: 30px; }
  .step { padding-left: 54px; }
  .flow { grid-template-columns: 1fr; gap: 14px; margin-bottom: 72px; }
  .flow-step:not(:last-child)::after { top: auto; bottom: -14px; right: auto; left: 54px; width: 2px; height: 14px;
    background: repeating-linear-gradient(180deg, var(--accent) 0 4px, transparent 4px 8px); }
  .film { margin-bottom: 56px; }
  .film-frame { border-radius: 14px; }
  .film-play { align-items: flex-end; justify-content: flex-end; padding: 12px; background: linear-gradient(180deg, rgba(11, 11, 14, 0.15), rgba(11, 11, 14, 0.55)), url("/motionkit/video/poster-bb19bd13.jpg") center / cover no-repeat; }
  .film-btn { width: 50px; }
  .film-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .film-chaps { flex-wrap: nowrap; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 4px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); }
  .film-chaps::-webkit-scrollbar { display: none; }
  .film-chap { flex: 0 0 auto; }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }
  .flow-step { padding: 14px 12px; text-align: center; }
  .flow-step p { display: none; }
  .flow-step h3 { margin-top: 10px; font-size: 16px; }
  .flow-icon { width: 46px; height: 46px; margin: 0 auto; border-radius: 12px; }
  .flow-icon svg { width: 32px; height: 32px; }
  .flow-step:not(:last-child)::after { display: none; }
  .tour-title { font-size: 17px; }
  .tour-tab { padding: 12px 12px 12px 24px; }
  .flow { margin-bottom: 56px; }
  .scene-wrap { border-radius: 12px; }
  .final { padding: 96px 0; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .nav, .js .enter, .js .enter-line, .js .enter-demo,
  .js .split .w > span,
  .js .tour.reveal .tour-stage, .js .tour.reveal .tour-tab { opacity: 1 !important; transform: none !important; }
  .js .detail::before { width: 36px; }
  .js .step::before { transform: none; opacity: 1; }
  .js .step:not(:last-child)::after { transform: none; }
  .fi-done .tick { stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
  .hero-curve-line { stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; }
  .demo-frame { transform: none; }
}

/* Back to MotionLabs */
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 14px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-mid);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.crumb svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.crumb:hover { color: var(--text); border-color: rgba(157, 140, 255, 0.45); background: rgba(157, 140, 255, 0.06); }
.crumb:hover svg { transform: translateX(-2px); }
@media (max-width: 760px) { .crumb span { display: none; } .crumb { padding: 6px; margin-right: 10px; } }

/* v1.0 install: download link in a step, and the hand-install fallback */
.step-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(157, 140, 255, 0.4);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.step-link:hover { color: #fff; border-color: var(--accent); }
.step p a:not(.step-link) { color: var(--accent-text); text-underline-offset: 3px; }
.manual { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.015); }
.manual summary { padding: 11px 14px; color: var(--text-mid); font-size: 14.5px; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.manual summary::-webkit-details-marker { display: none; }
.manual summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line); font: 500 13px/1 var(--mono); color: var(--accent-text); transition: transform 0.3s var(--ease); }
.manual[open] summary::before { content: "−"; }
.manual summary:hover { color: var(--text); }
.manual > :not(summary) { margin-left: 14px; margin-right: 14px; }
.manual > :last-child { margin-bottom: 14px; }

/* What's new in 1.0 */
.news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.new {
  position: relative;
  padding: 24px 24px 22px;
  background: linear-gradient(180deg, var(--surface), #141416);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease);
}
.new:hover { transform: translateY(-3px); border-color: #2a2540; }
.new-tag { display: inline-block; margin-bottom: 14px; padding: 4px 9px; border-radius: 999px; background: rgba(157, 140, 255, 0.1); color: var(--accent-text); font: 500 11.5px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.new-tag.fix { background: rgba(111, 196, 138, 0.1); color: #8fd6a4; }
.new h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.new p { margin: 8px 0 0; color: var(--text-mid); font-size: 15.5px; }
@media (max-width: 760px) { .news { grid-template-columns: minmax(0, 1fr); } }

/* YouTube film: poster until play, then the player fills the frame */
.film-yt { position: absolute; inset: 0; background: #0b0b0e center / cover no-repeat; }
.film-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.footer-links { flex-wrap: wrap; row-gap: 8px; }
.footer-inner > p { min-width: 0; }
