/* ==========================================================================
   Glide — marketing site
   Dark-first "liquid glass" look with a pastel light variant.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Surfaces & ink */
  --bg: #0d0928;
  --bg-2: #160f3f;
  --ink: #f6f4ff;
  --ink-2: rgba(236, 232, 255, 0.76);
  --ink-3: rgba(221, 214, 254, 0.56);
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.16);

  /* Glass */
  --glass-top: rgba(255, 255, 255, 0.095);
  --glass-bot: rgba(255, 255, 255, 0.035);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-hl: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 30px 70px -30px rgba(3, 1, 22, 0.85), 0 8px 24px -12px rgba(3, 1, 22, 0.5);
  --inset: rgba(8, 5, 32, 0.38);
  --inset-border: rgba(255, 255, 255, 0.07);
  --blur: 22px;

  /* Accents */
  --violet: #a78bfa;
  --indigo: #818cf8;
  --cyan: #67e8f9;
  --teal: #5eead4;
  --pink: #f472b6;
  --accent-ink: #c4b5fd;
  --grad-text: linear-gradient(115deg, #ffffff 8%, #ddd3ff 42%, #9ef0f2 92%);
  --grad-btn: linear-gradient(135deg, #8b5cf6 0%, #6366f1 48%, #0ea5e9 100%);
  --btn-glow: 0 10px 34px -8px rgba(124, 92, 255, 0.75);

  /* Blobs */
  --blob-1: rgba(124, 58, 237, 0.55);
  --blob-2: rgba(20, 184, 166, 0.40);
  --blob-3: rgba(192, 38, 211, 0.34);
  --blob-4: rgba(59, 91, 255, 0.42);
  --grain-opacity: 0.07;

  /* Shape & type */
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Nunito", "Varela Round", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3efff;
    --bg-2: #e9f3ff;
    --ink: #1a1342;
    --ink-2: rgba(26, 19, 66, 0.74);
    --ink-3: rgba(26, 19, 66, 0.54);
    --line: rgba(64, 44, 150, 0.12);
    --line-2: rgba(64, 44, 150, 0.18);

    --glass-top: rgba(255, 255, 255, 0.72);
    --glass-bot: rgba(255, 255, 255, 0.42);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-hl: rgba(255, 255, 255, 1);
    --glass-shadow: 0 30px 70px -34px rgba(76, 55, 170, 0.38), 0 8px 24px -14px rgba(76, 55, 170, 0.22);
    --inset: rgba(120, 100, 220, 0.08);
    --inset-border: rgba(90, 70, 190, 0.10);

    --violet: #7c3aed;
    --indigo: #4f46e5;
    --cyan: #0891b2;
    --teal: #0d9488;
    --pink: #db2777;
    --accent-ink: #6d28d9;
    --grad-text: linear-gradient(115deg, #24145f 10%, #6d28d9 52%, #0e7490 96%);
    --grad-btn: linear-gradient(135deg, #8b5cf6 0%, #6366f1 48%, #0ea5e9 100%);
    --btn-glow: 0 10px 30px -10px rgba(99, 70, 230, 0.6);

    --blob-1: rgba(196, 181, 253, 0.85);
    --blob-2: rgba(153, 246, 228, 0.75);
    --blob-3: rgba(251, 207, 232, 0.85);
    --blob-4: rgba(186, 230, 253, 0.85);
    --grain-opacity: 0.05;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }
p a, .faq a { color: var(--accent-ink); text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
b, strong { font-weight: 650; color: var(--ink); }

::selection { background: rgba(167, 139, 250, 0.45); color: var(--ink); }

:focus-visible {
  outline: 2.5px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 10px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon .fill, svg .fill { fill: currentColor; stroke: none; }
#i-github path { fill: currentColor; stroke: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: fixed;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 16px; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: 860px; }

/* --------------------------------------------------------------- Background */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--bg-2) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%);
}
.blob {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  will-change: transform;
}
.b1 { left: -22vmax; top: -26vmax; background: radial-gradient(closest-side, var(--blob-1), transparent 72%); animation: drift-1 38s ease-in-out infinite alternate; }
.b2 { right: -26vmax; top: -12vmax; background: radial-gradient(closest-side, var(--blob-2), transparent 72%); animation: drift-2 44s ease-in-out infinite alternate; }
.b3 { left: 8vmax; bottom: -40vmax; background: radial-gradient(closest-side, var(--blob-3), transparent 72%); animation: drift-3 50s ease-in-out infinite alternate; }
.b4 { right: -18vmax; bottom: -30vmax; background: radial-gradient(closest-side, var(--blob-4), transparent 72%); animation: drift-1 56s ease-in-out infinite alternate-reverse; }

@keyframes drift-1 { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(14vmax, 10vmax, 0) scale(1.12); } }
@keyframes drift-2 { from { transform: translate3d(0, 0, 0) scale(1.05); } to { transform: translate3d(-12vmax, 16vmax, 0) scale(0.92); } }
@keyframes drift-3 { from { transform: translate3d(0, 0, 0) scale(0.95); } to { transform: translate3d(18vmax, -12vmax, 0) scale(1.1); } }

.grain {
  position: absolute;
  inset: 0;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* --------------------------------------------------------------- Glass */
.glass {
  position: relative;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bot));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 0 var(--glass-hl),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.03),
    var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(165%);
  backdrop-filter: blur(var(--blur)) saturate(165%);
}

