One palette backdrop behind every page; flat hero, split hero buttons

PageBackdrop draws flat, overlapping palette circles behind the
public site and eases them to a new tone as each section reaches
the middle of the window, so sections no longer paint their own
bands (PageShell's background field is gone). The hero's brand
backdrop is a flat teal with the dove, its two buttons one cell cut
by a slash, and the countdown straddles the hero and the band
below. No glows: the drifting blobs, rings, live-dot pulse and the
stats band's blurred circle are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-30 14:46:48 -05:00
parent 3dfc31fd85
commit 6fc19d7ee3
36 changed files with 255 additions and 219 deletions

View file

@ -6,6 +6,7 @@ import Banner from "./Banner.tsx";
import siteLogo from "../assets/logos/NGU_Logo.svg";
import Footer from "./Footer.tsx";
import PrivacyNotice from "./PrivacyNotice.tsx";
import PageBackdrop from "./PageBackdrop.tsx";
import ThemeToggle from "./ThemeToggle.tsx";
import { scrollBehavior } from "../lib/motion.ts";
@ -186,7 +187,7 @@ export default function Layout() {
<nav
className="flex items-center justify-between px-6 py-4"
aria-label="Site"
style={{ background: "rgba(0, 69, 82,0.92)" }}
style={{ background: "rgba(0, 69, 82, 0.92)" }}
>
<div className="flex items-center gap-8">
<Link to="/" aria-label="Next Generation of Unity home" className="inline-block">
@ -239,8 +240,8 @@ export default function Layout() {
className="hidden md:flex items-center px-6 py-2"
aria-label={`On this page: ${activePage?.label}`}
style={{
background: "rgba(0, 47, 57, 0.92)",
borderBottom: "1px solid rgba(45,200,224,0.15)",
background: "rgba(0, 16, 17, 0.92)",
borderBottom: "1px solid rgba(92, 231, 255, 0.15)",
}}
>
<span className="text-xs text-white/65">{activePage?.label}</span>
@ -249,7 +250,7 @@ export default function Layout() {
<span
aria-hidden
className="mx-5 h-4 w-px"
style={{ background: "rgba(45,200,224,0.3)" }}
style={{ background: "rgba(92, 231, 255, 0.3)" }}
/>
<div className="flex items-center gap-6">
@ -272,6 +273,8 @@ export default function Layout() {
)}
</header>
<PageBackdrop />
{/* Keeps page content clear of the fixed header */}
<div aria-hidden className="print:hidden" style={{ height: headerHeight }} />
@ -292,7 +295,7 @@ export default function Layout() {
{mobileMenuOpen && (
<div
className="fixed inset-0 z-[60] flex flex-col items-center justify-center overflow-y-auto py-16"
style={{ background: "rgba(7,61,74,0.97)" }}
style={{ background: "rgba(0, 69, 82, 0.97)" }}
role="dialog"
aria-modal="true"
aria-label="Menu"

View file

@ -0,0 +1,62 @@
/* ═══════════════════════════════════════════════════════════════
PAGE BACKDROP: the circles and their tones (PageBackdrop.tsx)
Flat fills only: no blur, no gradient, no glow. Light mode uses
the palette's four palest shades, dark mode its dark shades at
half opacity over the ink background. Every text token reads at
5:1 or better on any of them, where two overlap included (the
lowest is the danger red in dark mode).
═══════════════════════════════════════════════════════════════ */
.page-backdrop {
position: fixed;
inset: 0;
z-index: -1;
overflow: hidden;
pointer-events: none;
--pb-opacity: 0.75;
--pb-a: #c2f6ff;
--pb-b: #dfebd6;
--pb-c: #c2ffd6;
--pb-d: #c2fbff;
--pb-e: #dfebd6;
--pb-shift: 0vw;
}
.page-backdrop__circle {
position: absolute;
border-radius: 50%;
opacity: var(--pb-opacity);
transform: translateX(var(--pb-shift));
transition: background-color 1.4s cubic-bezier(0.16, 1, 0.3, 1),
transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.page-backdrop__circle--a { width: 70vmax; height: 70vmax; left: -22vmax; top: -18vmax; background: var(--pb-a); }
.page-backdrop__circle--b { width: 52vmax; height: 52vmax; right: -16vmax; top: 8vh; background: var(--pb-b); }
.page-backdrop__circle--c { width: 44vmax; height: 44vmax; left: 30vw; bottom: -20vmax; background: var(--pb-c); }
.page-backdrop__circle--d { width: 30vmax; height: 30vmax; left: 12vw; top: 46vh; background: var(--pb-d); }
.page-backdrop__circle--e { width: 24vmax; height: 24vmax; right: 18vw; bottom: 6vh; background: var(--pb-e); }
/* Tones, one per section in turn: the same shades, moved around. */
.page-backdrop[data-tone="1"] { --pb-a: #dfebd6; --pb-b: #c2ffd6; --pb-c: #c2f6ff; --pb-d: #dfebd6; --pb-e: #c2fbff; --pb-shift: 4vw; }
.page-backdrop[data-tone="2"] { --pb-a: #c2ffd6; --pb-b: #c2fbff; --pb-c: #dfebd6; --pb-d: #c2f6ff; --pb-e: #c2ffd6; --pb-shift: -3vw; }
.page-backdrop[data-tone="3"] { --pb-a: #c2fbff; --pb-b: #c2f6ff; --pb-c: #c2ffd6; --pb-d: #dfebd6; --pb-e: #c2f6ff; --pb-shift: 2vw; }
/* Dark mode: the dark shades, the same turns. Two blocks as in
index.css: the toggle's choice, or the system's when there is none. */
:root[data-theme="dark"] .page-backdrop { --pb-opacity: 0.5; --pb-a: #004552; --pb-b: #27371b; --pb-c: #004c52; --pb-d: #00521b; --pb-e: #27371b; }
:root[data-theme="dark"] .page-backdrop[data-tone="1"] { --pb-a: #27371b; --pb-b: #004c52; --pb-c: #004552; --pb-d: #27371b; --pb-e: #00521b; }
:root[data-theme="dark"] .page-backdrop[data-tone="2"] { --pb-a: #004c52; --pb-b: #00521b; --pb-c: #27371b; --pb-d: #004552; --pb-e: #004c52; }
:root[data-theme="dark"] .page-backdrop[data-tone="3"] { --pb-a: #00521b; --pb-b: #004552; --pb-c: #004c52; --pb-d: #27371b; --pb-e: #004552; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .page-backdrop { --pb-opacity: 0.5; --pb-a: #004552; --pb-b: #27371b; --pb-c: #004c52; --pb-d: #00521b; --pb-e: #27371b; }
:root:not([data-theme="light"]) .page-backdrop[data-tone="1"] { --pb-a: #27371b; --pb-b: #004c52; --pb-c: #004552; --pb-d: #27371b; --pb-e: #00521b; }
:root:not([data-theme="light"]) .page-backdrop[data-tone="2"] { --pb-a: #004c52; --pb-b: #00521b; --pb-c: #27371b; --pb-d: #004552; --pb-e: #004c52; }
:root:not([data-theme="light"]) .page-backdrop[data-tone="3"] { --pb-a: #00521b; --pb-b: #004552; --pb-c: #004c52; --pb-d: #27371b; --pb-e: #004552; }
}
@media print {
.page-backdrop { display: none; }
}

View file

@ -0,0 +1,83 @@
/* ═══════════════════════════════════════════════════════════════
PAGE BACKDROP
One background behind every public page: large flat circles in
the palette's light shades (its dark ones in dark mode), fixed to
the window and overlapping. Sections paint nothing of their own,
so it runs behind all of them; cards keep their solid surface.
As the visitor moves through a page the circles change tone: the
section crossing the middle of the window picks one of TONES (its
place on the page, in turn), and the circles ease to that tone's
colors and a slightly shifted position. Watched with an
IntersectionObserver, so nothing runs while the page sits still;
the colors are in PageBackdrop.css. Under reduced motion the
change is instant (index.css stops every transition).
Every text color passes 4.5:1 on every shade used here, overlaps
included, in both modes: the light shades are the palette's
palest, and the dark ones sit at partial opacity.
═══════════════════════════════════════════════════════════════ */
import { useEffect, useRef } from 'react'
import { useLocation } from 'react-router-dom'
import './PageBackdrop.css'
/** How many tones PageBackdrop.css defines (data-tone 0 to 3). */
const TONES = 4
const CIRCLES = ['a', 'b', 'c', 'd', 'e']
export default function PageBackdrop() {
const ref = useRef<HTMLDivElement>(null)
const { pathname } = useLocation()
useEffect(() => {
const main = document.getElementById('main')
const backdrop = ref.current
if (!main || !backdrop) return undefined
backdrop.dataset.tone = '0'
let watched: Element[] = []
// The band crossing the window's middle line sets the tone.
const observer = new IntersectionObserver(
(entries) => {
for (const entry of entries) {
if (!entry.isIntersecting) continue
const index = watched.indexOf(entry.target)
if (index >= 0) backdrop.dataset.tone = String(index % TONES)
}
},
{ rootMargin: '-50% 0px -50% 0px', threshold: 0 },
)
// Pages draw their sections as their data arrives, so the list
// is gathered again whenever main's content changes.
const collect = () => {
observer.disconnect()
watched = Array.from(main.querySelectorAll('section'))
watched.forEach((section) => observer.observe(section))
}
collect()
let frame = 0
const mutations = new MutationObserver(() => {
cancelAnimationFrame(frame)
frame = requestAnimationFrame(collect)
})
mutations.observe(main, { childList: true, subtree: true })
return () => {
cancelAnimationFrame(frame)
mutations.disconnect()
observer.disconnect()
}
}, [pathname])
return (
<div ref={ref} className="page-backdrop" aria-hidden="true">
{CIRCLES.map((name) => (
<span key={name} className={`page-backdrop__circle page-backdrop__circle--${name}`} />
))}
</div>
)
}

View file

@ -1,8 +1,9 @@
/* ═══════════════════════════════════════════════════════════════
PAGE SHELL
Just the chrome that makes pages look alike: a page header, then
sections with a thin accent banner between them, alternating
backgrounds, and a left-aligned heading with a blurb and rule.
sections with a thin accent banner between them and a left-aligned
heading with a blurb and rule. Sections paint no background of
their own: the page's (PageBackdrop.tsx) runs behind all of them.
Whatever goes inside a section is passed as `content`, the shell
doesn't care what it is.
@ -21,7 +22,6 @@
title: "Local Groups",
blurb: "Optional line under the section heading.",
accent: BRAND, // heading, banner, rule
background: "var(--color-tint)",
actions: <SomeButton />, // optional, right of the heading
content: <YourStuff />,
},
@ -40,7 +40,6 @@ export type ShellSection = {
title: string;
blurb?: string;
accent: string;
background: string;
actions?: ReactNode;
content: ReactNode;
};
@ -57,7 +56,6 @@ export function Section({ section }: { section: ShellSection }) {
title,
blurb,
accent,
background,
// Optional action bar for this section's heading row, a view
// toggle, a filter, a link. Whatever the section needs; the
// shell just gives it a place to sit.
@ -71,7 +69,7 @@ export function Section({ section }: { section: ShellSection }) {
className="py-20"
// Clear of the fixed header, whatever it holds today (Layout
// sets --header-h from its measured height).
style={{ background, scrollMarginTop: "calc(var(--header-h, 5rem) + 1rem)" }}
style={{ scrollMarginTop: "calc(var(--header-h, 5rem) + 1rem)" }}
>
{/* Heading, left aligned, optional actions on the right */}
<div className="max-w-6xl mx-auto px-6 mb-10">
@ -102,7 +100,7 @@ export default function PageShell({ title, intro, sections }: PageShellProps) {
return (
<>
{/* Page header */}
<div className="pt-24 pb-12 px-6" style={{ background: "var(--color-tint)" }}>
<div className="pt-24 pb-12 px-6">
<div className="max-w-6xl mx-auto">
<h1 className="text-5xl md:text-6xl font-bold" style={{ color: accentText(BRAND) }}>
{title}

View file

@ -91,7 +91,7 @@ export default function PageState({
return (
<PageShell
title={title}
sections={[{ id: 'status', title: '', accent: BRAND, background: 'var(--color-surface)', content }]}
sections={[{ id: 'status', title: '', accent: BRAND, content }]}
/>
)
}