/* ==========================================================================
   EmbAId Agent — landing
   Deep matte black, one electric deep blue, grain, soft light.
   ========================================================================== */

:root {
  --accent: oklch(0.485 0.291 264.121);
  --accent-hover: oklch(0.53 0.27 264);
  --accent-hi: oklch(0.7 0.17 262);
  --accent-soft: oklch(0.485 0.291 264 / 0.16);
  --accent-glow: oklch(0.485 0.291 264 / 0.55);
  --good: oklch(0.76 0.15 158);
  --warn: oklch(0.8 0.14 75);
  --bad: oklch(0.7 0.18 25);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --sans: "General Sans", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --maxw: 1200px;
  --r: 14px;
  --nav-h: 64px;
  interpolate-size: allow-keywords;
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: oklch(0.118 0.004 286);
  --ground-2: oklch(0.135 0.005 286);
  --surface: oklch(0.158 0.006 286);
  --surface-2: oklch(0.19 0.007 286);
  --surface-3: oklch(0.235 0.008 286);
  --line: oklch(1 0 0 / 0.075);
  --line-2: oklch(1 0 0 / 0.12);
  --ink: oklch(0.975 0.002 286);
  --ink-2: oklch(0.74 0.01 286);
  --ink-3: oklch(0.56 0.012 286);
  --sheen: oklch(1 0 0 / 0.06);
  --panel: linear-gradient(180deg, oklch(1 0 0 / 0.045), oklch(1 0 0 / 0.012));
  --shadow: 0 1px 0 oklch(1 0 0 / 0.04) inset, 0 40px 80px -40px rgb(0 0 0 / 0.85);
  --glass: oklch(0.118 0.004 286 / 0.72);
  --grain: 0;
}

:root[data-theme="light"] {
  color-scheme: light;
  --accent-hi: oklch(0.485 0.291 264.121);
  --ground: oklch(0.985 0.002 286);
  --ground-2: oklch(0.97 0.003 286);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.965 0.003 286);
  --surface-3: oklch(0.93 0.004 286);
  --line: oklch(0.2 0.01 286 / 0.09);
  --line-2: oklch(0.2 0.01 286 / 0.14);
  --ink: oklch(0.2 0.01 286);
  --ink-2: oklch(0.42 0.012 286);
  --ink-3: oklch(0.56 0.012 286);
  --sheen: oklch(1 0 0 / 0.8);
  --panel: linear-gradient(180deg, oklch(1 0 0), oklch(0.985 0.002 286));
  --shadow: 0 1px 0 oklch(1 0 0) inset, 0 30px 60px -36px oklch(0.3 0.05 270 / 0.28);
  --glass: oklch(0.985 0.002 286 / 0.78);
  --grain: 0;
}

/* ---------- base ---------- */

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
::selection {
  background: oklch(0.485 0.291 264 / 0.55);
  color: #fff;
}
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  display: block;
}
button {
  font: inherit;
  color: inherit;
}
code,
pre {
  font-family: var(--mono);
}
:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 400;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus {
  top: 12px;
}

.grain {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: var(--grain);
  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 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
:root[data-theme="light"] .grain {
  filter: invert(1);
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 200;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-hi));
  transform: scaleX(0);
  transform-origin: left;
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent-hi);
}
.eyebrow--soft {
  color: var(--warn);
}

