/* ==========================================================================
   Mav — website (landing + docs). Brand: "Midnight & Emerald", docs/BRAND.md.
   No framework, no build step. Motion respects prefers-reduced-motion.
   ========================================================================== */

/* -------------------------------------------------------------- tokens */
:root {
  color-scheme: light;
  --bg: #fafaf7;
  --bg-2: #f3f2ee;
  --surface: #ffffff;
  --ink: #0e1013;
  --ink-2: #4a4f57;
  --ink-3: #8a9099;
  --line: #e6e5df;
  --line-2: #efeee9;
  --accent: #0f7a5c;
  --accent-2: #0a4a38;
  --accent-soft: #e4f2ec;
  --on-accent: #ffffff;
  --signal: #e8962e;
  --signal-soft: #fdf1e1;
  --danger: #c2412d;
  --cta: #0e1013;
  --on-cta: #ffffff;
  --halo-1: #bfe8d7;
  --halo-2: #fde3bf;
  --code-bg: #0e1116;
  --code-ink: #e7eaee;
  --code-line: #1e232a;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --shadow-sm: 0 0 0 1px rgba(14, 16, 19, 0.05), 0 1px 2px rgba(14, 16, 19, 0.05);
  --shadow:
    0 0 0 1px rgba(14, 16, 19, 0.05), 0 1px 2px rgba(14, 16, 19, 0.04),
    0 12px 32px -12px rgba(14, 16, 19, 0.14);
  --shadow-lg:
    0 0 0 1px rgba(14, 16, 19, 0.06), 0 2px 6px rgba(14, 16, 19, 0.06),
    0 32px 72px -20px rgba(14, 16, 19, 0.28);

  /* Midnight bands keep their colours in both themes. */
  --mid: #0b0d10;
  --mid-2: #13161a;
  --mid-line: #22272d;
  --mid-ink: #eef0f2;
  --mid-ink-2: #aab1ba;
  --mid-ink-3: #747c86;
  --mid-accent: #34d39d;
  --mid-signal: #f5b04f;

  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;

  --font: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1180px;
  --nav-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d10;
    --bg-2: #0f1215;
    --surface: #13161a;
    --ink: #eef0f2;
    --ink-2: #aab1ba;
    --ink-3: #747c86;
    --line: #22272d;
    --line-2: #1a1e23;
    --accent: #34d39d;
    --accent-2: #9ff0d1;
    --accent-soft: #0f2a21;
    --on-accent: #04140e;
    --signal: #f5b04f;
    --signal-soft: #2e2213;
    --danger: #f0806d;
    --cta: #eef0f2;
    --on-cta: #0b0d10;
    --halo-1: #0f3b2d;
    --halo-2: #3a2a12;
    --code-bg: #07090b;
    --code-line: #1a1e23;
    --glass: rgba(19, 22, 26, 0.7);
    --glass-strong: rgba(19, 22, 26, 0.92);
    --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow:
      0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.4),
      0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg:
      0 0 0 1px rgba(255, 255, 255, 0.07), 0 2px 6px rgba(0, 0, 0, 0.5),
      0 32px 72px -20px rgba(0, 0, 0, 0.75);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-2: #0f1215;
  --surface: #13161a;
  --ink: #eef0f2;
  --ink-2: #aab1ba;
  --ink-3: #747c86;
  --line: #22272d;
  --line-2: #1a1e23;
  --accent: #34d39d;
  --accent-2: #9ff0d1;
  --accent-soft: #0f2a21;
  --on-accent: #04140e;
  --signal: #f5b04f;
  --signal-soft: #2e2213;
  --danger: #f0806d;
  --cta: #eef0f2;
  --on-cta: #0b0d10;
  --halo-1: #0f3b2d;
  --halo-2: #3a2a12;
  --code-bg: #07090b;
  --code-line: #1a1e23;
  --glass: rgba(19, 22, 26, 0.7);
  --glass-strong: rgba(19, 22, 26, 0.92);
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.4),
    0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg:
    0 0 0 1px rgba(255, 255, 255, 0.07), 0 2px 6px rgba(0, 0, 0, 0.5),
    0 32px 72px -20px rgba(0, 0, 0, 0.75);
}

