# Roboto Studio page guidelines

How to build a page: an MDX body (`apps/web/content/`) or a page `.tsx`. Which block to use, and how blocks join. Every block here is registered in `apps/web/src/components/mdx/mdx-renderer.tsx`; a tag that isn't registered there throws when the page renders. Tokens are in [tokens.md](https://robotostudio.com/design/tokens.md), page UI components in [components.md](https://robotostudio.com/design/components.md), chart blocks in [charts.md](https://robotostudio.com/design/charts.md).

## Two kinds of body

- **Banded pages**: services, case studies and marketing pages (`services/`, `case-studies/`, `pages/`). The body is a stack of full-width bands. Each band is one block, and a `<Border variant="double" />` sits between every two.
- **Prose pages**: blog posts (`blog/`). They keep the breadcrumb row and the split hero, then one `prose` column (50rem at most), centred on wide screens, inside the site's side rules, with a scroll minimap at the right edge on long posts (ROB-6970). Write Markdown and drop in inline blocks (`InlineCTA`, `Newsletter`, `Figure`, video, charts). Never put a band (`OffsetSection`, `SplitBand`, `Border`) in a blog post; it breaks out of the column.

## Joining bands

A `<Border variant="double" />` goes between every two adjacent bands, with a blank line on each side. Blocks draw no edge borders of their own.

- The service and case-study templates already draw a double border above the first block and below the last (`app/services/[service]/page.tsx`, `components/case-study/case-study-mdx.tsx`). Never start or end those bodies with `<Border>`; it doubles.
- Multi-band marketing pages (`home`, `contact`, `team` in `pages/`) wrap their bands in `<PageSections>`, which puts a double border between its children itself. Don't add `<Border>` inside it. A single-band page (`privacy`, `terms`) is one `OffsetSection` with no wrapper.
- Two `<Border>`s with nothing between them is a bug: the lines stack 1px apart and read as one thick line.
- `<Subheading>` draws no border. It needs a `<Border variant="double" />` before and after (skip the side that touches the page edge).

```mdx
{/* Correct: content/services/agentic-websites.mdx */}
<Subheading>Agentic builds we've shipped</Subheading>

<Border variant="double" />

<CaseStudies slugs={["synacti", "savory-and-partners"]} limit={2} topUpWithFeatured={false} eyebrow="Agentic build" />

<Border variant="double" />

{/* Incorrect: no border between the subheading and the grid, and a doubled border after it */}
<Subheading>Agentic builds we've shipped</Subheading>
<CaseStudies slugs={["synacti"]} />

<Border variant="double" />
<Border variant="double" />
```

Check border placement with `node .agents/skills/mdx-double-borders/scan.mjs` before committing MDX. It scans the repo's `content/`, so save the file there first.

## Which band

```
What does the band hold?
 ├── A label row that names the next band → Subheading
 ├── Copy with an animated Scene beside it → SplitBand (scene, title, reverse, ctaHref, ctaLabel)
 ├── Copy only: an argument, a project overview, a list → OffsetSection (title, eyebrow, ctaHref, ctaLabel)
 ├── Figures with sources → StatsBand (rules in charts.md)
 ├── A client's words → Quote (author, position, image)
 ├── Questions and answers → FaqSection of FaqItem
 ├── Images or video of the work → MediaGrid of MediaItem / MediaVideoItem, or Media alone
 ├── Logos of clients → Companies
 ├── Cards linking to work or posts → CaseStudies (slugs) or BlogPosts (slugs)
 └── The closing ask → see below
```

`OffsetSection` is the default band: 139 call sites in `content/`, against 20 for `SplitBand`. Reach for another band only when the content is one of the shapes above.

### The closing ask

```
Does the ask have a headline of its own?
 ├── Yes → CentralHero: eyebrow, title, ctaHref, ctaLabel; children are the line under the title
 └── No: a paragraph and the default "Book a meeting" link to /contact → CTASection: eyebrow, href, linkText; children are the paragraph
```

The two take different link props (`ctaHref`/`ctaLabel` against `href`/`linkText`); don't mix them. Service pages end with the template's contact form, so their closing ask points at `#contact`.

### Quote

Props: `author`, `position`, `image`, or `id`. With `id`, the quote, author and portrait load from `content/config/quotes.yaml`, and `==text==` in that file renders emphasized. Inline children don't parse `==`; emphasize with `<Highlight>` there. Never invent a quote: use a real client's words, from that file or the case study.