/* --------------------------------------------------------------- Buttons */
.btn {
  --h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: var(--h);
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 1.2em; height: 1.2em; stroke-width: 2; }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-sm { --h: 38px; padding: 0 15px; font-size: 14.5px; }
.btn-lg { --h: 56px; padding: 0 28px; font-size: 17.5px; }

.btn-primary {
  color: #fff;
  background: var(--grad-btn);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -8px 18px -10px rgba(10, 0, 60, 0.45), var(--btn-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -8px 18px -10px rgba(10, 0, 60, 0.45), 0 16px 44px -10px rgba(124, 92, 255, 0.9); }

.btn-glass {
  color: var(--ink);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bot));
  border-color: var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hl), 0 8px 24px -14px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
}
.btn-glass:hover { transform: translateY(-2px); border-color: var(--line-2); }

/* --------------------------------------------------------------- Nav */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px var(--gutter) 0;
  padding-top: max(12px, env(safe-area-inset-top));
}
.nav {
  max-width: 1080px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 7px 7px 12px;
  border-radius: 999px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover { color: var(--ink); background: var(--line); }
.nav .btn { margin-left: 4px; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

/* --------------------------------------------------------------- Hero */
.hero {
  position: relative;
  padding: clamp(40px, 7vw, 80px) 0 clamp(40px, 7vw, 80px);
  text-align: center;
}
.hero-graph {
  position: absolute;
  left: 0; right: 0;
  top: 40px;
  width: 100%;
  height: min(78vh, 680px);
  z-index: -1;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 45%, #000 30%, transparent 85%);
  mask-image: radial-gradient(80% 70% at 50% 45%, #000 30%, transparent 85%);
}
@media (max-width: 600px) { .hero-graph { opacity: 0.55; } }
.hg-line { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.hg-a { stroke: url(#hg-a); }
.hg-b { stroke: url(#hg-b); }
.s-cyan { stop-color: var(--cyan); }
.s-violet { stop-color: var(--violet); }
.s-pink { stop-color: var(--pink); }

.js .hg-line { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.6s 0.25s var(--ease) forwards; }
.js .hg-b { animation-delay: 0.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-inner { display: flex; flex-direction: column; align-items: center; }

.hero-icon {
  position: relative;
  width: clamp(112px, 18vw, 150px);
  margin-bottom: 16px;
  animation: float 7s ease-in-out infinite;
}
.hero-icon::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.55), rgba(56, 189, 248, 0.18) 60%, transparent 75%);
  z-index: -1;
  filter: blur(6px);
}
.hero-icon img { width: 100%; filter: drop-shadow(0 22px 34px rgba(30, 10, 90, 0.5)); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bot);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(72px, 13vw, 136px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.92;
  padding: 0 0.04em 0.06em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline {
  margin-top: 10px;
  max-width: 24ch;
  font-size: clamp(27px, 4.2vw, 44px);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede {
  margin-top: 20px;
  max-width: 600px;
  color: var(--ink-2);
  font-size: clamp(17px, 1.9vw, 19.5px);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}
.fine span { white-space: nowrap; }
.fine {
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 14.5px;
  font-weight: 600;
}

.hero-shot {
  --tilt: 0;
  position: relative;
  max-width: 1080px;
  margin: clamp(48px, 8vw, 84px) auto 0;
  transform-origin: 50% 0%;
  transform: perspective(1800px) rotateX(calc(var(--tilt) * 16deg)) scale(calc(1 - var(--tilt) * 0.05));
  will-change: transform;
}
.hero-shot::before {
  content: "";
  position: absolute;
  inset: 8% 6% -4%;
  z-index: -1;
  border-radius: 40px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(139, 92, 246, 0.55), rgba(45, 212, 191, 0.18) 60%, transparent 80%);
  filter: blur(40px);
}
.hero-shot img { width: 100%; filter: drop-shadow(0 40px 60px rgba(4, 1, 26, 0.55)) drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.5)); }

.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  animation: float 8s ease-in-out infinite;
}
.chip .icon { color: var(--cyan); }
.chip-1 { left: -36px; top: 26%; }
.chip-2 { right: -44px; top: 3%; animation-delay: -2.5s; }
.chip-3 { right: 6%; bottom: -22px; animation-delay: -5s; }
.chip .keys kbd { font-size: 12px; min-width: 22px; height: 22px; }

@media (max-width: 1000px) {
  .chip { display: none; }
}

/* keycaps */
.keys { display: inline-flex; gap: 4px; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bot));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 var(--glass-hl), 0 2px 0 var(--line-2);
}
.keys-lg kbd { min-width: 46px; height: 46px; font-size: 20px; border-radius: 12px; }

/* --------------------------------------------------------------- Highlights */
.highlights { padding-top: clamp(24px, 4vw, 40px); }
.hl-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.hl {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
}
.hl strong { display: block; font-size: 16px; line-height: 1.25; }
.hl span:not(.hl-icon) { display: block; color: var(--ink-3); font-size: 14px; line-height: 1.35; margin-top: 2px; }
.hl-icon, .fl-icon, .card-icon, .mode-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--accent-ink);
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.28), rgba(103, 232, 249, 0.10));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 var(--glass-hl);
}
.hl-icon .icon, .fl-icon .icon, .card-icon .icon, .mode-icon .icon { width: 22px; height: 22px; }