.sec-head {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.sec-head h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}
.sec-head p {
  color: var(--ink-2);
  font-size: 16.5px;
  max-width: 600px;
}
.sec-head--left {
  text-align: left;
  justify-items: start;
  margin: 0;
}

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.16s var(--ease-out);
}
.btn:active {
  transform: scale(0.97);
}
.btn--lg {
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: 12px;
}
.btn--block {
  width: 100%;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.22),
    0 10px 30px -10px var(--accent-glow);
}
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-out);
}
.btn--primary svg {
  transition: transform 0.25s var(--ease-out);
}
.btn--glass {
  background: oklch(0.975 0.002 286 / 0.08);
  color: var(--ink);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
:root[data-theme="light"] .btn--glass {
  background: oklch(0.2 0.01 286 / 0.06);
}
.btn--quiet {
  background: transparent;
  color: var(--ink-2);
}
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover {
    background: var(--accent-hover);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.26),
      0 14px 40px -10px var(--accent-glow);
  }
  .btn--primary:hover::after {
    transform: translateX(120%);
  }
  .btn--primary:hover svg {
    transform: translateX(3px);
  }
  .btn--glass:hover {
    background: oklch(0.975 0.002 286 / 0.13);
  }
  :root[data-theme="light"] .btn--glass:hover {
    background: oklch(0.2 0.01 286 / 0.1);
  }
  .btn--quiet:hover {
    color: var(--ink);
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover {
    background: oklch(1 0 0 / 0.07);
    color: var(--ink);
  }
}
:root[data-theme="dark"] .i-moon,
:root[data-theme="light"] .i-sun {
  display: none;
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition:
    transform 0.4s var(--ease-out),
    background-color 0.3s ease,
    border-color 0.3s ease;
}
.nav[data-scrolled] {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom-color: var(--line);
}
.nav[data-hidden] {
  transform: translateY(-100%);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(160deg, oklch(0.6 0.24 264), var(--accent) 60%, oklch(0.38 0.22 266));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.3),
    0 4px 14px -4px var(--accent-glow);
}
.nav__links {
  position: relative;
  display: flex;
  gap: 2px;
  margin: 0 auto;
}
.nav__links a {
  position: relative;
  z-index: 1;
  padding: 7px 13px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13.5px;
  transition: color 0.2s ease;
}
.nav__links a[aria-current="true"],
.nav__links a:hover {
  color: var(--ink);
}
.nav__pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 8px;
  background: oklch(1 0 0 / 0.075);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.32s var(--ease-out),
    width 0.32s var(--ease-out),
    opacity 0.2s ease;
}
:root[data-theme="light"] .nav__pill {
  background: oklch(0.2 0.01 286 / 0.06);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav__toggle {
  display: none;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out);
}
.nav__toggle span:first-child {
  transform: translateY(-3.5px);
}
.nav__toggle span:last-child {
  transform: translateY(3.5px);
}
.nav__toggle[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}
.nav__mobile {
  display: none;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: max(640px, 100svh);
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__canvas.is-ready {
  opacity: 1;
}
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(40% 46% at 50% 44%, oklch(0.485 0.291 264 / 0.2), transparent 70%),
    radial-gradient(70% 60% at 50% 120%, oklch(0.3 0.15 266 / 0.35), transparent 70%);
}
:root[data-theme="light"] .hero__glow {
  background: radial-gradient(40% 46% at 50% 44%, oklch(0.485 0.291 264 / 0.1), transparent 70%);
}
.hero--static .hero__glow {
  background:
    radial-gradient(28% 34% at 50% 42%, oklch(0.485 0.291 264 / 0.45), transparent 70%),
    radial-gradient(70% 60% at 50% 120%, oklch(0.3 0.15 266 / 0.35), transparent 70%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  z-index: -1;
  background: linear-gradient(to top, var(--ground), transparent);
  pointer-events: none;
}
.intro {
  position: relative;
  padding: 72px 0 120px;
}
.intro__inner {
  display: grid;
  gap: 56px;
}
.intro__grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  align-items: end;
  gap: 48px;
}
.intro__copy {
  display: grid;
  gap: 22px;
  justify-items: start;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.05);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.intro__title {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.intro__lede {
  max-width: 520px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.7;
}
.intro__side {
  display: grid;
  gap: 14px;
  justify-items: end;
}
.intro__cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.snippet {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: oklch(0.118 0.004 286 / 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 13px;
  color: var(--ink-2);
}
:root[data-theme="light"] .snippet {
  background: oklch(1 0 0 / 0.7);
}
.snippet code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.snippet__copy {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 0;
  border-radius: 8px;
  background: oklch(1 0 0 / 0.06);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.snippet__copy[data-copied] {
  color: var(--good);
}
@media (hover: hover) and (pointer: fine) {
  .snippet__copy:hover {
    background: oklch(1 0 0 / 0.12);
  }
}

.intro__stages {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.intro__stages li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  transition: color 0.5s ease;
}
.intro__stages li + li {
  margin-left: 64px;
}
.intro__stages li + li::after {
  content: "";
  position: absolute;
  right: calc(100% + 14px);
  width: 36px;
  height: 1px;
  background: var(--line-2);
}
.intro__stages li[data-active] {
  color: var(--ink);
}

.hero__cue {
  position: absolute;
  left: 50%;
  bottom: 32px;
  display: grid;
  padding: 8px 12px;
  transform: translateX(-50%);
}
.hero__cue i {
  position: relative;
  width: 1px;
  height: 44px;
  overflow: hidden;
  background: var(--line-2);
}
.hero__cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink-2);
  transform: translateY(-100%);
  animation: cue 2.2s var(--ease-in-out) infinite;
}
@keyframes cue {
  0% {
    transform: translateY(-100%);
  }
  60%,
  100% {
    transform: translateY(100%);
  }
}

/* split-text entrance (one-time) */
.char {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.32em);
}
[data-split].in .char {
  animation: char-in 0.9s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 32ms);
}
@keyframes char-in {
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

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

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}
.reveal[data-d="1"] {
  transition-delay: 0.05s;
}
.reveal[data-d="2"] {
  transition-delay: 0.1s;
}
.reveal[data-d="3"] {
  transition-delay: 0.15s;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- marquee ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  padding: 26px 0;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
.marquee ul {
  display: flex;
  gap: 56px;
  margin: 0;
  padding: 0 56px 0 0;
  list-style: none;
}
.marquee li {
  display: flex;
  align-items: center;
  gap: 56px;
  color: var(--ink-3);
  font-size: 15px;
  white-space: nowrap;
}
.marquee li::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-2);
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- panel (shared matte surface) ---------- */

.panel,
.card {
  position: relative;
  background: var(--panel), var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}
.panel__bar i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 0.25);
}
.panel__bar i:nth-child(1) {
  background: #ff5f57;
}
.panel__bar i:nth-child(2) {
  background: #febc2e;
}
.panel__bar i:nth-child(3) {
  background: #28c840;
}
.panel__bar span {
  margin-left: 12px;
}

/* ---------- story (pinned scroll) ---------- */

.story {
  padding: 140px 0 80px;
}
.story__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 72px;
}
.story__steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.story__step {
  display: grid;
  gap: 10px;
  min-height: 58vh;
  align-content: center;
  opacity: 0.28;
  transition: opacity 0.5s var(--ease-out);
}
.story__step[data-active] {
  opacity: 1;
}
.story__step h3 {
  font-size: clamp(24px, 2.6vw, 32px);
}
.story__step p {
  color: var(--ink-2);
  font-size: 16px;
  max-width: 440px;
}
.story__visual {
  position: sticky;
  top: calc(50vh - 235px);
  height: 470px;
  align-self: start;
  margin-top: 14vh;
}
.story__panel {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
.story__panel > .scene {
  grid-area: 2 / 1;
}
.scene {
  padding: 26px;
  display: grid;
  align-content: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  filter: blur(6px);
  pointer-events: none;
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out),
    filter 0.5s var(--ease-out);
}
.scene[data-active] {
  opacity: 1;
  transform: none;
  filter: none;
  pointer-events: auto;
}