/* -------------------------------------------------------------- base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  letter-spacing: -0.006em;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,
video {
  max-width: 100%;
  display: block;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
code,
kbd,
pre {
  font-family: var(--mono);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
::selection {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.serif {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.serif em,
em.serif {
  font-style: italic;
}

/* -------------------------------------------------------------- brand mark */
.mark {
  --s: 26px;
  position: relative;
  width: var(--s);
  height: var(--s);
  flex: none;
  display: inline-block;
}
.mark::before {
  /* the emerald disc, notched by the dot's clear space */
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  width: 88%;
  height: 88%;
  border-radius: 50%;
  background: var(--accent);
  --notch: radial-gradient(
    circle calc(var(--s) * 0.23) at calc(var(--s) * 0.82) calc(var(--s) * 0.06),
    transparent 98%,
    #000 100%
  );
  -webkit-mask: var(--notch);
  mask: var(--notch);
}
.mark::after {
  content: "";
  position: absolute;
  left: 66%;
  top: 2%;
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background: var(--signal);
  animation: dot 2.6s var(--ease) infinite;
}
@keyframes dot {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.82);
  }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}
.brand:hover {
  text-decoration: none;
}

/* -------------------------------------------------------------- buttons */
.btn {
  --b: var(--cta);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  background: var(--b);
  color: var(--on-cta);
  font: 500 0.95rem/1 var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    background 0.2s;
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn.ghost {
  background: var(--surface);
  color: var(--ink);
}
.btn.sm {
  height: 34px;
  padding: 0 14px;
  font-size: 0.85rem;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover {
  background: var(--bg-2);
  color: var(--ink);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-2);
  box-shadow: inset 0 -1px 0 var(--line), 0 0 0 1px var(--line);
  color: var(--ink-2);
  font-size: 0.72rem;
  line-height: 1.6;
  text-align: center;
}

/* -------------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.scrolled {
  border-bottom-color: var(--line);
}
.nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  color: var(--ink-2);
  font-size: 0.92rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: var(--bg-2);
  text-decoration: none;
}
.nav-end {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gh-star {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.15s, background 0.15s;
}
.gh-star:hover {
  text-decoration: none;
  background: var(--bg-2);
}
.gh-star svg {
  width: 16px;
  height: 16px;
}
.gh-star b {
  font-weight: 500;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.menu-btn {
  display: none;
}
.theme-btn .sun {
  display: none;
}
:root[data-theme="dark"] .theme-btn .sun {
  display: block;
}
:root[data-theme="dark"] .theme-btn .moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-btn .moon {
    display: none;
  }
}
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    padding: 12px 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s var(--ease-out);
  }
  .nav-links a {
    padding: 12px 14px;
    font-size: 1rem;
  }
  .nav.open .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .menu-btn {
    display: inline-grid;
  }
  .nav .wrap {
    justify-content: space-between;
  }
  .gh-star span {
    display: none;
  }
}

/* -------------------------------------------------------------- scroll progress */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  z-index: 60;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* -------------------------------------------------------------- reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].in {
  opacity: 1;
  transform: none;
}
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.split .w > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 55ms + 120ms);
}
.split.in .w > span {
  transform: none;
}

/* -------------------------------------------------------------- section shells */
.section {
  padding: 120px 0;
  position: relative;
}
.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.section-head h2,
.h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}
.section-head h2 em,
.h2 em {
  color: var(--accent);
}
.section-head p {
  font-size: 1.12rem;
  color: var(--ink-2);
  margin: 0;
}
.band {
  background: var(--mid);
  color: var(--mid-ink);
  --ink: var(--mid-ink);
  --ink-2: var(--mid-ink-2);
  --ink-3: var(--mid-ink-3);
  --line: var(--mid-line);
  --accent: var(--mid-accent);
  --surface: var(--mid-2);
  --bg-2: var(--mid-2);
  --signal: var(--mid-signal);
  color-scheme: dark;
  overflow: hidden;
}

