sailfork / t3code-github / .repos/ alchemy-effect/ website/ src/ pages/ index.astro

---
import Marketing from "../layouts/Marketing.astro";
import CodeBlock from "../components/marketing/CodeBlock.astro";
import Button from "../components/marketing/Button.astro";
import ProviderMark from "../components/marketing/ProviderMark.astro";
import HeroBgGraph from "../components/marketing/HeroBgGraph.astro";
import Yantra from "../brand/Yantra.astro";
import DevTuiTerminal from "../components/marketing-islands/DevTuiTerminal.tsx";
import HeroHosts from "../components/marketing-islands/HeroHosts.tsx";
import { HOSTS, hostSource } from "../components/marketing-islands/heroHosts";
import { installSpec } from "../../plugins/preview-install.ts";
import Sentiment from "../components/marketing/Sentiment.astro";
import AlchemicalDivider from "../components/marketing/AlchemicalDivider.astro";
import TestTerminal from "../components/marketing-islands/TestTerminal.tsx";
import PRLifecycle from "../components/marketing-islands/PRLifecycle.tsx";
import PreviewComment from "../components/marketing-islands/PreviewComment.tsx";
import TypePolicy from "../components/marketing-islands/TypePolicy.tsx";
import ObservabilityDash from "../components/marketing-islands/ObservabilityDash.tsx";
import CopyForAgent from "../components/marketing-islands/CopyForAgent.tsx";
import PhotosLayers from "../components/marketing-islands/PhotosLayers.tsx";

const alchemySpec = installSpec("alchemy");

// The hero terminal covers the code card's empty bottom-right corner: it
// starts below the last line that reaches TERM_COL, so no code is hidden.
// The code changes per host, so measure every host's version.
const TERM_COL = 44;
const HOST_LINES = HOSTS.map((h) => hostSource(h.values).split("\n"));
const TERM_LINE = Math.max(
  ...HOST_LINES.map(
    (lines) => lines.findLastIndex((l) => l.trimEnd().length > TERM_COL - 2) + 1,
  ),
);
const STACK_WIDTH = Math.max(...HOST_LINES.flat().map((l) => l.length));
// Cropped to the comment logic inside the Stack.
const PREVIEW_SRC = `const api = yield* Api;
const pr = yield* Config.option(Config.Int("PULL_REQUEST"));
const sha = yield* Config.String("GITHUB_SHA");

if (Option.isSome(pr)) {
  yield* GitHub.Comment("Preview", {
    owner: "acme",
    repository: "my-app",
    issueNumber: pr.value,
    body: Output.interpolate\`Preview: \${api.url} (\${sha})\`,
    allowDelete: true,
  });
}`;
// The GitHub.Comment block, highlighted in the snippet above.
const PREVIEW_COMMENT_LINES: [number, number][] = [[6, 12]];

// The vertical track beside the sections that walk the full picture.
const RAIL = [
  {
    label: "Your machine",
    steps: [
      { id: "loop-edit", title: "edit" },
      { id: "loop-types", title: "type-check" },
      { id: "loop-local", title: "test, emulated" },
      { id: "loop-live", title: "test, live" },
    ],
  },
  { label: "CI/CD", steps: [{ id: "loop-pr", title: "preview per PR" }] },
  { label: "Production", steps: [{ id: "loop-prod", title: "monitoring" }] },
];
const railKicker = (id: string) => {
  const group = RAIL.find((g) => g.steps.some((s) => s.id === id))!;
  return `${group.label} · ${group.steps.find((s) => s.id === id)!.title}`;
};

const TEST_SRC = `const { test, beforeAll, afterAll, deploy, destroy } = Test.make({
  providers: Cloudflare.providers(),
  dev: !!process.env.LOCAL, // emulated, or the real cloud
});

const stack = beforeAll(deploy(Stack)); // its own stage
afterAll(destroy(Stack));

test("PUT + GET round-trips through R2", Effect.gen(function* () {
  const { url } = yield* stack;
  const res = yield* HttpClient.get(\`\${url}/object/hello.txt\`);
  expect(yield* res.text).toBe("hi!");
}));`;

/** The app's layers, bottom-up, and what the Photos module owns in each. */
const PYRAMID = [
  { layer: "Infrastructure", slice: "Photos bucket" },
  { layer: "Configuration & policies", slice: "read/write binding" },
  { layer: "APIs & business logic", slice: "upload()" },
  { layer: "Frontend", slice: "upload button" },
];

const VITE_SRC = `import Api from "./src/api.ts";

export default Alchemy.Stack(
  "my-app",
  { providers: Cloudflare.providers() },
  Effect.gen(function* () {
    // backend: a Cloudflare Worker, run locally in workerd
    const api = yield* Api;
    // frontend: a Vite app that calls it
    const web = yield* Cloudflare.Website.Vite("Web", {
      env: { VITE_API_URL: api.url },
    });
    return { web: web.url, api: api.url };
  }),
);`;

// Marks render monochrome (inheriting the label color) and take on the
// official brand hue only on hover. `color` values are verified against
// svgl.app's SVGs; Prisma swaps to its multi-color mark instead.
const PROVIDERS = [
  { label: "Cloudflare", icon: "Cloudflare", href: "/cloudflare", color: "#f4811f" },
  { label: "AWS", icon: "AWS", href: "/aws", color: "#ff9900" },
  { label: "Hetzner", icon: "Hetzner", href: "/hetzner", color: "#d50c2d" },
  { label: "Fly", icon: "Fly", href: "/fly", color: "#996bec" },
  { label: "Railway", icon: "Railway", href: "/railway" },
  { label: "Neon", icon: "Neon", href: "/neon", color: "#37c38f" },
  { label: "PlanetScale", icon: "PlanetScale", href: "/planetscale" },
  { label: "Prisma", icon: "Prisma", iconHover: "PrismaColor", href: "/prisma" },
  { label: "Docker", icon: "Docker", href: "/docker", color: "#008fe2" },
  { label: "Stripe", icon: "Stripe", href: "/stripe", color: "#533afd" },
  { label: "GitHub", icon: "GitHub", href: "/github" },
  { label: "Axiom", icon: "Axiom", href: "/axiom" },
];