.src {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  grid-template-areas: "ic name tag" "ic meta tag" "bar bar bar";
  column-gap: 12px;
  row-gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: oklch(1 0 0 / 0.02);
}
.src__ic {
  grid-area: ic;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-hi);
}
.src b {
  grid-area: name;
  font-weight: 500;
  font-size: 14px;
}
.src small {
  grid-area: meta;
  color: var(--ink-3);
  font-size: 12px;
}
.src em {
  grid-area: tag;
  align-self: center;
  font-style: normal;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}
.src em.ok {
  color: var(--good);
}
.src__bar,
.rank__bar {
  grid-area: bar;
  height: 3px;
  margin-top: 10px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.src__bar i,
.rank__bar i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out) 0.15s;
}
.scene[data-active] .src__bar i,
.scene[data-active] .rank__bar i {
  transform: none;
}

.chunks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.chunks span {
  aspect-ratio: 1.6;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: oklch(1 0 0 / 0.025);
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.4s var(--ease-out),
    background-color 0.4s ease;
  transition-delay: calc(var(--i, 0) * 22ms);
}
.chunks span.hot {
  background: var(--accent-soft);
  border-color: oklch(0.485 0.291 264 / 0.5);
  box-shadow: 0 0 22px -6px var(--accent-glow);
}
.scene[data-active] .chunks span {
  opacity: 1;
  transform: none;
}
.chunks__legend {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 12px;
  font-family: var(--mono);
}
.chunks__legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chunks__legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.chunks__legend .v {
  background: var(--accent);
}
.chunks__legend .l {
  background: var(--ink-3);
}

.rank {
  display: grid;
  gap: 10px;
}
.rank__q {
  padding: 10px 12px;
  border-radius: 10px;
  background: oklch(1 0 0 / 0.03);
  border: 1px dashed var(--line-2);
  color: var(--ink-3);
  font-size: 13px;
}
.rank__q b {
  color: var(--ink);
  font-weight: 500;
}
.rank__row {
  display: grid;
  grid-template-columns: 22px 1fr 44px;
  grid-template-areas: "n t s" "bar bar bar";
  align-items: center;
  column-gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
}
.rank__row > span:first-child {
  grid-area: n;
  font-family: var(--mono);
  color: var(--ink-3);
}
.rank__row b {
  grid-area: t;
  font-weight: 500;
}
.rank__row em {
  grid-area: s;
  text-align: right;
  font-style: normal;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}
.rank__row .rank__bar {
  margin-top: 8px;
}
.rank__row.dim {
  opacity: 0.55;
}
.rank__row.dim .rank__bar i {
  background: var(--ink-3);
}

.mini-chat {
  display: grid;
  gap: 12px;
}
.mc {
  max-width: 82%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
}
.mc--u {
  justify-self: end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.mc--a {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}
.mc__cite {
  display: inline-flex;
  margin-top: 8px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-size: 12px;
}
.gap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid oklch(0.8 0.14 75 / 0.25);
  background: oklch(0.8 0.14 75 / 0.06);
  color: var(--ink-2);
  font-size: 13px;
}
.gap em {
  margin-left: auto;
  font-style: normal;
  color: var(--warn);
}

/* ---------- thinking demo ---------- */

.think {
  padding: 120px 0;
}
.think__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: center;
}
.think__text {
  display: grid;
  gap: 18px;
  justify-items: start;
}
.think__text h2 {
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.14;
}
.think__text > p {
  color: var(--ink-2);
  font-size: 16.5px;
  max-width: 460px;
}
.think__note {
  color: var(--ink-3) !important;
  font-size: 13.5px !important;
}

.seg {
  position: relative;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  margin-top: 6px;
  border-radius: 12px;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--line);
}
:root[data-theme="light"] .seg {
  background: oklch(0.2 0.01 286 / 0.04);
}
.seg button {
  position: relative;
  z-index: 1;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.seg button[aria-selected="true"] {
  color: var(--ink);
}
.seg__pill,
.tabs__pill {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  border-radius: 9px;
  background: var(--surface-3);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.07),
    0 4px 12px -4px rgb(0 0 0 / 0.5);
  transition:
    transform 0.35s var(--ease-out),
    width 0.35s var(--ease-out);
}
:root[data-theme="light"] .seg__pill,
:root[data-theme="light"] .tabs__pill {
  background: var(--surface);
  box-shadow: 0 1px 3px oklch(0.2 0.01 286 / 0.15);
}

.chatmock {
  position: relative;
  height: 560px;
  border-radius: 20px;
  box-shadow: 0 50px 120px -50px oklch(0.485 0.291 264 / 0.45);
}
@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}
.thought__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--ink-3);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
@keyframes chip-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
}
@keyframes grow {
  from {
    transform: scaleX(0);
  }
}

/* ---------- bento ---------- */

.feat {
  padding: 120px 0;
}
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  padding: 24px;
  overflow: hidden;
  isolation: isolate;
}
.card--wide {
  grid-column: span 2;
}
.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.card::before {
  z-index: -1;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), oklch(0.485 0.291 264 / 0.13), transparent 50%);
}
.card::after {
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), oklch(0.7 0.17 262 / 0.6), transparent 60%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover::before,
  .card:hover::after {
    opacity: 1;
  }
}
.card h3 {
  font-size: 18px;
  margin-top: 18px;
  letter-spacing: -0.015em;
}
.card p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 14.5px;
}
.card__art {
  position: relative;
  height: 148px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 50% 0%, oklch(0.485 0.291 264 / 0.09), transparent 70%),
    oklch(0 0 0 / 0.18);
  overflow: hidden;
}
:root[data-theme="light"] .card__art {
  background:
    radial-gradient(120% 90% at 50% 0%, oklch(0.485 0.291 264 / 0.07), transparent 70%),
    var(--surface-2);
}