### CaseStudies

Props: `slugs` (which studies, in order), `technology` (pick by technology instead), `limit` (default 4), `topUpWithFeatured` (default true: fill up to `limit` with featured studies), `eyebrow` (the label on every card), `framed` (a two-column grid with its own top and bottom rule, for use inside prose). On a banded page, leave `framed` off.

### OffsetSection

A two-column band: a numbered title on the left (a CSS counter, `01`, `02`), prose on the right. Inside it, the first `##` is a display heading; split it with `<Highlight>` so the second half reads muted.

```mdx
{/* Correct */}
<OffsetSection eyebrow="Marks and formats" title="Logo">

## Two marks, two backgrounds, no exceptions. <Highlight>Dark files on dark, light files on light.</Highlight>

The R glyph stands on its own where space is tight.

</OffsetSection>

{/* Incorrect: no title, so the band renders the fallback "Project Overview" */}
<OffsetSection>
```

Always set `title`. The service and case-study templates render the page h1 themselves, so their bands stay h2. Set `as="h1"` only on a `pages/` body whose first band carries the page title (`contact`, `call`, `privacy`, `terms`, `roboto-ads-api`, `proposals-docusign`). `reveal={false}` turns off the scroll fade for task pages.

### SplitBand

Copy beside a Scene, splitting at `xl` (1280px) and stacking copy-first below it. `scene` names an entry in `REMOTION_SCENE_META`; `reverse` puts the Scene on the left. Alternate `reverse` down a run of SplitBands so the Scenes zigzag.

## A page in `.tsx`

The skeleton every index page follows (`app/sectors/page.tsx`):

```tsx
<div>
  <BreadcrumbJsonLd items={breadcrumbItems} />
  <PageBreadcrumb items={breadcrumbItems} />
  <GridContainer>
    <HeadingBlock description={PAGE_DESCRIPTION} title={PAGE_TITLE} />
  </GridContainer>
  <GridContainer>
    <Subheading title="Explore by sector" />
  </GridContainer>
  <ResponsiveGridWithDividers cols={{ base: 1, md: 2 }}>
    {cards}
  </ResponsiveGridWithDividers>
  <CTASection eyebrow="Work with us">{closingCopy}</CTASection>
</div>
```

- The root is a `<div>`. `app/layout.tsx` already renders `<main>`; a second one breaks the landmark.
- The page h1 is `HeadingBlock` inside a `GridContainer`. One per page.
- MDX blocks (`OffsetSection`, `FaqSection`, `CTASection`, `CentralHero`, `Quote`) work in `.tsx` too; import them from `@/components/mdx/`. Between two of them, use `<Border variant="double" />` as in MDX.
- A `FaqSection` on a page also gets `FaqJsonLd` (`@/components/json-ld`) with the same questions.
- A page ends on its last block. The footer draws the closing rule.

## Inline blocks in prose

| Need | Block | Rule |
|---|---|---|
| Point a reader at a service mid-post | `InlineCTA` (title, description, href, linkText) | `linkText="Learn more"` on a `/services/*` href is swapped for the service's own label; write a specific label anywhere else |
| Newsletter sign-up | `<Newsletter />` | Defaults are the house copy; pass children only to change the description |
| An image with a caption | `Figure` (src, alt, caption, layout) | `layout="center"` for a narrow (24rem) centred image with its caption below, such as a portrait photo; leave it off otherwise. Images are Vercel Blob URLs, never `cdn.sanity.io` |
| A video | `MuxVideo` (Mux playback ID), `YouTube`, or `LoopVideo` for a silent loop | |
| A chart | `LineChart`, `BarChart`, `AreaChart` (nothing else exists) | charts.md |
| A diagram | `Diagram` (light and dark SVG) | charts.md |

Prose blocks set `not-prose` and their own `my-*` spacing. Don't wrap them in a `div` or add margins.

## Copy rules

- Sentence case for every `title`, `eyebrow`, `ctaLabel` and heading.
- An `eyebrow` is two to four words. It renders as a mono label, so it names the section; it doesn't sell.
- A `ctaLabel` names what happens: "Scope your build", not "Click here" or "Learn more".
- `ctaHref="#contact"` scrolls to the contact form that the service template renders at the foot of the page.
