Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
b7c842d
Update whats-new.mdx
kurbycchua Sep 26, 2025
ea0ac01
Create WhatsNewPromo.tsx
kurbycchua Sep 26, 2025
adf4568
Update whats-new.mdx
kurbycchua Sep 26, 2025
d3c93f3
Delete pages/guides/components directory
kurbycchua Sep 26, 2025
d476445
Create WhatsNewPromo.tsx
kurbycchua Sep 26, 2025
5a33214
Update WhatsNewPromo.tsx
kurbycchua Sep 26, 2025
bfcbc46
Update WhatsNewPromo.tsx
kurbycchua Sep 26, 2025
d80a26a
Update WhatsNewPromo.tsx
kurbycchua Sep 26, 2025
908d3d9
Update whats-new.mdx
kurbycchua Sep 26, 2025
96ae037
Create whats-new-timeline.mdx
kurbycchua Sep 26, 2025
a7f7b25
Create WhatsNewTimeline.tsx
kurbycchua Sep 26, 2025
92f774e
Update WhatsNewTimeline.tsx
kurbycchua Sep 26, 2025
03835e9
Update WhatsNewPromo.tsx
kurbycchua Sep 26, 2025
9167aab
Update WhatsNewPromo.tsx
kurbycchua Sep 26, 2025
fe19a1f
Update WhatsNewTimeline.tsx
kurbycchua Sep 26, 2025
ed671ba
Create WhatsNewVertical
kurbycchua Sep 27, 2025
f408eab
Create whats-new-compact
kurbycchua Sep 27, 2025
9c60d37
Rename whats-new-compact to whats-new-compact.mdx
kurbycchua Sep 27, 2025
b089a7a
Rename WhatsNewVertical to WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
6f3f7d1
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
53caa62
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
cbf88c4
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
fdcf7a3
Delete components/WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
367e59d
Create WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
d7373e8
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
49baade
Update whats-new-compact.mdx
kurbycchua Sep 27, 2025
18657f1
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
d24a9be
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
254d447
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
abfa3af
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
0d8524b
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
0989741
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
3702932
Delete components/WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
0af32c2
Create WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
2319fc1
Update and rename whats-new.mdx to whats-new-horizontal.mdx
kurbycchua Sep 27, 2025
0939fd5
Rename WhatsNewPromo.tsx to WhatsNewHorizontal.tsx
kurbycchua Sep 27, 2025
640a52f
Rename whats-new-compact.mdx to whats-new.mdx
kurbycchua Sep 27, 2025
37b3cdd
Update WhatsNewVertical.tsx
kurbycchua Sep 27, 2025
25339bb
Update whats-new.mdx
kurbycchua Sep 27, 2025
52905d9
Update whats-new-horizontal.mdx
kurbycchua Sep 27, 2025
f8684e4
Create WhatsNewVerticalV2.tsx
kurbycchua Sep 27, 2025
df76c8f
Update whats-new.mdx
kurbycchua Sep 27, 2025
25e69ee
Update whats-new.mdx
kurbycchua Sep 27, 2025
521c3fd
Update WhatsNewVertical.tsx
kurbycchua Oct 6, 2025
a451eda
Merge branch 'main' into kurbycchua-whats-new
kurbycchua Oct 6, 2025
3ad91ee
Update WhatsNewVertical.tsx
kurbycchua Oct 6, 2025
ef35d91
Merge branch 'main' into kurbycchua-whats-new
kurbycchua Oct 6, 2025
b686959
Update WhatsNewVertical.tsx
kurbycchua Oct 6, 2025
d2a54bd
Update WhatsNewVertical.tsx
kurbycchua Oct 6, 2025
98a105e
Update WhatsNewVertical.tsx
kurbycchua Oct 6, 2025
971d391
Update WhatsNewVertical.tsx
kurbycchua Oct 6, 2025
6cec3ec
Update WhatsNewVerticalV2.tsx
kurbycchua Oct 6, 2025
f61ea21
Update WhatsNewVerticalV2.tsx
kurbycchua Oct 6, 2025
6fcaa9b
Update WhatsNewVerticalV2.tsx
kurbycchua Oct 6, 2025
051c687
Update WhatsNewVerticalV2.tsx
kurbycchua Oct 6, 2025
4b3d9d6
Update WhatsNewVerticalV2.tsx
kurbycchua Oct 6, 2025
099756e
Update WhatsNewVerticalV2.tsx
kurbycchua Oct 6, 2025
3603bd4
Update WhatsNewVerticalV2.tsx
kurbycchua Oct 6, 2025
096b830
Delete pages/guides/whats-new-horizontal.mdx
kurbycchua Oct 6, 2025
2230317
Delete components/WhatsNewHorizontal.tsx
kurbycchua Oct 6, 2025
ec888d4
Delete pages/guides/whats-new-timeline.mdx
kurbycchua Oct 6, 2025
9637e52
Delete components/WhatsNewTimeline.tsx
kurbycchua Oct 6, 2025
5cc97ae
Update _meta.ts
kurbycchua Oct 6, 2025
bb4c84e
Delete components/WhatsNewVertical.tsx
kurbycchua Oct 6, 2025
26788d7
Rename WhatsNewVerticalV2.tsx to WhatsNewVertical.tsx
kurbycchua Oct 6, 2025
0d7771f
Update whats-new.mdx
kurbycchua Oct 6, 2025
a6d3e5a
Merge branch 'main' into kurbycchua-whats-new
kurbycchua Oct 21, 2025
4e2443d
Create self-guided-tours.mdx
kurbycchua Oct 21, 2025
6866961
Update _meta.ts
kurbycchua Oct 21, 2025
97d6f81
Update cspell.json
kurbycchua Oct 21, 2025
11a74e4
Update cspell.json
kurbycchua Oct 21, 2025
aa31764
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
eed5539
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
7a7a270
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
3734014
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
7b9a8c7
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
1bb1889
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
ebd36c0
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
d1d1391
Delete pages/guides/self-guided-tours.mdx
kurbycchua Oct 21, 2025
d74427a
Create self-guided-tours.mdx
kurbycchua Oct 21, 2025
6d8e907
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
8cb7cbd
Delete pages/guides/self-guided-tours.mdx
kurbycchua Oct 21, 2025
edd6431
Update cspell.json
kurbycchua Oct 21, 2025
4d12232
Update _meta.ts
kurbycchua Oct 21, 2025
3bcea28
Create self-guided-tours.mdx
kurbycchua Oct 21, 2025
e42b95c
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
0cb5fd3
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
ec4bec0
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
34108cd
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
6a4b664
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
ded5bae
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
ff602ca
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
8517fa3
Update cspell.json
kurbycchua Oct 21, 2025
345a839
Update _meta.ts
kurbycchua Oct 21, 2025
13bfd72
Update self-guided-tours.mdx
kurbycchua Oct 21, 2025
9888747
Update cspell.json
kurbycchua Oct 21, 2025
19afbc9
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
73ca679
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
35ed0bb
Update next.config.mjs
kurbycchua Oct 22, 2025
87ccbc4
Update next.config.mjs
kurbycchua Oct 22, 2025
062d0bf
Update next.config.mjs
kurbycchua Oct 22, 2025
f9de1ac
Update next.config.mjs
kurbycchua Oct 22, 2025
1ce0000
Update next.config.mjs
kurbycchua Oct 22, 2025
8bb4542
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
23ab6dc
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
5ad2c8d
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
b4d29bc
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
5d42346
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
d6cac44
Update next.config.mjs
kurbycchua Oct 22, 2025
7343c6c
Update next.config.mjs
kurbycchua Oct 22, 2025
e045cff
Update middleware.ts
kurbycchua Oct 22, 2025
45dbc81
Update middleware.ts
kurbycchua Oct 22, 2025
11a1126
Create Launch an Experiment.png
kurbycchua Oct 22, 2025
d368683
Add files via upload
kurbycchua Oct 22, 2025
2709789
Add files via upload
kurbycchua Oct 22, 2025
43abd6e
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
8e6cd8e
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
1fc5ad7
Delete public/navattic/Launch an Experiment.png
kurbycchua Oct 22, 2025
9c1eb82
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
1530d63
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
dddc867
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
3ace349
Add files via upload
kurbycchua Oct 22, 2025
ff7db57
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
865babc
Add files via upload
kurbycchua Oct 22, 2025
81dbf37
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
07845f3
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
1b85f6f
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
2035811
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
08b71a2
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
2b75ea0
Create SelfGuidedTours.tsx
kurbycchua Oct 22, 2025
c34db9a
Update SelfGuidedTours.tsx
kurbycchua Oct 22, 2025
32420e0
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
4362e99
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
35d1e30
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
ae796fe
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
01acbbb
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
9d80e04
Update SelfGuidedTours.tsx
kurbycchua Oct 22, 2025
90fcaa3
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
778900a
Update SelfGuidedTours.tsx
kurbycchua Oct 22, 2025
259686a
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
67a434b
Update SelfGuidedTours.tsx
kurbycchua Oct 22, 2025
1f2e707
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
c6b3add
Update SelfGuidedTours.tsx
kurbycchua Oct 22, 2025
9c17af5
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
d1ae62d
Update SelfGuidedTours.tsx
kurbycchua Oct 22, 2025
421a886
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
9588251
Update SelfGuidedTours.tsx
kurbycchua Oct 22, 2025
7de099f
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
42a19e2
Add files via upload
kurbycchua Oct 22, 2025
e44b1e1
Update SelfGuidedTours.tsx
kurbycchua Oct 22, 2025
d2d0f01
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
7b916a0
Update SelfGuidedTours.tsx
kurbycchua Oct 22, 2025
42daaf9
Update self-guided-tours.mdx
kurbycchua Oct 22, 2025
3bc0fad
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
9794a5b
Delete components/SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
25a6b9a
Create SGTCards.tsx
kurbycchua Oct 23, 2025
c3d1ba7
Delete pages/guides/SGTCards.tsx
kurbycchua Oct 23, 2025
d8c3893
Create SGTCards.tsx
kurbycchua Oct 23, 2025
7f86c39
Update SGTCards.tsx
kurbycchua Oct 23, 2025
7aed398
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
340418b
Delete components/SGTCards.tsx
kurbycchua Oct 23, 2025
8e9a80e
Create SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
bb7c8ad
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
9b01449
Merge branch 'main' into kurbycchua-whats-new
kurbycchua Oct 23, 2025
14b2880
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
a4dc9cf
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
e3a24c9
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
354b24f
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
3b5b8fb
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
3adc6c0
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
4429076
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
1767d08
Update and rename SelfGuidedTours.tsx to SGTours.tsx
kurbycchua Oct 23, 2025
3338989
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
b1cc77a
Update and rename SGTours.tsx to SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
708f6d1
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
69dd60f
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
1b5be53
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
f992b85
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
5e2c020
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
a66bb67
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
d113879
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
3eb08a8
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
10ff995
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
04e6f14
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
710095b
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
cc52e68
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
ccdb8b3
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
ce8c6be
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
8cb8850
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
b468c98
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
fbdb7bb
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
5c0ec8b
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
68175cf
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
ed6f0dd
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
b87e66c
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
378b883
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
bd39083
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
d8a5a90
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
402a55a
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
143a65d
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
32b950d
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
d277e3e
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
f5c6c4c
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
b7c5b52
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
7a0f5b2
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
df00aaa
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
81a892e
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
82d7152
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
64a015e
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
f55253a
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
9ed1ea5
Add files via upload
kurbycchua Oct 23, 2025
7367b86
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
e2f8104
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
61ab817
Add files via upload
kurbycchua Oct 23, 2025
2bc5ad8
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
d5c9eb1
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
403b31d
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
996e440
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
5d87aa8
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
0867607
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
becc9b6
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
0e07f99
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
b4489fc
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
39d908a
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
91994a3
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
f258806
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
a9457e1
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
2ac0d3f
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
b0b2135
Update self-guided-tours.mdx
kurbycchua Oct 23, 2025
5b5dbd8
Update SelfGuidedTours.tsx
kurbycchua Oct 23, 2025
1012953
Update SelfGuidedTours.tsx
kurbycchua Oct 24, 2025
ea14422
Update SelfGuidedTours.tsx
kurbycchua Oct 24, 2025
7e2fbf4
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
3818ded
Update SelfGuidedTours.tsx
kurbycchua Oct 24, 2025
8aa527b
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
58019dc
Update SelfGuidedTours.tsx
kurbycchua Oct 24, 2025
7119c86
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
7614059
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
2fd8d24
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
d74b7fa
Merge branch 'main' into kurbycchua-whats-new
kurbycchua Oct 24, 2025
b6efee1
Update SelfGuidedTours.tsx
kurbycchua Oct 24, 2025
9d61d4e
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
3901412
Update SelfGuidedTours.tsx
kurbycchua Oct 24, 2025
71cc25a
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
0e985b8
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
876fb41
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
7526ac3
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
87f5310
Update SelfGuidedTours.tsx
kurbycchua Oct 24, 2025
1fda9f2
Update self-guided-tours.mdx
kurbycchua Oct 24, 2025
2f413b0
Update self-guided-tours.mdx
kurbycchua Oct 28, 2025
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
309 changes: 309 additions & 0 deletions components/SelfGuidedTours.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,309 @@
'use client';
import React from 'react';
import Image from 'next/image';
import Script from 'next/script';