@media (max-width: 980px) { .hl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .hl-grid { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------- Sections */
.section { padding: clamp(72px, 11vw, 140px) 0 0; }
.section-head { max-width: 720px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head .body { margin-inline: auto; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--accent-ink);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker .icon { width: 18px; height: 18px; stroke-width: 2; }

h2 {
  font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 800;
  letter-spacing: -0.035em;
}
h3 { font-size: 19px; font-weight: 750; letter-spacing: -0.015em; line-height: 1.25; }
.body { margin-top: 18px; max-width: 560px; color: var(--ink-2); font-size: clamp(17px, 1.7vw, 19px); }

/* Feature split */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.feature-reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature-reverse .feature-copy { order: 2; }
.feature-reverse .feature-media { order: 1; }
.feature-media { position: relative; }
@media (min-width: 961px) {
  .feature { align-items: start; }
  .feature-media { position: sticky; top: 120px; margin-top: 40px; }
}

@media (max-width: 960px) {
  .feature, .feature-reverse { grid-template-columns: minmax(0, 1fr); }
  .feature-reverse .feature-copy { order: 1; }
  .feature-reverse .feature-media { order: 2; }
}

.shot { position: relative; margin: 0; isolation: isolate; }
.shot::before {
  content: "";
  position: absolute;
  inset: 10% 8%;
  z-index: -1;
  border-radius: 40px;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.5), rgba(45, 212, 191, 0.15) 70%, transparent);
  filter: blur(36px);
}
.shot img { width: 100%; filter: drop-shadow(0 30px 50px rgba(4, 1, 26, 0.5)) drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.45)); }
.shot-wide { max-width: 980px; margin: clamp(32px, 5vw, 56px) auto 0; }

@media (prefers-color-scheme: light) {
  .hero-shot img, .shot img { filter: drop-shadow(0 30px 50px rgba(60, 40, 150, 0.28)) drop-shadow(0 0 0.5px rgba(40, 20, 110, 0.35)); }
}