---

<Marketing
  title="Alchemy · the tightest feedback loop from edit to production"
  description="Cloud programs composed from Layers: type-checked, emulated locally, tested live, and deployed per pull request."
>
  <!-- Hero + marquee fill the first screen so the marquee lands just above the fold. -->
  <div class="v2-fold">
  <!-- ───────────────── HERO ───────────────── -->
  <section class="alc-hero v2-hero" style="padding:20px 32px 16px;">
    <HeroBgGraph />
    <button type="button" class="v2-motion-toggle" id="motion-toggle" aria-pressed="false">
      <span class="v2-motion-toggle__label">Pause motion</span>
    </button>
    <div class="v2-hero__grid">
      <div class="v2-hero__copy">
        <div class="alc-hero__inner">
          <Yantra class="alc-hero__mark v2-hero__mark" size={42} />
          <h1
            data-copy
            class="alc-hero__title"
            id="hero-h1"
            style="font-size:clamp(38px,3.65vw,52px);"
          >
            The tightest feedback loop from edit to production
          </h1>
          <p
            data-copy
            class="alc-hero__subtitle"
            id="hero-sub"
            style="font-size:clamp(17px,2.2vw,22px);max-width:560px;"
          >
            Cloud programs composed from Layers: type-checked, emulated locally, tested live, and deployed per pull request.
          </p>
          <div class="alc-hero__cta">
            <Button variant="primary" icon="arrow" href="/getting-started">
              <span data-copy>Start your project</span>
            </Button>
            <Button variant="secondary" href="#agent-prompt">
              <span data-copy>Build it with your agent</span>
              <span class="v2-hero__cta-arrow" aria-hidden="true">&darr;</span>
            </Button>
          </div>
        </div>
      </div>
      <div
        class="v2-hero__visual"
        aria-hidden="true"
        style={`--term-line:${TERM_LINE};--term-col:${TERM_COL}ch;--code-cols:${STACK_WIDTH + 1}ch`}
      >
        <HeroHosts client:load />
      </div>
    </div>
  </section>

  <!-- ───────────────── PROVIDER MARQUEE ───────────────── -->
  <div class="v2-marquee" aria-label="Supported cloud providers">
    <div class="v2-marquee__track">
      {
        /* Four copies so the -50% loop shift always lands on an identical
           frame with content still covering viewports up to ~2 copies wide.
           Two copies leave a blank tail on screens wider than one copy. */
        [0, 1, 2, 3].map((dup) => (
          <ul class="v2-marquee__group" aria-hidden={dup > 0}>
            {PROVIDERS.map((p) => (
              <li>
                <a
                  class="v2-marquee__item"
                  href={p.href}
                  tabindex={dup > 0 ? -1 : undefined}
                  style={"color" in p ? `--brand:${p.color}` : undefined}
                >
                  <span
                    class:list={[
                      "v2-marquee__mark",
                      "iconHover" in p && "v2-marquee__mark--swap",
                    ]}
                  >
                    <ProviderMark name={p.icon} size={17} />
                  </span>
                  {"iconHover" in p && (
                    <span class="v2-marquee__mark v2-marquee__mark--hover">
                      <ProviderMark name={p.iconHover} size={17} />
                    </span>
                  )}
                  {p.label}
                </a>
              </li>
            ))}
          </ul>
        ))
      }
    </div>
  </div>
  </div>

  <script>
    // WCAG 2.2.2: the hero rings and the provider marquee move on their
    // own, so offer a way to stop them. Remembered across visits.
    const KEY = "alc-motion-paused";
    const btn = document.getElementById("motion-toggle")!;
    const label = btn.querySelector(".v2-motion-toggle__label")!;
    const apply = (paused: boolean) => {
      document.documentElement.classList.toggle("alc-motion-paused", paused);
      btn.setAttribute("aria-pressed", String(paused));
      label.textContent = paused ? "Play motion" : "Pause motion";
      window.dispatchEvent(new Event("alc-motion-change"));
    };
    apply(localStorage.getItem(KEY) === "1");
    btn.addEventListener("click", () => {
      const paused = !document.documentElement.classList.contains("alc-motion-paused");
      localStorage.setItem(KEY, paused ? "1" : "0");
      apply(paused);
    });
  </script>

  <div class="v2-scroll-hint" id="scroll-hint" aria-hidden="true">
    <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6" /></svg>
  </div>
  <script>
    // Only while scrolled to the top, and only when the hero + marquee fit
    // on screen (the chevron sits in the gap below the marquee).
    const hint = document.getElementById("scroll-hint")!;
    const fold = document.querySelector<HTMLElement>(".v2-fold")!;
    const sync = () =>
      hint.classList.toggle(
        "is-hidden",
        scrollY > 4 || fold.getBoundingClientRect().bottom > innerHeight + 1,
      );
    addEventListener("scroll", sync, { passive: true });
    addEventListener("resize", sync);
    sync();
  </script>

  <!-- ───────────────── THE FULL PICTURE ───────────────── -->
  <AlchemicalDivider variant="dot" class="v2-divider" />
  <section class="v2-section v2-pat-1 v2-overview">
    <div class="v2-container">
      <h2 class="v2-h2" data-copy>Every step is optimized</h2>
      <p class="v2-lede" data-copy>
        Iterate on your machine and then let CI deploy a preview, test it, and ship it on merge. The type checker answers in milliseconds, emulated tests in seconds, and the real cloud in about 20 seconds.
      </p>
      <p class="v2-overview__source">
        <a
          href="https://github.com/alchemy-run/alchemy/tree/main/examples/cloudflare-preview-benchmark"
          target="_blank"
          rel="noopener"
        >
          <span data-copy>See the example app and benchmark on GitHub</span>
          <span aria-hidden="true">&rarr;</span>
        </a>
      </p>
      <PRLifecycle client:visible />
    </div>
  </section>

  <nav class="v2-rail" aria-label="From an edit to production">
    <span class="v2-rail__track" aria-hidden="true"><span class="v2-rail__fill"></span></span>
    {RAIL.map((group) => (
      <div class="v2-rail__group">
        <span class="v2-rail__label">{group.label}</span>
        <ol class="v2-rail__steps">
          {group.steps.map((step) => (
            <li>
              <a class="v2-rail__step" href={`#${step.id}`} data-rail={step.id}>
                <span class="v2-rail__dot" aria-hidden="true"></span>
                {step.title}
              </a>
            </li>
          ))}
        </ol>
      </div>
    ))}
  </nav>
  <script>
    // Light the rail's step for the section in the middle of the viewport,
    // fill the track up to it, and show the rail only while those sections
    // are on screen.
    const rail = document.querySelector<HTMLElement>(".v2-rail")!;
    const sections = [
      ...document.querySelectorAll<HTMLElement>("[data-rail-section]"),
    ];
    const links = new Map(
      [...rail.querySelectorAll<HTMLAnchorElement>("[data-rail]")].map((a) => [
        a.dataset.rail!,
        a,
      ]),
    );
    const syncRail = () => {
      const mid = innerHeight * 0.45;
      const start = sections[0]!.getBoundingClientRect();
      const end = sections[sections.length - 1]!.getBoundingClientRect();
      rail.classList.toggle("is-shown", start.top < mid && end.bottom > mid);
      const current =
        sections.findLast((el) => el.getBoundingClientRect().top < mid) ??
        sections[0]!;
      let reached = true;
      for (const [id, a] of links) {
        a.classList.toggle("is-current", id === current.id);
        a.classList.toggle("is-done", reached && id !== current.id);
        if (id === current.id) reached = false;
      }
      // One track from the first dot to the last, filled to the current one.
      const dots = [...rail.querySelectorAll<HTMLElement>(".v2-rail__dot")];
      const top = rail.getBoundingClientRect().top;
      const center = (el: HTMLElement) => {
        const r = el.getBoundingClientRect();
        return r.top + r.height / 2 - top;
      };
      const first = center(dots[0]!);
      const track = rail.querySelector<HTMLElement>(".v2-rail__track")!;
      track.style.top = `${first}px`;
      track.style.height = `${center(dots[dots.length - 1]!) - first}px`;
      const at = links.get(current.id)!.querySelector<HTMLElement>(".v2-rail__dot")!;
      track.style.setProperty("--fill", `${center(at) - first}px`);
    };
    addEventListener("scroll", syncRail, { passive: true });
    addEventListener("resize", syncRail);
    syncRail();
  </script>


  <!-- ───────────────── EDIT ───────────────── -->
  <AlchemicalDivider variant="line" class="v2-divider" />
  <section class="v2-section v2-pat-2 v2-feature" id="loop-edit" data-rail-section>
    <div class="v2-container">
      <p class="v2-kicker">{railKicker("loop-edit")}</p>
      <h2 class="v2-h2" data-copy>Infrastructure is part of your application</h2>
      <p class="v2-lede" data-copy>
        Other IaC tools split an app into two programs, but every feature you build crosses that line. In Alchemy, a Layer owns its infrastructure and service implementation so that features can be decomposed.
      </p>
      <div class="v2-split v2-split--center">
        <figure class="v2-pyramid" aria-label="The Photos module spans every layer of the app">
          <div class="v2-pyramid__stack">
            <span class="v2-pyramid__module" data-copy>PHOTOS MODULE</span>
            <ol class="v2-pyramid__layers">
              {PYRAMID.map((row, i) => (
                <li class="v2-pyramid__layer" style={`--w:${100 - i * 12}%`}>
                  <span class="v2-pyramid__name" data-copy>{row.layer}</span>
                  <span class="v2-pyramid__slice" data-copy>{row.slice}</span>
                </li>
              ))}
            </ol>
          </div>
          <span class="v2-pyramid__cut" aria-hidden="true"></span>
          <span class="v2-pyramid__program v2-pyramid__program--above" data-copy>runtime program</span>
          <span class="v2-pyramid__program v2-pyramid__program--below" data-copy>infrastructure program</span>
        </figure>
        <PhotosLayers client:visible />
      </div>
    </div>
  </section>

  <!-- ───────────────── TYPE-CHECK ───────────────── -->
  <AlchemicalDivider variant="triangle" class="v2-divider" />
  <section class="v2-section v2-pat-3 v2-feature" id="loop-types" data-rail-section>
    <div class="v2-container">
      <p class="v2-kicker">{railKicker("loop-types")}</p>
      <h2 class="v2-h2" data-copy>Type checking proves your infra is correct</h2>
      <p class="v2-lede" data-copy>
        Each Layer declares what it needs in its type: the resources it creates, the access it grants, and the services it calls. Leave one out and the program doesn't compile, so a broken stack fails in your editor in milliseconds, before anything deploys.
      </p>
      <TypePolicy client:visible />
    </div>
  </section>

  <!-- ───────────────── EMULATED ───────────────── -->
  <AlchemicalDivider variant="square" class="v2-divider" />
  <section class="v2-section v2-pat-4 v2-feature" id="loop-local" data-rail-section>
    <div class="v2-container">
      <p class="v2-kicker">{railKicker("loop-local")}</p>
      <h2 class="v2-h2" data-copy>Get fast feedback with local emulation</h2>
      <p class="v2-lede" data-copy>
        <code class="alc-code-inline">alchemy dev</code> runs Workers, Durable Objects, queues and buckets on emulated services on your machine, and the frontend reloads as you type. Set <code class="alc-code-inline">dev: true</code> in a test and the same suite runs against those services in seconds, with nothing deployed.
      </p>
      <div class="v2-split">
        <CodeBlock filename="alchemy.run.ts" code={VITE_SRC} compact />
        <DevTuiTerminal client:visible />
      </div>
    </div>
  </section>

  <!-- ───────────────── TESTED LIVE ───────────────── -->
  <AlchemicalDivider variant="pentagon" class="v2-divider" />
  <section class="v2-section v2-pat-5 v2-feature" id="loop-live" data-rail-section>
    <div class="v2-container">
      <p class="v2-kicker">{railKicker("loop-live")}</p>
      <h2 class="v2-h2" data-copy>Test a live deployment when ready to PR</h2>
      <p class="v2-lede" data-copy>
        Once it works locally, run the same test without <code class="alc-code-inline">LOCAL=1</code>. It deploys the app to a stage of its own, runs against real Workers, buckets and permissions, and destroys the stage afterwards, in about 20 seconds.
      </p>
      <div class="v2-split">
        <CodeBlock filename="test/api.test.ts" code={TEST_SRC} compact />
        <TestTerminal client:visible />
      </div>
    </div>
  </section>

  <!-- ───────────────── PER PULL REQUEST ───────────────── -->
  <AlchemicalDivider variant="hexagon" class="v2-divider" />
  <section class="v2-section v2-pat-6 v2-feature" id="loop-pr" data-rail-section>
    <div class="v2-container">
      <p class="v2-kicker">{railKicker("loop-pr")}</p>
      <h2 class="v2-h2" data-copy>Deploy a preview stage in CI before merging</h2>
      <p class="v2-lede" data-copy>
        CI deploys each pull request to its own stage, runs the same tests, and comments a link to try it. The comment is a resource in the same program, so it is updated on every push and deleted with the preview. Merging deploys to production.
      </p>
      <div class="v2-split v2-split--preview">
        <CodeBlock
          filename="alchemy.run.ts"
          code={PREVIEW_SRC}
          compact
          highlight={PREVIEW_COMMENT_LINES}
        />
        <PreviewComment client:visible />
      </div>
    </div>
  </section>

  <!-- ───────────────── OBSERVABILITY ───────────────── -->
  <AlchemicalDivider variant="heptagon" class="v2-divider" />
  <section class="v2-section v2-pat-1 v2-feature" id="loop-prod" data-rail-section>
    <div class="v2-container">
      <p class="v2-kicker">{railKicker("loop-prod")}</p>
      <h2 class="v2-h2" data-copy>Disciplined monitoring on Day 1</h2>
      <p class="v2-lede" data-copy>
        Provide one Layer and every request is traced and logged with OpenTelemetry from the first deploy. Its datasets, dashboards and alert monitors are resources in the same program, so monitoring ships with the app. Swap the Layer to send telemetry to a different platform.
      </p>
      <ObservabilityDash client:visible />
    </div>
  </section>

  <!-- ───────────────── SENTIMENT ───────────────── -->
  <AlchemicalDivider variant="octagon" class="v2-divider" />
  <section class="v2-section v2-pat-2" aria-labelledby="sentiment-h">
    <div class="v2-container">
      <h2 class="v2-h2" id="sentiment-h" data-copy>Loved by the people shipping with it</h2>
      <p class="v2-lede" data-copy>
        What builders say after putting Alchemy in front of their agents,
        their Cloudflare apps, and their production infrastructure.
      </p>
      <Sentiment />
    </div>
  </section>

  <!-- ───────────────── GET STARTED ───────────────── -->
  <AlchemicalDivider variant="circle" class="v2-divider" />
  <section class="v2-section v2-pat-3 v2-section--last">
    <div class="v2-container">
      <h2 class="v2-h2" data-copy>Get started.</h2>
      <ol class="v2-steps">
        <li class="v2-steps__inline">
          <span class="v2-steps__label" data-copy>Install</span>
          <code class="v2-steps__code">pnpm add {alchemySpec} effect</code>
        </li>
        <li id="agent-prompt">
          <span class="v2-steps__label" data-copy>Paste this into your coding agent</span>
          <CopyForAgent client:load />
        </li>
        <li class="v2-steps__inline">
          <span class="v2-steps__label" data-copy>Ship</span>
          <code class="v2-steps__code">pnpm alchemy deploy</code>
        </li>
      </ol>
      <div class="v2-cta-buttons">
        <Button variant="secondary" icon="arrow" href="/getting-started">
          <span data-copy>Read the tutorial</span>
        </Button>
        <Button
          variant="ghost"
          icon="github"
          href="https://github.com/alchemy-run/alchemy"
        >
          <span data-copy>GitHub</span>
        </Button>
      </div>
    </div>
  </section>