/* -------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding: 72px 0 40px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-bg .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  mask: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.55;
}
.hero-bg .glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.9;
}
.hero-bg .g1 {
  width: 560px;
  height: 560px;
  left: 50%;
  top: 8%;
  margin-left: -280px;
  background: var(--halo-1);
  animation: drift 18s var(--ease) infinite alternate;
}
.hero-bg .g2 {
  width: 260px;
  height: 260px;
  right: 12%;
  top: 4%;
  background: var(--halo-2);
  animation: drift 14s var(--ease) infinite alternate-reverse;
}
@keyframes drift {
  to {
    transform: translate3d(40px, 30px, 0) scale(1.08);
  }
}
.hero-copy {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  font-size: 0.85rem;
  margin-bottom: 28px;
}
.pill:hover {
  text-decoration: none;
  color: var(--ink);
}
.pill b {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.78rem;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 8.4vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.hero h1 em {
  color: var(--accent);
}
.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 auto 36px;
}
.lede strong {
  color: var(--ink);
  font-weight: 600;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font-size: 0.88rem;
}
.hero-points li::before {
  content: "✓";
  color: var(--accent);
  margin-right: 8px;
  font-weight: 600;
}

/* install box with tabs */
.install {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: var(--shadow);
  max-width: 100%;
  overflow: hidden;
}
.install-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 6px 0;
}
.install-tabs button {
  border: 0;
  background: transparent;
  color: #8a9099;
  font: 500 0.78rem/1 var(--font);
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}
.install-tabs button[aria-selected="true"] {
  color: #eef0f2;
  background: #171b21;
}
.install-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #171b21;
  padding: 12px 10px 12px 16px;
}
.install code {
  font-size: 0.86rem;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.install code::before {
  content: "$ ";
  color: #34d39d;
}
.copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #eef0f2;
  font: 500 0.78rem/1 var(--font);
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.copy:hover {
  background: rgba(255, 255, 255, 0.14);
}
.copy.done {
  background: #34d39d;
  color: #04140e;
}

/* -------------------------------------------------------------- live product scene */
.stage {
  position: relative;
  max-width: 1080px;
  margin: 72px auto 0;
  perspective: 1800px;
}
.stage::before {
  /* emerald floor glow */
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -40px;
  height: 120px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 40%, transparent), transparent);
  filter: blur(30px);
  z-index: -1;
}
.app {
  --ink: var(--mid-ink);
  --ink-2: var(--mid-ink-2);
  --ink-3: var(--mid-ink-3);
  --line: var(--mid-line);
  --accent: var(--mid-accent);
  --signal: var(--mid-signal);
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 540px;
  border-radius: 18px;
  background: var(--mid);
  color: var(--ink);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 100px -30px rgba(14, 16, 19, 0.55);
  overflow: hidden;
  transform: rotateX(8deg) scale(0.96);
  transform-origin: 50% 0;
  transition: transform 1.2s var(--ease-out);
  text-align: left;
  font-size: 14px;
}
.stage.in .app {
  transform: none;
}
.app-side {
  background: #0e1114;
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.app-side .brand {
  color: var(--ink);
  font-size: 1.05rem;
  margin: 2px 6px 14px;
}
.app-side .brand .mark {
  --s: 22px;
}
.app-new {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--accent);
  color: #04140e;
  font-weight: 600;
  margin-bottom: 14px;
}
.app-lbl {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 6px 8px 4px;
}
.app-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-item.on {
  background: #1a1e23;
  color: var(--ink);
}
.av {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0f7a5c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.av.r {
  background: #3b5bdb;
}
.av.p {
  background: #b0558a;
}
.app-main {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 28px 18px;
  min-width: 0;
}
.app-msgs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  justify-content: flex-end;
}
.msg-me {
  align-self: flex-end;
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  background: #1a1e23;
}
.msg-mav {
  display: flex;
  gap: 10px;
  max-width: 88%;
}
.msg-mav .body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.msg-mav p {
  margin: 0;
  color: var(--ink);
}
.tool {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  background: #13161a;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  width: fit-content;
  max-width: 100%;
}
.tool code {
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool .st {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  flex: none;
}
.tool.ok .st {
  border: 0;
  animation: none;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.5 14.5-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.5 14.5-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.tool time {
  margin-left: 4px;
  color: var(--ink-3);
  font-size: 11px;
  font-family: var(--mono);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #13161a;
  box-shadow: 0 0 0 1px var(--line);
  width: fit-content;
}
.file-card i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #0f2a21;
  color: var(--accent);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}
.file-card small {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
}
.caret::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.composer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  border-radius: 14px;
  background: #13161a;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink-3);
}
.composer span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}
.composer span.typing {
  color: var(--ink);
}
.composer b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #04140e;
  transition: transform 0.15s;
}
.composer b.press {
  transform: scale(0.86);
}
.push {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 300px;
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(26, 30, 35, 0.92);
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 40px -12px rgba(0, 0, 0, 0.7);
  transform: translateY(-14px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.6s var(--ease-out),
    opacity 0.4s;
  z-index: 2;
}
.push.is-in {
  transform: none;
  opacity: 1;
}
.push .mark {
  --s: 30px;
}
.push > div {
  flex: 1;
  min-width: 0;
}
.push strong {
  display: block;
  font-size: 13px;
}
.push small {
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.4;
  display: block;
}
.push em {
  font-style: normal;
  color: var(--signal);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pop {
  animation: pop 0.45s var(--ease-out) both;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
.cursor {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 22px;
  left: 0;
  top: 0;
  pointer-events: none;
  transition: transform 0.9s var(--ease-out);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.cursor::after {
  content: "";
  position: absolute;
  left: -8px;
  top: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(52, 211, 157, 0.5);
  transform: scale(0);
  opacity: 0;
}
.cursor.click::after {
  animation: ripple 0.5s var(--ease-out);
}
@keyframes ripple {
  from {
    transform: scale(0.2);
    opacity: 1;
  }
  to {
    transform: scale(1.8);
    opacity: 0;
  }
}
.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  animation: bob 6s var(--ease) infinite alternate;
}
.float-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.float-chip.amber i {
  background: var(--signal);
}
.float-chip.c1 {
  left: -56px;
  top: 58%;
}
.float-chip.c2 {
  right: 9%;
  top: -20px;
  animation-delay: -3s;
}
@keyframes bob {
  to {
    transform: translateY(-12px);
  }
}
@media (max-width: 980px) {
  .float-chip {
    display: none;
  }
}
@media (max-width: 720px) {
  .app {
    grid-template-columns: 1fr;
    height: 500px;
  }
  .app-side {
    display: none;
  }
  .app-main {
    padding: 16px;
  }
  .push {
    left: 12px;
    right: 12px;
    width: auto;
  }
  .msg-me {
    max-width: 88%;
  }
  .msg-mav {
    max-width: 100%;
  }
}

/* -------------------------------------------------------------- marquee */
.marquee-block {
  padding: 56px 0 24px;
  text-align: center;
}
.marquee-block p {
  color: var(--ink-3);
  font-size: 0.88rem;
  margin: 0 0 22px;
}
.marquee {
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-track span {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 0.2s;
}
.marquee-track span:hover {
  color: var(--ink);
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* -------------------------------------------------------------- film */
.film {
  padding: 120px 0;
}
.film .section-head p {
  color: var(--mid-ink-2);
}
.film-frame {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 50px 120px -30px rgba(52, 211, 157, 0.35);
  transform: scale(0.94);
  transition: transform 1.1s var(--ease-out);
}
.film-frame.in {
  transform: none;
}
.film-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.45));
  cursor: pointer;
  color: #fff;
  transition: opacity 0.3s;
}
.play.gone {
  opacity: 0;
  pointer-events: none;
}
.play-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #0b0d10;
  color: #34d39d;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform 0.3s var(--ease-out);
}
.play-disc::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: ring 2.4s var(--ease-out) infinite;
}
@keyframes ring {
  from {
    transform: scale(0.85);
    opacity: 1;
  }
  to {
    transform: scale(1.35);
    opacity: 0;
  }
}
.play:hover .play-disc {
  transform: scale(1.08);
}
.play-disc svg {
  width: 30px;
  height: 30px;
  margin-left: 4px;
}
.play-meta {
  position: absolute;
  left: 24px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}