/* Tick list */
.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.ticks .icon {
  margin-top: 3px;
  width: 22px; height: 22px;
  padding: 4px;
  border-radius: 50%;
  stroke-width: 2.6;
  color: #fff;
  background: linear-gradient(140deg, var(--violet), var(--cyan));
}
@media (prefers-color-scheme: light) { .ticks .icon { color: #fff; } }

/* Feature list (buttons) */
.feature-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 20px; }
.feature-list li { display: flex; gap: 16px; align-items: flex-start; }
.feature-list h3 { font-size: 18px; }
.feature-list p { color: var(--ink-2); margin-top: 4px; font-size: 16.5px; }

/* Shared card bits */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.label-caps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.label-caps .icon { width: 17px; height: 17px; }
.card-note { margin-top: 10px; color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-cyan { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

.pill {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(14, 165, 233, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.pill-quiet { color: var(--ink-2); background: var(--line); box-shadow: none; border: 1px solid var(--line-2); }

/* --------------------------------------------------------------- Response curve card */
.curve-card { margin-top: 32px; padding: 20px 22px 18px; }
.legend { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; font-weight: 650; }
.lg { display: inline-block; width: 18px; height: 3px; border-radius: 3px; }
.lg-solid { background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.lg-dash { margin-left: 8px; background: repeating-linear-gradient(90deg, var(--ink-3) 0 4px, transparent 4px 7px); }

.curve-svg { width: 100%; height: auto; margin-top: 12px; overflow: visible; touch-action: pan-y; }
.curve-grid line { stroke: var(--line); stroke-width: 1; }
.curve-grid line.axis { stroke: var(--line-2); }
.curve-area { fill: none; stroke: url(#cg-line); stroke-width: 9; stroke-linecap: round; opacity: 0.35; filter: url(#cg-blur); }
.curve-line { fill: none; stroke: url(#cg-line); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.curve-mac { fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-dasharray: 5 4; }
.curve-dot { fill: #fff; stroke: var(--violet); stroke-width: 2; }
.curve-dot-halo { fill: var(--violet); opacity: 0.28; }
.curve-tag { fill: var(--ink-3); font-size: 11px; font-weight: 700; font-family: var(--font); }
.axis-label { fill: var(--ink-3); font-size: 11.5px; font-weight: 650; font-family: var(--font); }

.slider-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-weight: 700; font-size: 16px; }
.slider-row output {
  min-width: 48px;
  padding: 3px 12px;
  border-radius: 999px;
  text-align: center;
  background: var(--inset);
  border: 1px solid var(--inset-border);
  font-variant-numeric: tabular-nums;
}
.range-ends { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 13px; font-weight: 600; margin-top: 4px; }

.range {
  --fill: 63%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 8px 0 0;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--cyan)) 0 0 / var(--fill) 100% no-repeat, var(--inset);
  border: 1px solid var(--inset-border);
}
.range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--inset); border: 1px solid var(--inset-border); }
.range::-moz-range-progress { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  background: #f4f2ff;
  border: 0;
  box-shadow: 0 2px 10px rgba(10, 0, 40, 0.45), inset 0 -2px 4px rgba(80, 60, 160, 0.18);
}
.range::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #f4f2ff;
  border: 0;
  box-shadow: 0 2px 10px rgba(10, 0, 40, 0.45);
}
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 2.5px solid var(--cyan); outline-offset: 2px; }
.range:focus-visible::-moz-range-thumb { outline: 2.5px solid var(--cyan); outline-offset: 2px; }

/* --------------------------------------------------------------- Scroll modes */
.modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.mode { padding: 24px; border-radius: var(--r-lg); }
.mode h3 { margin-top: 18px; }
.mode p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.mode-featured {
  background:
    linear-gradient(180deg, rgba(167, 139, 250, 0.20), rgba(103, 232, 249, 0.06)),
    linear-gradient(180deg, var(--glass-top), var(--glass-bot));
  border-color: rgba(196, 181, 253, 0.45);
}
@media (max-width: 900px) { .modes { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------- Demo */
.demo { padding: 18px; border-radius: var(--r-xl); }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--inset-border);
  border-radius: 999px;
  background: var(--inset);
  min-width: 0;
}
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s;
}
.seg input:checked + label { color: #fff; }
.seg input:focus-visible + label { outline: 2.5px solid var(--cyan); outline-offset: 1px; }
.seg-thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--grad-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 18px -6px rgba(124, 92, 255, 0.8);
  transition: transform 0.35s var(--ease);
}
.seg input#fw-plain:checked ~ .seg-thumb { transform: translateX(0); }
.seg input#fw-fly:checked ~ .seg-thumb { transform: translateX(100%); }
.seg input#fw-plain:checked ~ .seg-thumb { background: linear-gradient(135deg, #64748b, #475569); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px -8px rgba(0, 0, 0, 0.6); }

.demo-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
}
.fw-viewport {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--inset);
  border: 1px solid var(--inset-border);
  touch-action: none;
  overscroll-behavior: contain;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}
.fw-viewport.dragging { cursor: grabbing; }
.fw-viewport:focus-visible { outline: 2.5px solid var(--cyan); outline-offset: 2px; -webkit-mask-image: none; mask-image: none; }
.fw-track {
  list-style: none;
  margin: 0;
  padding: 14px 34px 14px 14px;
  will-change: transform;
}
.fw-row {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
}
.fw-row:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
@media (prefers-color-scheme: light) { .fw-row:nth-child(odd) { background: rgba(255, 255, 255, 0.5); } }
.fw-row .fw-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 12px currentColor; background: currentColor; }
.fw-row .fw-label { min-width: 72px; color: var(--ink); font-variant-numeric: tabular-nums; }
.fw-row .fw-bar { margin-left: auto; height: 8px; border-radius: 99px; background: var(--line-2); }
.fw-scrollbar {
  position: absolute;
  top: 14px; bottom: 14px; right: 10px;
  width: 6px;
  border-radius: 99px;
  background: var(--line);
}
.fw-thumb {
  width: 100%;
  border-radius: 99px;
  background: var(--ink-3);
  will-change: transform;
}
.noscript { padding: 24px; color: var(--ink-2); }