.art-hybrid {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  padding: 18px 22px;
  gap: 8px 18px;
}
.art-hybrid .lane {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: oklch(1 0 0 / 0.02);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}
.art-hybrid .lane span {
  width: 66px;
}
.art-hybrid .lane i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent-hi);
  box-shadow: 0 0 10px var(--accent);
  animation: flow 2.8s linear infinite;
}
.art-hybrid .lane:nth-child(2) i {
  background: var(--ink-2);
  box-shadow: none;
  animation-duration: 3.4s;
}
.art-hybrid .lane i:nth-of-type(2) {
  animation-delay: -0.9s;
}
.art-hybrid .lane i:nth-of-type(3) {
  animation-delay: -1.8s;
}
@keyframes flow {
  from {
    transform: translateX(0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  to {
    transform: translateX(260px);
    opacity: 0;
  }
}
.art-hybrid .merge {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.25),
    0 0 40px -6px var(--accent-glow);
}

.art-trace {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  row-gap: 10px;
  padding: 0 12px;
}
.art-trace span {
  position: relative;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  animation: trace-hit 5s var(--ease-out) infinite;
}
.art-trace span + span {
  margin-left: 10px;
}
.art-trace span + span::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--line-2);
}
.art-trace span:nth-child(2) {
  animation-delay: 0.5s;
}
.art-trace span:nth-child(3) {
  animation-delay: 1s;
}
.art-trace span:nth-child(4) {
  animation-delay: 1.5s;
}
.art-trace span:nth-child(5) {
  animation-delay: 2s;
}
@keyframes trace-hit {
  0%,
  100% {
    color: var(--ink-3);
    border-color: var(--line-2);
  }
  8%,
  40% {
    color: var(--accent-hi);
    border-color: oklch(0.485 0.291 264 / 0.6);
  }
}

.art-trust {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 0 22px;
}
.art-trust div {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-3);
}
.art-trust i {
  position: relative;
  height: 6px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}
.art-trust i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
}
.art-trust i.stale::after {
  background: repeating-linear-gradient(135deg, var(--ink-3) 0 4px, transparent 4px 7px);
}

.art-gap {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 0 18px;
}
.art-gap .q {
  display: flex;
  justify-content: space-between;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: oklch(1 0 0 / 0.02);
  font-size: 12.5px;
  color: var(--ink-2);
}
.art-gap em {
  font-style: normal;
  font-family: var(--mono);
  color: var(--warn);
}
.art-gap .draft {
  justify-self: start;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-size: 12px;
}

.art-shadow .host {
  position: absolute;
  inset: 18px 70px 18px 18px;
  display: grid;
  align-content: start;
  gap: 8px;
}
.art-shadow .host span {
  height: 8px;
  border-radius: 4px;
  background: var(--line-2);
}
.art-shadow .host span:nth-child(2) {
  width: 70%;
}
.art-shadow .host span:nth-child(3) {
  width: 45%;
}
.art-shadow .bubble {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.25),
    0 0 0 0 var(--accent-glow);
  animation: ping 2.6s var(--ease-out) infinite;
}
@keyframes ping {
  0% {
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.25),
      0 0 0 0 oklch(0.485 0.291 264 / 0.5);
  }
  70%,
  100% {
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.25),
      0 0 0 16px oklch(0.485 0.291 264 / 0);
  }
}

.art-persona {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
}
.art-persona .sw {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin: 0 4px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
}
.art-persona .sw:first-child {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.art-persona .persona {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
}

.art-ops {
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 16px 20px;
}
.art-ops .spark svg {
  width: 100%;
  height: 72px;
}
.art-ops path {
  fill: none;
  stroke: var(--accent-hi);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  filter: drop-shadow(0 0 6px var(--accent));
  transition: stroke-dashoffset 1.6s var(--ease-out);
}
.card.in .art-ops path {
  stroke-dashoffset: 0;
}
.art-ops .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.art-ops .chips span {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11.5px;
  font-family: var(--mono);
}

/* ---------- deploy timeline ---------- */

.deploy {
  padding: 120px 0;
}
.timeline {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
}
.timeline__line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: var(--line-2);
  transform: translateX(-50%);
}
.timeline__line i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to bottom, var(--accent), var(--accent-hi));
  box-shadow: 0 0 12px var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}
.timeline ol {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tl {
  position: relative;
  width: calc(50% - 44px);
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel), var(--surface);
  box-shadow: var(--shadow);
}
.tl:nth-child(even) {
  margin-left: auto;
}
.tl__dot {
  position: absolute;
  top: 26px;
  right: -51px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--ground);
  transition:
    border-color 0.4s ease,
    background-color 0.4s ease,
    box-shadow 0.4s ease;
}
.tl:nth-child(even) .tl__dot {
  right: auto;
  left: -51px;
}
.tl[data-on] .tl__dot {
  border-color: var(--accent-hi);
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}
.tl h3 {
  margin-top: 6px;
  font-size: 18px;
}
.tl p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 14.5px;
}

/* ---------- hosting modes ---------- */