/**
* Card data shape passed from MDX.
* - navatticOpen: the Navattic demo id (e.g., "cmfkxwfa5000004lc8408f5wi")
* - navatticTitle: optional; title for the Navattic popup chrome
* - img: optional; if omitted, a dark placeholder fills the media area
*/
type Card = {
badge: string;
title: string;
blurb?: string;
img?: string;
href?: string;
navatticOpen?: string;
navatticTitle?: string;
};

interface Props {
cards: Card[];
}

/* ---- Constants / design tokens (keep in sync with MDX usage) ---- */
const MP_PURPLE = 'rgb(139 92 246)';
const BORDER_RADIUS = 14;
const CARD_W = 296;
const CARD_H = 319;
/** Image height is fixed for consistent badge anchoring */
const IMAGE_H = 140;
/** Image width is indented left and bleeds to the right edge */
const IMAGE_W = 276;

/* ---- Inline “CSS-in-TS” styles (layout is pixel-exact to your spec) ---- */
const styles = {
grid: {
display: 'grid',
gap: 20,
gridTemplateColumns: 'repeat(auto-fit, minmax(296px, 1fr))',
justifyContent: 'center',
marginTop: 32,
} as React.CSSProperties,

card: {
position: 'relative',
width: CARD_W,
height: CARD_H,
borderRadius: BORDER_RADIUS,
overflow: 'hidden',
border: `2px solid ${MP_PURPLE}`,
boxShadow: '0 10px 30px rgba(0,0,0,.25)',
transition: 'transform .25s ease, box-shadow .25s ease, background .3s ease, color .3s ease',
} as React.CSSProperties,

dogEar: {
position: 'absolute',
right: 10,
top: 10,
width: 22,
height: 22,
background: 'var(--sgt-dogear)',
clipPath: 'polygon(0 0, 100% 0, 100% 100%)',
boxShadow: '0 0 0 2px rgba(0,0,0,.15) inset',
zIndex: 5,
pointerEvents: 'none',
} as React.CSSProperties,

mediaWrap: {
position: 'absolute',
top: 18, // aligns the image to the badge’s left indent
height: IMAGE_H,
width: IMAGE_W,
marginLeft: 16, // left indent (aligns with badge)
marginRight: -16, // bleed to right edge (no right indent)
borderTopLeftRadius: 8,
borderBottomLeftRadius: 8,
overflow: 'hidden',
background: 'var(--sgt-media-bg)', // placeholder color behind images
zIndex: 1,
} as React.CSSProperties,

mediaImg: {
width: '100%',
height: '100%',
objectFit: 'cover',
objectPosition: 'left top',
display: 'block',
} as React.CSSProperties,

placeholder: {
width: '100%',
height: '100%',
background: 'var(--sgt-media-bg)',
} as React.CSSProperties,

/**
* Anchored text block:
* - Badge top is locked to IMAGE_H + offset so all cards align visually
* - Title and blurb naturally flow below the badge
*/
bottom: {
position: 'absolute' as const,
top: IMAGE_H + 22,
left: 0,
right: 0,
bottom: 0,
padding: '16px 18px 22px',
zIndex: 3,
},

/* Badge = stronger weight + tighter tracking for a pill look */
badge: {
display: 'inline-block',
background: 'var(--sgt-badge-bg)',
color: 'var(--sgt-badge-fg)',
fontWeight: 800,
letterSpacing: '.04em',
fontSize: '11.5px',
lineHeight: 1,
borderRadius: 8,
padding: '8px 10px',
marginBottom: 10,
} as React.CSSProperties,

title: {
fontSize: 23,
fontWeight: 700,
lineHeight: 1.2,
margin: 0,
color: 'var(--sgt-title)',
} as React.CSSProperties,

blurb: {
marginTop: 8,
fontSize: 15,
color: 'var(--sgt-blurb)',
opacity: 0.75,
} as React.CSSProperties,

clickable: {
display: 'block',
width: '100%',
height: '100%',
background: 'transparent',
border: 0,
padding: 0,
cursor: 'pointer',
textAlign: 'inherit',
} as React.CSSProperties,
};