.fw-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fw-graph {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--inset);
  border: 1px solid var(--inset-border);
}
.spark { position: relative; flex: 1; min-height: 150px; margin-top: 12px; }
.spark canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fw-readout { font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fw-readout span { color: var(--ink-3); font-size: 13px; font-weight: 650; }
.fw-mode-note {
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--inset);
  border: 1px solid var(--inset-border);
  color: var(--ink-2);
  font-size: 14.5px;
}

@media (max-width: 860px) {
  .demo-body { grid-template-columns: minmax(0, 1fr); }
  .fw-viewport { height: 320px; }
  .fw-graph .spark { min-height: 120px; }
}
@media (max-width: 480px) {
  .demo { padding: 12px; border-radius: var(--r-lg); }
  .demo-bar { flex-direction: column; align-items: stretch; }
  .seg label { padding: 9px 10px; font-size: 14.5px; }
  .demo-bar .btn { width: 100%; }
}

/* --------------------------------------------------------------- Combo card */
.combo-card {
  position: absolute;
  left: -28px;
  bottom: -26px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 700;
  animation: float 9s ease-in-out infinite;
}
.kbd-pill { padding: 6px 12px; border-radius: 999px; background: var(--inset); border: 1px solid var(--inset-border); white-space: nowrap; }
.kbd-accent { color: #fff; background: var(--grad-btn); border-color: rgba(255, 255, 255, 0.3); }
.combo-card .plus { color: var(--ink-3); }
.combo-card .arrow { color: var(--ink-3); }
@media (max-width: 960px) {
  .combo-card { position: relative; left: auto; bottom: auto; margin: -8px auto 0; width: fit-content; max-width: 100%; justify-content: center; animation: none; }
}

/* --------------------------------------------------------------- Dashboard card */
.dash-card {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 20px;
  margin-top: 32px;
  padding: 18px;
  align-items: stretch;
}
.dash-side { display: flex; flex-direction: column; min-width: 0; }
.dash-side .spark { min-height: 96px; }

.tb {
  position: relative;
  width: 172px;
  height: 172px;
  border-radius: 40px;
  background: linear-gradient(160deg, rgba(40, 32, 92, 0.9), rgba(16, 12, 44, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 30px -14px rgba(0, 0, 0, 0.7);
  touch-action: none;
}
.tb-pad {
  position: absolute;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background-color 0.18s, box-shadow 0.18s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.tb-tl { left: 10px; top: 10px; border-top-left-radius: 30px; }
.tb-tr { right: 10px; top: 10px; border-top-right-radius: 30px; }
.tb-bl { left: 10px; bottom: 10px; border-bottom-left-radius: 30px; }
.tb-br { right: 10px; bottom: 10px; border-bottom-right-radius: 30px; }
.tb-pad:hover { background: rgba(255, 255, 255, 0.13); }
.tb-pad.lit {
  background: linear-gradient(140deg, #a78bfa, #22d3ee);
  box-shadow: 0 0 22px rgba(167, 139, 250, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: scale(0.96);
}
.tb-ring {
  position: absolute;
  inset: 32px;
  border-radius: 50%;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.55) 0deg 1.4deg, transparent 1.4deg 6deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 80%, #000 81%, #000 99%, transparent 100%);
  mask-image: radial-gradient(closest-side, transparent 80%, #000 81%, #000 99%, transparent 100%);
  transition: transform 0.6s var(--ease);
}
.tb-ball {
  position: absolute;
  inset: 46px;
  border-radius: 50%;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 42% 32%, #a5b4fc 0%, #6366f1 34%, #3730a3 64%, #17124a 100%);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.7), inset 0 -6px 14px rgba(10, 4, 40, 0.6), 0 0 26px rgba(124, 92, 255, 0.35);
}
.tb-shine {
  position: absolute;
  left: 24%; top: 14%;
  width: 40%; height: 22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  will-change: transform;
}

@media (max-width: 520px) {
  .dash-card { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .dash-side { width: 100%; }
}

/* --------------------------------------------------------------- Safety cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { padding: 26px; border-radius: var(--r-lg); }
.card h3 { margin-top: 20px; }
.card p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.card .keys { min-height: 46px; }
@media (max-width: 900px) { .cards-3 { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------- Sync */
.sync {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.sync-art {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 28px 8px 70px;
}
.sync-node {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}
.sync-node .icon {
  width: 72px; height: 72px;
  padding: 16px;
  border-radius: 22px;
  color: var(--accent-ink);
  stroke-width: 1.5;
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.26), rgba(103, 232, 249, 0.10));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 var(--glass-hl), 0 14px 30px -16px rgba(0, 0, 0, 0.6);
}
.sync-link {
  position: relative;
  height: 2px;
  margin-bottom: 26px;
  background: repeating-linear-gradient(90deg, var(--cyan) 0 6px, transparent 6px 12px);
  background-size: 24px 2px;
  opacity: 0.9;
  animation: flow 1.2s linear infinite;
}
@keyframes flow { to { background-position: 24px 0; } }
.sync-cloud {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  color: #fff;
  background: var(--grad-btn);
  box-shadow: 0 0 0 6px rgba(124, 92, 255, 0.16), 0 10px 26px -8px rgba(124, 92, 255, 0.9);
}
.sync-cloud .icon { width: 26px; height: 26px; }
.sync-file {
  position: absolute;
  left: 50%; bottom: 8px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--inset);
  border: 1px solid var(--inset-border);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}
.sync-file .icon { color: var(--accent-ink); }
@media (max-width: 860px) { .sync { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) {
  .sync-node .icon { width: 60px; height: 60px; padding: 14px; border-radius: 18px; }
}

/* --------------------------------------------------------------- Install steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  counter-reset: none;
}
.step { padding: 26px 26px 26px 88px; border-radius: var(--r-lg); }
.step-n {
  position: absolute;
  left: 24px; top: 24px;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  background: var(--grad-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 20px -8px rgba(124, 92, 255, 0.9);
}
.step h3 { margin-top: 9px; }
.step h3 .pill { margin-left: 4px; }
.step p { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .step { padding: 22px 20px 22px 20px; }
  .step-n { position: static; margin-bottom: 14px; }
  .step h3 { margin-top: 0; }
}

/* --------------------------------------------------------------- FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border-radius: var(--r-md); padding: 0; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
  font-weight: 750;
  font-size: 17.5px;
  line-height: 1.35;
  border-radius: var(--r-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--ink-3); width: 22px; height: 22px; transition: transform 0.3s var(--ease); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 22px 20px; color: var(--ink-2); font-size: 16.5px; }

/* --------------------------------------------------------------- Final CTA */
.final { padding-bottom: clamp(72px, 10vw, 120px); }
.final-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(36px, 6vw, 72px) clamp(20px, 4vw, 48px);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.final-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 120%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(139, 92, 246, 0.45), transparent 70%);
}
.final-card img { width: 112px; margin-bottom: 18px; filter: drop-shadow(0 16px 26px rgba(30, 10, 90, 0.45)); }
.final-card .body { margin-inline: auto; }

/* --------------------------------------------------------------- Footer */
.footer { padding: 36px 0 48px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 18px 32px; align-items: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal { grid-column: 1 / -1; color: var(--ink-3); font-size: 13.5px; max-width: 720px; }
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-links { justify-content: flex-start; }
}

/* --------------------------------------------------------------- 404 */
.nf {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 40px var(--gutter);
}
.nf-card {
  width: 100%;
  max-width: 560px;
  padding: clamp(32px, 6vw, 56px) clamp(22px, 5vw, 48px);
  border-radius: var(--r-xl);
  text-align: center;
}
.nf-card img { width: 96px; margin: 0 auto 18px; }
.nf-code {
  font-size: clamp(72px, 18vw, 120px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nf-card h1 { margin-top: 10px; font-size: clamp(24px, 4.5vw, 32px); font-weight: 800; }
.nf-card .body { margin: 12px auto 0; }
.nf-card .cta-row { margin-top: 28px; }

/* --------------------------------------------------------------- Reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- Small screens */
@media (max-width: 420px) {
  body { font-size: 16px; }
  .btn-lg { --h: 52px; padding: 0 22px; font-size: 16.5px; }
  .cta-row { width: 100%; }
  .cta-row .btn { flex: 1 1 100%; }
  .brand span { font-size: 18px; }
}

/* --------------------------------------------------------------- Motion & fallbacks */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .hero-icon, .chip, .combo-card, .sync-link { animation: none !important; }
  .js .hg-line { animation: none; stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-shot { transform: none !important; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .btn-glass { background: linear-gradient(180deg, rgba(40, 30, 90, 0.92), rgba(24, 18, 60, 0.92)); }
}
@media (prefers-color-scheme: light) {
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass, .btn-glass { background: rgba(255, 255, 255, 0.9); }
  }
}

@media (forced-colors: active) {
  .glass, .btn { border: 1px solid CanvasText; }
  .hero-title, .nf-code { color: CanvasText; background: none; }
}

/* ==========================================================================
   Delight — small rewards for real interactions. Everything here is
   decorative, skipped with reduced motion, and never blocks anything.
   ========================================================================== */

/* --------------------------------------------------------------- Scroll progress (CSS only) */
.scroll-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    display: block;
    position: absolute;
    left: 22px; right: 22px; bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--violet), var(--cyan), var(--pink));
    transform-origin: 0 50%;
    transform: scaleX(0);
    opacity: 0.85;
    pointer-events: none;
    animation: page-progress linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes page-progress { to { transform: scaleX(1); } }
}

/* --------------------------------------------------------------- Reveal: a touch of scale */
.js .reveal { transform: translateY(24px) scale(0.985); }

/* --------------------------------------------------------------- Magnetic download buttons */
.btn-primary {
  --mx: 0px;
  --my: 0px;
  --gx: 50%;
  --gy: 50%;
  position: relative;
  isolation: isolate;
  transform: translate3d(var(--mx), var(--my), 0);
}
.btn-primary:hover { transform: translate3d(var(--mx), calc(var(--my) - 2px), 0); }
.btn-primary:active { transform: translate3d(var(--mx), calc(var(--my) + 1px), 0) scale(0.97); }
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(120px circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary.magnet { transition: transform 0.16s var(--ease), box-shadow 0.25s var(--ease); }

/* --------------------------------------------------------------- Cursor glow on glass cards */
.glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--px, 50%) var(--py, 50%), var(--glow-color, rgba(167, 139, 250, 0.14)), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.glow.glowing::after { opacity: 1; }
@media (prefers-color-scheme: light) {
  .glow { --glow-color: rgba(255, 255, 255, 0.55); }
}

/* --------------------------------------------------------------- Download celebration */
.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 200;
}
.dl-toast {
  --tx: -50%;
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 210;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(460px, calc(100vw - 32px));
  padding: 14px 14px 14px 16px;
  border-radius: 22px;
  transform: translate(var(--tx), 0);
  animation: toast-in 0.55s var(--ease) both;
}
/* On wide screens, sit in the corner so the page's buttons stay in view. */
@media (min-width: 760px) {
  .dl-toast { --tx: 0px; left: auto; right: 24px; bottom: 24px; }
}
.dl-toast.leaving { animation: toast-out 0.35s var(--ease) both; }
.dl-toast .dl-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--grad-btn);
  box-shadow: 0 6px 18px -6px rgba(124, 92, 255, 0.9);
}
.dl-toast .dl-check .icon { width: 20px; height: 20px; stroke-width: 2.6; }
.dl-toast .dl-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; color: var(--ink-2); }
.dl-toast strong { color: var(--ink); font-size: 15.5px; }
.dl-toast a { color: var(--accent-ink); font-weight: 700; }
.dl-toast .dl-close {
  flex: none;
  margin-left: auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.dl-toast .dl-close:hover { background: var(--line); color: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translate(var(--tx), 24px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translate(var(--tx), 16px) scale(0.98); } }

/* --------------------------------------------------------------- Flick meter */
.fw-meter {
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--inset);
  border: 1px solid var(--inset-border);
}
.fm-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f472b6, #a78bfa);
  box-shadow: 0 6px 16px -6px rgba(244, 114, 182, 0.9);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s var(--ease), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fm-badge.show { opacity: 1; transform: scale(1); }