.play-meta span {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-family: var(--mono);
  font-size: 0.78rem;
}

/* -------------------------------------------------------------- story (sticky scroll) */
.story {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.story-steps {
  display: flex;
  flex-direction: column;
}
.story-step {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
  opacity: 0.32;
  transition: opacity 0.4s;
}
.story-step.active {
  opacity: 1;
}
.story-step .num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 12px;
}
.story-step h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.story-step p {
  color: var(--ink-2);
  font-size: 1.05rem;
  margin: 0 0 14px;
  max-width: 460px;
}
.story-step ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.story-step li {
  padding: 4px 0;
}
.story-step li::before {
  content: "→";
  color: var(--accent);
  margin-right: 10px;
}
.story-visual {
  position: sticky;
  top: calc(50vh - 200px);
  height: 400px;
}
.panel {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition:
    opacity 0.5s,
    transform 0.6s var(--ease-out);
  overflow: hidden;
}
.panel.active {
  opacity: 1;
  transform: none;
}
.panel h4 {
  margin: 0 0 18px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
/* panel 1: triggers */
.trig {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.trig-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.trig-ico svg {
  width: 18px;
  height: 18px;
}
.trig strong {
  display: block;
  font-size: 0.95rem;
}
.trig small {
  color: var(--ink-3);
  font-size: 0.82rem;
}
.trig .when {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-2);
}
.panel.active .trig {
  animation: pop 0.5s var(--ease-out) both;
}
.panel.active .trig:nth-of-type(2) {
  animation-delay: 0.1s;
}
.panel.active .trig:nth-of-type(3) {
  animation-delay: 0.2s;
}
.panel.active .trig:nth-of-type(4) {
  animation-delay: 0.3s;
}
/* panel 2: ladder */
.lad {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.lad span {
  width: 92px;
  font-size: 0.85rem;
  font-weight: 500;
  flex: none;
}
.lad .bar {
  flex: 1;
  height: 34px;
  border-radius: 9px;
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}
.lad .bar i {
  position: absolute;
  inset: 0;
  width: var(--w);
  border-radius: 9px;
  background: var(--c, var(--accent));
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 1s var(--ease-out);
}
.panel.active .lad .bar i {
  transform: scaleX(1);
}
.lad .bar b {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  z-index: 1;
}
.seg {
  display: inline-flex;
  margin-top: 18px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 0.82rem;
}
.seg span {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink-2);
}
.seg span.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
/* panel 3: draft */
.draft {
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.draft-kind {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--signal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.draft p {
  margin: 10px 0 16px;
  font-size: 0.95rem;
  color: var(--ink);
  min-height: 4.8em;
}
.draft-acts {
  display: flex;
  gap: 8px;
}
.draft-acts b {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent);
  color: var(--on-accent);
}
.draft-acts b.g {
  background: var(--bg-2);
  color: var(--ink-2);
}
.bg-task {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  font-size: 0.88rem;
}
.bg-task .meter {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: var(--bg-2);
  overflow: hidden;
}
.bg-task .meter i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0.05);
}
.panel.active .bg-task .meter i {
  animation: fill 4s var(--ease) infinite;
}
@keyframes fill {
  to {
    transform: scaleX(1);
  }
}
@media (max-width: 900px) {
  .story {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .story-visual {
    position: relative;
    top: auto;
    height: 360px;
  }
  .story-step {
    min-height: 0;
    opacity: 1;
    padding: 0 0 28px;
  }
  .panel {
    padding: 20px;
  }
}

/* -------------------------------------------------------------- showcase */
.show-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
}
.show-tabs button {
  position: relative;
  overflow: hidden;
  border: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--mid-2);
  color: var(--ink-2);
  font: 500 0.9rem/1 var(--font);
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line);
  transition: color 0.2s, background 0.2s;
}
.show-tabs button[aria-selected="true"] {
  color: var(--ink);
}
.show-tabs button i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.show-tabs button[aria-selected="true"] i {
  animation: tabfill var(--dur, 5s) linear forwards;
}
.paused .show-tabs button[aria-selected="true"] i {
  animation: none;
  transform: scaleX(1);
}
@keyframes tabfill {
  to {
    transform: scaleX(1);
  }
}
.show {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.browser {
  border-radius: 14px;
  background: var(--mid-2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 90px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2b3036;
}
.browser-bar span {
  margin: 0 auto;
  padding: 3px 40px;
  border-radius: 6px;
  background: var(--mid);
  color: var(--ink-3);
  font-size: 0.75rem;
  font-family: var(--mono);
}
.shots {
  position: relative;
  aspect-ratio: 1600 / 1000;
}
.shots img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  opacity: 0;
  transform: scale(1.015);
  transition:
    opacity 0.6s,
    transform 1.2s var(--ease-out);
}
.shots img.on {
  opacity: 1;
  transform: none;
}
.show-copy h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.1;
  margin: 0 0 12px;
}
.show-copy p {
  color: var(--ink-2);
  margin: 0;
}
.show-copy .phone {
  margin-top: 28px;
  width: 170px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow:
    0 0 0 6px #1a1e23,
    0 0 0 7px #2b3036,
    0 30px 60px -20px rgba(0, 0, 0, 0.9);
}
@media (max-width: 900px) {
  .show {
    grid-template-columns: 1fr;
  }
  .show-copy {
    text-align: center;
  }
  .show-copy .phone {
    display: none;
  }
}

