Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file added h1-320.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions quality/route-lock/approved-production.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"src/components/leadership-chapters/storyFinder.ts": "853a83c43e76077cf98f80c8a24ac45751f25cba908701fd0c67d088b8fd6a5c",
"src/components/mindmake/ClientWords.tsx": "a2e21562ed800e2badde85deaf604c386a4ca5f08a661e18e083e2123978ff3f",
"src/components/mindmake/JourneyEnd.tsx": "207473003da45b951d78c2b9ad3c275b7dc98199e344e38b810460e515625a79",
"src/components/mindmake/LeadBrief.tsx": "f3d5544db34b0db06b7202b9cdb4fe860536a35ed138983c7873fe273ad90136",
"src/components/mindmake/LeadBrief.tsx": "ee752a0e254021ed3609f88d89ca2fd72e90017b4bcd1a05d004d0287adea8f5",
"src/components/mindmake/LiquidBrain.tsx": "b52927a3bb68a2404afb81bed89c93dd1ccaa47ebdc1ec629cf6167d3b379bc5",
"src/components/mindmake/MindmakeShell.tsx": "9a9a6210b4da18000b83bdad841e0bf24e0e5449402870e0e654964fcbfe4e19",
"src/components/mindmake/PairingBridge.tsx": "0e258356d98d81c81b5b69117de13e51d09a9adc1c15c21b4f91e1c92d89d426",
Expand Down Expand Up @@ -209,7 +209,7 @@
"src/styles/mindmake.css": "877cca206fa34e709d60a59cbef4863945ebf5f57d54b746d6f80c599bbc281d",
"src/styles/new-age-leadership-r5.css": "3addc3c171b9ae393e3bb1a68f19f7b8f66f5d44783af53157abe2e4b7943c00",
"src/styles/new-age-leadership-r6.layer.css": "cd43609a34f1d6af6d7a28dc7b653731029109f486bd79cb7c4af9eeb0f2f084",
"src/styles/product-pages.css": "e3096674e13b3fff7d83b964d7a19a8fcc38bc9ea86f1643384582b48d22bdcb",
"src/styles/product-pages.css": "2cbe0e4a65a509ca9cf3218e7abf0f22138409dd91d36db4c1ee4df03d0a2b8d",
"src/styles/route-transition.css": "9f5eaa784f5f90ccf2fd1771374a668db3155b97a6ffa6b4394a6367dcad2cd0",
"src/styles/story-examples.css": "5ca1a1706bc765600e58527cd58d6684260b996c52ea92f9e9ae581175b8b460",
"src/test/ai-gtm-page.test.tsx": "de27f9dd6e17a760de1335a4147692a3353f1fd2ca06a83489e3c2290a13770f",
Expand Down
20 changes: 2 additions & 18 deletions src/components/mindmake/LeadBrief.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
} from "@/hooks/useKeyboardSafeViewport";
import opportunitiesFilm from "@/assets/films/sep2026/opportunities-resolve-loop-r01-20s-720p-web-sealed.mp4";
import opportunitiesPoster from "@/assets/films/sep2026/opportunities-resolve-poster.webp";
import { getLastPressed } from "@/lib/lastPressed";
import {
DIVISIONS,
FREE_EMAIL_PROBLEM,
Expand Down Expand Up @@ -409,23 +410,6 @@ export function LeadBrief({ open, onClose, route = "home", presentation = "modal
const firstDivisionRef = useRef<HTMLButtonElement>(null);
const divisionSelectRef = useRef<HTMLSelectElement>(null);
const previousFocus = useRef<HTMLElement | null>(null);
/* Safari does not focus a button when it is clicked, so at the moment the
brief opens document.activeElement is the body. The last control the
reader pressed is remembered here and used instead, so focus can return
to the button that opened the brief in every browser. */
const lastPressed = useRef<HTMLElement | null>(null);
useEffect(() => {
const remember = (event: Event) => {
const control = (event.target as Element | null)?.closest?.<HTMLElement>("button, a[href], [role='button']");
if (control) lastPressed.current = control;
};
document.addEventListener("pointerdown", remember, true);
document.addEventListener("click", remember, true);
return () => {
document.removeEventListener("pointerdown", remember, true);
document.removeEventListener("click", remember, true);
};
}, []);
const researchAbortRef = useRef<AbortController | null>(null);
const handoffAbortRef = useRef<AbortController | null>(null);
const requestIdRef = useRef(createRequestId());
Expand Down Expand Up @@ -529,7 +513,7 @@ export function LeadBrief({ open, onClose, route = "home", presentation = "modal
return;
}
const focused = document.activeElement as HTMLElement | null;
previousFocus.current = focused && focused !== document.body ? focused : (lastPressed.current?.isConnected ? lastPressed.current : focused);
previousFocus.current = focused && focused !== document.body ? focused : (getLastPressed() ?? focused);
document.body.classList.add("mm-dialog-open");
/* On a phone the page behind is locked at the root as well, because the
body alone does not stop it scrolling there. iOS still moves the page to
Expand Down
21 changes: 21 additions & 0 deletions src/lib/lastPressed.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* The last control the reader pressed. Safari does not focus a button when it
* is clicked, so a dialog that opens from a click sees the body as the focused
* element. Recording presses from the moment the page loads (main.tsx imports
* this) lets the brief return focus to the button that opened it in every
* browser, even though the brief itself loads on demand after the click.
*/
let lastPressed: HTMLElement | null = null;

if (typeof document !== "undefined") {
const remember = (event: Event) => {
const control = (event.target as Element | null)?.closest?.<HTMLElement>("button, a[href], [role='button']");
if (control) lastPressed = control;
};
document.addEventListener("pointerdown", remember, true);
document.addEventListener("click", remember, true);
}

export function getLastPressed(): HTMLElement | null {
return lastPressed?.isConnected ? lastPressed : null;
}
1 change: 1 addition & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { StrictMode } from "react";
import { createRoot, hydrateRoot } from "react-dom/client";
import App from "./App.tsx";
import "./index.css";
import "./lib/lastPressed";

const root = document.getElementById("root")!;
const app = (
Expand Down
10 changes: 9 additions & 1 deletion src/styles/product-pages.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
padding: clamp(38px, 7vh, 76px) var(--room-pad);
border-bottom: 1px solid var(--mm-seam);
}
.product-hero { display: grid; align-items: center; min-height: min(78svh, 760px); isolation: isolate; }
.product-hero { display: grid; align-items: center; align-items: safe center; min-height: min(78svh, 760px); isolation: isolate; }
.product-hero > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.product-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--mm-ink) 4%, rgb(8 17 14 / .94) 35%, rgb(8 17 14 / .38)); }
.product-page .product-hero h1, .product-page .product-section > h2, .product-page .brain-inside > div > h2 {
Expand Down Expand Up @@ -117,3 +117,11 @@
@keyframes select-cut { from { margin-left: 95%; } }
@keyframes select-frame { from { width: 85%; } }
.product-actions .product-story-link { padding: 8px 0; min-height: 44px; color: var(--mm-mint); font: 550 16px var(--mm-grotesque); text-decoration: underline; text-underline-offset: .28em; }

/* On the smallest phones the hero's heading is set smaller and the hero starts
below the fixed navigation, so the heading never sits under it
(browser-verification at 320x568). */
@media (max-width: 380px) {
.product-page .product-hero h1 { font-size: clamp(40px, 12vw, 56px); }
.product-page .product-hero { align-items: start; padding-top: calc(64px + 24px); }
}
Loading