.fm-bar {
  position: relative;
  height: 10px;
  margin-top: 12px;
  border-radius: 99px;
  background: var(--line);
}
.fm-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
  transform-origin: 0 50%;
  transform: scaleX(var(--v, 0));
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.55);
}
.fm-best {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 0;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--ink);
  opacity: 0;
  transform: translateX(var(--best-x, 0px));
  transition: transform 0.5s var(--ease), opacity 0.3s;
}
.fm-best.on { opacity: 0.85; }
.fw-meter.record .fm-fill { animation: meter-flash 0.9s var(--ease); }
@keyframes meter-flash { 30% { box-shadow: 0 0 26px rgba(244, 114, 182, 0.95); filter: brightness(1.35); } }
.fm-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}
.fm-stats dt { color: var(--ink-3); font-size: 12.5px; font-weight: 650; }
.fm-stats dd { margin: 2px 0 0; font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fm-stats dd span { color: var(--ink-3); font-size: 12px; font-weight: 650; }
.fm-stats output { display: inline-block; }
.fm-stats output.bump { animation: bump 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes bump { 40% { transform: scale(1.18); color: var(--pink); } }

/* --------------------------------------------------------------- Mini trackball */
.tb-ring { transition: none; will-change: transform; }
.tb-pad::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid #a5f3fc;
  opacity: 0;
  pointer-events: none;
}
.tb-pad.ripple::after { animation: pad-ripple 0.55s var(--ease); }
@keyframes pad-ripple { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.45); } }
/* A slow idle turn while the card is on screen (compositor-only; JS adds spin on top). */
.tb.idle .tb-ring { animation: ring-idle 48s linear infinite; }
@keyframes ring-idle { to { rotate: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; }
  .btn-primary, .btn-primary:hover { transform: none; }
  .glow::after, .tb-pad::after, .scroll-progress { display: none; }
  .dl-toast, .dl-toast.leaving { animation: none; }
  .fm-badge { transition: none; }
  .fw-meter.record .fm-fill, .fm-stats output.bump, .tb.idle .tb-ring { animation: none; }
}