/* -------------------------------------------------------------- bento */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.tile {
  --mx: 50%;
  --my: 50%;
  position: relative;
  grid-column: span 2;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.tile:hover::before {
  opacity: 1;
}
.tile.wide {
  grid-column: span 3;
}
.tile.hero-tile {
  grid-column: span 4;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}
.tile-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.tile-ico.amber {
  background: var(--signal-soft);
  color: var(--signal);
}
.tile-ico svg {
  width: 21px;
  height: 21px;
}
.tile h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.tile p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.94rem;
}
.tile code {
  font-size: 0.85em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-2);
}
.brief {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.brief-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}
.brief-row i {
  font-style: normal;
  font-size: 1.1rem;
}
.brief-row small {
  margin-left: auto;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}
@media (max-width: 960px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .tile,
  .tile.wide {
    grid-column: span 1;
  }
  .tile.hero-tile {
    grid-column: span 2;
    grid-row: auto;
  }
}
@media (max-width: 600px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .tile,
  .tile.wide,
  .tile.hero-tile {
    grid-column: auto;
  }
}

/* -------------------------------------------------------------- install section */
.setup {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.setup-steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  counter-reset: s;
}
.setup-steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 22px 52px;
}
.setup-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
}
.setup-steps li::after {
  content: "";
  position: absolute;
  left: 15.5px;
  top: 34px;
  bottom: 2px;
  width: 1px;
  background: var(--line);
}
.setup-steps li:last-child::after {
  display: none;
}
.setup-steps strong {
  display: block;
  margin-bottom: 2px;
}
.setup-steps span {
  color: var(--ink-2);
  font-size: 0.95rem;
}
.term {
  border-radius: 16px;
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.84rem;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid #1e232a;
}
.term-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2b3036;
}
.term-bar .install-tabs {
  margin-left: auto;
  padding: 0;
}
.term-bar .install-tabs button {
  border-radius: 7px;
  padding: 6px 10px;
}
.term pre {
  margin: 0;
  padding: 20px;
  min-height: 300px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.term .p {
  color: #34d39d;
}
.term .d {
  color: #747c86;
}
.term .k {
  color: #f5b04f;
}
.term .ok {
  color: #34d39d;
}
@media (max-width: 900px) {
  .setup {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------- stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow-sm);
}
.stat {
  background: var(--surface);
  padding: 30px 24px;
}
.stat b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  color: var(--ink);
}
.stat > span {
  color: var(--ink-2);
  font-size: 0.92rem;
}
@media (max-width: 760px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -------------------------------------------------------------- final cta */
.final {
  text-align: center;
  padding: 140px 0;
  position: relative;
}
.final .big-mark {
  --s: 88px;
  margin: 0 auto 32px;
  display: block;
}
.final h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.final h2 em {
  color: var(--accent);
}
.final p {
  color: var(--ink-2);
  font-size: 1.15rem;
  margin: 0 0 36px;
}
.final .glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--mid-accent) 22%, transparent), transparent);
  pointer-events: none;
}