.host-sec {
  padding: 100px 0;
}
.modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mode {
  display: grid;
  align-content: start;
  gap: 10px;
}
.mode h3 {
  margin-top: 4px;
  font-size: 20px;
}
.mode p {
  margin-top: 0;
}
.mode__tag {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
}
.mode code {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: oklch(0 0 0 / 0.25);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
  overflow-x: auto;
  white-space: nowrap;
}
:root[data-theme="light"] .mode code {
  background: var(--surface-2);
}
.mode--focus {
  border-color: oklch(0.485 0.291 264 / 0.45);
  box-shadow:
    var(--shadow),
    0 0 60px -20px var(--accent-glow);
}
.mode--focus .mode__tag {
  border-color: oklch(0.485 0.291 264 / 0.5);
  color: var(--accent-hi);
}

/* ---------- roadmap ---------- */

.road {
  padding: 120px 0;
}
.road__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: center;
}
.road__text {
  display: grid;
  gap: 18px;
  justify-items: start;
}
.road__text h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.16;
}
.road__text > p {
  color: var(--ink-2);
  font-size: 16px;
}
.road__list {
  display: grid;
  gap: 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.road__list li {
  position: relative;
  padding-left: 16px;
  border-left: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: 14.5px;
}
.road__list b {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}
.decide {
  display: grid;
  justify-items: center;
  padding: 36px 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel), var(--surface);
  box-shadow: var(--shadow);
}
.decide__q {
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  font-size: 14px;
  font-weight: 500;
}
.decide__lines {
  width: 100%;
  max-width: 380px;
  height: 110px;
  overflow: visible;
}
.decide__lines path {
  stroke: var(--line-2);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  transition: stroke-dashoffset 1.4s var(--ease-out);
}
.decide__lines path:nth-child(2) {
  transition-delay: 0.12s;
}
.decide__lines path:nth-child(3) {
  transition-delay: 0.24s;
}
.decide__lines path:nth-child(4) {
  transition-delay: 0.36s;
}
.road__visual.in .decide__lines path {
  stroke-dashoffset: 0;
}
.decide__out {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 380px;
}
.decide__out span {
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-2);
}
.decide__out .go {
  border-color: oklch(0.76 0.15 158 / 0.45);
  color: var(--good);
}
.decide__out .stop {
  border-color: oklch(0.8 0.14 75 / 0.45);
  color: var(--warn);
}

/* ---------- developers ---------- */

.dev {
  padding: 120px 0;
}
.tabs {
  max-width: 820px;
  margin: 0 auto;
  overflow: hidden;
}
.tabs__head {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
}
.tabs__head .tabs__pill {
  top: 6px;
  height: calc(100% - 12px);
}
.tabs__head button {
  position: relative;
  z-index: 1;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.tabs__head button[aria-selected="true"] {
  color: var(--ink);
}
.tabs__panel {
  animation: panel-in 0.35s var(--ease-out);
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 0;
}
.code__file {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.code__copy {
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}
.code__copy[data-copied] {
  color: var(--good);
  border-color: oklch(0.76 0.15 158 / 0.4);
}
.code__body {
  margin: 0;
  padding: 16px 20px 24px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.code__body .t {
  color: var(--ink-3);
}
.code__body .a {
  color: var(--accent-hi);
}
.code__body .s {
  color: oklch(0.8 0.12 160);
}
.code__body .k {
  color: oklch(0.76 0.14 300);
}
:root[data-theme="light"] .code__body .s {
  color: oklch(0.5 0.13 160);
}
:root[data-theme="light"] .code__body .k {
  color: oklch(0.5 0.18 300);
}

/* ---------- pricing (hidden until billing launches) ---------- */

.pricing-sec {
  padding: 120px 0;
}
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.plan ul {
  margin: 16px 0 22px;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 14px;
}
.plan__note {
  color: var(--ink-3);
}
.plan__tag {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-size: 11.5px;
}

/* ---------- faq ---------- */

.faq-sec {
  padding: 100px 0;
}
.faq__grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}
.faq__grid .sec-head h2 {
  font-size: clamp(28px, 3vw, 38px);
}
.faq {
  display: grid;
  border-top: 1px solid var(--line);
}
.faq__item {
  border-bottom: 1px solid var(--line);
}
.faq__item summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px 20px 0;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}
.faq__item summary::-webkit-details-marker {
  display: none;
}
.faq__item summary::before,
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink-3);
  transition: transform 0.3s var(--ease-out);
}
.faq__item summary::after {
  transform: rotate(90deg);
}
.faq__item[open] summary::after {
  transform: rotate(0deg);
}
@media (hover: hover) and (pointer: fine) {
  .faq__item summary:hover {
    color: var(--accent-hi);
  }
}
.faq__item::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.4s var(--ease-out),
    content-visibility 0.4s allow-discrete;
}
.faq__item[open]::details-content {
  block-size: auto;
}
.faq__body {
  padding: 0 40px 22px 0;
  color: var(--ink-2);
  font-size: 15px;
}

/* ---------- cta ---------- */

.cta {
  padding: 60px 0 120px;
}
.cta__inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 88px 32px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--surface);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.cta__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 70% at 50% 100%, transparent, var(--surface) 75%);
}
.cta__glow {
  position: absolute;
  left: 50%;
  bottom: -220px;
  z-index: -1;
  width: 640px;
  height: 360px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(110px);
  opacity: 0.55;
  transform: translateX(-50%);
}
.cta h2 {
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.1;
}
.cta p {
  color: var(--ink-2);
  font-size: 16.5px;
}
.cta__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  color: var(--ink-2);
  font-size: 14px;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer__brand {
  display: grid;
  gap: 12px;
}
.footer__brand .brand {
  color: var(--ink);
}
.footer__cols {
  display: flex;
  gap: 64px;
}
.footer__cols div {
  display: grid;
  align-content: start;
  gap: 10px;
}
.footer__cols h4 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.footer__cols a {
  transition: color 0.2s ease;
}
.footer__cols a:hover {
  color: var(--ink);
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  margin-top: 48px;
  padding-top: 24px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.footer__bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  border-top: 1px solid var(--line);
}