/* Linux & Windows preview */
.h3-lg { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.step code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: var(--line); }
.step .btn + a { margin-left: 10px; font-size: 0.92em; }

/* Website privacy notice. The text comes from a Netlify snippet; app.js tucks it into the
   footer as a collapsed card (this styles that card, and the raw block if scripts are off). */
#cg-website-privacy { max-width: 860px; margin: 28px auto 0; padding: 0 var(--gutter); color: var(--ink-2); font-size: 13px; line-height: 1.65; }
#cg-website-privacy h2 { font-size: 16px; margin: 0 0 8px; color: var(--ink); }
#cg-website-privacy p { margin: 0 0 10px; }
#cg-website-privacy a { color: var(--accent-ink); text-underline-offset: 3px; }
#cg-website-privacy.privacy-block { grid-column: 1 / -1; width: 100%; max-width: none; margin: 4px 0 0; padding: 0; }
.privacy-details { border: 1px solid var(--line); border-radius: var(--r-md); background: linear-gradient(180deg, var(--glass-top), var(--glass-bot)); }
.privacy-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; cursor: pointer; list-style: none; font-weight: 650; font-size: 14px; color: var(--ink-2); border-radius: var(--r-md); }
.privacy-details > summary::-webkit-details-marker { display: none; }
.privacy-details > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.25s var(--ease); opacity: 0.7; }
.privacy-details[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.privacy-details > summary:hover { color: var(--ink); }
.privacy-details > summary:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.privacy-body { padding: 2px 18px 18px; max-width: 78ch; }
.privacy-glance { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.privacy-glance li { padding: 5px 12px; border-radius: 999px; background: var(--inset); border: 1px solid var(--inset-border); color: var(--ink); font-size: 12.5px; font-weight: 600; }
.privacy-body p { font-size: 13px; line-height: 1.65; color: var(--ink-2); margin: 0 0 12px; }
.privacy-body p:last-child { margin-bottom: 0; }
.privacy-body a { color: var(--accent-ink); text-underline-offset: 3px; }
.footer-links #cg-analytics-settings { display: inline; min-height: 0; padding: 0; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.footer-links #cg-analytics-settings:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