/* -------------------------------------------------------------- footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.footer .wrap {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.footer h4 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer li {
  padding: 3px 0;
}
.footer a {
  color: var(--ink-2);
}
.footer a:hover {
  color: var(--ink);
}
.footer .tag {
  margin: 12px 0 0;
  max-width: 280px;
}
.footer .legal {
  grid-column: 1 / -1;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 760px) {
  .footer .wrap {
    grid-template-columns: 1fr 1fr;
  }
  .footer .wrap > :first-child {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Docs
   ========================================================================== */
.docs-hero {
  position: relative;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.docs-hero .hero-bg .g1 {
  width: 420px;
  height: 420px;
  left: auto;
  right: -80px;
  top: -160px;
  margin: 0;
}
.docs-hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
.docs-hero h1 em {
  color: var(--accent);
}
.docs-hero > .wrap > p {
  color: var(--ink-2);
  font-size: 1.1rem;
  margin: 0 0 28px;
  max-width: 560px;
}
.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 460px;
  height: 46px;
  padding: 0 10px 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink-3);
  font: 400 0.95rem var(--font);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.search-trigger:hover {
  box-shadow: var(--shadow-lg);
}
.search-trigger svg {
  width: 18px;
  height: 18px;
}
.search-trigger span {
  flex: 1;
  text-align: left;
}
.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 32px;
}
.quick a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition:
    transform 0.25s var(--ease-out),
    box-shadow 0.25s;
}
.quick a:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.quick b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.quick b::after {
  content: "→";
  margin-left: auto;
  color: var(--ink-3);
  transition: transform 0.2s var(--ease-out), color 0.2s;
}
.quick a:hover b::after {
  transform: translateX(3px);
  color: var(--accent);
}
.quick span {
  color: var(--ink-2);
  font-size: 0.86rem;
}
@media (max-width: 900px) {
  .quick {
    grid-template-columns: 1fr 1fr;
  }
}

