# Caldura v4 — Component class contract

The v4 design system declares a set of HTML class names that components are expected to use. When a class is applied to the right element type, the system's CSS resolves the variant-correct styling automatically.

Component classes are declared in:

- `code/shared/deck-components.css` — chevron, deck-table, matrix, deck-kpi, deck-bullets, deck-badge, deck-section
- `code/shared/section-motifs.css` — section-motif (Horizon-derived for Capital, Thermal bars for AI)
- `code/shared/paper-texture.css` — caldura-paper-surface (paper-grain utility)
- `code/shared/entrance.css` — caldura-bloom (animated bloom mark wrapper)
- `code/shared/sr-only.css` — sr-only (visually-hidden utility for the H1-as-lockup pattern)

Variant overrides for specific components live in each variant's `tokens.css` (e.g., `.caldura-capital.variant-warm-steel a { color: rgb(var(--accent-secondary)); }`).

---

## Wrapper classes (set the variant scope)

| Class | Apply to | Effect |
|-------|----------|--------|
| `caldura-capital` | `<body>` or a section element | Activates Capital tokens. Required prefix. |
| `caldura-ai` | `<body>` or a section element | Activates AI tokens. |
| `variant-warm-distinctive` | `<body>` (combined with `caldura-capital`) | Resolves to v4 candidate A |
| `variant-warm-steel` | same | v4 candidate B |
| `variant-blue-institutional` | same | v4 candidate C |
| `variant-v31-baseline` | same | frozen v3.1 reference |
| `caldura-paper-surface` | `<body>` or container | Enables the paper-texture overlay (opacity from `--paper-texture-opacity`) |

`data-color-scheme="dark"` or `data-color-scheme="light"` on `<html>` toggles mode override.

---

## Section / structural

### `.section-motif`

A section-boundary indicator. Renders the variant's section motif (Horizon-derived line + half-disc echo for Capital; Thermal bars for AI).

For the bare case (no child marks), use an `<hr>`:

```html
<hr class="section-motif">
```

When the variant adds a child mark — warm-steel's amber endcap, or AI's trailing thermal bar — use a `<div role="separator">` so the child is a real flex descendant (an `<hr>` is a void element and cannot accept children):

```html
<!-- AI: trailing thermal bar -->
<div class="section-motif" role="separator">
  <span class="bar-trailing" aria-hidden="true"></span>
</div>

<!-- Capital · warm-steel: amber endcap -->
<div class="section-motif" role="separator">
  <span class="endcap" aria-hidden="true"></span>
</div>
```

### `.caldura-bloom`

Wrapper for the animated Bloom mark. Inside, expect `<svg>` with `.ring-1`, `.ring-2`, `.ring-3`, `.ember`, and the wordmark element labeled `.wordmark`. Animations run when `--motion-play-state` is `running` and are paused otherwise.

```html
<div class="caldura-bloom">
  <svg>
    <circle class="ring-3" ... />
    <circle class="ring-2" ... />
    <circle class="ring-1" ... />
    <circle class="ember" ... />
  </svg>
  <span class="wordmark">Caldura AI</span>
</div>
```

### `.sr-only`

Visually-hidden utility for screen-reader-only content. Used when the lockup IS the hero and you still want a proper `<h1>` for semantics.

```html
<h1 class="sr-only">Caldura Capital</h1>
<div aria-hidden="true"><!-- visual lockup --></div>
```

---

## Deck components

### `.chevron`

A three-step horizontal flow. Each `.step` is a discrete phase. Add `.highlight` to a step to call it out with a left-border accent.

```html
<div class="chevron">
  <div class="step highlight">Originate</div>
  <div class="step">Underwrite</div>
  <div class="step">Hold</div>
</div>
```

Bgs read `--accent` via color-mix; text reads `--deck-display-text`.

### `.deck-table`

A standard table with deck styling. Alternate rows tinted with `--accent` at 8%; cell borders are accent-tinted.

```html
<table class="deck-table">
  <thead><tr><th>Investment</th><th>Sector</th><th>Vintage</th></tr></thead>
  <tbody>
    <tr><td>Mesa Grid</td><td>Grid mod</td><td>2025</td></tr>
  </tbody>
</table>
```

Header reads `--deck-display-text`; borders use `--accent` at 35%.

### `.matrix`

A 2D grid where one cell is the "you are here." Add `.you-are-here` to the hero cell.

```html
<div class="matrix">
  <div class="cell">...</div>
  <div class="cell you-are-here">...</div>
</div>
```

Hero cell bg is `--accent` at 18%; left border is full `--accent`.

### `.deck-kpi`

A single KPI tile.

```html
<div class="deck-kpi">
  <div class="value">$420M</div>
  <div class="label">Target fund size</div>
</div>
```

Value reads `--deck-kpi-hero` (computed); label reads `--deck-subtitle-muted`.

### `.deck-bullets`

A `<ul>` whose `::before` markers are tinted with `--accent-light`.

```html
<ul class="deck-bullets">
  <li>Originate</li>
  <li>Underwrite</li>
</ul>
```

### `.deck-badge`

A surface-elevated badge.

```html
<span class="deck-badge">Fund I</span>
```

Bg uses `--bg-surface`; border uses `--border`; text uses `--deck-display-text`.

### `.deck-section`

A section divider band.

```html
<section class="deck-section">
  <!-- section content -->
</section>
```

Bg is `--deck-section-band` (accent at 18% mixed with `--bg-base`).

---

## Action elements

### `.cta-primary`

The primary CTA button. Reads `--cta-bg` and `--cta-text` from the active variant. The compare pages and standalone variant pages all use this class on their hero CTAs.

```html
<button class="cta-primary" type="button">Review Fund Materials</button>
<a class="cta-primary" href="...">Review Fund Materials</a>
```

The system does NOT declare default padding / radius / font-size — those are consumer choices. The system only owns the CTA's color tokens (which ensure AAA contrast for the variant's identity colors).

### `.cta-secondary`

A text-link secondary action. Reads `--accent` for color.

```html
<a class="cta-secondary" href="...">Meet the team →</a>
```

### `.parent-link`

A cross-reference to caldura.com (the parent). Reads `--gold-parent-dark` or `--gold-parent-light` based on mode. Carries the parent-brand bloodline on every entity surface.

```html
<a class="parent-link" href="https://caldura.com">↗ caldura.com — the Caldura group</a>
```

### `.footer-rule`

A horizontal rule used in footer contexts. In warm-steel only, the variant CSS overrides the border-color to `--accent-secondary` (amber) for heat retention.

```html
<hr class="footer-rule">
```

---

## What's NOT declared

The system does NOT declare:

- Top-level page layout (grids, containers, max-width) — consumer-owned.
- Form input styling beyond focus rings — consumer-owned.
- Modal / dialog chrome — out of scope (would be added in a future cycle).
- Navigation chrome (header bars, dropdowns) — consumer-owned.

If the consuming surface needs additional component styling beyond this list, those rules belong in the consumer's own CSS, not back-ported into the design system.
