# Lowtide tide table hero with a live sea

> A dark harbour hero where about fifty stacked wave lines rise and fall with a real tide formula, with a live height readout and a 24-hour curve.

- Kind: Plan
- Page: https://ownlyplans.com/bhaskar/lowtide-tide-table-hero-with-a-live-sea/
- Licence: CC BY 4.0 (reuse with credit)

## Steps

### 1. Set the palette, type and layout

Pick a deep harbour palette and one serif for the headline. Keep the copy on the left and the live data along the bottom, so the sea can fill the right side.

Prompt:

```text
Create a single-file HTML hero for Lowtide, a tide table service for working harbours. Colours: ink #0a1c22, deep #12333b, sea #2f7f86, foam #e8f0e6, buoy yellow #f4c542. Fonts: Fraunces for the headline and Hanken Grotesk for everything else, loaded from Google Fonts with Georgia and system-ui fallbacks. Layout: a top bar with a wave logo, three links and a Sign in pill; a left-aligned headline "The harbour at six is not the harbour at noon." with "noon." in buoy yellow; one lead paragraph limited to 46 characters wide; two buttons (Open today's tides, Add your harbour); and an empty strip along the bottom for a live tide reading. No centred text. Keep it responsive and keep visible keyboard focus.
```

Done when: The page shows the bar, the headline, the copy, both buttons and an empty bottom strip, all readable on a dark background.

### 2. Draw the sea on a canvas

Fill the screen with stacked wavy lines. Each row is a filled shape, so rows in front hide rows behind, which gives depth. Lines get brighter toward the bottom.

Prompt:

```text
Add a full-screen canvas behind the content. Draw one row every 15px starting 20% down the screen. For each row build a wave from three summed sine waves with different frequencies that drift with time, fill below it with a dark teal that gets slightly lighter toward the bottom, then stroke the top edge with a colour that goes from sea teal to foam and gets brighter toward the bottom. Redraw with requestAnimationFrame and size the canvas for devicePixelRatio up to 2. Add a left-to-right dark gradient over the canvas so the headline stays readable.
```

Done when: A calm field of fine lines moves across the right side of the screen and the headline stays easy to read.

### 3. Drive the sea with the real tide

Use a simple two-wave tide formula tied to the clock. The same number moves the waves and fills the readout, so what you read matches what you see.

Prompt:

```text
Write level(t) with a 12h25m semi-diurnal period P: 1.1 + 0.82*sin(2*PI*t/P + 0.6) + 0.18*sin(2*PI*t/(2.03*P) + 1.9). Show level(Date.now()) bottom-left as a large serif number with a small "m" unit and the word rising or falling underneath, updated every 15 seconds. Scale the canvas wave amplitude with the current level so the sea looks higher at high tide. Add a small yellow buoy that bobs on one row with a faint pulsing ring. Mark the data as demo values to replace with real predictions.
```

Done when: The reading shows a height such as 0.41 m with rising or falling, and the waves are taller at high tide than at low tide.

### 4. Add the 24-hour curve and the phone layout

A small curve next to the number shows what is coming. Then tidy the phone layout and respect reduced motion.

Prompt:

```text
Draw a 24-hour tide curve in SVG beside the reading, from 3 hours ago to 21 hours ahead, with a dashed vertical now line, a yellow dot on the curve and hour labels every 6 hours. Set the SVG viewBox from its real pixel width on load and on resize so the text is never stretched. Make rows near the pointer bend slightly. At 760px and below hide the text links, stack the bottom strip, make the buttons full width and push the copy to the bottom of the screen. If prefers-reduced-motion is set, draw one still frame.
```

Done when: The curve and the now dot appear, resizing the window redraws it cleanly, and on a phone nothing scrolls sideways.

## Files

- lowtide-hero.html: https://ownlyplans.com/bhaskar/lowtide-tide-table-hero-with-a-live-sea/lowtide-hero/ (The finished file. Open it in a browser.)

## About

A single-file hero for a tide table service. The sea is a canvas of stacked, filled wave lines that rise and fall with a two-wave tide formula keyed to the real clock. The bottom strip shows the current height, whether the tide is rising or falling, and a 24-hour curve with a dashed now line. Only Google Fonts load from outside; everything else is inline, so it works in the live preview. The numbers are demo data: swap level() for your own harbour predictions.

---
Also available as JSON: https://ownlyplans.com/bhaskar/lowtide-tide-table-hero-with-a-live-sea/?format=json
MCP server: https://ownlyplans.com/mcp