.docs {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 200px;
  gap: 48px;
  align-items: start;
  padding-top: 32px;
  padding-bottom: 80px;
}
.side {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto;
  padding: 8px 4px 24px 0;
  scrollbar-width: thin;
}
.side-group {
  margin-bottom: 18px;
}
.side-group > span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 12px 6px;
}
.side a {
  position: relative;
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 0.9rem;
  transition: color 0.15s, background 0.15s;
}
.side a:hover {
  color: var(--ink);
  background: var(--bg-2);
  text-decoration: none;
}
.side a.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 500;
}
.toc {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  font-size: 0.84rem;
  padding-top: 8px;
}
.toc > span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.toc ul {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  border-left: 1px solid var(--line);
}
.toc a {
  display: block;
  padding: 4px 0 4px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--ink-3);
  line-height: 1.4;
}
.toc a:hover {
  color: var(--ink);
  text-decoration: none;
}
.toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.toc-actions a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  padding: 3px 0;
}
.toc-actions a:hover {
  color: var(--ink);
}
.toc-actions svg {
  width: 14px;
  height: 14px;
}

/* content */
.prose {
  min-width: 0;
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.72;
}
.prose section {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.prose section:last-of-type {
  border-bottom: 0;
}
.prose .crumb {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}
.prose h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.3rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.prose h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 32px 0 10px;
}
.prose h2,
.prose h3 {
  position: relative;
}
.anchor {
  position: absolute;
  left: -1.1em;
  padding-right: 0.3em;
  color: var(--ink-3);
  opacity: 0;
  font-family: var(--font);
  font-weight: 400;
  transition: opacity 0.15s;
}
.prose h2 .anchor {
  font-size: 1.4rem;
  top: 0.35em;
}
h2:hover > .anchor,
h3:hover > .anchor,
.anchor:focus {
  opacity: 1;
  text-decoration: none;
}
.prose p,
.prose li {
  color: var(--ink-2);
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.prose a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}
.prose a:hover {
  text-decoration-color: var(--accent);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li {
  margin: 4px 0;
}
.prose li::marker {
  color: var(--ink-3);
}
.prose :not(pre) > code {
  font-size: 0.86em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.codeblock {
  position: relative;
  margin: 16px 0 20px;
  border-radius: 12px;
  background: var(--code-bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.codeblock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid var(--code-line);
  color: #747c86;
  font: 500 0.72rem var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.codeblock .copy {
  padding: 6px 9px;
}
.prose pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: var(--code-ink);
  font-size: 0.84rem;
  line-height: 1.7;
}
.prose pre code {
  background: none;
  box-shadow: none;
  padding: 0;
  color: inherit;
}
.tok-c {
  color: #747c86;
}
.tok-k {
  color: #34d39d;
}
.tok-s {
  color: #f5b04f;
}
.prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0 24px;
  font-size: 0.9rem;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
  display: block;
  overflow-x: auto;
}
.prose thead th {
  background: var(--bg-2);
  text-align: left;
  font-weight: 600;
  color: var(--ink);
}
.prose th,
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
.prose tr:last-child td {
  border-bottom: 0;
}
.docs-note {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.95rem;
}
.docs-note::before {
  content: "i";
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 0.78rem/1 var(--mono);
}
.docs-note p {
  margin: 0;
  color: var(--ink);
}
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.docs-pager a {
  padding: 16px 18px;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 0.2s, background 0.2s;
}
.docs-pager a:hover {
  box-shadow: 0 0 0 1px var(--accent);
  background: var(--accent-soft);
}
.docs-pager small {
  display: block;
  color: var(--ink-3);
  font-size: 0.78rem;
}
.docs-pager a + a,
.docs-pager .next {
  text-align: right;
  grid-column: 2;
}
.side-toggle {
  display: none;
}
@media (max-width: 1180px) {
  .docs {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}
@media (max-width: 860px) {
  .docs {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
  }
  .side-toggle {
    position: sticky;
    top: var(--nav-h);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% + 48px);
    margin: 0 -24px;
    padding: 12px 24px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
    color: var(--ink);
    font: 500 0.92rem var(--font);
    cursor: pointer;
  }
  .side-toggle svg {
    width: 16px;
    height: 16px;
    color: var(--ink-3);
  }
  .side-toggle b {
    font-weight: 500;
    color: var(--accent);
  }
  .side {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    z-index: 40;
    max-height: none;
    padding: 20px 20px 40px;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
  }
  .side.open {
    transform: none;
  }
  .prose {
    padding-top: 28px;
  }
  .anchor {
    display: none;
  }
  .prose h2 {
    font-size: 2rem;
  }
}

/* -------------------------------------------------------------- search palette */
.palette {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(11, 13, 16, 0.45);
  backdrop-filter: blur(4px);
}
.palette.open {
  display: flex;
  animation: fade 0.18s var(--ease-out);
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.palette-box {
  width: 100%;
  max-width: 600px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop 0.25s var(--ease-out);
}
.palette-in {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.palette-in svg {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
}
.palette-in input {
  flex: 1;
  height: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 400 1.05rem var(--font);
}
.palette-in input::-webkit-search-cancel-button {
  display: none;
}
.palette ul {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: 55vh;
  overflow-y: auto;
}
.palette li a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.palette li a small {
  display: block;
  color: var(--ink-3);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.palette li a mark {
  background: none;
  color: var(--accent);
  font-weight: 600;
}
.palette li a.sel {
  background: var(--accent-soft);
}
.palette .empty {
  padding: 28px;
  text-align: center;
  color: var(--ink-3);
}
.palette-foot {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.78rem;
}

/* -------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal],
  .split .w > span {
    opacity: 1;
    transform: none;
  }
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
}