/* ---------- live banner (boot.js live mode) ---------- */

.live-banner {
  position: fixed;
  left: 50%;
  top: calc(var(--nav-h) + 12px);
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid oklch(0.76 0.15 158 / 0.35);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 13px;
  transform: translateX(-50%);
  animation: chip-in 0.5s var(--ease-out) both;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .nav__links {
    display: none;
  }
  .nav__actions {
    margin-left: auto;
  }
  .nav__actions .btn {
    display: none;
  }
  .nav__toggle {
    display: inline-grid;
  }
  .nav__mobile[data-open="true"] {
    display: grid;
    gap: 4px;
    padding: 12px 24px 20px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
  }
  .nav__mobile a {
    padding: 10px 4px;
    color: var(--ink-2);
  }
  .nav__mobile .btn {
    margin-top: 8px;
    color: #fff;
  }
  .intro__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .intro__side {
    justify-items: start;
  }
  .intro__cta {
    justify-content: flex-start;
  }
  .story__grid,
  .think__grid,
  .road__grid,
  .faq__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .story__visual {
    top: calc(var(--nav-h) + 12px);
    height: 360px;
    margin-top: 0;
    z-index: 2;
    order: -1;
  }
  .story__step {
    min-height: 46vh;
  }
  .bento,
  .modes,
  .pricing {
    grid-template-columns: 1fr 1fr;
  }
  .card--wide {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 20px;
  }
  .intro {
    padding: 48px 0 88px;
  }
  .intro__stages {
    font-size: 11px;
  }
  .intro__stages li + li {
    margin-left: 28px;
  }
  .intro__stages li + li::after {
    display: none;
  }
  .snippet {
    display: none;
  }
  .story,
  .think,
  .feat,
  .deploy,
  .road,
  .dev {
    padding: 88px 0;
  }
  .bento,
  .modes,
  .pricing {
    grid-template-columns: 1fr;
  }
  .card--wide {
    grid-column: auto;
  }
  .chatmock {
    height: 520px;
  }
  .seg button {
    padding: 8px 10px;
  }
  .timeline__line {
    left: 7px;
  }
  .tl,
  .tl:nth-child(even) {
    width: auto;
    margin-left: 32px;
  }
  .footer__bottom::before {
    left: 20px;
    right: 20px;
  }
  .tl__dot,
  .tl:nth-child(even) .tl__dot {
    left: -32px;
    right: auto;
  }
  .footer__cols {
    gap: 36px;
  }
  .cta__inner {
    padding: 64px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.12s !important;
    transition-delay: 0s !important;
  }
  .reveal,
  .scene,
  .chunks span {
    transform: none !important;
    filter: none !important;
  }
  .char {
    opacity: 1;
    filter: none;
    transform: none;
  }
  .marquee__track {
    animation: none;
  }
}

/* ==========================================================================
   Ambient loops — every section keeps something quietly moving.
   Loops only run while their section is on screen (data-live, set in app.js).
   ========================================================================== */

main section:not([data-live]) *,
.marquee:not([data-live]) * {
  animation-play-state: paused !important;
}

.nav__gh {
  color: var(--ink-2);
}
@media (hover: hover) and (pointer: fine) {
  .nav__gh:hover {
    color: var(--ink);
  }
}
.btn svg {
  flex: none;
}

/* story: sources keep indexing */
.scene[data-active] .src:nth-child(3) .src__bar i {
  animation: index-progress 4.2s var(--ease-in-out) infinite;
}
.scene[data-active] .src:nth-child(4) .src__bar i {
  animation: queued 1.6s ease-in-out infinite alternate;
}
.src__bar,
.rank__bar {
  position: relative;
}
.scene[data-active] .src__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.35), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: bar-sheen 2.6s linear infinite;
}
@keyframes index-progress {
  0% {
    transform: scaleX(0.15);
  }
  75%,
  100% {
    transform: scaleX(1);
  }
}
@keyframes queued {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
  }
}
@keyframes bar-sheen {
  from {
    background-position: -40% 0;
  }
  to {
    background-position: 140% 0;
  }
}

/* story: embedding scan sweeps across the chunk grid */
.scene[data-active] .chunks span {
  animation: chunk-scan 4.8s linear infinite;
  animation-delay: calc(var(--i, 0) * 0.11s);
}
@keyframes chunk-scan {
  0%,
  6% {
    background-color: oklch(0.485 0.291 264 / 0.32);
    border-color: oklch(0.7 0.17 262 / 0.6);
  }
  20%,
  100% {
    background-color: oklch(1 0 0 / 0.025);
  }
}
.scene[data-active] .chunks span.hot {
  animation-name: chunk-hot;
}
@keyframes chunk-hot {
  0%,
  100% {
    box-shadow: 0 0 22px -6px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 30px -2px var(--accent-glow);
  }
}