</Marketing>

<style>
  /* ---------- first screen: hero + marquee, fold just below the marquee ---------- */
  .v2-fold {
    display: flex;
    flex-direction: column;
    /* 64px sticky header, ~32px of the next section peeking below the marquee. */
    min-height: max(620px, calc(100svh - 64px - 32px));
  }
  .v2-fold > .v2-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .v2-fold > .v2-hero > .v2-hero__grid {
    width: 100%;
  }
  /* Bottom-left, under the copy column, where nothing else sits; at the
     top right it collided with the host reel. */
  .v2-motion-toggle {
    position: absolute;
    left: 20px;
    bottom: 12px;
    z-index: 3;
    padding: 4px 10px;
    border: 1px solid var(--alc-hairline-2);
    border-radius: 999px;
    background: color-mix(in srgb, var(--alc-bg) 70%, transparent);
    color: var(--alc-fg-3);
    font: 500 12px var(--alc-font-sans);
    cursor: pointer;
    min-height: 24px;
  }
  .v2-motion-toggle:hover {
    color: var(--alc-fg-1);
    border-color: var(--alc-hairline-3);
  }
  .v2-motion-toggle:focus-visible {
    outline: 2px solid var(--alc-accent);
    outline-offset: 2px;
  }
  /* Nothing moves under reduced motion, so the control isn't needed. */
  @media (prefers-reduced-motion: reduce) {
    .v2-motion-toggle {
      display: none;
    }
  }
  .v2-scroll-hint {
    position: fixed;
    left: 50%;
    bottom: 6px;
    z-index: 5;
    translate: -50% 0;
    color: var(--alc-fg-2);
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 300ms ease;
    animation: v2-scroll-hint-pulse 2.2s ease-in-out infinite;
  }
  .v2-scroll-hint svg {
    display: block;
  }
  .v2-scroll-hint.is-hidden {
    opacity: 0;
    animation: none;
  }
  @keyframes v2-scroll-hint-pulse {
    0%,
    100% {
      opacity: 0.15;
      transform: translateY(-3px);
    }
    50% {
      opacity: 0.45;
      transform: translateY(2px);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .v2-scroll-hint {
      animation: none;
    }
  }

  /* ---------- hero: copy left, deploy visual right ---------- */
  .v2-hero__grid {
    position: relative;
    z-index: 1;
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    /* Wide enough for the headline to set in two lines at its size. */
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
  }
  .v2-hero__copy :global(.alc-hero__inner) {
    text-align: left;
    margin: 0;
  }
  /* Shrink-wrap the mark so its box center is the glyph center: the
     background graph measures this element to place its vanishing point. */
  .v2-hero__copy :global(.alc-hero__mark) {
    width: fit-content;
    margin: 0 0 22px;
  }
  .v2-hero__copy :global(.alc-hero__title) {
    text-wrap: balance;
    margin-bottom: 18px;
  }
  .v2-hero__copy :global(.alc-hero__subtitle) {
    margin-inline: 0;
  }
  .v2-hero__copy :global(.alc-hero__cta) {
    justify-content: flex-start;
  }
  /* Hero CTAs use the logo's colors: the leaf-green mark for the main
     action, and the terracotta dot as the secondary action's accent. */
  .v2-hero__copy :global(.alc-btn--primary) {
    background: var(--alc-accent-deep);
    color: var(--alc-bg);
  }
  .v2-hero__copy :global(.alc-btn--primary:hover) {
    background: var(--alc-accent-bright);
  }
  .v2-hero__copy :global(.alc-btn--secondary) {
    padding: 10px 18px;
    background: color-mix(in srgb, var(--alc-bg) 60%, transparent);
    border-color: var(--alc-hairline-3);
  }
  .v2-hero__copy :global(.alc-btn--secondary:hover) {
    border-color: var(--alc-terracotta);
  }
  :global([data-theme="dark"]) .v2-hero__cta-arrow {
    color: var(--alc-terracotta-deep);
  }
  .v2-hero__cta-arrow {
    color: #7a3a18;
  }
  /* The terminal sits over the code card's empty bottom-right corner.
     --term-line / --term-col come from the host sources (see TERM_LINE) and are
     in the code font's units (11px mono, 1.65 line-height). */
  .v2-hero__visual {
    --code-lh: 18.15px;
    --code-header: 36px;
    /* Code and terminal share one grid cell, so the box grows to fit the
       terminal's overhang below the code card. */
    display: grid;
    /* A fixed-width column, so the terminal's percentage width resolves
       against the column and stays put while its content changes. */
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-items: start;
    text-align: left;
    font-family: var(--alc-font-mono);
    font-size: 11px;
  }
  /* The host reel spans the code card's width, edge to edge. */
  .v2-hero__visual :global(.v2-hero__reel) {
    grid-area: 1 / 1;
    width: calc(34px + var(--code-cols));
    max-width: 100%;
    justify-content: space-between;
  }
  .v2-hero__visual :global(.v2-hero__code .alc-code-block__pre) {
    font-size: 11px;
    line-height: 1.65;
  }
  .v2-hero__visual :global(.v2-hero__code),
  .v2-hero__visual :global(.v2-hero__term) {
    grid-area: 2 / 1;
  }
  .v2-hero__visual :global(.v2-hero__code) {
    width: calc(34px + var(--code-cols));
    max-width: 100%;
  }
  .v2-hero__visual :global(.v2-hero__term) {
    position: relative;
    margin-top: calc(var(--code-header) + 12px + var(--term-line) * var(--code-lh) + 8px);
    margin-left: calc(16px + var(--term-col));
    z-index: 1;
    /* Roomier than the longest deploy line (47 chars at 12.5px), capped so
       it never overhangs the column by more than 24px. */
    width: min(470px, calc(100% - 16px - var(--term-col) + 24px));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    border-radius: 10px;
  }
  /* The section-wide halo assumed centered copy; the copy column carries
     its own below. */
  .v2-hero::after {
    background: none;
  }
  .v2-hero__copy {
    position: relative;
  }
  /* Fades the rings behind the headline and subtitle so they stay
     readable; the mark sits near the edge so the rings still read as
     emanating from it. */
  .v2-hero__copy::before {
    content: "";
    position: absolute;
    inset: -60px -160px -90px -160px;
    z-index: -1;
    pointer-events: none;
    /* Same stops as the original centered hero's halo (.alc-hero::after),
       centered on the headline + subtitle. */
    background: radial-gradient(
      closest-side at 50% 62%,
      color-mix(in srgb, var(--alc-bg) 98%, transparent) 0%,
      color-mix(in srgb, var(--alc-bg) 94%, transparent) 50%,
      color-mix(in srgb, var(--alc-bg) 68%, transparent) 78%,
      transparent 100%
    );
  }
  /* Below this the right column is too narrow for the terminal to overlap
     the code, so the hero stacks. */
  @media (max-width: 1260px) {
    .v2-hero__grid {
      grid-template-columns: minmax(0, 1fr);
      gap: 40px;
    }
    .v2-hero__visual {
      max-width: 700px;
    }
  }
  @media (max-width: 760px) {
    .v2-hero__visual {
      justify-items: stretch;
    }
    /* Phones show the cycling code (compact form) and drop the deploy
       terminal, which has no room to overlap it. */
    .v2-hero__visual :global(.v2-hero__code) {
      width: auto;
    }
    .v2-hero__visual :global(.v2-hero__reel) {
      width: auto;
      justify-content: flex-start;
    }
    .v2-hero__visual :global(.v2-hero__term) {
      display: none;
    }
    /* The copy fills the screen width here, so the desktop halo can't fade
       the rings at its edges. A blurred veil covering the whole copy block
       keeps the white text readable over the animation. */
    .v2-hero__copy::before {
      inset: -28px -32px;
      background: color-mix(in srgb, var(--alc-bg) 68%, transparent);
      -webkit-backdrop-filter: blur(4px);
      backdrop-filter: blur(4px);
      -webkit-mask-image: radial-gradient(
        farthest-side at 50% 50%,
        #000 72%,
        transparent 100%
      );
      mask-image: radial-gradient(
        farthest-side at 50% 50%,
        #000 72%,
        transparent 100%
      );
    }
    /* Equal-width, stacked CTAs. */
    .v2-hero__copy :global(.alc-hero__cta) {
      flex-direction: column;
      align-items: stretch;
      max-width: 340px;
    }
    .v2-hero__copy :global(.alc-hero__cta .alc-btn) {
      justify-content: center;
    }
    /* Stacked, the bottom-left spot falls on the code card. */
    .v2-motion-toggle {
      left: auto;
      right: 16px;
      bottom: auto;
      top: 12px;
    }
  }

  .v2-container {
    max-width: 1080px;
    margin: 0 auto;
  }

  #agent-prompt {
    scroll-margin-top: 96px;
  }

  /* ---------- provider marquee ---------- */
  .v2-marquee {
    overflow: hidden;
    border-top: 1px solid var(--alc-hairline);
    padding: 14px 0;
    -webkit-mask-image: linear-gradient(
      to right,
      transparent,
      #000 8%,
      #000 92%,
      transparent
    );
    mask-image: linear-gradient(
      to right,
      transparent,
      #000 8%,
      #000 92%,
      transparent
    );
  }
  .v2-marquee__track {
    display: flex;
    width: max-content;
    animation: v2-marquee-scroll 72s linear infinite;
  }
  .v2-marquee:hover .v2-marquee__track,
  .v2-marquee:focus-within .v2-marquee__track,
  :global(html.alc-motion-paused) .v2-marquee__track {
    animation-play-state: paused;
  }
  .v2-marquee__group {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .v2-marquee__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 26px;
    font-family: var(--alc-font-mono);
    font-size: 12.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--alc-fg-2);
    text-decoration: none;
    transition: color 120ms ease;
  }
  .v2-marquee__item:hover {
    color: var(--alc-fg-1);
  }
  .v2-marquee__mark {
    display: inline-flex;
    align-items: center;
    /* Optical correction: the labels are uppercase-only, so their visual
       mass sits above the flex-centered midline; drop the mark to match. */
    transform: translateY(0.5px);
  }
  /* Monochrome at rest; brand color only under the cursor. Prisma swaps
     between its mono and multi-color marks instead of tinting. */
  .v2-marquee__item:hover .v2-marquee__mark {
    color: var(--brand, currentColor);
  }
  .v2-marquee__mark--hover {
    display: none;
  }
  .v2-marquee__item:hover .v2-marquee__mark--hover {
    display: inline-flex;
  }
  .v2-marquee__item:hover .v2-marquee__mark--swap {
    display: none;
  }
  .v2-marquee__item :global(svg) {
    display: block;
    flex: none;
    opacity: 0.9;
  }
  @keyframes v2-marquee-scroll {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(-50%);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .v2-marquee__track {
      animation: none;
    }
    .v2-marquee {
      overflow-x: auto;
    }
  }

  /* ---------- sections ---------- */
  .v2-section {
    padding: 80px 32px;
  }
  /* Sections are separated by the original site's geometric dividers:
     triangle → square → pentagon → hexagon → circle, down the page. */
  :global(.v2-divider) {
    margin: 0 auto;
  }
  /* A very faint, static echo of the hero's ring geometry behind each
     section, alternating sides. Masked so it takes the theme's text color.
     Clipped horizontally only, so a pattern spills into the neighboring
     sections instead of being cropped; without a per-section stacking
     context it stays behind their content too. */
  .v2-section {
    position: relative;
    overflow-x: clip;
  }
  /* One stacking context for all sections: patterns (z-index -1) paint above
     the body background but below every section's content. Clipped so the
     last section's pattern stops at the footer. */
  :global(main) {
    isolation: isolate;
    overflow: clip;
  }
  .v2-section::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -380px;
    z-index: -1;
    width: 1000px;
    height: 1000px;
    translate: 0 -50%;
    pointer-events: none;
    background: var(--alc-fg-1);
    opacity: 0.045;
    mask: var(--pattern) center / contain no-repeat;
    -webkit-mask: var(--pattern) center / contain no-repeat;
  }
  /* A different Sri Yantra motif per section. */
  .v2-pat-1 { --pattern: url("/patterns/yantra-1.svg"); }
  .v2-pat-2 { --pattern: url("/patterns/yantra-2.svg"); }
  .v2-pat-3 { --pattern: url("/patterns/yantra-3.svg"); }
  .v2-pat-4 { --pattern: url("/patterns/yantra-4.svg"); }
  .v2-pat-5 { --pattern: url("/patterns/yantra-5.svg"); }
  .v2-pat-6 { --pattern: url("/patterns/yantra-6.svg"); }
  .v2-pat-2::before,
  .v2-pat-4::before,
  .v2-pat-6::before {
    right: auto;
    left: -380px;
  }
  .v2-section--last {
    padding-bottom: 96px;
  }
  .v2-h2 {
    font-family: var(--alc-font-serif);
    font-size: clamp(30px, 4.5vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    font-weight: 500;
    color: var(--alc-fg-1);
    margin: 0 0 14px;
  }
  .v2-h3 {
    font-family: var(--alc-font-serif);
    font-size: clamp(24px, 3.5vw, 31px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    font-weight: 500;
    color: var(--alc-fg-1);
    margin: 8px 0 12px;
  }
  .v2-lede {
    font-size: 16px;
    line-height: 1.65;
    color: var(--alc-fg-2);
    max-width: 680px;
    margin: 0 0 28px;
    text-wrap: balance;
  }

  .v2-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }
  /* Grid items default to min-width:auto, so a long unwrappable terminal
     line would stretch its column as the animation plays. Clamp both
     columns to the track size; overflow stays inside the card. */
  .v2-split > :global(*) {
    min-width: 0;
  }
  /* Astro hoists a client:visible loader <script> next to the first such
     island; as a grid child it would otherwise render as text. */
  .v2-split > :global(script) {
    display: none !important;
  }
  /* Side-by-side cards always match heights: every row item stretches, the
     island wrappers pass that height down, and the shorter card's body
     grows (a terminal keeps its designed minimum). Stacked on narrow
     screens, each card keeps its own height. */
  @media (min-width: 901px) {
    .v2-split {
      align-items: stretch;
    }
    .v2-split > :global(*),
    .v2-split :global(astro-island),
    .v2-split :global(astro-island > div) {
      display: flex;
      flex-direction: column;
    }
    .v2-split :global(astro-island > div),
    .v2-split :global(.alc-code-block),
    .v2-split :global(.alc-term) {
      flex: 1;
    }
    .v2-split :global(.alc-code-block__pre),
    .v2-split :global(.alc-term__body) {
      flex: 1;
    }
    .v2-split :global(.alc-term__body) {
      height: auto !important;
    }
  }
  @media (max-width: 900px) {
    .v2-split {
      grid-template-columns: 1fr;
    }
  }

  /* ---------- the full picture (PR lifecycle overview) ---------- */
  .v2-overview {
    border-top: none;
    padding-top: 72px;
  }
  .v2-overview__source {
    margin: -14px 0 24px;
    font-size: 14px;
  }
  .v2-overview__source a {
    display: inline-flex;
    gap: 6px;
    color: var(--alc-fg-2);
    text-decoration: underline;
    text-decoration-color: var(--alc-hairline-3);
    text-underline-offset: 3px;
  }
  .v2-overview__source a:hover {
    color: var(--alc-fg-1);
    text-decoration-color: currentColor;
  }

  /* ---------- modules: the app's layers, cut by a feature ---------- */
  .v2-split--center {
    align-items: center !important;
  }
  .v2-pyramid {
    /* Band height and gap; the cut sits between the 2nd and 3rd bands. */
    --band: 58px;
    --gap: 6px;
    --cut: calc(2 * var(--band) + 1.5 * var(--gap));
    position: relative;
    margin: 0;
  }
  .v2-pyramid__stack {
    --slice-left: 46%;
    --slice-width: 34%;
    position: relative;
    width: 76%;
    padding-top: 30px;
  }
  /* The module: one column through every band. */
  .v2-pyramid__stack::after {
    content: "";
    position: absolute;
    top: 26px;
    bottom: -4px;
    left: var(--slice-left);
    width: var(--slice-width);
    border: 1.5px solid var(--alc-accent);
    border-radius: var(--alc-radius);
    background: color-mix(in srgb, var(--alc-accent) 10%, transparent);
    pointer-events: none;
  }
  .v2-pyramid__module {
    position: absolute;
    top: 0;
    left: var(--slice-left);
    width: var(--slice-width);
    text-align: center;
    font-family: var(--alc-font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--alc-accent-text);
  }
  .v2-pyramid__layers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column-reverse;
    gap: var(--gap);
  }
  .v2-pyramid__layer {
    position: relative;
    min-height: var(--band);
    display: flex;
    align-items: center;
  }
  .v2-pyramid__layer::before {
    content: "";
    position: absolute;
    inset: 0 calc((100% - var(--w)) / 2);
    border: 1px solid var(--alc-hairline-3);
    border-radius: var(--alc-radius);
    background: color-mix(in srgb, var(--alc-bg) 85%, transparent);
  }
  .v2-pyramid__name {
    position: relative;
    margin-left: calc((100% - var(--w)) / 2);
    padding: 0 12px;
    max-width: calc(var(--slice-left) - (100% - var(--w)) / 2);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--alc-fg-1);
  }
  .v2-pyramid__slice {
    position: absolute;
    inset: 0 auto 0 var(--slice-left);
    width: var(--slice-width);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 6px;
    font-family: var(--alc-font-mono);
    font-size: 12.5px;
    color: var(--alc-fg-1);
  }
  .v2-pyramid__cut {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--cut);
    border-top: 1.5px dashed var(--alc-fg-2);
  }
  .v2-pyramid__program {
    position: absolute;
    right: 0;
    width: 22%;
    font-size: 12px;
    line-height: 1.3;
    color: var(--alc-fg-2);
  }
  .v2-pyramid__program--above {
    bottom: calc(var(--cut) + 8px);
  }
  .v2-pyramid__program--below {
    top: calc(100% - var(--cut) + 8px);
  }
  @media (max-width: 480px) {
    .v2-pyramid__name {
      font-size: 12px;
      padding: 0 8px;
    }
    .v2-pyramid__slice {
      font-size: 11px;
    }
  }

  /* One card, as wide as one column of a split. */
  .v2-split--narrow {
    grid-template-columns: minmax(0, 720px);
  }
  @media (min-width: 901px) {
    .v2-split--preview {
      grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    }
  }

  /* ---------- the rail: where each section sits in the full picture ---------- */
  .v2-rail {
    position: fixed;
    top: 50%;
    left: max(16px, calc((100vw - 1080px) / 2 - 176px));
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 150px;
    translate: -8px -50%;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 240ms ease,
      translate 240ms ease;
  }
  .v2-rail.is-shown {
    opacity: 1;
    translate: 0 -50%;
    pointer-events: auto;
  }
  .v2-rail__label {
    display: block;
    margin-bottom: 8px;
    padding-left: 21px;
    font-family: var(--alc-font-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--alc-fg-2);
  }
  .v2-rail__steps {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .v2-rail__step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 0;
    font-size: 13.5px;
    color: var(--alc-fg-2);
    text-decoration: none;
    transition: color 160ms ease;
  }
  .v2-rail__step:hover {
    color: var(--alc-fg-1);
  }
  /* One track behind every dot; the fill grows to the current step. */
  .v2-rail__track {
    position: absolute;
    left: 4px;
    width: 1px;
    background: var(--alc-hairline-3);
  }
  .v2-rail__fill {
    display: block;
    width: 100%;
    height: var(--fill, 0px);
    background: var(--alc-accent);
    transition: height 240ms ease;
  }
  .v2-rail__dot {
    position: relative;
    z-index: 1;
  }
  .v2-rail__dot {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid var(--alc-hairline-3);
    background: var(--alc-bg);
    transition:
      background 160ms ease,
      border-color 160ms ease,
      box-shadow 160ms ease;
  }
  .v2-rail__step.is-done .v2-rail__dot {
    border-color: var(--alc-accent);
    background: var(--alc-accent);
  }
  .v2-rail__step.is-current {
    color: var(--alc-fg-1);
    font-weight: 600;
  }
  .v2-rail__step.is-current .v2-rail__dot {
    border-color: var(--alc-accent);
    background: var(--alc-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--alc-accent) 25%, transparent);
  }
  /* Without room beside the content, each section names its step instead. */
  .v2-kicker {
    margin: 0 0 10px;
    font-family: var(--alc-font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--alc-accent-text);
  }
  @media (min-width: 1440px) {
    .v2-kicker {
      display: none;
    }
  }
  @media (max-width: 1439px) {
    .v2-rail {
      display: none;
    }
  }

  /* ---------- feature sections ---------- */
  .v2-feature .v2-h2 {
    margin-bottom: 12px;
  }

  @media (max-width: 640px) {
    .v2-section {
      padding-left: 20px;
      padding-right: 20px;
    }
  }

  /* ---------- get started ---------- */
  .v2-steps {
    list-style: none;
    counter-reset: step;
    margin: 32px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 720px;
  }
  .v2-steps li {
    counter-increment: step;
    position: relative;
    padding-left: 44px;
  }
  .v2-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--alc-hairline-3);
    color: var(--alc-fg-1);
    font-family: var(--alc-font-mono);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .v2-steps__label {
    display: block;
    font-weight: 600;
    color: var(--alc-fg-1);
    margin-bottom: 8px;
  }
  .v2-steps__code {
    display: inline-block;
    font-family: var(--alc-font-mono);
    font-size: 14px;
    background: var(--alc-bg-code);
    color: var(--alc-fg-invert);
    padding: 10px 16px;
    border-radius: var(--alc-radius);
  }
  /* One-command steps: label and command share the number's row. */
  .v2-steps__inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    min-height: 28px;
  }
  .v2-steps__inline .v2-steps__label {
    margin-bottom: 0;
  }
  .v2-steps__inline .v2-steps__code {
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 6px;
  }
  .v2-cta-buttons {
    display: flex;
    gap: 12px;
    margin-top: 40px;
  }
</style>