/* ---- One card view (supports Navattic popup or plain link) ---- */
function CardView({ c }: { c: Card }) {
const inside = (
<>
<div style={styles.dogEar} aria-hidden />
<div style={styles.mediaWrap}>
{c.img ? (
<Image src={c.img} alt="" fill style={styles.mediaImg} priority={false} />
) : (
<div style={styles.placeholder} />
)}
</div>

<div style={styles.bottom}>
<div style={styles.badge}>{c.badge}</div>
<h3 style={styles.title}>{c.title}</h3>
{c.blurb ? <div style={styles.blurb}>{c.blurb}</div> : null}
</div>
</>
);

// Use Navattic popup if navatticOpen is provided
if (c.navatticOpen) {
const navatticUrl = c.navatticOpen.startsWith('http')
? c.navatticOpen
: `https://capture.navattic.com/${c.navatticOpen}`;

return (
<div style={styles.card} className="sgt-card">
<button
type="button"
style={styles.clickable}
className="sgt-click"
data-navattic-open={navatticUrl}
data-navattic-title={c.navatticTitle || c.title}
>
{inside}
</button>
</div>
);
}

// Fallback to href links if needed
if (c.href) {
return (
<div style={styles.card} className="sgt-card">
<a href={c.href} style={styles.clickable} className="sgt-click">
{inside}
</a>
</div>
);
}

// Static (non-clickable) card
return (
<div style={styles.card} className="sgt-card">
{inside}
</div>
);
}