/* story: reranking spotlight walks down the candidates */
.scene[data-active] .rank__row {
  animation: row-scan 5.2s ease-in-out infinite;
}
.scene[data-active] .rank__row:nth-child(3) {
  animation-delay: 0.5s;
}
.scene[data-active] .rank__row:nth-child(4) {
  animation-delay: 1s;
}
.scene[data-active] .rank__row:nth-child(5) {
  animation-delay: 1.5s;
}
@keyframes row-scan {
  0%,
  8% {
    border-color: oklch(0.485 0.291 264 / 0.55);
    background-color: oklch(0.485 0.291 264 / 0.1);
  }
  22%,
  100% {
    border-color: var(--line);
    background-color: transparent;
  }
}
.scene[data-active] .gap em {
  display: inline-block;
  animation: nudge 1.6s var(--ease-in-out) infinite;
}
@keyframes nudge {
  50% {
    transform: translateX(4px);
  }
}

/* bento: trust bars breathe */
.art-trust i::after {
  transform-origin: left;
  animation: breathe 3.6s ease-in-out infinite alternate;
}
.art-trust div:nth-child(2) i::after {
  animation-delay: -1.2s;
}
.art-trust i.stale::after {
  animation: stale 2.4s ease-in-out infinite alternate;
}
@keyframes breathe {
  from {
    transform: scaleX(0.9);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes stale {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 0.85;
  }
}

/* bento: knowledge-gap counters tick up, the draft chip shimmers */
.art-gap em.pop {
  animation: pop 0.45s var(--ease-out);
}
@keyframes pop {
  40% {
    transform: scale(1.35);
    color: var(--ink);
  }
}
.art-gap em {
  display: inline-block;
}
.art-gap .draft {
  background: linear-gradient(90deg, var(--accent-soft) 0%, oklch(0.7 0.17 262 / 0.32) 50%, var(--accent-soft) 100%);
  background-size: 200% 100%;
  animation: draft-sweep 3s linear infinite;
}
@keyframes draft-sweep {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

/* bento: host page skeleton shimmers behind the widget */
.art-shadow .host span {
  background: linear-gradient(90deg, var(--line-2) 0%, oklch(1 0 0 / 0.2) 50%, var(--line-2) 100%);
  background-size: 200% 100%;
  animation: draft-sweep 2.8s linear infinite;
}

/* bento: persona swatches cycle */
.art-persona .sw {
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition:
    outline-color 0.3s ease,
    transform 0.3s var(--ease-out);
}
.art-persona .sw:first-child {
  outline-color: transparent;
}
.art-persona .sw.is-on {
  outline-color: var(--ink);
  transform: scale(1.08);
}
.art-persona .persona {
  transition:
    opacity 0.22s ease,
    transform 0.22s var(--ease-out);
}
.art-persona .persona.is-swap {
  opacity: 0;
  transform: translateY(4px);
}

/* bento: a live line that keeps scrolling */
.art-ops .spark {
  position: relative;
  overflow: hidden;
}
.art-ops .spark__run {
  animation: spark-run 9s linear infinite;
}
.art-ops .spark__run path {
  stroke-dasharray: none;
  stroke-dashoffset: 0;
}
@keyframes spark-run {
  to {
    transform: translateX(-200px);
  }
}
.spark__dot {
  position: absolute;
  right: 0;
  top: 47px;
  width: 8px;
  height: 8px;
  margin-right: -1px;
  border-radius: 50%;
  background: var(--accent-hi);
  box-shadow: 0 0 0 0 oklch(0.7 0.17 262 / 0.6);
  animation: live-ping 1.8s var(--ease-out) infinite;
}
@keyframes live-ping {
  70%,
  100% {
    box-shadow: 0 0 0 10px oklch(0.7 0.17 262 / 0);
  }
}

/* hosting modes: packets flow between components */
.flow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 6px;
}
.flow span {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: oklch(1 0 0 / 0.03);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
}
.flow i {
  position: relative;
  flex: 1;
  height: 1px;
  background: var(--line-2);
}
.flow i::after {
  content: "";
  position: absolute;
  inset: -1px 0;
  background: linear-gradient(90deg, transparent, var(--accent-hi), transparent) no-repeat;
  background-size: 40% 100%;
  animation: packet 2.2s linear infinite;
}
.flow i + span + i::after {
  animation-delay: 1.1s;
}
.mode--focus .flow i::after {
  animation-duration: 1.6s;
}
@keyframes packet {
  from {
    background-position: -60% 0;
  }
  to {
    background-position: 160% 0;
  }
}
.host-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
  color: var(--ink-3);
  font-size: 13.5px;
}

/* roadmap: evidence packets flow into each decision */
.decide__lines .pkt {
  fill: var(--accent-hi);
  filter: drop-shadow(0 0 4px var(--accent));
}
.road__visual.in .decide__out span {
  animation: arrive 3.2s ease-out infinite;
}
.decide__out span:nth-child(2) {
  animation-delay: -0.8s !important;
}
.decide__out span:nth-child(3) {
  animation-delay: -1.6s !important;
}
.decide__out span:nth-child(4) {
  animation-delay: -2.4s !important;
}
@keyframes arrive {
  0% {
    box-shadow: 0 0 0 0 oklch(0.7 0.17 262 / 0.5);
    border-color: oklch(0.7 0.17 262 / 0.7);
  }
  30%,
  100% {
    box-shadow: 0 0 0 8px oklch(0.7 0.17 262 / 0);
  }
}

/* deploy: a comet keeps travelling down the timeline */
.timeline__line::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to bottom, transparent, var(--accent-hi) 50%, transparent) no-repeat;
  background-size: 100% 140px;
  animation: comet 5s linear infinite;
}
@keyframes comet {
  from {
    background-position: 0 -15%;
  }
  to {
    background-position: 0 115%;
  }
}

