# Hero Statement

> A studio statement set very large over a mono line with the city, a live local time and the booking window. The words rise out of their masks one after the other on load.

Hero · hero, section, landing, entrance, statement, studio, clock, typography · HTML, CSS, vanilla JS · no dependencies · updated 2026-10-24
Demo: https://kodza.dev/components/hero-statement/

## Files

The code below, served as files: byte for byte what the Kodza site copies (the CSS includes its theme guard).

- [`kodza-hero-statement.css`](https://kodza.dev/registry/hero-statement/kodza-hero-statement.css) · 13.6 KB
- [`kodza-hero-statement.js`](https://kodza.dev/registry/hero-statement/kodza-hero-statement.js) · 6.6 KB
- [`kodza-hero-statement.html`](https://kodza.dev/registry/hero-statement/kodza-hero-statement.html) · 1.0 KB · the markup, to adapt and paste into your page

**Can you run shell commands? Download the CSS and the JS, don't retype them.** Retyping costs thousands of tokens and can drop or change lines of the CSS. Put the files where your stack expects them (Use it says where: change the `-o` paths):

```bash
curl -fsSL --create-dirs -o kodza/kodza-hero-statement.css https://kodza.dev/registry/hero-statement/kodza-hero-statement.css
curl -fsSL --create-dirs -o kodza/kodza-hero-statement.js https://kodza.dev/registry/hero-statement/kodza-hero-statement.js
```

Then load the files from your page as Use it shows, instead of pasting the content. The HTML is the part you adapt (text, links, modifiers): paste it from the Code section. Copy the CSS and the JS from the Code section only if you can't run commands, exactly as they are. (Windows PowerShell: `curl.exe`.)

## API

- Root: `.kodza-hero-statement`
- Variables (set them on the root element itself: it declares its own defaults):
  - `--kz-hero-statement-ink: #0a0a0a`
  - `--kz-hero-statement-muted: rgba(10, 10, 10, 0.5)`
  - `--kz-hero-statement-dim: rgba(10, 10, 10, 0.62)`
  - `--kz-hero-statement-rule: rgba(10, 10, 10, 0.14)`
  - `--kz-hero-statement-bg: transparent`
  - `--kz-hero-statement-width: 1280px`
  - `--kz-hero-statement-top: clamp(96px, 13vw, 200px)`
  - `--kz-hero-statement-bottom: clamp(28px, 3.5vw, 44px)`
  - `--kz-hero-statement-gutter: clamp(16px, 4vw, 40px)`
  - `--kz-hero-statement-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace`
  - `--kz-hero-statement-ease: cubic-bezier(0.22, 1, 0.36, 1)`
  - `--kz-hero-statement-glide: cubic-bezier(0.6, 0, 0.1, 1)`
  - `--kz-hero-statement-soft-ease: cubic-bezier(0.25, 1, 0.5, 1)`
- Attributes:
  - `data-timezone` (e.g. `Europe/Paris`)
- Lifecycle: `kodza:init` / `kodza:destroy` on `document`, with `{ detail: { root } }` to target a container.

## Dark mode

The values Kodza uses on a dark background (`#0a0a0a`). For a page that follows the system theme, add them after the component's CSS:

```css
@media (prefers-color-scheme: dark) {
  .kodza-hero-statement {
    --kz-hero-statement-ink: #f2f2f0;
    --kz-hero-statement-muted: rgba(242, 242, 240, 0.5);
    --kz-hero-statement-dim: rgba(242, 242, 240, 0.64);
    --kz-hero-statement-rule: rgba(242, 242, 240, 0.16);
  }
}
```

A site with its own theme switch puts the same rules under its dark selector instead (`[data-theme="dark"] .kodza-hero-statement { … }`); a single dark section, under that section's class.

## Use it

### Plain HTML page

- CSS: `kodza/kodza-hero-statement.css` next to the page (the Files commands as they are), linked in `<head>`: `<link rel="stylesheet" href="kodza/kodza-hero-statement.css">`. Without a shell, paste it in a `<style>` in `<head>` instead. It only touches `kodza-` classes.
- HTML: where the component goes. Paste it as many times as you need: instances never interfere.
- JS: `kodza/kodza-hero-statement.js`, loaded with `<script src="kodza/kodza-hero-statement.js" defer></script>` in `<head>`. Without a shell, paste it in a `<script>` before `</body>` (or in `<head>`: it waits for the page). One copy per page, whatever the number of instances.
- Restyle with the `--kz-…` variables, set on the component's root element itself (the root declares its own defaults, so a value on an ancestor is ignored), and with the modifiers / attributes listed under API.
- Font: it takes the page's own. The Kodza look is Geist: `<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap">`.
- Content added later (AJAX navigation, a SPA route, a builder preview): start it with `document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root: container } }))`; before removing it, the same call with `'kodza:destroy'` stops it and puts the original markup back.

### Claude artifact (claude.ai)

- Paste the CSS in a `<style>` and the JS in a `<script>` at the end, in the artifact itself: it loads stylesheets only from Google Fonts and scripts only from a few CDNs, so no `<link>` or `<script src>` to Kodza.
- Writing the artifact file with a shell? Insert the downloaded files (Files) with a command instead of retyping them: a line `KODZA-CSS` alone inside the `<style>`, `KODZA-JS` inside the `<script>`, then `sed -e '/^KODZA-CSS$/{r kodza/kodza-hero-statement.css' -e 'd' -e '}' -e '/^KODZA-JS$/{r kodza/kodza-hero-statement.js' -e 'd' -e '}' page.html > artifact.html`.
- Font: load Geist from Google Fonts (allowed): `<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap">`.
- Dark mode: the viewer sets `data-theme="dark"` or `"light"` on `<html>`, or nothing when it follows the system. Write the Dark mode rules twice: inside `@media (prefers-color-scheme: dark)` with `:root:not([data-theme="light"])` in front of each selector, and with `:root[data-theme="dark"]` in front of each selector.

### WordPress

- HTML: a **Custom HTML** block (or a pattern / template part). WordPress keeps this markup as it is only for users allowed to post unfiltered HTML (Administrators; Super Admins on multisite): for anyone else it strips tags such as `<svg>`, `<input>` or `<dialog>`, so add it from the theme (a pattern or template part) instead.
- This one spans the page: a block theme keeps a Custom HTML block to the width of the text column, so put it inside a **Group** block set to **Full width**, with **Inner blocks use content width** turned off.
- CSS and JS: the downloaded files go in the theme, under `wp-content/themes/<your-theme>/kodza/` (the child theme if there is one), enqueued from its functions.php (or a code-snippets plugin):
  ```php
  add_action('wp_enqueue_scripts', function () {
    $dir = get_stylesheet_directory() . '/kodza/';
    $uri = get_stylesheet_directory_uri() . '/kodza/';
    wp_enqueue_style('kodza-hero-statement', $uri . 'kodza-hero-statement.css', [], filemtime($dir . 'kodza-hero-statement.css'));
    wp_enqueue_script('kodza-hero-statement', $uri . 'kodza-hero-statement.js', [], filemtime($dir . 'kodza-hero-statement.js'), true);
  });
  ```
  Scoped to `kodza-` classes, the CSS never touches the theme. One copy of the JS, whatever the number of blocks.
- No access to the theme files? The CSS can also go, as it is, in **Appearance → Customize → Additional CSS** (classic theme) or **Styles → Additional CSS** in the Site Editor (block theme).
- Theme with AJAX page transitions: fire `kodza:init` on the new content after each swap (and `kodza:destroy` on the old one).
- Performance plugin (WP Rocket, LiteSpeed Cache, Perfmatters…) with **Delay JavaScript execution** turned on: add `kodza` to the scripts it must not delay. Otherwise the component waits for the visitor's first scroll, tap or mouse move, and that first click can be lost.
- Colours: it takes the colour of the text around it (or keeps its own monochrome): nothing to point at the theme.
- WordPress turns straight quotes and `--` into typographic ones in the text of a Custom HTML block (not inside `<code>` or `<pre>`).

#### With Elementor

- HTML: an **HTML** widget (Elementor shows it to administrators only). It keeps the code exactly as pasted, straight quotes included.
- This one spans the page: give the widget its own container, **Content Width: Full Width**, padding 0.
- CSS and JS: as above. Elementor's Site Settings → Theme Style styles every button, field, link and image of the page, components included; the theme guard at the end of the CSS keeps the component's buttons, fields and link colours as they are.
- The Elementor editor redraws each widget after the page has loaded: without the script below, the component stays still in the editor preview (the published page works). Add it once per site, in the footer like the component's script (`kodza/elementor-editor.js`, or a code-snippets plugin):

```js
// Kodza in the Elementor editor: the editor redraws each HTML widget after the page has loaded.
// Start Kodza in what it draws, stop it in what it replaces or removes. Once per site.
window.addEventListener('elementor/frontend/init', () => {
  if (!elementorFrontend.isEditMode()) return;
  class KodzaWidget extends elementorModules.frontend.handlers.Base {
    onInit() {
      super.onInit();
      this.kodza = [...this.$element[0].children];
      document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root: this.$element[0] } }));
    }
    onDestroy() {
      super.onDestroy();
      this.kodza.forEach((root) => document.dispatchEvent(new CustomEvent('kodza:destroy', { detail: { root } })));
    }
  }
  elementorFrontend.elementsHandler.attachHandler('html', KodzaWidget);
});
```

- No child theme: everything can go in the HTML widget instead, `<style>` with the CSS, the HTML, then `<script>` with the JS. It works on the page and in the editor without the script above.

### Shopify

- Files: `assets/kodza-hero-statement.css` and `assets/kodza-hero-statement.js` (the Files commands with `-o assets/…`).
- In the section: `{{ 'kodza-hero-statement.css' | asset_url | stylesheet_tag }}` and `<script src="{{ 'kodza-hero-statement.js' | asset_url }}" defer></script>`, then the HTML.
- The theme editor re-renders sections: restart them with
  `document.addEventListener('shopify:section:load', (e) => document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root: e.target } })));`
  and the same with `shopify:section:unload` → `kodza:destroy`.

### React / Next.js

- Files, side by side (e.g. in `components/kodza/`): `HeroStatement.tsx` (below), the CSS block under Code saved as `hero-statement.css` and the JS block as `hero-statement.js`, both as they are. The HTML block is already inside the component: skip it.
- Use it: `import { HeroStatement } from '@/components/kodza/HeroStatement';` then `<HeroStatement />`. Props: `vars` (the `--kz-…` variables listed under API, e.g. `vars={{ '--kz-hero-statement-ink': … }}`), `className`, `style` and the other props of its `<section>` (`onClick`, `aria-…`).
- Next.js App Router: it is a Client Component already (`'use client'`). Pages Router: Next.js takes global CSS only in `pages/_app`, so move the `import './hero-statement.css'` line there.
- Safe under StrictMode, client-side navigation and prop changes: when a prop changes, the `key` gives React a fresh element, `kodza:destroy` stops the script on the old one and `kodza:init` starts it on the new one.

```tsx
'use client';
// Kodza — Hero Statement, for React. From https://kodza.dev/components/hero-statement/
// Kodza License: free to use, client work included. Not to resell or redistribute, ported or not: https://kodza.dev/docs/#print-license
// Next to this file: hero-statement.css and hero-statement.js, the component's CSS and JS from Kodza, as they are.
// Yours to edit: the markup is plain JSX below.
// The script changes this markup once React has rendered it (it adds layers, splits text, moves
// nodes), so React must not patch it afterwards. When a prop changes, the key gives React a fresh
// element: kodza:destroy stops the script on the old one, kodza:init starts it on the new one.
import { useRef, useEffect, type ComponentPropsWithoutRef, type ComponentRef, type CSSProperties } from 'react';
import './hero-statement.css';

export type HeroStatementProps = Omit<ComponentPropsWithoutRef<'section'>, "children" | "vars"> & {
  /** Settings, as CSS variables on the root */
  vars?: {
    /** default: #0a0a0a */
    "--kz-hero-statement-ink"?: string | number;
    /** default: rgba(10, 10, 10, 0.5) */
    "--kz-hero-statement-muted"?: string | number;
    /** default: rgba(10, 10, 10, 0.62) */
    "--kz-hero-statement-dim"?: string | number;
    /** default: rgba(10, 10, 10, 0.14) */
    "--kz-hero-statement-rule"?: string | number;
    /** default: transparent */
    "--kz-hero-statement-bg"?: string | number;
    /** default: 1280px */
    "--kz-hero-statement-width"?: string | number;
    /** default: clamp(96px, 13vw, 200px) */
    "--kz-hero-statement-top"?: string | number;
    /** default: clamp(28px, 3.5vw, 44px) */
    "--kz-hero-statement-bottom"?: string | number;
    /** default: clamp(16px, 4vw, 40px) */
    "--kz-hero-statement-gutter"?: string | number;
    /** default: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace */
    "--kz-hero-statement-mono"?: string | number;
    /** default: cubic-bezier(0.22, 1, 0.36, 1) */
    "--kz-hero-statement-ease"?: string | number;
    /** default: cubic-bezier(0.6, 0, 0.1, 1) */
    "--kz-hero-statement-glide"?: string | number;
    /** default: cubic-bezier(0.25, 1, 0.5, 1) */
    "--kz-hero-statement-soft-ease"?: string | number;
  };
  className?: string;
};

export function HeroStatement({ vars, className, style, ...rest }: HeroStatementProps) {
  const ref = useRef<ComponentRef<'section'>>(null);
  const classes = ["kodza-hero-statement", className].filter(Boolean).join(' ');
  // Everything the markup is made of: when it changes, React gets a fresh element (see the top)
  const key = JSON.stringify([classes, vars, style, rest]);

  // Starts the script on this element once React has rendered it, stops it when it goes
  useEffect(() => {
    const root = ref.current;
    let live = true;
    // @ts-ignore: a plain script, no types to find
    import('./hero-statement.js').then(() => {
      if (live) document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root } }));
    });
    return () => {
      live = false;
      document.dispatchEvent(new CustomEvent('kodza:destroy', { detail: { root } }));
    };
  }, [key]);

  return (
    <section key={key} {...rest} className={classes} style={{ ...vars, ...style } as CSSProperties} ref={ref}>
      <div className="kodza-hero-statement__inner">
        <h1 className="kodza-hero-statement__title">Independent studio. <span className="kodza-hero-statement__muted">We build fast websites, deploy on Fridays and still sleep fine.</span></h1>
        <div className="kodza-hero-statement__foot">
          <ul className="kodza-hero-statement__meta">
            <li className="kodza-hero-statement__item">Paris, FR</li>
            <li className="kodza-hero-statement__item kodza-hero-statement__local"><time className="kodza-hero-statement__clock" data-timezone="Europe/Paris"> <span className="kodza-hero-statement__digits"> <span>--</span> </span> <span className="kodza-hero-statement__colon">:</span> <span className="kodza-hero-statement__digits"> <span>--</span> </span> </time> local time</li>
            <li className="kodza-hero-statement__item">Booking Q1 2027</li>
          </ul>
          <p className="kodza-hero-statement__hint" aria-hidden="true"><span className="kodza-hero-statement__cue" />Scroll for the work</p>
        </div>
      </div>
    </section>
  );
}
```

## Code

```html
<section class="kodza-hero-statement">
  <div class="kodza-hero-statement__inner">
    <h1 class="kodza-hero-statement__title">Independent studio. <span class="kodza-hero-statement__muted">We build fast websites, deploy on Fridays and still sleep fine.</span></h1>
    <div class="kodza-hero-statement__foot">
      <ul class="kodza-hero-statement__meta">
        <li class="kodza-hero-statement__item">Paris, FR</li>
        <li class="kodza-hero-statement__item kodza-hero-statement__local"><time class="kodza-hero-statement__clock" data-timezone="Europe/Paris"><span class="kodza-hero-statement__digits"><span>--</span></span><span class="kodza-hero-statement__colon">:</span><span class="kodza-hero-statement__digits"><span>--</span></span></time> local time</li>
        <li class="kodza-hero-statement__item">Booking Q1 2027</li>
      </ul>
      <p class="kodza-hero-statement__hint" aria-hidden="true"><span class="kodza-hero-statement__cue"></span>Scroll for the work</p>
    </div>
  </div>
</section>
```

```css
/* Kodza License: free to use, client work included. Not to resell or redistribute, ported or not: https://kodza.dev/docs/#print-license */
/* Kodza — Hero Statement
   A studio statement set very large, aligned left, over a mono line with the city, the local
   time that ticks and the booking window. On load the words rise out of their masks one after
   the other. Everything is tuned with the --kz-hero-statement-* variables. */
.kodza-hero-statement {
  --kz-hero-statement-ink: #0a0a0a;
  --kz-hero-statement-muted: rgba(10, 10, 10, 0.5);
  --kz-hero-statement-dim: rgba(10, 10, 10, 0.62);
  --kz-hero-statement-rule: rgba(10, 10, 10, 0.14);
  --kz-hero-statement-bg: transparent;
  --kz-hero-statement-width: 1280px;
  --kz-hero-statement-top: clamp(96px, 13vw, 200px);
  --kz-hero-statement-bottom: clamp(28px, 3.5vw, 44px);
  --kz-hero-statement-gutter: clamp(16px, 4vw, 40px);
  --kz-hero-statement-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --kz-hero-statement-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --kz-hero-statement-glide: cubic-bezier(0.6, 0, 0.1, 1);
  --kz-hero-statement-soft-ease: cubic-bezier(0.25, 1, 0.5, 1);

  container: kodza-hero-statement / inline-size;
  box-sizing: border-box;
  width: 100%;
  padding-top: var(--kz-hero-statement-top);
  padding-bottom: var(--kz-hero-statement-bottom);
  padding-left: max(var(--kz-hero-statement-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--kz-hero-statement-gutter), env(safe-area-inset-right, 0px));
  background: var(--kz-hero-statement-bg);
  color: var(--kz-hero-statement-ink);
}

.kodza-hero-statement__inner {
  max-width: var(--kz-hero-statement-width);
  margin: 0 auto;
}

.kodza-hero-statement__title {
  max-width: 15.5em;
  margin: 0 0 clamp(64px, 9vw, 136px);
  font-size: clamp(36px, 5.8vw, 88px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.045em;
  color: var(--kz-hero-statement-ink);
  text-wrap: pretty;
}

.kodza-hero-statement__muted {
  color: var(--kz-hero-statement-muted);
}

/* Each word is its own mask (set up by the script): it rises from behind its bottom edge */
.kodza-hero-statement__word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.kodza-hero-statement__rise {
  display: inline-block;
}

/* The foot: a hairline, the mono line on the left, the scroll hint on the right */
.kodza-hero-statement__foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 20px;
}

.kodza-hero-statement__foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--kz-hero-statement-rule);
  transform-origin: left center;
}

/* Every item carries its dot, and the list is shifted left by one dot and clipped there: the
   dot of an item that starts a line never shows, even when the line wraps */
.kodza-hero-statement__meta {
  position: relative;
  left: -27px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  clip-path: inset(-24px -24px -24px 27px);
}

.kodza-hero-statement__item {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  font-family: var(--kz-hero-statement-mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  color: var(--kz-hero-statement-dim);
}

/* A dot drawn before each item: 12px + 3px + 12px, the 27px the list is shifted by */
.kodza-hero-statement__item::before {
  content: "";
  flex: none;
  width: 3px;
  height: 3px;
  margin: 0 12px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* Without the script there is no time to show */
.kodza-hero-statement:not(.is-ready) .kodza-hero-statement__local {
  display: none;
}

.kodza-hero-statement__clock {
  display: inline-flex;
  /* The space after the time: a flex item drops its leading space */
  margin-right: 1ch;
  color: var(--kz-hero-statement-ink);
  font-variant-numeric: tabular-nums;
}

/* Each pair of digits is a mask: the new value rolls in from below while the old one leaves */
.kodza-hero-statement__digits {
  display: inline-grid;
  overflow: hidden;
}

.kodza-hero-statement__digits > span {
  grid-area: 1 / 1;
}

.kodza-hero-statement__hint {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--kz-hero-statement-mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  color: var(--kz-hero-statement-dim);
}

.kodza-hero-statement__cue {
  position: relative;
  overflow: hidden;
  width: 1px;
  height: 28px;
  background: var(--kz-hero-statement-rule);
}

.kodza-hero-statement__cue::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 10px;
  background: currentColor;
  transform: translateY(90%);
}

/* Narrow: the hint goes under the mono line */
@container kodza-hero-statement (max-width: 640px) {
  .kodza-hero-statement__foot {
    flex-direction: column;
    align-items: flex-start;
  }

  /* The full width plus the hidden dot, so the line only wraps when it has to */
  .kodza-hero-statement__meta {
    width: calc(100% + 27px);
  }
}

/* The entrance, once the script has set the words up: they rise one after the other, the
   hairline draws from the left, then the mono line comes up */
@media (prefers-reduced-motion: no-preference) {
  .kodza-hero-statement.is-ready .kodza-hero-statement__rise {
    animation: kodza-hero-statement-rise 1170ms var(--kz-hero-statement-glide) calc(120ms + var(--i, 0) * 40ms) both;
  }

  .kodza-hero-statement.is-ready .kodza-hero-statement__foot::before {
    animation: kodza-hero-statement-draw 1300ms var(--kz-hero-statement-glide) 450ms both;
  }

  .kodza-hero-statement.is-ready .kodza-hero-statement__item {
    animation: kodza-hero-statement-in 900ms var(--kz-hero-statement-soft-ease) 750ms both;
  }

  .kodza-hero-statement.is-ready .kodza-hero-statement__item:nth-child(2) {
    animation-delay: 840ms;
  }

  .kodza-hero-statement.is-ready .kodza-hero-statement__item:nth-child(3) {
    animation-delay: 930ms;
  }

  .kodza-hero-statement.is-ready .kodza-hero-statement__hint {
    animation: kodza-hero-statement-in 900ms var(--kz-hero-statement-soft-ease) 1020ms both;
  }

  .kodza-hero-statement.is-ready .kodza-hero-statement__colon {
    animation: kodza-hero-statement-blink 2s steps(1) infinite;
  }

  .kodza-hero-statement__cue::before {
    animation: kodza-hero-statement-cue 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  }
}

@keyframes kodza-hero-statement-rise {
  from {
    transform: translateY(105%);
  }
}

@keyframes kodza-hero-statement-draw {
  from {
    transform: scaleX(0);
  }
}

@keyframes kodza-hero-statement-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes kodza-hero-statement-blink {
  50% {
    opacity: 0.3;
  }
}

@keyframes kodza-hero-statement-cue {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(280%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kodza-hero-statement *,
  .kodza-hero-statement *::before,
  .kodza-hero-statement *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* kodza-guard d27ca196f188 — generated by Kodza, do not edit.
   Theme guard: keeps a site's own CSS (WordPress themes, Bootstrap, CSS resets…) off this
   component. :not(#_) is always true and weighs as much as an id, so these lines win over
   theme rules made of classes and tags. Customise the component through its --kz-* variables. */

/* What the browser gives, where the component sets it only in some states: at the lowest weight, so its own rules below put it back */

:where(.kodza-hero-statement__title):not(#_),
:where(.kodza-hero-statement__meta):not(#_),
:where(.kodza-hero-statement__item):not(#_),
:where(.kodza-hero-statement__clock):not(#_),
:where(.kodza-hero-statement__hint):not(#_) {
  transition-duration: revert;
}

/* What the browser gives, on everything the component leaves to it */

.kodza-hero-statement__inner:not(#_),
.kodza-hero-statement__word:not(#_),
.kodza-hero-statement__rise:not(#_),
.kodza-hero-statement__muted:not(#_),
.kodza-hero-statement__foot:not(#_),
.kodza-hero-statement__digits:not(#_),
.kodza-hero-statement__colon:not(#_),
.kodza-hero-statement__cue:not(#_),
.kodza-hero-statement__digits span:where(:not([class*="kodza-"])):not(#_) {
  box-sizing: revert;
}

.kodza-hero-statement__title:not(#_) {
  border: revert;
  padding: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-height: revert;
  font-family: revert;
  font-style: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  transition-property: revert;
  transition-timing-function: revert;
  transition-delay: revert;
}

.kodza-hero-statement__meta:not(#_) {
  border: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  box-sizing: revert;
  float: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  color: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  transition-property: revert;
  transition-timing-function: revert;
  transition-delay: revert;
}

.kodza-hero-statement__item:not(#_) {
  border: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-style: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  transition-property: revert;
  transition-timing-function: revert;
  transition-delay: revert;
}

.kodza-hero-statement__clock:not(#_) {
  border: revert;
  padding: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  margin-top: revert;
  margin-bottom: revert;
  margin-left: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  transition-property: revert;
  transition-timing-function: revert;
  transition-delay: revert;
}

.kodza-hero-statement__hint:not(#_) {
  border: revert;
  padding: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-style: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  transition-property: revert;
  transition-timing-function: revert;
  transition-delay: revert;
}

.kodza-hero-statement__title:not(#_):where(:not([hidden])) {
  display: revert;
}

.kodza-hero-statement__title:not(#_):where([hidden]) {
  display: none;
}

.kodza-hero-statement__foot:not(#_)::before,
.kodza-hero-statement__item:not(#_)::before,
.kodza-hero-statement__cue:not(#_)::before {
  box-sizing: revert;
}

/* The component's own rules, one step stronger: real buttons and fields, what it sets on tags themes style (links, lists, headings, images…), and the root width (a theme may narrow it, never widen it) */

.kodza-hero-statement__title:not(#_) {
  max-width: 15.5em;
  margin: 0 0 clamp(64px, 9vw, 136px);
  font-size: clamp(36px, 5.8vw, 88px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.045em;
  color: var(--kz-hero-statement-ink);
}

.kodza-hero-statement__meta:not(#_) {
  position: relative;
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kodza-hero-statement__item:not(#_) {
  display: flex;
  margin: 0;
  padding: 0;
  font-family: var(--kz-hero-statement-mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  color: var(--kz-hero-statement-dim);
}

.kodza-hero-statement:not(.is-ready) .kodza-hero-statement__local:not(#_) {
  display: none;
}

.kodza-hero-statement__clock:not(#_) {
  display: inline-flex;
  margin-right: 1ch;
  color: var(--kz-hero-statement-ink);
}

.kodza-hero-statement__hint:not(#_) {
  display: flex;
  margin: 0;
  font-family: var(--kz-hero-statement-mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  color: var(--kz-hero-statement-dim);
}

@media (prefers-reduced-motion: reduce) {
  .kodza-hero-statement *:where(h1, ul, li, time, p):not(#_) {
    transition-duration: 0.01ms !important;
  }
}
```

```js
// Kodza License: free to use, client work included. Not to resell or redistribute, ported or not: https://kodza.dev/docs/#print-license
// Kodza — Hero Statement
// Puts each word of the title in its own mask for the cascade, and keeps the studio's local
// time ticking (the digits roll when the minute changes).
(() => {
  const SELECTOR = '.kodza-hero-statement';
  const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

  // The words of the title, each in its own mask and numbered for the cascade. Text nodes are
  // split in place, so the spans around them (the muted part) stay. The heading keeps its
  // sentence as its accessible name
  const split = (title) => {
    title.setAttribute('aria-label', title.textContent.replace(/\s+/g, ' ').trim());
    const walker = document.createTreeWalker(title, NodeFilter.SHOW_TEXT);
    const texts = [];
    while (walker.nextNode()) texts.push(walker.currentNode);
    let i = 0;
    texts.forEach((node) => {
      const fragment = document.createDocumentFragment();
      node.data.split(/(\s+)/).forEach((part) => {
        if (!part) return;
        if (/^\s+$/.test(part)) return fragment.append(part);
        const word = document.createElement('span');
        const rise = document.createElement('span');
        word.className = 'kodza-hero-statement__word';
        rise.className = 'kodza-hero-statement__rise';
        rise.style.setProperty('--i', i++);
        rise.textContent = part;
        word.append(rise);
        fragment.append(word);
      });
      node.replaceWith(fragment);
    });
  };

  // A new value in a pair of digits: the old one leaves upwards, the new one comes from below
  const roll = (slot, text, instant) => {
    const old = slot.lastElementChild;
    if (old?.textContent === text) return;
    const next = document.createElement('span');
    next.textContent = text;
    slot.append(next);
    if (!old) return;
    if (instant || reduceMotion) return old.remove();
    const timing = { duration: 600, easing: 'cubic-bezier(0.22, 1, 0.36, 1)' };
    old.animate([{ transform: 'none' }, { transform: 'translateY(-100%)' }], timing).finished.then(() => old.remove(), () => old.remove());
    next.animate([{ transform: 'translateY(100%)' }, { transform: 'none' }], timing);
  };

  // The time where the studio is (data-timezone, an IANA name such as Europe/Paris; the
  // visitor's own time when it is missing or unknown)
  const clockFormat = (zone) => {
    const options = { hour: '2-digit', minute: '2-digit', hourCycle: 'h23' };
    try {
      return new Intl.DateTimeFormat('en-GB', { ...options, timeZone: zone || undefined });
    } catch {
      return new Intl.DateTimeFormat('en-GB', options);
    }
  };

  // One instance, with its own state: two copies on a page never interfere. Everything it
  // starts is tied to `signal` (listeners get { signal }, observers and timers stop on its
  // 'abort' event), so kodza:destroy stops it all.
  function mount(root, signal) {
    const title = root.querySelector('.kodza-hero-statement__title');
    if (title) split(title);

    const clock = root.querySelector('.kodza-hero-statement__clock');
    if (!clock) return;
    const [hours, minutes] = clock.querySelectorAll('.kodza-hero-statement__digits');
    if (!hours || !minutes) return;
    const format = clockFormat(clock.dataset.timezone);
    let shown = '';
    const update = (instant) => {
      const parts = Object.fromEntries(format.formatToParts(new Date()).map((p) => [p.type, p.value]));
      const now = `${parts.hour}:${parts.minute}`;
      if (now === shown) return;
      shown = now;
      clock.dateTime = now;
      roll(hours, parts.hour, instant);
      roll(minutes, parts.minute, instant);
    };
    update(true);
    // Checked every second, written only when the minute changes
    const timer = setInterval(update, 1000);
    signal.addEventListener('abort', () => clearInterval(timer));
  }

  // Kodza lifecycle, the same in every component: `kodza:init` starts the instances inside
  // event.detail.root (the whole page by default), `kodza:destroy` stops them and puts their
  // markup back. For themes and apps that swap content without a page load. Each running root
  // keeps its markup as written under KODZA, shared by every Kodza script on the page: a Kodza
  // component inside another one is saved as written, not half-started, and stopped with it.
  const KODZA = Symbol.for('kodza');
  const instances = new WeakMap();
  const find = (scope = document) => [scope, ...scope.querySelectorAll(SELECTOR)].filter((el) => el.matches?.(SELECTOR));
  const attrsOf = (el) => [...el.attributes].map((a) => [a.name, a.value]);
  const put = (el, saved) => {
    [...el.attributes].forEach((a) => el.removeAttribute(a.name));
    saved.attrs.forEach(([name, value]) => el.setAttribute(name, value));
    el.innerHTML = saved.html;
  };
  // The markup inside a root as written: Kodza components already running in it give back their own
  const written = (root) => {
    const all = [...root.querySelectorAll('*')];
    if (!all.some((el) => el[KODZA])) return root.innerHTML;
    const copy = root.cloneNode(true);
    const twins = copy.querySelectorAll('*');
    let last = null;
    all.forEach((el, i) => {
      if (!el[KODZA] || last?.contains(el)) return;
      last = el;
      put(twins[i], el[KODZA]);
    });
    return copy.innerHTML;
  };
  const init = (scope) => find(scope).forEach((root) => {
    if (root.classList.contains('is-ready')) return; // already running, maybe from another copy of this script
    const controller = new AbortController();
    const saved = { html: written(root), attrs: attrsOf(root), stop: () => destroy(root) };
    instances.set(root, { controller, saved });
    root[KODZA] = saved;
    mount(root, controller.signal);
    root.classList.add('is-ready');
  });
  const destroy = (scope) => find(scope).forEach((root) => {
    const instance = instances.get(root);
    if (!instance) return;
    instances.delete(root);
    // The Kodza components running inside it stop first: once its markup is put back, their own
    // script could not find them any more
    root.querySelectorAll('*').forEach((el) => el[KODZA]?.stop());
    instance.controller.abort();
    delete root[KODZA];
    put(root, instance.saved);
  });
  document.addEventListener('kodza:init', (event) => init(event.detail?.root));
  document.addEventListener('kodza:destroy', (event) => destroy(event.detail?.root));
  init();
  // Loaded in <head>, the script runs before the markup exists: once more when it is parsed
  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', () => init(), { once: true });
})();
```

Free to use, from Kodza (https://kodza.dev).
