From 16a3b55a627e517e8ca07da9a5e4ec837b5f29b3 Mon Sep 17 00:00:00 2001 From: HeWillCook Date: Mon, 16 Nov 2026 00:49:55 -0500 Subject: [PATCH 1/5] feat: fire identity, grill bands and fuller pages Add a fire system (flame beds, embers, grill bands, grill marks) to the butcher-paper identity: an ember wordmark, heat on primary buttons and tabs, glowing headcounts, and a grill-lit landing, dashboard and event masthead. Fill empty space with two-pane auth, new-event and guest pages, a 404 grill scene, sticky summary columns, rebalanced Today and Edit layouts, and a shared illustrated EmptyState. Reduced motion and print strip the fire. Co-Authored-By: Claude Opus 5.5 --- DESIGN.md | 29 +- .../specs/2026-11-15-fire-identity.md | 63 + src/app/(auth)/login/page.tsx | 10 +- src/app/(auth)/signup/page.tsx | 10 +- src/app/e/[code]/g/[token]/page.tsx | 34 +- src/app/e/[code]/page.tsx | 52 +- src/app/globals.css | 1047 ++++++++++++++++- src/app/host/events/[id]/edit/page.tsx | 56 +- src/app/host/events/[id]/layout.tsx | 6 +- src/app/host/new/page.tsx | 10 +- src/app/host/page.tsx | 83 +- src/app/not-found.tsx | 53 +- src/app/page.tsx | 265 +++-- src/components/AuthForm.tsx | 101 +- src/components/ChangeNotice.tsx | 10 +- src/components/CoverChip.tsx | 12 +- src/components/EmptyState.tsx | 144 +++ src/components/FirePage.tsx | 55 + src/components/GuestsPanel.tsx | 28 +- src/components/NewEventForm.tsx | 17 +- src/components/RsvpForm.tsx | 35 +- src/components/fire/EmberBurst.tsx | 51 + src/components/fire/Embers.tsx | 79 ++ src/components/fire/FlameIcon.tsx | 36 + src/components/fire/Flames.tsx | 130 ++ src/components/fire/GrillBand.tsx | 42 + src/components/fire/GrillMarks.tsx | 19 + src/components/fire/index.ts | 6 + src/components/fire/seed.ts | 22 + src/components/menu/MenuPanel.tsx | 13 +- src/components/prep/KitchenSheet.tsx | 30 +- src/components/shopping/ExtrasCard.tsx | 5 +- src/components/shopping/ShoppingPanel.tsx | 9 +- src/components/split/SplitPanel.tsx | 19 +- src/components/today/TodayChecklist.tsx | 83 +- src/components/ui/Button.tsx | 4 +- src/components/ui/Wordmark.tsx | 18 +- 37 files changed, 2312 insertions(+), 374 deletions(-) create mode 100644 docs/superpowers/specs/2026-11-15-fire-identity.md create mode 100644 src/components/EmptyState.tsx create mode 100644 src/components/FirePage.tsx create mode 100644 src/components/fire/EmberBurst.tsx create mode 100644 src/components/fire/Embers.tsx create mode 100644 src/components/fire/FlameIcon.tsx create mode 100644 src/components/fire/Flames.tsx create mode 100644 src/components/fire/GrillBand.tsx create mode 100644 src/components/fire/GrillMarks.tsx create mode 100644 src/components/fire/index.ts create mode 100644 src/components/fire/seed.ts diff --git a/DESIGN.md b/DESIGN.md index e863e8f..7d3ef04 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -11,6 +11,12 @@ colors: pickle: "#3e6a33" charcoal: "#2b1d17" # token: ink charcoal-muted: "#6a4636" # token: ink-muted + coal: "#1a110c" # darkest grill, token: coal + coal-2: "#2b1d17" # same value as ink, token: coal-2 + coal-3: "#3a2820" # grate bars, token: coal-3 + ember: "#ff6b1a" + flame: "#ffb43a" + flame-tip: "#ffe08a" divider: "#ead6c7" divider-strong: "#cfa58c" typography: @@ -44,11 +50,30 @@ Alfa Slab One sets every heading and the wordmark. It has one heavy weight, so ` ## Layout -Shells are at most 64rem wide. Event screens open with the ticket, then sticky text tabs over a 2px charcoal rule, with a 5px ketchup bar under the current tab. At 1024px and up, task content uses a list beside a 320px summary column. Guest, sign-in and new-event screens are single slips about 28rem wide. +Shells are at most 64rem wide. Event screens open with the ticket, then sticky text tabs over a 2px charcoal rule, with a 5px ketchup bar under the current tab. At 1024px and up, task content uses a list beside a 320px summary column that sticks below the tabs. Guest, sign-in, new-event and RSVP screens are two panes: a tall sticky coal band with the page's headline on the left, and the slip on the right; below 1024px the band becomes a short strip above the slip. The dashboard grid is one column, then two from 640px; it never crowds three cards into the 64rem shell. + +Today stacks Timeline and Make beside Still to buy, so the day does not leave a column blank. Edit details keeps the form on the left and the cancellation and delete controls on the right, sticky. + +Empty states are paper cards with a slab title, a line of body copy and a simple line-art grill, ticket, cart, split or calendar in charcoal with an ember accent. They fill the column they sit in. ## Motion -There is one orchestrated moment: on the landing page the example ticket prints down out of a dark slot. Reduced-motion users get it already printed. Elsewhere, motion only answers actions. +Two loops belong to the chrome, both decorative and both CSS-only. Embers drift up through coal bands, and flame tongues flicker along their edges with staggered timing so a row never looks looped. The active tab bar carries a slow shimmer, the wordmark's ember period breathes, and primary buttons answer hover with one ember sweep and a soft glow. Nothing moves inside a form, a data row or a table. + +The one orchestrated page moment is still the landing example printing down out of its coal slot. Success notices may burst embers once on mount. Fire is there to frame the paper, so the loops stay slow, low and at the edges. + +`prefers-reduced-motion: reduce` removes embers, stills flames at full height and stops every loop; the design must look finished without motion. Print strips all fire. + +## Fire + +The grill is lit behind the counter. Coal, ember and flame are chrome, never content: they frame pages and mark moments while the paper stays calm and readable. + +- Fire appears in bands and edges: the dashboard header, the coal strip on top of the event ticket, the slot above the example plan, the landing close, the two-pane sign-in and guest screens, the 404 and empty-state art. +- The fire bed is continuous: overlapping tongues in two depths over a glowing coal strip, never a row of separated drops. Tall tongues stay behind shorter, brighter ones. +- Fire never enters a form, a data row, a table, the kitchen sheet or anything printed. Decorative layers are `aria-hidden`, CSS-only and deterministic, so they render identically every time. +- Text on coal uses `--paper`. Muted copy on coal is paper at 80% or more; never set ketchup or mustard body copy on coal. +- Grill marks are a quiet texture on cover chips, stamps and empty-state art, and stay under about a quarter tint. +- Stamps are the one place fire meets a statistic: a slab figure on a paper stamp with faint marks, slightly rotated, never more than three in a row. ## Shapes diff --git a/docs/superpowers/specs/2026-11-15-fire-identity.md b/docs/superpowers/specs/2026-11-15-fire-identity.md new file mode 100644 index 0000000..5e6380a --- /dev/null +++ b/docs/superpowers/specs/2026-11-15-fire-identity.md @@ -0,0 +1,63 @@ +# Light the grill: fire identity and fuller pages + +Date: 2026-11-15. Status: approved direction ("Light the grill"). + +Spread keeps its butcher paper and order tickets (see DESIGN.md). This pass adds fire as the second voice of the brand, and fills the empty space that screenshots showed on almost every page. + +## Brand idea + +The tickets stay on the counter. The grill is lit behind it. Charcoal bands with live flames and rising embers frame the pages; the paper stays calm and readable. Fire appears in chrome, empty states and moments of success, never inside forms or data rows. + +## New tokens (globals.css `:root` + `@theme inline`) + +- `--coal: #1a110c` (darkest grill), `--coal-2: #2b1d17` (= ink), `--coal-3: #3a2820` +- `--ember: #ff6b1a`, `--flame: #ffb43a`, `--flame-tip: #ffe08a` +- `--glow: 0 0 24px rgb(255 107 26 / 0.45)` +- Grate pattern: `--grate` repeating-linear-gradient of 3px coal-3 bars every 18px. + +Text on coal uses `--paper`. Contrast must stay at or above WCAG AA. + +## Fire primitives (new files in `src/components/fire/`) + +All decorative, `aria-hidden="true"`, server-renderable (no client JS needed), CSS-only animation, deterministic (no Math.random at render, so no hydration mismatch). + +1. **`Embers`**: absolutely positioned layer of N small glowing dots (default 14). Each gets inline CSS vars `--x`, `--size`, `--dur`, `--delay`, `--drift` from a fixed seeded table. Keyframe `ember-rise`: translateY(0 → -140px), translateX(drift), opacity 0 → 1 → 0, scale shrinking. Colours alternate flame and ember with a box-shadow glow. +2. **`Flames`**: a row of layered SVG flame tongues (3 layers: ember, flame, flame-tip) that tiles horizontally along the bottom or top edge of a container. Keyframe `flicker`: scaleY 0.85 ↔ 1.08, small skewX, with `transform-origin: bottom`, and staggered durations (1.1–1.9s) per tongue so it never looks looped. +3. **`GrillBand`**: a coal surface with the grate pattern, a warm radial glow from the bottom, `Flames` along one edge (prop `edge="top" | "bottom"`), and `Embers` rising. Takes children (headline content). Rounded 8px when inset, square when full-bleed. +4. **`FlameIcon`**: a small inline SVG flame (16–24px) with a subtle flicker. Used in the wordmark, success notices and the empty states. +5. **`GrillMarks`**: two or three diagonal seared stripes (a CSS gradient) used as a quiet texture on cover chips and empty-state art. + +**Reduced motion** (`prefers-reduced-motion: reduce`): embers hidden, flames still at full height, no glow pulses. Everything must look finished without motion. + +**Performance:** animate only `transform` and `opacity`. Use no JS animation loops and no canvas. + +## Where fire goes + +- **Wordmark**: the mustard period becomes a small glowing ember that slowly breathes (opacity and glow, 3s). Add a `FlameIcon` next to the toast logo only on the landing header. +- **Primary button**: on hover, an ember gradient sweeps across (background-position transition) and a soft glow appears. The pressed-key inset shadow stays. On focus, the existing outline. +- **Active tab bar**: the 5px ketchup bar becomes a ketchup → ember → flame gradient with a slow shimmer (background-position) and a faint glow. +- **"Plan for" big numbers** (event masthead, dashboard tickets, landing example): a gentle heat glow (text-shadow pulse, 4s) in ketchup/ember. +- **Landing**: + - The dark slot bar above the example ticket becomes a hot coal bar with flames licking up behind it. The ticket still prints down out of it. + - Add a full-bleed `GrillBand` footer section above the existing footer, with a big slab line ("Fire up the grill. We'll count the buns."), the primary CTA and embers. This fills the dead band and gives the page an ending. + - Fill the empty space under the hero CTA with a row of three stamp-style stats or steps ("1 link", "0 accounts", "every bun counted"), using the slab font and grill-mark texture. +- **Dashboard `/host`**: the header ("Your events", greeting, Create event) sits inside an inset `GrillBand` with flames along its bottom edge. The events grid becomes 1/2/3 columns (sm/lg/xl). After the event tickets, add a dashed "Fire up another" ticket that links to `/host/new`, so rows look full. Redesign the empty state as a large illustrated one (see Empty states). +- **Event masthead** (`host/events/[id]/layout.tsx`): add a thin coal strip with small flames along the top of the ticket (it's on the grill), and give the cover chip grill marks. Keep the layout otherwise. +- **Success moments**: the "You're in!" guest banner and change notices get a `FlameIcon` plus a one-time burst of embers on mount (CSS only, runs once). + +## Filling empty space + +- **Auth (`/login`, `/signup`), `/host/new`, guest RSVP `/e/[code]` and `/e/[code]/g/[token]`**: at `lg` and up, use a two-pane layout. On the left is a tall `GrillBand` (sticky, full viewport height minus padding) with a big slab headline that fits the page, flames along the bottom and embers. On the right is the existing slip. For the guest page, the headline is the event title, date and host's cover. Below `lg`, the band collapses to a short strip (about 140px) above the slip. +- **404 (`not-found.tsx`)**: a full-page grill scene. A grate illustration with flames, a slab headline "This one fell through the grate.", a short line and the CTA home. Embers rise across the viewport. +- **Event tabs with a 320px summary column** (Guests, Menu, Shopping, Split): make the right column `lg:sticky lg:top-[tabs height + 1rem] lg:self-start` so it travels with the long list instead of leaving a void. Where the left column is an empty state, the empty state fills the column height (see below). +- **Today**: replace the 3-column grid with a CSS multi-column (masonry) layout or put Timeline and Make in one stacked column beside Still to buy, so columns balance. No blank 1000px. +- **Edit event**: two columns at `lg`. The form is on the left, and Cancel event and Danger zone are on the right, sticky. +- **Empty states**: add a new shared `src/components/EmptyState.tsx` (props: `title`, `children` body, optional `action`, `art: "grill" | "ticket" | "cart" | "split" | "calendar"`). It is a paper card with a min-height of about 280px, centred content and a slab title. The art is a simple inline SVG (a line-art grill with a flickering `FlameIcon`, a ticket stub, a shopping bag, and so on) in charcoal with ember accents. Faint grill marks sit in the background. Replace the hard-coded empty states in: `GuestsPanel.tsx`, `menu/MenuPanel.tsx`, `shopping/ShoppingPanel.tsx`, `shopping/ExtrasCard.tsx` (keep it compact here, `size="sm"`), `split/SplitPanel.tsx`, `prep/KitchenSheet.tsx` (no flames in print), `today/TodayChecklist.tsx`, and `host/page.tsx` "No events yet". Keep the existing copy and any test-asserted text exactly. + +## Out of scope + +No data or behaviour changes. Do not add npm dependencies. The dev-only Guest lab is untouched. Print styles must strip all fire (white paper rule in DESIGN.md). + +## Docs + +Update DESIGN.md: add the fire tokens, the "Fire" section (where fire may and may not appear) and the rewritten Motion section (ember/flame loops are allowed in chrome bands and empty-state art; reduced motion gets static flames). diff --git a/src/app/(auth)/login/page.tsx b/src/app/(auth)/login/page.tsx index 8166750..22f44fe 100644 --- a/src/app/(auth)/login/page.tsx +++ b/src/app/(auth)/login/page.tsx @@ -1,5 +1,6 @@ import { redirect } from "next/navigation"; import { AuthForm } from "@/components/AuthForm"; +import { FirePage } from "@/components/FirePage"; import { getHostOrNull } from "@/server/auth"; // Reads the session from request headers, so it must never be prerendered. @@ -7,5 +8,12 @@ export const dynamic = "force-dynamic"; export default async function LoginPage() { if (await getHostOrNull()) redirect("/host"); - return ; + return ( + + + + ); } diff --git a/src/app/(auth)/signup/page.tsx b/src/app/(auth)/signup/page.tsx index d317199..c1127bf 100644 --- a/src/app/(auth)/signup/page.tsx +++ b/src/app/(auth)/signup/page.tsx @@ -1,5 +1,6 @@ import { redirect } from "next/navigation"; import { AuthForm } from "@/components/AuthForm"; +import { FirePage } from "@/components/FirePage"; import { getHostOrNull } from "@/server/auth"; // Reads the session from request headers, so it must never be prerendered. @@ -7,5 +8,12 @@ export const dynamic = "force-dynamic"; export default async function SignupPage() { if (await getHostOrNull()) redirect("/host"); - return ; + return ( + + + + ); } diff --git a/src/app/e/[code]/g/[token]/page.tsx b/src/app/e/[code]/g/[token]/page.tsx index c20b6c7..de0c597 100644 --- a/src/app/e/[code]/g/[token]/page.tsx +++ b/src/app/e/[code]/g/[token]/page.tsx @@ -2,9 +2,13 @@ import type { Metadata } from "next"; import Link from "next/link"; import { notFound } from "next/navigation"; import { CancelledEventNotice } from "@/components/CancelledEventNotice"; +import { CoverChip } from "@/components/CoverChip"; import { EventUnavailable } from "@/components/EventUnavailable"; +import { FirePage } from "@/components/FirePage"; import { RsvpForm } from "@/components/RsvpForm"; import { UpdatedDetailsNotice } from "@/components/UpdatedDetailsNotice"; +import { EmberBurst } from "@/components/fire/EmberBurst"; +import { FlameIcon } from "@/components/fire/FlameIcon"; import { getDb } from "@/db/client"; import type { RsvpStatus } from "@/domain/headcount"; import { coverFor } from "@/lib/cover"; @@ -78,7 +82,16 @@ export default async function GuestEditPage({ params }: PageProps<"/e/[code]/g/[ ); return ( -
+ } + headline={event.title} + detail={ + <> +

{formatWhen(event.startsAt, event.location, event.timezone)}

+

Hosted by {event.hostName}

+ + } + > {cancelled ? ( @@ -97,12 +111,18 @@ export default async function GuestEditPage({ params }: PageProps<"/e/[code]/g/[ ) : (
- {CONFIRMATION[guest.status]} - - Need to change something? Update your answer below. - + +
+ + + {CONFIRMATION[guest.status]} + + + Need to change something? Update your answer below. + +
)} {updated ? : null} @@ -110,6 +130,6 @@ export default async function GuestEditPage({ params }: PageProps<"/e/[code]/g/[ } /> -
+ ); } diff --git a/src/app/e/[code]/page.tsx b/src/app/e/[code]/page.tsx index 45a42a6..699b3e4 100644 --- a/src/app/e/[code]/page.tsx +++ b/src/app/e/[code]/page.tsx @@ -2,7 +2,9 @@ import type { Metadata } from "next"; import { cookies } from "next/headers"; import { notFound, redirect } from "next/navigation"; import { CancelledEventNotice } from "@/components/CancelledEventNotice"; +import { CoverChip } from "@/components/CoverChip"; import { EventUnavailable } from "@/components/EventUnavailable"; +import { FirePage } from "@/components/FirePage"; import { RsvpForm } from "@/components/RsvpForm"; import { UpdatedDetailsNotice } from "@/components/UpdatedDetailsNotice"; import { getDb } from "@/db/client"; @@ -85,7 +87,16 @@ export default async function GuestPage({ params, searchParams }: PageProps<"/e/ }); return ( -
+ } + headline={event.title} + detail={ + <> +

{formatWhen(event.startsAt, event.location, event.timezone)}

+

Hosted by {event.hostName}

+ + } + > @@ -106,28 +118,26 @@ export default async function GuestPage({ params, searchParams }: PageProps<"/e/ /> {cancelled ? null : ( -
+ ); } diff --git a/src/app/globals.css b/src/app/globals.css index 04b0470..1247eb9 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -24,6 +24,19 @@ --radius-ticket: 6px; --stub: #fff3df; --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.27 0 0 0 0 0.2 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E"); + /* Fire: the grill lit behind the counter. Chrome and moments only, never forms. */ + --coal: #1a110c; + --coal-2: #2b1d17; + --coal-3: #3a2820; + --ember: #ff6b1a; + --flame: #ffb43a; + --flame-tip: #ffe08a; + --glow: 0 0 24px rgb(255 107 26 / 0.45); + --grate: repeating-linear-gradient( + 90deg, + rgb(255 180 58 / 0.055) 0 1px, + transparent 1px 20px + ); } @theme inline { @@ -42,6 +55,13 @@ --color-divider-strong: var(--divider-strong); --color-background: var(--cream); --color-foreground: var(--ink); + --color-coal: var(--coal); + --color-coal-2: var(--coal-2); + --color-coal-3: var(--coal-3); + --color-ember: var(--ember); + --color-flame: var(--flame); + --color-flame-tip: var(--flame-tip); + --shadow-glow: var(--glow); --font-display: var(--font-slab), "Rockwell", "Roboto Slab", Georgia, serif; --font-body: var(--font-archivo), "Helvetica Neue", Arial, sans-serif; --radius-lg: 5px; @@ -173,7 +193,18 @@ min-height: 3rem; padding: 0.75rem 1.5rem; border-radius: 6px; - background: var(--ketchup); + background-color: var(--ketchup); + /* An ember band parked off the left edge; hover sweeps it across the key. */ + background-image: linear-gradient( + 100deg, + transparent 0%, + transparent 34%, + rgb(255 107 26 / 0.85) 50%, + transparent 66%, + transparent 100% + ); + background-size: 250% 100%; + background-position: 100% 0; color: var(--paper); box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.18); font-size: 1.0625rem; @@ -181,11 +212,14 @@ line-height: 1.2; text-align: center; text-decoration: none; - transition: background-color 160ms ease, transform 160ms ease; + transition: background-color 160ms ease, background-position 560ms ease, + box-shadow 220ms ease, transform 160ms ease; } .cta-primary:hover { - background: var(--ketchup-deep); + background-color: var(--ketchup-deep); + background-position: 0 0; + box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.18), var(--glow); } .cta-primary:active { @@ -239,26 +273,105 @@ line-height: 1.55; } + /* Three counter stamps below the hero CTA: slab figures, grill-mark texture. */ + .hero-stamps { + display: flex; + flex-wrap: wrap; + gap: 0.7rem; + margin: 2.25rem 0 0; + padding: 0; + list-style: none; + } + + .hero-stamp { + position: relative; + flex: 1 1 8rem; + min-width: 0; + overflow: hidden; + padding: 0.65rem 0.8rem 0.7rem; + border: 2px solid rgb(43 29 23 / 0.5); + border-radius: 4px; + background: rgb(255 250 244 / 0.45); + box-shadow: 0 1px 0 rgb(43 29 23 / 0.06); + } + + .hero-stamp:nth-child(1) { + transform: rotate(-1.4deg); + } + + .hero-stamp:nth-child(2) { + transform: rotate(1.1deg); + } + + .hero-stamp:nth-child(3) { + transform: rotate(-0.6deg); + } + + .hero-stamp-value { + position: relative; + display: block; + color: var(--ketchup-deep); + font-family: var(--font-display); + font-size: 1.3125rem; + line-height: 1.05; + } + + .hero-stamp-caption { + position: relative; + display: block; + margin-top: 0.28rem; + color: var(--ink-muted); + font-size: 0.8125rem; + font-weight: 600; + line-height: 1.35; + } + + .hero-stamp .grill-marks { + opacity: 0.4; + } + /* - * The example plan prints out of a slot like a kitchen order ticket. This is the - * page's single moment of motion; reduced-motion users get it already printed. + * The example plan prints out of a slot like a kitchen order ticket. The slot + * mouth is a hot coal bar; flames lick up behind it. This is the page's single + * orchestrated moment; reduced-motion users get it already printed. */ .ticket-slot { + position: relative; width: 100%; max-width: 27rem; padding: 0 0.75rem 1.5rem; + /* Flames may run past the slot's sides; keep them out of the page scroll. */ + overflow-x: clip; + } + + .ticket-slot-mouth { + position: relative; + z-index: 1; overflow: hidden; + padding-bottom: 9px; } - .ticket-slot::before { + .ticket-slot-mouth::before { content: ""; display: block; - height: 10px; - margin-inline: -0.75rem; position: relative; - z-index: 1; + z-index: 3; + height: 12px; + margin-inline: -0.75rem; border-radius: 5px; - background: var(--ink); + background-color: var(--coal); + background-image: var(--grate), + radial-gradient(120% 220% at 50% 130%, rgb(255 107 26 / 0.55), transparent 70%); + box-shadow: 0 0 20px rgb(255 107 26 / 0.35), inset 0 1px 0 rgb(255 180 58 / 0.18); + } + + .ticket-slot-fire { + position: absolute; + inset-inline: 0; + top: -42px; + height: 48px; + z-index: 0; + pointer-events: none; } @media (min-width: 56rem) { @@ -367,6 +480,52 @@ padding-bottom: clamp(3rem, 8vw, 6rem); } + /* The close: a full-bleed coal band with the page's last CTA. */ + .landing-fire-inner { + display: flex; + flex-wrap: wrap; + align-items: flex-end; + justify-content: space-between; + gap: 1.5rem 3rem; + padding-block: clamp(2.5rem, 6vw, 4rem) clamp(5.5rem, 11vw, 8.5rem); + } + + .landing-fire-title { + max-width: 21ch; + color: var(--paper); + font-size: clamp(2rem, 4.6vw, 3.25rem); + font-weight: 400; + line-height: 0.98; + } + + .landing-fire-note { + max-width: 34ch; + margin-top: 0.9rem; + color: rgb(255 250 244 / 0.82); + font-size: 1.0625rem; + line-height: 1.55; + } + + .landing-fire-actions { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.75rem; + } + + @media (max-width: 47.999rem) { + .landing-fire .flames { + transform: scaleY(0.65); + transform-origin: bottom; + } + } + + .landing-fire-wink { + color: rgb(255 250 244 / 0.78); + font-size: 0.8125rem; + line-height: 1.5; + } + .landing-explainer h2 { max-width: 20ch; font-size: clamp(1.75rem, 3.5vw, 2.5rem); @@ -420,6 +579,23 @@ } /* Host dashboard */ + .dashboard-band { + margin-top: 0.75rem; + } + + .dashboard-band .dashboard-head { + padding: clamp(1.35rem, 3.2vw, 2.25rem) clamp(1.25rem, 3vw, 2rem) + clamp(4.25rem, 6vw, 5.25rem); + } + + .dashboard-band .dashboard-title { + color: var(--paper); + } + + .dashboard-band .dashboard-sub { + color: rgb(255 250 244 / 0.8); + } + .dashboard-head { display: flex; flex-wrap: wrap; @@ -461,6 +637,73 @@ margin-bottom: 9px; } + .event-list-more { + display: flex; + } + + /* A dashed ticket that invites another event; never stretches to card height. */ + .dash-ticket-more { + position: relative; + display: flex; + flex: 1; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 0.55rem; + width: 100%; + height: 13.75rem; + min-height: 0; + overflow: hidden; + padding: 2rem 1.5rem; + border: 2px dashed var(--divider-strong); + border-radius: 8px; + background: rgb(255 250 244 / 0.32); + color: var(--ink); + text-align: center; + text-decoration: none; + transition: border-color 160ms ease, background-color 160ms ease; + } + + .dash-ticket-more:hover { + border-color: var(--ketchup); + background: rgb(255 250 244 / 0.72); + } + + .dash-ticket-more .grill-marks { + opacity: 0.3; + } + + .dash-ticket-more-mark { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + width: 2.5rem; + height: 2.5rem; + border-radius: 999px; + background: var(--cream-deep); + box-shadow: 0 0 18px rgb(255 107 26 / 0.25); + } + + .dash-ticket-more-title { + position: relative; + font-family: var(--font-display); + font-size: 1.5rem; + line-height: 1.1; + } + + .dash-ticket-more:hover .dash-ticket-more-title { + color: var(--ketchup-deep); + } + + .dash-ticket-more-note { + position: relative; + max-width: 22ch; + color: var(--ink-muted); + font-size: 0.875rem; + line-height: 1.45; + } + .dash-ticket { display: flex; flex-direction: column; @@ -638,6 +881,8 @@ font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 0.9; + /* A gentle heat haze from the numbers, like a plate under a warmer. */ + animation: heat-glow 4s ease-in-out infinite; } .ticket-count-sub { @@ -829,7 +1074,17 @@ } .tab-link[aria-current="page"]::after { - background: var(--ketchup); + background-image: linear-gradient( + 90deg, + var(--ketchup) 0%, + var(--ember) 35%, + var(--flame) 50%, + var(--ember) 65%, + var(--ketchup) 100% + ); + background-size: 200% 100%; + box-shadow: 0 0 10px rgb(255 107 26 / 0.4); + animation: tab-shimmer 7s linear infinite; } @media (min-width: 40rem) { @@ -1000,6 +1255,723 @@ } } +@layer components { + /* + * Fire. The grill lit behind the counter: coal bands with grate bars, flame + * tongues along one edge, and embers drifting up. All of it is decorative, + * aria-hidden in markup, CSS-only, and stripped in print. Nothing animates + * here but transform and opacity. + */ + .grill-band { + position: relative; + isolation: isolate; + overflow: hidden; + background-color: var(--coal); + /* Heat rises from the fire edge; the grate is a faint, separate layer. */ + background-image: radial-gradient( + 130% 130% at 50% 116%, + rgb(255 107 26 / 0.34) 0%, + rgb(255 180 58 / 0.09) 42%, + transparent 68% + ); + color: var(--paper); + } + + .grill-band::before { + content: ""; + position: absolute; + inset: 0; + z-index: 0; + pointer-events: none; + background-image: var(--grate); + -webkit-mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.55) 38%, transparent 82%); + mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.55) 38%, transparent 82%); + } + + .grill-band[data-edge="top"]::before { + -webkit-mask-image: linear-gradient( + to bottom, + #000 0%, + rgb(0 0 0 / 0.55) 38%, + transparent 82% + ); + mask-image: linear-gradient(to bottom, #000 0%, rgb(0 0 0 / 0.55) 38%, transparent 82%); + } + + .grill-band-inset { + border-radius: 8px; + } + + .grill-band-content { + position: relative; + z-index: 1; + } + + .embers { + position: absolute; + inset: 0; + z-index: 0; + overflow: hidden; + pointer-events: none; + } + + .ember { + position: absolute; + bottom: -3px; + left: var(--x); + width: var(--size); + height: var(--size); + border-radius: 999px; + background: var(--ember-tone, var(--ember)); + box-shadow: 0 0 6px 1px rgb(255 180 58 / 0.7); + opacity: 0; + animation: ember-rise var(--dur, 8s) linear var(--delay, 0s) infinite; + } + + .ember[data-tone="flame"] { + box-shadow: 0 0 8px 2px rgb(255 180 58 / 0.8); + } + + .ember[data-tone="tip"] { + box-shadow: 0 0 10px 2px rgb(255 224 138 / 0.9); + } + + @keyframes ember-rise { + 0% { + transform: translate3d(0, 0, 0) scale(0.6); + opacity: 0; + } + 10% { + opacity: 0.95; + } + 60% { + opacity: 0.72; + } + 82% { + opacity: 0.32; + } + 100% { + transform: translate3d(var(--drift, 12px), calc(var(--rise, 180px) * -1), 0) scale(0.12); + opacity: 0; + } + } + + .flames { + position: absolute; + inset-inline: 0; + z-index: 0; + height: var(--flame-h, 62px); + pointer-events: none; + } + + .flames[data-edge="bottom"] { + bottom: 0; + } + + .flames[data-edge="top"] { + top: 0; + transform: scaleY(-1); + } + + .flame-glow { + position: absolute; + inset-inline: 0; + bottom: 0; + height: calc(var(--flame-h, 62px) * 1.6); + background: radial-gradient( + 60% 100% at 50% 100%, + rgb(255 107 26 / 0.34) 0%, + rgb(255 180 58 / 0.12) 44%, + transparent 72% + ); + filter: blur(7px); + } + + .flame-row { + position: absolute; + inset: 0; + } + + .flame-tongue { + position: absolute; + bottom: 0; + width: var(--w); + height: var(--h); + transform-origin: 50% 100%; + animation: flicker var(--dur, 1.5s) ease-in-out var(--delay, 0s) infinite alternate; + } + + .flame-tongue[data-depth="back"] { + filter: blur(0.6px) drop-shadow(0 0 8px rgb(255 107 26 / 0.28)); + } + + .flame-tongue[data-depth="front"] { + filter: drop-shadow(0 0 6px rgb(255 107 26 / 0.38)); + } + + .flame-tongue svg { + display: block; + width: 100%; + height: 100%; + overflow: visible; + } + + .flame-bed { + position: absolute; + inset-inline: -2%; + bottom: 0; + height: 11px; + background-image: + radial-gradient(18% 180% at 12% 100%, #ff8a3d 0%, transparent 100%), + radial-gradient(22% 200% at 33% 100%, #ffb43a 0%, transparent 100%), + radial-gradient(16% 170% at 52% 100%, #ff5a12 0%, transparent 100%), + radial-gradient(20% 190% at 71% 100%, #ffcf6b 0%, transparent 100%), + radial-gradient(18% 170% at 88% 100%, #ff7a2a 0%, transparent 100%), + linear-gradient(90deg, var(--coal) 0%, #4a1f10 22%, #2a130b 50%, #5a2612 78%, var(--coal) 100%); + box-shadow: 0 0 24px 5px rgb(255 107 26 / 0.4); + -webkit-mask-image: linear-gradient(to top, #000 55%, transparent 100%); + mask-image: linear-gradient(to top, #000 55%, transparent 100%); + } + + .flames[data-size="sm"] .flame-bed { + height: 6px; + } + + .flames[data-size="md"] .flame-bed { + height: 10px; + } + + @keyframes flicker { + 0% { + transform: scaleY(0.84) skewX(var(--skew, 0deg)); + } + 46% { + transform: scaleY(1.08) skewX(var(--skew, 0deg)); + } + 100% { + transform: scaleY(0.94) skewX(var(--skew, 0deg)); + } + } + + .flame-icon { + transform-origin: 50% 100%; + animation: flame-flicker 2.8s ease-in-out infinite; + filter: drop-shadow(0 0 4px rgb(255 107 26 / 0.4)); + } + + @keyframes flame-flicker { + 0%, + 100% { + transform: scaleY(1) scaleX(1); + opacity: 0.95; + } + 35% { + transform: scaleY(1.045) scaleX(0.98); + opacity: 1; + } + 70% { + transform: scaleY(0.975) scaleX(1.015); + opacity: 0.92; + } + } + + .grill-marks { + position: absolute; + inset: -1px; + z-index: 0; + pointer-events: none; + background-image: repeating-linear-gradient( + 115deg, + transparent 0 12px, + var(--mark-color, rgb(26 17 12 / 0.16)) 12px 15px + ); + } + + [data-cover="ink"] .grill-marks, + [data-cover="ketchup"] .grill-marks, + [data-cover="pickle"] .grill-marks { + --mark-color: rgb(255 250 244 / 0.26); + } + + /* Three wide stripes for a badge-sized surface. */ + .grill-marks-sear { + background-image: linear-gradient( + 115deg, + transparent 0%, + transparent 18%, + var(--mark-color, rgb(26 17 12 / 0.2)) 18% 29%, + transparent 29% 41%, + var(--mark-color, rgb(26 17 12 / 0.2)) 41% 52%, + transparent 52% 64%, + var(--mark-color, rgb(26 17 12 / 0.2)) 64% 75%, + transparent 75% 100% + ); + } + + /* The mustard period of the wordmark, now a coal that breathes. */ + .wordmark-ember { + display: inline-block; + color: var(--ember); + text-shadow: 0 0 8px rgb(255 107 26 / 0.5), 0 0 20px rgb(255 180 58 / 0.3); + animation: ember-breathe 3s ease-in-out infinite; + } + + @keyframes ember-breathe { + 0%, + 100% { + opacity: 0.85; + text-shadow: 0 0 7px rgb(255 107 26 / 0.4), 0 0 16px rgb(255 180 58 / 0.22); + } + 50% { + opacity: 1; + text-shadow: 0 0 12px rgb(255 107 26 / 0.65), 0 0 26px rgb(255 180 58 / 0.4); + } + } + + .wordmark-flame { + position: absolute; + top: -0.36em; + right: -0.06em; + height: 0.58em; + width: auto; + transform: rotate(7deg); + transform-origin: 50% 100%; + } + + @keyframes heat-glow { + 0%, + 100% { + text-shadow: 0 1px 0 rgb(158 36 17 / 0.16); + } + 50% { + text-shadow: 0 0 14px rgb(255 107 26 / 0.38), 0 0 30px rgb(255 180 58 / 0.16); + } + } + + @keyframes tab-shimmer { + from { + background-position: 0% 0; + } + to { + background-position: 200% 0; + } + } + + /* Shared button plumbing: the sweep needs a slower background-position move. */ + .ui-button { + transition: background-color 160ms ease, border-color 150ms ease, + transform 160ms ease, box-shadow 220ms ease, background-position 560ms ease; + } + + .fire-button { + background-image: linear-gradient( + 100deg, + transparent 0%, + transparent 34%, + rgb(255 107 26 / 0.85) 50%, + transparent 66%, + transparent 100% + ); + background-size: 250% 100%; + background-position: 100% 0; + box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.18); + } + + .fire-button:hover { + background-position: 0 0; + box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.18), var(--glow); + } + + /* The thin coal strip that sits on top of the event ticket. */ + .ticket-fire-strip { + position: relative; + /* Flames may rise above the strip but never spill past the ticket edges. */ + clip-path: inset(-3rem 0 0 0 round var(--radius-ticket) var(--radius-ticket) 0 0); + height: 12px; + border-radius: var(--radius-ticket) var(--radius-ticket) 0 0; + background-color: var(--coal); + background-image: + radial-gradient(120% 240% at 50% 130%, rgb(255 107 26 / 0.5), transparent 70%), + var(--grate); + } + + @media (prefers-reduced-motion: reduce) { + .embers, + .ember-burst { + display: none; + } + + .flame-tongue, + .flame-icon, + .wordmark-ember, + .tab-link[aria-current="page"]::after, + .ticket-count-number, + .ember-burst-dot { + animation: none !important; + } + + .flame-tongue { + transform: none; + filter: none; + } + + .wordmark-ember { + opacity: 1; + } + + .ui-button, + .fire-button, + .cta-primary { + transition: background-color 160ms ease, box-shadow 220ms ease; + } + } +} + +@layer components { + /* Two-pane fire pages: a tall coal band beside a slip (auth, new event, guest). */ + .fire-page { + display: flex; + flex: 1; + flex-direction: column; + width: 100%; + gap: 0.75rem; + padding: 0.75rem; + } + + .fire-band { + min-height: 9rem; + } + + .fire-band-inner { + display: flex; + flex-direction: column; + justify-content: space-between; + gap: 0.75rem; + min-height: inherit; + padding: 0.9rem 1rem 4rem; + } + + .fire-home { + align-self: flex-start; + text-decoration: none; + } + + .fire-band .wordmark { + color: var(--paper); + } + + .fire-band-copy { + display: flex; + align-items: flex-start; + gap: 0.9rem; + } + + .fire-copy-text { + display: flex; + min-width: 0; + flex-direction: column; + gap: 0.5rem; + } + + .fire-cover { + flex-shrink: 0; + margin-top: 0.1rem; + } + + .fire-headline { + color: var(--paper); + font-size: clamp(1.55rem, 5vw, 2.25rem); + font-weight: 400; + line-height: 0.98; + overflow-wrap: anywhere; + } + + .fire-detail { + display: none; + color: rgb(255 250 244 / 0.82); + font-size: 1rem; + line-height: 1.5; + } + + .fire-detail p + p { + margin-top: 0.1rem; + } + + .fire-slip { + width: 100%; + padding: 0.25rem 0.25rem 3.5rem; + } + + .fire-slip-inner { + display: flex; + width: 100%; + max-width: 32rem; + margin-inline: auto; + flex-direction: column; + gap: 1.25rem; + } + + .fire-foot { + color: var(--ink-muted); + font-size: 0.875rem; + line-height: 1.55; + text-align: center; + } + + @media (max-width: 63.999rem) { + .fire-band .flames { + transform: scaleY(0.5); + transform-origin: bottom; + } + } + + @media (min-width: 64rem) { + .fire-page { + display: grid; + grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); + align-items: start; + gap: clamp(1.5rem, 3vw, 2.75rem); + min-height: 100vh; + padding: 1.5rem; + } + + .fire-rail { + position: sticky; + top: 1.5rem; + align-self: start; + } + + .fire-band { + min-height: calc(100vh - 6rem); + } + + .fire-band-inner { + min-height: calc(100vh - 6rem); + padding: 1.5rem 1.75rem 8.5rem; + } + + .fire-headline { + font-size: clamp(2.5rem, 3.4vw, 3.5rem); + } + + .fire-detail { + display: block; + font-size: 1.0625rem; + } + + .fire-slip { + display: flex; + min-height: calc(100vh - 3rem); + flex-direction: column; + justify-content: center; + padding-block: 2.5rem; + } + } + + /* Empty states: paper with quiet line art and an ember accent. */ + .empty-state { + position: relative; + display: flex; + min-height: 17.5rem; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 1rem; + overflow: hidden; + padding: 2rem 1.5rem; + border-radius: 8px; + background: var(--paper); + box-shadow: 0 1px 0 rgb(43 29 23 / 0.08); + text-align: center; + } + + .empty-state-marks { + opacity: 0.12; + } + + .empty-state-art, + .empty-state-copy { + position: relative; + z-index: 1; + } + + .empty-state-art { + display: block; + width: 9.5rem; + color: var(--ink); + } + + .empty-state-art svg { + display: block; + width: 100%; + height: auto; + } + + .empty-art-grill { + position: relative; + } + + .empty-art-flame { + position: absolute; + left: 50%; + bottom: 2.1rem; + display: inline-flex; + transform: translateX(-50%); + } + + .empty-state-title { + font-family: var(--font-display); + font-size: 1.375rem; + font-weight: 400; + line-height: 1.15; + overflow-wrap: anywhere; + } + + .empty-state-body { + max-width: 44ch; + margin-top: 0.4rem; + color: var(--ink-muted); + font-size: 0.9375rem; + line-height: 1.55; + } + + .empty-state-action { + margin-top: 0.85rem; + } + + .empty-state-inset { + min-height: 15rem; + border-radius: 6px; + background-color: var(--cream); + background-image: var(--grain); + box-shadow: none; + } + + .empty-state-sm { + min-height: 0; + flex-direction: row; + align-items: center; + gap: 0.85rem; + padding: 0.85rem 1rem; + text-align: left; + } + + .empty-state-sm .empty-state-art { + width: 3.25rem; + flex-shrink: 0; + } + + .empty-state-sm .empty-state-title { + font-size: 1.0625rem; + } + + .empty-state-sm .empty-state-body { + margin-top: 0.2rem; + font-size: 0.875rem; + } + + /* A one-time ember pop for success notices. */ + .ember-burst { + position: absolute; + inset: 0 0 20%; + z-index: 0; + overflow: visible; + pointer-events: none; + } + + .ember-burst-dot { + position: absolute; + bottom: 0; + left: var(--x); + width: var(--size); + height: var(--size); + border-radius: 999px; + background: var(--ember-tone); + box-shadow: 0 0 8px 1px rgb(255 180 58 / 0.7); + opacity: 0; + animation: ember-burst var(--dur, 1.5s) cubic-bezier(0.2, 0.6, 0.3, 1) var(--delay, 0s) 1 both; + } + + @keyframes ember-burst { + 0% { + transform: translate3d(0, 0, 0) scale(0.7); + opacity: 0; + } + 12% { + opacity: 1; + } + 100% { + transform: translate3d(var(--drift, 20px), -90px, 0) scale(0.14); + opacity: 0; + } + } + + .success-banner { + position: relative; + isolation: isolate; + } + + .success-banner-copy { + position: relative; + z-index: 1; + } + + /* 404: a grate on the coals, with embers across the page. */ + .grill-404 { + position: relative; + display: flex; + min-height: 100vh; + flex: 1; + flex-direction: column; + align-items: center; + justify-content: center; + overflow: hidden; + padding: 2.5rem 1.25rem; + text-align: center; + } + + .grill-404-inner { + position: relative; + z-index: 1; + display: flex; + width: 100%; + max-width: 40rem; + flex-direction: column; + align-items: center; + gap: 1.35rem; + } + + .grill-404-scene { + position: relative; + width: min(100%, 24rem); + aspect-ratio: 16 / 10; + overflow: hidden; + border-radius: 12px; + background-color: var(--coal); + } + + .grill-404-grate { + position: absolute; + inset: 0; + z-index: 1; + width: 100%; + height: 100%; + color: var(--paper); + } + + .grill-404-title { + font-size: clamp(2rem, 5vw, 3rem); + line-height: 0.98; + } + + .grill-404-line { + max-width: 34ch; + color: var(--ink-muted); + font-size: 1.0625rem; + line-height: 1.55; + } +} + @media print { @page { margin: 14mm; @@ -1232,3 +2204,56 @@ .whatif-table { font-size: 0.875rem; } } } + +/* + * Paper gets no fire. Print drops every decorative layer and flattens any coal + * band that wraps real content back to black on white. + */ +@media print { + .embers, + .ember-burst, + .flames, + .flame-icon, + .grill-marks, + .empty-state-art, + .empty-state-marks, + .ticket-slot-fire, + .ticket-fire-strip { + display: none !important; + } + + .empty-state { + background: transparent !important; + box-shadow: none !important; + } + + .grill-band { + background: transparent !important; + color: black !important; + } + + .grill-band .dashboard-title, + .grill-band .dashboard-sub, + .landing-fire-title, + .landing-fire-note, + .landing-fire-wink { + color: black !important; + } + + .wordmark-ember { + color: black !important; + text-shadow: none !important; + animation: none !important; + } + + .ticket-count-number { + animation: none !important; + text-shadow: none !important; + } + + .cta-primary, + .fire-button { + background-image: none !important; + box-shadow: none !important; + } +} diff --git a/src/app/host/events/[id]/edit/page.tsx b/src/app/host/events/[id]/edit/page.tsx index e713817..f0afbe9 100644 --- a/src/app/host/events/[id]/edit/page.tsx +++ b/src/app/host/events/[id]/edit/page.tsx @@ -19,32 +19,36 @@ export default async function EditEventPage({ params }: PageProps<"/host/events/ const cancelled = event.cancelledAt !== null; return ( -
-