/* cta: the light underneath breathes */
.cta__glow {
  animation: glow-breathe 8s ease-in-out infinite alternate;
}
@keyframes glow-breathe {
  from {
    opacity: 0.4;
    transform: translateX(-50%) scale(0.92);
  }
  to {
    opacity: 0.65;
    transform: translateX(-50%) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .decide__lines .pkt {
    display: none;
  }
}

.art-persona .sws {
  display: flex;
  gap: 10px;
}
.art-persona .sws .sw {
  margin: 0;
}
.art-gap {
  gap: 6px;
}
.art-gap .q {
  padding: 5px 10px;
  font-size: 12px;
}

/* ---------- floating pill nav ---------- */

html {
  scroll-padding-top: 104px;
}
.nav,
.nav[data-scrolled] {
  top: 16px;
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  border: 1px solid var(--line-2);
  border-radius: 22px;
  background: oklch(0.118 0.004 286 / 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  transition: background-color 0.3s ease;
}
.nav[data-scrolled] {
  background: oklch(0.118 0.004 286 / 0.78);
}
:root[data-theme="light"] .nav {
  background: oklch(0.985 0.002 286 / 0.7);
}
:root[data-theme="light"] .nav[data-scrolled] {
  background: oklch(0.985 0.002 286 / 0.88);
}
.nav .container.nav__inner {
  max-width: none;
  height: 58px;
  padding: 0 10px 0 20px;
}
.nav__mobile[data-open="true"] {
  background: transparent !important;
  border: 0 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-top: 1px solid var(--line) !important;
}
.live-banner {
  top: 88px;
}

/* ---------- story on narrow screens: inline panels, no sticky overlay ---------- */

.story__inline {
  display: none;
}
@media (max-width: 1024px) {
  .story__visual {
    display: none;
  }
  .story__step {
    min-height: 0;
    padding: 28px 0;
    opacity: 1;
  }
  .story__inline {
    display: grid;
    height: auto;
    margin-top: 18px;
  }
  .story__inline > .scene {
    grid-area: auto;
    opacity: 1;
    transform: none;
    filter: none;
  }
}
@media (max-width: 760px) {
  .nav,
  .nav[data-scrolled] {
    top: 10px;
    width: calc(100% - 20px);
    border-radius: 18px;
  }
  .nav .container.nav__inner {
    height: 54px;
    padding: 0 6px 0 14px;
  }
  .story__inline .scene {
    padding: 18px;
  }
  .chunks {
    gap: 6px;
  }
}

@media (max-width: 760px) {
  .chatmock {
    height: 460px;
  }
  .code__body {
    font-size: 12px;
    padding: 12px 16px 18px;
  }
  .nav:has(.nav__mobile[data-open="true"]) {
    background: oklch(0.118 0.004 286 / 0.96);
  }
  :root[data-theme="light"] .nav:has(.nav__mobile[data-open="true"]) {
    background: oklch(0.985 0.002 286 / 0.97);
  }
}

/* ---------- scroll-in choreography (stronger, directional, staggered) ---------- */

.reveal,
.reveal[data-reveal="up"] {
  opacity: 0;
  filter: blur(6px);
  transform: translate3d(0, 44px, 0);
  transition:
    opacity 0.9s var(--ease-out),
    transform 1s var(--ease-out),
    filter 0.9s var(--ease-out);
  transition-delay: var(--rd, 0ms);
}
.reveal[data-reveal="left"] {
  transform: translate3d(-56px, 0, 0);
}
.reveal[data-reveal="right"] {
  transform: translate3d(56px, 0, 0);
}
.reveal[data-reveal="scale"] {
  transform: translate3d(0, 36px, 0) scale(0.94);
}
.reveal.in,
.reveal[data-reveal].in {
  opacity: 1;
  filter: none;
  transform: none;
}
/* the story steps already fade by focus; reveal only moves them in */
.story__step.reveal.in:not([data-active]) {
  opacity: 0.28;
}
@media (max-width: 1024px) {
  .story__step.reveal.in:not([data-active]) {
    opacity: 1;
  }
  .reveal[data-reveal="left"],
  .reveal[data-reveal="right"] {
    transform: translate3d(0, 40px, 0);
  }
}
@media (max-width: 760px) {
  .reveal,
  .reveal[data-reveal] {
    transition-duration: 0.75s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal[data-reveal] {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

/* the demo's send button mirrors the embedded widget: rounded square, arrow up, dim until there is text */

/* Numbers and labels use the UI face. Monospace stays for code only: its zero carries a
   slash (to tell 0 from O in code), which is noise in figures and captions. */
.intro__stages,
.src em,
.chunks__legend,
.rank__row > span:first-child,
.rank__row em,
.art-hybrid .merge,
.art-gap em,
.mode__tag {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: normal;
}

/* ---------- language switch ---------- */

/* Same box and hover as the theme toggle; only the label is text. */
.lang-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  width: auto;
  min-width: 36px;
  padding: 0 6px;
}
html[lang="en"] .intro__title {
  font-size: clamp(34px, 4.4vw, 60px);
}

/* split-text: keep Latin words on one line */
[data-split] .word {
  display: inline-block;
  white-space: nowrap;
}

/* language switch: a soft crossfade instead of a page reload */
html.lang-vt::view-transition-old(root) {
  animation: lang-out 0.22s cubic-bezier(0.4, 0, 1, 1) both;
}
html.lang-vt::view-transition-new(root) {
  animation: lang-in 0.38s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes lang-out {
  to {
    opacity: 0;
    filter: blur(6px);
  }
}
@keyframes lang-in {
  from {
    opacity: 0;
    filter: blur(6px);
  }
}