/**
* SelfGuidedTours
* - Renders a responsive grid of product-tour cards
* - Loads Navattic's embed script once (popup mode)
* - Exposes a simple props API so MDX controls the content
*/
export default function SelfGuidedTours({ cards }: Props) {
return (
<>
{/* Navattic embed loader (newer API) */}
<Script src="https://js.navattic.com/embeds.js" strategy="afterInteractive" />

{/* Grid */}
<div style={styles.grid}>
{cards.map((c, i) => (
<CardView key={i} c={c} />
))}
</div>

{/* Theme variables + interactions */}
<style jsx global>{`
/* ---- Dark defaults ---- */
:root {
--sgt-card-bg: #0a0a0b;
--sgt-title: #ffffff;
--sgt-blurb: rgba(255, 255, 255, 0.85);
--sgt-border: ${MP_PURPLE};
--sgt-media-bg: #111111;
--sgt-dogear: ${MP_PURPLE};
--sgt-badge-bg: ${MP_PURPLE};
--sgt-badge-fg: #ffffff;
}

/* ---- Prefer light scheme (also covered below by class/attr) ---- */
@media (prefers-color-scheme: light) {
:root,
html.light,
html[class*='light'],
[data-theme='light'] {
--sgt-card-bg: #ffffff;
--sgt-title: #111111;
--sgt-blurb: #333333;
--sgt-border: ${MP_PURPLE};
--sgt-media-bg: #e9e9ef;
--sgt-dogear: ${MP_PURPLE};
--sgt-badge-bg: ${MP_PURPLE};
--sgt-badge-fg: #ffffff;
}
}

/* ---- Explicit site light mode (Mixpanel Docs sets html.light) ---- */
html.light,
html[class*='light'],
[data-theme='light'] {
--sgt-card-bg: #ffffff;
--sgt-title: #111111;
--sgt-blurb: #333333;
--sgt-border: ${MP_PURPLE};
--sgt-media-bg: #e9e9ef;
--sgt-dogear: ${MP_PURPLE};
--sgt-badge-bg: ${MP_PURPLE};
--sgt-badge-fg: #ffffff;
}

/* ---- Card base colors ---- */
.sgt-card {
background: var(--sgt-card-bg);
color: var(--sgt-title);
border-color: var(--sgt-border);
}

/* ---- Micro-interactions ---- */
.sgt-card:hover {
transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
}
.sgt-card:focus-within {
outline: 2px solid ${MP_PURPLE};
outline-offset: 2px;
}
.sgt-click:focus-visible {
outline: 2px solid ${MP_PURPLE};
outline-offset: 3px;
border-radius: 10px;
}

/* ---- Responsive type bump on very wide screens ---- */
@media (min-width: 1280px) {
.sgt-card h3 { font-size: 24px; }
.sgt-card p { font-size: 15px; }
}
`}</style>
</>
);
}
Loading