Edit details

- - - +
+
+

Edit details

+ +
+
); } diff --git a/src/app/host/events/[id]/layout.tsx b/src/app/host/events/[id]/layout.tsx index 0bf6998..341890a 100644 --- a/src/app/host/events/[id]/layout.tsx +++ b/src/app/host/events/[id]/layout.tsx @@ -5,6 +5,7 @@ import { CopyCancellationButton } from "@/components/CopyCancellationButton"; import { CopyLinkButton } from "@/components/CopyLinkButton"; import { CoverChip } from "@/components/CoverChip"; import { EventTabs } from "@/components/EventTabs"; +import { Flames } from "@/components/fire/Flames"; import { Wordmark } from "@/components/ui/Wordmark"; import { coverFor } from "@/lib/cover"; import { formatWhen } from "@/lib/format"; @@ -58,9 +59,12 @@ export default async function EventLayout({ ) : null}
+
- +

{event.title}

diff --git a/src/app/host/new/page.tsx b/src/app/host/new/page.tsx index 648579b..529326a 100644 --- a/src/app/host/new/page.tsx +++ b/src/app/host/new/page.tsx @@ -1,4 +1,5 @@ import { NewEventForm } from "@/components/NewEventForm"; +import { FirePage } from "@/components/FirePage"; import { requireHost } from "@/server/auth"; import { createEventAction } from "./actions"; @@ -7,5 +8,12 @@ export const dynamic = "force-dynamic"; export default async function NewEventPage() { await requireHost(); - return ; + return ( + + + + ); } diff --git a/src/app/host/page.tsx b/src/app/host/page.tsx index ac63659..4f80a0f 100644 --- a/src/app/host/page.tsx +++ b/src/app/host/page.tsx @@ -2,7 +2,10 @@ import Link from "next/link"; import { CopyLinkButton } from "@/components/CopyLinkButton"; import { CoverChip } from "@/components/CoverChip"; import { SignOutButton } from "@/components/SignOutButton"; -import { Card } from "@/components/ui/Card"; +import { FlameIcon } from "@/components/fire/FlameIcon"; +import { GrillBand } from "@/components/fire/GrillBand"; +import { GrillMarks } from "@/components/fire/GrillMarks"; +import { EmptyState } from "@/components/EmptyState"; import { Pill } from "@/components/ui/Pill"; import { SubmitButton } from "@/components/ui/SubmitButton"; import { Wordmark } from "@/components/ui/Wordmark"; @@ -92,6 +95,21 @@ function EventTicket({ ); } +function MoreTicket() { + return ( + + + + Fire up another + + A fresh ticket for the next crowd. + + + ); +} + export default async function HostDashboardPage({ searchParams }: PageProps<"/host">) { const host = await requireHost(); const db = await getDb(); @@ -120,17 +138,27 @@ export default async function HostDashboardPage({ searchParams }: PageProps<"/ho -

-
-

Your events

-

- Hi, {host.name}. Pick an event to keep planning. -

+ +
+
+

Your events

+

+ Hi, {host.name}. Pick an event to keep planning. +

+
+ {events.length > 0 ? ( + + Create event + + ) : null}
- - Create event - -
+ {deletedEvent ? (
- -

No events yet

-

- Create one, then share the link with your guests. Replies start - filling in the food plan. -

-
-
+ + Create event + + } + > +

+ Create one, then share the link with your guests. Replies start + filling in the food plan. +

+
) : ( <> {upcoming.length > 0 ? ( @@ -185,6 +219,9 @@ export default async function HostDashboardPage({ searchParams }: PageProps<"/ho showGlance={event.cancelledAt === null} /> ))} +
  • + +
  • ) : null} @@ -208,6 +245,12 @@ export default async function HostDashboardPage({ searchParams }: PageProps<"/ho ) : null} + + {upcoming.length === 0 ? ( +
    + +
    + ) : null} )} diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index c7c4976..f13ab30 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -1,20 +1,49 @@ import Link from "next/link"; +import { Embers } from "@/components/fire/Embers"; +import { Flames } from "@/components/fire/Flames"; import { Wordmark } from "@/components/ui/Wordmark"; export default function NotFound() { return ( -
    - -

    We can't find that page.

    -

    - If you were sent an RSVP link, ask your host for a fresh one. -

    - - Back to Spread - +
    + + +
    + + + + + + +

    This one fell through the grate.

    +

    + The page you were after is off the menu. Head back to the grill and + start again. +

    + + Back to Spread + +
    ); } diff --git a/src/app/page.tsx b/src/app/page.tsx index 856ff6f..d61a399 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,4 +1,7 @@ import Link from "next/link"; +import { Flames } from "@/components/fire/Flames"; +import { GrillBand } from "@/components/fire/GrillBand"; +import { GrillMarks } from "@/components/fire/GrillMarks"; import { Pill } from "@/components/ui/Pill"; import { Wordmark } from "@/components/ui/Wordmark"; import { getHostOrNull } from "@/server/auth"; @@ -21,126 +24,180 @@ const explainers = [ }, ]; +const stamps = [ + { value: "1 link", caption: "to invite everyone" }, + { value: "0 accounts", caption: "for guests to reply" }, + { value: "every bun counted", caption: "from their answers" }, +]; + export default async function Home() { const host = await getHostOrNull(); return ( -
    -
    - - -
    +
    +
    +
    + + +
    -
    -
    -

    - Enough food. - More time together. -

    -

    - Share one link. Guests answer without an account, and Spread turns - their replies into a shopping list, a headcount you can plan for, and - an editable cost split. -

    -
    - - {host ? "Go to your events" : "Host a get-together"} - +
    +
    +

    + Enough food. + More time together. +

    +

    + Share one link. Guests answer without an account, and Spread turns + their replies into a shopping list, a headcount you can plan for, and + an editable cost split. +

    +
    + + {host ? "Go to your events" : "Host a get-together"} + +
    +

    + Guests reply in their browser. No app to install. +

    + +
      + {stamps.map((stamp) => ( +
    • + + {stamp.value} + {stamp.caption} +
    • + ))} +
    -

    - Guests reply in their browser. No app to install. -

    -
    -
    -
    -
    -
    -

    - Saturday cookout -

    -

    Sat, Jun 14 · 6pm · The backyard

    -
    - Example +
    +
    +
    +
    +
    +
    +
    +

    + Saturday cookout +

    +

    Sat, Jun 14 · 6pm · The backyard

    +
    + Example +
    -
    -

    - Plan for - ~4 -

    -

    - 3 confirmed + about 1 from maybes{" "} - (range 3–4) -

    -
    +
    +

    + Plan for + ~4 +

    +

    + 3 confirmed + about 1 from maybes{" "} + (range 3–4) +

    +
    -
      -
    • - Priya - Going -
    • -
    • - Sam + 1 - Going -
    • -
    • - Alex - Maybe -
    • -
    +
      +
    • + Priya + Going +
    • +
    • + Sam + 1 + Going +
    • +
    • + Alex + Maybe +
    • +
    -
    -

    Shopping list

    -
      -
    • - Burgers - 6 -
    • -
    • - Ground beef - 2 lb -
    • -
    • - Buns - 6 -
    • -
    +
    +

    Shopping list

    +
      +
    • + Burgers + 6 +
    • +
    • + Ground beef + 2 lb +
    • +
    • + Buns + 6 +
    • +
    +
    + +
    + Example plan. Your numbers come from your guests' answers. +
    +
    +
    +
    -
    - Example plan. Your numbers come from your guests' answers. -
    - -
    - +
    +

    The plan follows the people.

    +
    + {explainers.map((item) => ( +
    +

    {item.title}

    +

    {item.body}

    +
    + ))} +
    +
    +
    -
    -

    The plan follows the people.

    -
    - {explainers.map((item) => ( -
    -

    {item.title}

    -

    {item.body}

    -
    - ))} + +
    +
    +

    + Fire up the grill. We'll count the buns. +

    +

    + One link for the guest list, the food and the split. Guests never + need an account, and the plan keeps up with every reply. +

    +
    +
    + + {host ? "Back to your events" : "Start your plan"} + + + Takes a minute. Costs nothing. + +
    -
    + -
    - Spread - Guests answer from a link. Hosts see the plan. -
    +
    +
    + Spread + Guests answer from a link. Hosts see the plan. +
    +
    ); } diff --git a/src/components/AuthForm.tsx b/src/components/AuthForm.tsx index 262938d..6a8ea6d 100644 --- a/src/components/AuthForm.tsx +++ b/src/components/AuthForm.tsx @@ -6,11 +6,10 @@ import { useState, useSyncExternalStore, type FormEvent } from "react"; import { authClient, friendlyAuthError } from "@/lib/auth-client"; import { Button } from "./ui/Button"; import { Field } from "./ui/Field"; -import { Wordmark } from "./ui/Wordmark"; const COPY = { login: { - title: "Welcome back", + title: "Log in", blurb: "Log in to manage your events.", submit: "Log in", pending: "Logging in...", @@ -77,69 +76,65 @@ export function AuthForm({ mode }: { mode: "login" | "signup" }) { } return ( -
    - - - - +
    -
    -

    {copy.title}

    -

    {copy.blurb}

    -
    -
    - {/* method="post" + a disabled button until hydration: a native submit before - React is live must never put credentials in the URL query string. */} -
    - {mode === "signup" ? ( +
    +

    {copy.title}

    +

    {copy.blurb}

    +
    +
    + {/* method="post" + a disabled button until hydration: a native submit before + React is live must never put credentials in the URL query string. */} + + {mode === "signup" ? ( + + ) : null} + - ) : null} - - - {error ? ( -

    - {error} -

    - ) : null} + {error ? ( +

    + {error} +

    + ) : null} - - -
    + + +
    -

    +

    {copy.switchText}{" "} {copy.switchLink}

    -
    +
    ); } diff --git a/src/components/ChangeNotice.tsx b/src/components/ChangeNotice.tsx index 3ec2a5d..19f39eb 100644 --- a/src/components/ChangeNotice.tsx +++ b/src/components/ChangeNotice.tsx @@ -1,6 +1,8 @@ "use client"; import { useState } from "react"; +import { EmberBurst } from "./fire/EmberBurst"; +import { FlameIcon } from "./fire/FlameIcon"; import { Button } from "./ui/Button"; /** The sentence the host pastes into their group chat; Spread never sends it. */ @@ -35,8 +37,12 @@ export function ChangeNotice({ } return ( -
    -

    {message}

    +
    + +

    + + {message} +

    Copy this into your group chat. Spread doesn't message guests for you.

    diff --git a/src/components/CoverChip.tsx b/src/components/CoverChip.tsx index 31e1d46..7ded616 100644 --- a/src/components/CoverChip.tsx +++ b/src/components/CoverChip.tsx @@ -1,4 +1,5 @@ import type { Cover } from "@/lib/cover"; +import { GrillMarks } from "./fire/GrillMarks"; const sizes = { sm: "h-8 w-8 text-base", @@ -10,19 +11,26 @@ const sizes = { export function CoverChip({ cover, size = "md", + marks = false, className = "", }: { cover: Cover; size?: keyof typeof sizes; + /** A quiet seared texture, used on the event masthead. */ + marks?: boolean; className?: string; }) { return ( - {cover.emoji} + {marks ? : null} + + {cover.emoji} + ); } diff --git a/src/components/EmptyState.tsx b/src/components/EmptyState.tsx new file mode 100644 index 0000000..3f91af0 --- /dev/null +++ b/src/components/EmptyState.tsx @@ -0,0 +1,144 @@ +import type { ReactNode } from "react"; +import { FlameIcon } from "./fire/FlameIcon"; +import { GrillMarks } from "./fire/GrillMarks"; + +export type EmptyStateArt = "grill" | "ticket" | "cart" | "split" | "calendar"; + +const stroke = { + fill: "none", + stroke: "currentColor", + strokeWidth: 2.2, + strokeLinecap: "round", + strokeLinejoin: "round", +} as const; + +function Grate() { + return ( +
    + + + + +
    + ); +} + +function Ticket() { + return ( + + ); +} + +function Cart() { + return ( + + ); +} + +function Split() { + return ( + + ); +} + +function Calendar() { + return ( + + ); +} + +function Art({ art }: { art: EmptyStateArt }) { + switch (art) { + case "grill": + return ; + case "cart": + return ; + case "split": + return ; + case "calendar": + return ; + default: + return ; + } +} + +/** + * A paper resting place for an empty list or a finished one. The art is line + * work with an ember accent; fire stays decorative and never prints. Pass + * `inset` when the state already sits inside a Card. + */ +export function EmptyState({ + title, + children, + action, + art = "grill", + size = "md", + inset = false, + className = "", +}: { + title: string; + children?: ReactNode; + action?: ReactNode; + art?: EmptyStateArt; + size?: "sm" | "md"; + inset?: boolean; + className?: string; +}) { + return ( +
    + + +
    +

    {title}

    + {children ?
    {children}
    : null} + {action ?
    {action}
    : null} +
    +
    + ); +} diff --git a/src/components/FirePage.tsx b/src/components/FirePage.tsx new file mode 100644 index 0000000..b85b0ff --- /dev/null +++ b/src/components/FirePage.tsx @@ -0,0 +1,55 @@ +import Link from "next/link"; +import type { ReactNode } from "react"; +import { GrillBand } from "./fire/GrillBand"; +import { Wordmark } from "./ui/Wordmark"; + +/** + * The two-pane fire page: a tall, sticky coal band with a headline beside the + * slip. Below `lg` the band becomes a short strip above the slip. Used by the + * sign-in, sign-up, new-event and guest RSVP screens. + */ +export function FirePage({ + headline, + detail, + cover, + children, + className = "", +}: { + headline: ReactNode; + detail?: ReactNode; + /** Event cover for the guest page, shown beside the headline. */ + cover?: ReactNode; + children: ReactNode; + className?: string; +}) { + return ( +
    +
    + +
    + + + +
    + {cover ?
    {cover}
    : null} +
    +

    {headline}

    + {detail ?
    {detail}
    : null} +
    +
    +
    +
    +
    +
    +
    {children}
    +
    +
    + ); +} diff --git a/src/components/GuestsPanel.tsx b/src/components/GuestsPanel.tsx index eca73d7..7c088e7 100644 --- a/src/components/GuestsPanel.tsx +++ b/src/components/GuestsPanel.tsx @@ -4,6 +4,7 @@ import { useActionState, useState } from "react"; import { duplicateGuestIds } from "@/lib/guest-names"; import type { GuestsOverview, GuestRow } from "@/services/guestsOverview"; import { CopyReminderButton } from "./CopyReminderButton"; +import { EmptyState } from "./EmptyState"; import { FoodNotesSummary } from "./FoodNotesSummary"; import { Button } from "./ui/Button"; import { Card, CardRow } from "./ui/Card"; @@ -214,23 +215,28 @@ export function GuestsPanel({ -
    +
    - -

    Guests

    - {guests.length === 0 ? ( -

    No answers yet. Share your link above to get started, then add your dishes on the Menu tab.

    - ) : ( - guests.map((g) => ( + {guests.length === 0 ? ( + +

    + Share your link above to get started, then add your dishes on the + Menu tab. +

    +
    + ) : ( + +

    Guests

    + {guests.map((g) => ( - )) - )} -
    + ))} +
    + )} {noReply && noReply.length > 0 ? ( @@ -247,7 +253,7 @@ export function GuestsPanel({ ) : null}
    -
    ); } diff --git a/src/components/RsvpForm.tsx b/src/components/RsvpForm.tsx index ba9a1dd..e6fcd7e 100644 --- a/src/components/RsvpForm.tsx +++ b/src/components/RsvpForm.tsx @@ -7,7 +7,6 @@ import type { GuestView } from "@/services/rsvp"; import { CoverChip } from "./CoverChip"; import { Button } from "./ui/Button"; import { Field } from "./ui/Field"; -import { Wordmark } from "./ui/Wordmark"; export const MAX_PLUS_ONES = 10; @@ -42,16 +41,26 @@ const ANSWER_LABELS: Record = { no: "Can't make it", }; -function SlipHead({ event, readOnly }: { event: RsvpFormEvent; readOnly: boolean }) { +function SlipHead({ + event, + readOnly, + hideTitle, +}: { + event: RsvpFormEvent; + readOnly: boolean; + hideTitle: boolean; +}) { return (

    {event.hostName} is hosting

    -
    - {event.cover ? : null} -

    {event.title}

    -
    + {hideTitle ? null : ( +
    + {event.cover ? : null} +

    {event.title}

    +
    + )}

    {event.when}

    {readOnly @@ -106,14 +115,17 @@ export function RsvpForm({ action, notice, readOnly = false, + hideTitle = false, }: { event: RsvpFormEvent; initial?: GuestView; action: RsvpFormAction; - /** Optional banner shown under the wordmark (e.g. the confirmation or a cancellation). */ + /** Optional banner shown above the slip (e.g. the confirmation or a cancellation). */ notice?: ReactNode; /** Cancelled event: render the details and answer, but nothing to submit. */ readOnly?: boolean; + /** The headline already appears in the fire band; skip it in the slip. */ + hideTitle?: boolean; }) { const [state, formAction, pending] = useActionState(action, { error: null }); const [name, setName] = useState(initial?.name ?? ""); @@ -124,22 +136,19 @@ export function RsvpForm({ const canSubmit = name.trim().length > 0 && status !== null && !pending; return ( -

    -
    - -
    +
    {notice} {readOnly ? (
    - +
    ) : ( - +
    { + const rand = seeded(0xb0057); + const tones = ["var(--ember)", "var(--flame)", "var(--flame-tip)"]; + return Array.from({ length: 12 }, () => ({ + x: between(rand, 3, 97), + size: between(rand, 2.5, 5.5), + dur: between(rand, 1.2, 1.9), + delay: between(rand, 0, 0.35), + drift: between(rand, -40, 40), + tone: tones[Math.floor(rand() * tones.length)], + })); +})(); + +/** + * A one-time ember pop for a success moment. CSS-only and `both`-filled, so it + * runs once on mount and is gone; reduced motion hides it. + */ +export function EmberBurst({ className = "" }: { className?: string }) { + return ( +
    - -
    -
    -

    Your events

    -

    - Hi, {host.name}. Pick an event to keep planning. -

    +
    + +
    + +
    +
    +

    Your events

    +

    + Hi, {host.name}. Pick an event to keep planning. +

    +
    + {events.length > 0 ? ( + + Create event + + ) : null}
    - {events.length > 0 ? ( - - Create event - - ) : null}
    - +
    {deletedEvent ? (
    - +
    + -
    - - - - -
    ); diff --git a/src/app/page.tsx b/src/app/page.tsx index d61a399..93f2832 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,9 +1,11 @@ import Link from "next/link"; -import { Flames } from "@/components/fire/Flames"; -import { GrillBand } from "@/components/fire/GrillBand"; -import { GrillMarks } from "@/components/fire/GrillMarks"; +import { OccasionScene } from "@/components/occasion/OccasionScene"; +import { Bunting } from "@/components/scrapbook/Bunting"; +import { Sticker } from "@/components/scrapbook/Sticker"; +import { WashiTape } from "@/components/scrapbook/WashiTape"; import { Pill } from "@/components/ui/Pill"; import { Wordmark } from "@/components/ui/Wordmark"; +import { occasionSticker, type OccasionTheme } from "@/lib/occasion"; import { getHostOrNull } from "@/server/auth"; // Reads the session from request headers, so it must never be prerendered. @@ -30,6 +32,15 @@ const stamps = [ { value: "every bun counted", caption: "from their answers" }, ]; +const miniOccasions: { theme: OccasionTheme; name: string; note: string }[] = [ + { theme: "picnic", name: "Picnic", note: "A blanket and a list." }, + { theme: "birthday", name: "Birthday", note: "Candles and portions." }, + { theme: "holiday", name: "Holiday", note: "A table for twelve." }, + { theme: "gamenight", name: "Game night", note: "Snacks and a score." }, + { theme: "toast", name: "Toast", note: "Bubbles and bites." }, + { theme: "cookout", name: "Cookout", note: "Burgers and buns." }, +]; + export default async function Home() { const host = await getHostOrNull(); @@ -37,7 +48,7 @@ export default async function Home() {
    - +
    + +

    Enough food. @@ -74,7 +87,7 @@ export default async function Home() {
      {stamps.map((stamp) => (
    • - + {stamp.value} {stamp.caption}
    • @@ -83,9 +96,13 @@ export default async function Home() {

    -
    - -
    + + + + + + +
    @@ -147,6 +164,44 @@ export default async function Home() {
    + +
    @@ -163,34 +218,47 @@ export default async function Home() {
    - -
    -
    -

    - Fire up the grill. We'll count the buns. +
    +
    +
    +

    + For every kind of get-together.

    -

    - One link for the guest list, the food and the split. Guests never - need an account, and the plan keeps up with every reply. +

    + Birthdays, holidays, game nights, a quiet brunch. The plan follows + the occasion, and every guest gets the same simple link.

    -
    -
    - - {host ? "Back to your events" : "Start your plan"} - - - Takes a minute. Costs nothing. - + +
      + {miniOccasions.map(({ theme, name, note }) => ( +
    • +
      + +
      +
      + {name} + {note} +
      + +
    • + ))} +
    + +
    + + {host ? "Back to your events" : "Start your plan"} + + + Takes a minute. Costs nothing. + +
    - +