-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathskill.html
More file actions
5068 lines (4859 loc) · 205 KB
/
Copy pathskill.html
File metadata and controls
5068 lines (4859 loc) · 205 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="color-scheme" content="light dark" />
<title>Transitions.dev Skill — Teach your AI about product motion</title>
<meta
name="description"
content="Transitions.dev Skill teaches your AI about product motion. Includes all the transitions from the main page. Works with Claude Code, Cursor, GitHub Copilot, Codex, and Gemini CLI."
/>
<meta
name="keywords"
content="AI skill, transitions, CSS transitions, web animations, Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, motion design, frontend, AI coding agent"
/>
<meta name="author" content="Transitions.dev" />
<meta name="robots" content="index, follow, max-image-preview:large" />
<meta name="googlebot" content="index, follow" />
<meta name="referrer" content="strict-origin-when-cross-origin" />
<meta name="format-detection" content="telephone=no" />
<meta name="theme-color" content="#fdfdfd" media="(prefers-color-scheme: light)" />
<meta name="theme-color" content="#070707" media="(prefers-color-scheme: dark)" />
<meta name="apple-mobile-web-app-title" content="Transitions.dev" />
<meta name="application-name" content="Transitions.dev" />
<link rel="canonical" href="https://transitions.dev/skill.html" />
<link rel="alternate" hreflang="en" href="https://transitions.dev/skill.html" />
<link rel="alternate" hreflang="x-default" href="https://transitions.dev/skill.html" />
<link rel="icon" href="assets/favicon-light-mode.png?v=4" type="image/png" sizes="any" />
<link rel="icon" href="assets/favicon-light-mode.png?v=4" media="(prefers-color-scheme: light)" type="image/png" />
<link rel="icon" href="assets/favicon-darkmode.png?v=4" media="(prefers-color-scheme: dark)" type="image/png" />
<link rel="apple-touch-icon" href="assets/favicon-light-mode.png?v=4" />
<link rel="manifest" href="site.webmanifest" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Transitions.dev" />
<meta property="og:url" content="https://transitions.dev/skill.html" />
<meta property="og:locale" content="en_US" />
<meta property="og:title" content="Transitions.dev Skill — Teach your AI about product motion" />
<meta property="og:description" content="Transitions.dev Skill teaches your AI about product motion. Works with Claude Code, Cursor, GitHub Copilot, Codex, and Gemini CLI." />
<meta property="og:image" content="https://transitions.dev/assets/og-main.jpg" />
<meta property="og:image:secure_url" content="https://transitions.dev/assets/og-main.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="Transitions.dev Skill — Teach your AI about product motion" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Transitions.dev Skill — Teach your AI about product motion" />
<meta name="twitter:description" content="Transitions.dev Skill teaches your AI about product motion. Works with Claude Code, Cursor, GitHub Copilot, Codex, and Gemini CLI." />
<meta name="twitter:image" content="https://transitions.dev/assets/og-main.jpg" />
<meta name="twitter:image:alt" content="Transitions.dev Skill — Teach your AI about product motion" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="preload"
as="style"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Roboto+Mono:wght@400;500&display=swap"
/>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Roboto+Mono:wght@400;500&display=swap"
rel="stylesheet"
/>
<!-- Preload the Saans display face (hero title) so it's fetched before
first paint — paired with font-display: optional this removes the
fallback→Saans flash/reflow. -->
<link
rel="preload"
as="font"
type="font/woff2"
href="assets/fonts/Saans-Medium.woff2"
crossorigin
/>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://transitions.dev/#website",
"url": "https://transitions.dev/",
"name": "Transitions.dev",
"description": "Collection of the most essential transitions for web apps that you can just copy and paste into any project.",
"inLanguage": "en"
},
{
"@type": "WebPage",
"@id": "https://transitions.dev/skill.html#webpage",
"url": "https://transitions.dev/skill.html",
"name": "Transitions.dev Skill — Teach your AI about product motion",
"isPartOf": { "@id": "https://transitions.dev/#website" },
"inLanguage": "en",
"primaryImageOfPage": {
"@type": "ImageObject",
"url": "https://transitions.dev/assets/og-main.jpg",
"width": 1200,
"height": 630
}
}
]
}
</script>
<script>
// Apply theme before first paint to avoid FOUC: a manually chosen theme,
// persisted to localStorage by the toggle (see end of <body>), wins over
// system preference so it carries across reloads and other pages.
(function () {
try {
var stored = localStorage.getItem("tdev:theme");
var dark = stored
? stored === "dark"
: (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches);
if (dark) document.documentElement.setAttribute("data-theme", "dark");
} catch (e) {}
})();
</script>
<style>
/* Saans - used for the hero eyebrow + title (Medium / 500). */
@font-face {
font-family: "Saans";
src: url("assets/fonts/Saans-Medium.woff2") format("woff2"),
url("assets/fonts/Saans-Medium.woff") format("woff");
font-weight: 500;
font-style: normal;
/* optional (not swap): the browser waits a brief block period for the
preloaded font, then renders Saans with no late swap. */
font-display: optional;
}
/* ============================================================ */
/* Design tokens — light (default) and dark */
/* ============================================================ */
:root {
color-scheme: light;
--bg: #fdfdfd;
--text: #0d0d0d;
--text-muted: #6c6c6c;
--text-subtle: #767676;
--text-faint: #8f8f8f;
--text-footer-name: #4a4a4a;
--card-bg: #ffffff;
--card-border: rgba(0, 0, 0, 0.06);
--card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
/* Horizontal inset for card title block + copy control */
--card-pad-x: 20px;
/* Opaque equivalent of rgba(194, 194, 194, 0.1) over #ffffff
(≈ #f9f9f9). Kept opaque on purpose so the stage doesn't pick
up the card's hover tint through a translucent fill. */
--stage-bg: #f9f9f9;
--stage-border: rgba(0, 0, 0, 0.04);
--chip-bg: #f4f4f4;
--chip-bg-hover: #f1f1f1;
--chip-bg-pressed: #eae9e9;
--animate-bg: rgba(243, 243, 243, 0.9);
--animate-bg-tint: #bfc0cb;
--animate-bg-hover: #eae9e9;
--animate-text: #17181c;
--copy-bg: rgba(255, 255, 255, 0.9);
--copy-bg-tint: #bfc0cb;
--copy-bg-hover: #f1f1f1;
--copy-bg-pressed: #eae9e9;
--surface-bg: #ffffff;
--skeleton: #eeeeef;
--muted: #5e6073;
/* Inner "material" surface (Figma: node 221:2895)
used by dropdowns, panels, and resize cards inside demo cards */
--material-bg: #ffffff;
--material-shadow:
0 4px 42px 0 rgba(0, 0, 0, 0.06),
0 2px 6px 0 rgba(0, 0, 0, 0.05),
0 0 0 1px rgba(0, 0, 0, 0.06);
--icon-color: #0d0d0d;
--icon-color-muted: rgba(13, 13, 13, 0.6);
--label-mono: #5e6073;
--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
Roboto, Helvetica, Arial, sans-serif;
--font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
Consolas, monospace;
/* ========================================================== */
/* Prototype transition knobs (copied per prototype) */
/* ========================================================== */
/* P1 — Notification badge */
--p1-pos-open-dur: 260ms;
--p1-scale-open-dur: 500ms;
--p1-scale-close-dur: 180ms;
--p1-opacity-open-dur: 400ms;
--p1-opacity-close-dur: 180ms;
--p1-blur: 2px;
--p1-distance-x: -8.2px;
--p1-distance-y: 12.4px;
--p1-bounce: 1.36;
--p1-ease-pos-open: cubic-bezier(0.22, 1, 0.36, 1);
--p1-ease-scale-open: cubic-bezier(0.34, 1.36, 0.64, 1);
--p1-ease-close: cubic-bezier(0.4, 0, 0.2, 1);
/* P2 — Menu dropdown */
--p2-open-dur: 250ms;
--p2-close-dur: 150ms;
--p2-pre-scale: 0.97;
--p2-closing-scale: 0.99;
/* Origin-aware: anchor the scale where the trigger sits so the
menu visually "grows" from the trigger (top center = button
sits directly above the menu). */
--p2-origin: top center;
--p2-ease: cubic-bezier(0.22, 1, 0.36, 1);
/* P3 — Panel reveal */
--p3-open-dur: 400ms;
--p3-close-dur: 350ms;
--p3-panel-height: 187px;
/* Movement trajectory = 50% of the panel height. The panel
also fades opacity 0 ↔ 1 AND cross-blurs 2px ↔ 0 over the
same timing, so the shortened travel still reads as a full
open / close. */
--p3-translate-y: calc(var(--p3-panel-height) * 0.5);
--p3-blur: 2px;
/* Gutter inside clip so box-shadow isn’t cropped.
Top needs enough room for the 42px-blur shadow (blur 42 − offset 4 ≈ 38px reach);
sides/bottom stay slim so the stack still fits the 260px stage. */
/* Clip fills the full 260px stage (top:0, bottom:0) so no bare stage
strip shows below the panel when it's open. Top pad still sized so
resting panel is pushed below the button and the 38px top-reach drop
shadow has room above the panel. */
--p3-clip-pad-top: 54px;
--p3-clip-pad: 14px;
/* Vertical offset when panel is open. Positive = lift the panel
higher in the stage; negative = push it lower. */
--p3-open-lift: -28px;
--p3-ease: cubic-bezier(0.22, 1, 0.36, 1);
/* Figma 213:1375 — Light Mode / Shadow 25.
Left/right/bottom of the panel are flush with the stage, where
`.card-stage::after` already draws a ring — so we only draw
the top edge here, plus the drop shadows. The top hairline is
drawn as an *outer* shadow (0 -1px) instead of an inset one so
it sits on the stage background (for contrast with other
material surfaces like the dropdown / modal rings) rather
than over the panel's own white fill where it would be barely
visible. */
--p3-shadow:
0 -1px 0 0 rgba(0, 0, 0, 0.06),
0 2px 6px 0 rgba(0, 0, 0, 0.05),
0 4px 42px 0 rgba(0, 0, 0, 0.06);
/* P4 — Card resize */
--p4-dur: 300ms;
--p4-ease: cubic-bezier(0.22, 1, 0.36, 1);
/* P5 — Hamburger ↔ Close */
--p5-dur: 200ms;
--p5-blur: 2px;
--p5-start-scale: 0.25;
--p5-ease: ease-in-out;
/* P6 — Text enter/exit */
--p6-dur: 150ms;
--p6-enter-delay: 0ms;
--p6-translate-y: 4px;
--p6-blur: 2px;
--p6-ease: ease-in-out;
/* P7 — Modal open/close */
--p7-open-dur: 250ms;
--p7-close-dur: 150ms;
--p7-scale: 0.96;
--p7-scale-close: 0.96;
--p7-ease: cubic-bezier(0.22, 1, 0.36, 1);
/* Detail-modal motion tokens. Defaults to the P7 modal timing
so desktop is unchanged. Mobile overrides these to the P3
"Panel reveal" timing inside its own @media block, which lets
the JS close-timer pick the right wait via getComputedStyle. */
--proto-modal-open-dur: var(--p7-open-dur);
--proto-modal-close-dur: var(--p7-close-dur);
--proto-modal-ease: var(--p7-ease);
/* P8 — Page slide */
--p8-slide-dur: 200ms;
--p8-fade-dur: 200ms;
--p8-distance: 8px;
--p8-blur: 3px;
--p8-stagger: 0ms;
--p8-exit-enabled: 1;
--p8-slide-ease: cubic-bezier(0.22, 1, 0.36, 1);
--p8-fade-ease: cubic-bezier(0.22, 1, 0.36, 1);
/* P9 — Number pop-in */
--p9-dur: 500ms;
--p9-distance: 8px;
--p9-stagger: 70ms;
--p9-blur: 2px;
--p9-bounce: 1.45;
--p9-ease: cubic-bezier(0.34, 1.45, 0.64, 1);
--p9-dir-x: 0;
--p9-dir-y: 1;
/* P10 — Success check (appear / disappear).
Entry composes 5 sub-transitions in parallel (fade, rotate,
blur, Y-bob, stroke-draw). Exit deliberately uses only 3
(fade, blur, stroke-undraw) so the disappearance reads as a
soft fade-away rather than a full reverse of the entrance. */
--p10-opacity-dur: 550ms;
--p10-rotate-dur: 550ms;
--p10-rotate-from: 80deg;
--p10-bob-dur: 450ms;
--p10-y-amount: 40px;
--p10-blur-dur: 500ms;
--p10-blur-from: 10px;
/* Exit uses its own (softer) blur amount so the disappearance
reads as a gentle fade rather than a full reverse of entry. */
--p10-blur-out-from: 4px;
--p10-path-dur: 550ms;
--p10-path-delay: 80ms;
--p10-out-dur: 500ms;
--p10-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
--p10-ease-opacity: cubic-bezier(0.22, 1, 0.36, 1);
--p10-ease-rotate: cubic-bezier(0.22, 1, 0.36, 1);
--p10-ease-bob: cubic-bezier(0.34, 1.35, 0.64, 1);
--p10-ease-path: cubic-bezier(0.22, 1, 0.36, 1);
/* P11 — Avatar group hover spring.
Each neighbor at distance d from the hovered avatar lifts by
--p11-lift * pow(--p11-falloff, d). Lift uses --p11-ease-in
(clean) and the return uses --p11-ease-out (bouncy spring). */
--p11-lift: -4px;
--p11-dur: 320ms;
--p11-ease-in: cubic-bezier(0.22, 1, 0.36, 1);
--p11-ease-out: cubic-bezier(0.34, 3.85, 0.64, 1);
--p11-scale: 1.05;
--p11-falloff: 0.45;
/* P12 — Input shake on error.
Four-phase translateX with a per-segment cubic-bezier per
keyframe stop (80 + 80 + 60 + 60 = 280ms total). After the
shake we hold --p12-revert-hold then fade border + message
back to neutral over --p12-revert-dur. */
--p12-shake-distance: 6px;
--p12-shake-overshoot: 4px;
--p12-shake-dur-a: 80ms;
--p12-shake-dur-b: 60ms;
--p12-shake-ease: cubic-bezier(0.22, 1, 0.36, 1);
--p12-error-border: #e23014;
--p12-error-text: #d62b11;
--p12-revert-hold: 3000ms;
--p12-revert-dur: 280ms;
}
html[data-theme="dark"] {
color-scheme: dark;
--bg: #121212;
--text: #ffffff;
--text-muted: rgba(202, 202, 202, 0.7);
--text-subtle: #767676;
--text-faint: #8f8f8f;
--text-footer-name: #e9e9e9;
--card-bg: #181818;
--card-border: rgba(0, 0, 0, 0.06);
--card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
--stage-bg: #131313;
--stage-border: rgba(255, 255, 255, 0.02);
--chip-bg: rgba(255, 255, 255, 0.07);
--chip-bg-hover: rgba(255, 255, 255, 0.1);
--chip-bg-pressed: rgba(255, 255, 255, 0.08);
/* Animate button — Figma icons 232:3561 (dark states).
Translucent white overlays on the card surface:
default 4%, hover 6%, clicked 8%, disabled 4% + 50% text. */
--animate-bg: rgba(255, 255, 255, 0.04);
--animate-bg-tint: transparent;
--animate-bg-hover: rgba(255, 255, 255, 0.06);
--animate-bg-pressed: rgba(255, 255, 255, 0.08);
--animate-text: #e3e3e3;
--animate-text-disabled: rgba(227, 227, 227, 0.5);
--copy-bg: rgba(255, 255, 255, 0.08);
--copy-bg-tint: transparent;
--copy-bg-hover: rgba(255, 255, 255, 0.10);
--copy-bg-pressed: rgba(255, 255, 255, 0.10);
--surface-bg: #181818;
--skeleton: rgba(238, 238, 239, 0.1);
--muted: #767676;
--material-bg: #181818;
--material-shadow:
0 1px 3px 0 rgba(0, 0, 0, 0.04),
inset 0 1px 0 0 rgba(255, 255, 255, 0.04),
inset 0 0 0 1px rgba(0, 0, 0, 0.06),
inset 0 -1px 0 0 rgba(0, 0, 0, 0.06),
inset 0 0 0 1px rgba(196, 196, 196, 0.08);
--icon-color: #ededed;
--icon-color-muted: rgba(237, 237, 237, 0.6);
--label-mono: #5e6073;
}
* { box-sizing: border-box; }
*,
*::before,
*::after {
margin: 0;
padding: 0;
}
html, body {
min-height: 100dvh;
}
body {
background: var(--bg);
color: var(--text);
font-family: var(--font-sans);
transition: background-color 0.2s ease, color 0.2s ease;
}
/* ─── Cross-browser text anti-aliasing ───────────────────── */
html {
-webkit-font-smoothing: antialiased; /* Safari, Chrome (macOS/iOS) */
-moz-osx-font-smoothing: grayscale; /* Firefox (macOS) */
font-smooth: always; /* legacy non-standard */
text-rendering: optimizeLegibility; /* Firefox, Safari, Chrome */
-webkit-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
text-size-adjust: 100%;
}
/* ─── Skip link ───────────────────────────────────────────── */
.skip-link {
position: absolute;
top: -100%;
left: 16px;
z-index: 200;
padding: 12px 20px;
border-radius: 8px;
background: var(--text);
color: var(--bg);
font-size: 14px;
font-weight: 500;
text-decoration: none;
}
.skip-link:focus { top: 16px; }
/* ─── Main container ──────────────────────────────────────── */
.app {
position: relative;
max-width: 1240px;
margin: 0 auto;
width: 100%;
padding: 0 24px 64px;
display: flex;
flex-direction: column;
align-items: center;
}
/* ─── Top bar (absolute action buttons) ──────────────────── */
.top-bar {
position: absolute;
top: 16px;
right: 24px;
display: flex;
align-items: center;
gap: 8px;
z-index: 10;
}
.icon-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border: 0;
border-radius: 50px;
background: var(--chip-bg);
color: var(--icon-color);
cursor: pointer;
text-decoration: none;
padding: 0;
transition: background-color 0.15s ease, color 0.15s ease;
-webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--chip-bg-hover); }
.icon-btn:active { background: var(--chip-bg-pressed); }
.icon-btn:focus-visible {
outline: 2px solid var(--icon-color);
outline-offset: 2px;
}
.icon-btn svg {
width: 16px;
height: 16px;
display: block;
fill: currentColor;
color: var(--icon-color-muted);
transition: color 0.15s ease;
}
.icon-btn svg.icon-x {
width: 16px;
height: 17px;
}
.icon-btn:hover svg { color: var(--icon-color); }
/* Mirrors the P5 "Icon swap" prototype architecture: both icons
live permanently in the DOM stacked on top of each other, and
the swap is driven by toggling a single `data-active` attribute
on the wrapper. This way both icons start their transitions in
the same frame — no per-click image decode, no asymmetric
enter/exit pacing. The `--p5-*` tokens are reused directly so
any future tweak to the prototype carries over automatically. */
.theme-icon-stack {
position: relative;
display: inline-flex;
width: 16px;
height: 16px;
}
.theme-icon {
position: absolute;
inset: 0;
width: 16px;
height: 16px;
display: block;
transform-origin: center;
pointer-events: none;
user-select: none;
transition:
opacity var(--p5-dur) var(--p5-ease),
filter var(--p5-dur) var(--p5-ease),
transform var(--p5-dur) var(--p5-ease);
/* Default = inactive (hidden) state, matches P5 morph-out. */
opacity: 0;
transform: scale(var(--p5-start-scale));
}
.theme-icon-moon { filter: blur(var(--p5-blur)); }
/* Sun is filtered to white in both states; only the blur amount
changes, so the inversion can't briefly reveal native colors. */
.theme-icon-sun { filter: brightness(0) invert(1) blur(var(--p5-blur)); }
/* Active icon = visible at rest. */
.theme-icon-stack[data-active="moon"] .theme-icon-moon,
.theme-icon-stack[data-active="sun"] .theme-icon-sun {
opacity: 0.6;
transform: scale(1);
}
.theme-icon-stack[data-active="moon"] .theme-icon-moon { filter: blur(0); }
.theme-icon-stack[data-active="sun"] .theme-icon-sun { filter: brightness(0) invert(1); }
.theme-toggle:hover .theme-icon-stack[data-active="moon"] .theme-icon-moon,
.theme-toggle:hover .theme-icon-stack[data-active="sun"] .theme-icon-sun {
opacity: 1;
}
/* Suppresses the entry animation on first paint so the resting
icon doesn't appear to "fly in" when the page loads. */
.theme-icon-stack.no-anim .theme-icon { transition: none; }
/* ─── Site nav (shared bar: logo + menu + actions) ─────────── */
/* Mirrors the /index.html + /refine.html top bar. Lives as the first
child of .app so the brand lines up with the page content column. */
.site-nav {
position: relative;
z-index: 50;
width: 100%;
}
.site-nav-inner {
max-width: 1240px;
margin: 0 auto;
position: relative;
z-index: 3;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 16px 0;
}
.site-nav-left {
display: flex;
align-items: center;
gap: 34px;
min-width: 0;
}
.site-nav-right {
display: flex;
align-items: center;
gap: 8px;
}
.brand {
display: inline-flex;
align-items: center;
gap: 4px;
height: 35px;
padding: 5px 0;
text-decoration: none;
color: var(--text);
flex-shrink: 0;
}
.brand-mark {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
color: var(--icon-color);
}
/* Natural 18×20.295 ratio centered in the 24px box (Figma vector
inset 7.72%/12.5%), not stretched edge-to-edge. */
.brand-mark svg { width: 18px; height: 20.295px; display: block; }
.brand-word {
font-size: 15px;
font-weight: 500;
line-height: 1;
letter-spacing: -0.01em;
white-space: nowrap;
}
.brand-word-dim { color: var(--text-muted); }
/* Tertiary text pills — quiet by default, soft tint when active. */
.site-nav-menu {
display: flex;
align-items: center;
gap: 8px;
}
.nav-pill {
display: inline-flex;
align-items: center;
justify-content: center;
height: 36px;
padding: 0 13px;
border-radius: 50px;
font-family: var(--font-sans);
font-size: 13px;
font-weight: 500;
line-height: 16px;
color: var(--text-muted);
text-decoration: none;
white-space: nowrap;
transition: background-color 0.15s ease, color 0.15s ease;
-webkit-tap-highlight-color: transparent;
}
.nav-pill:hover { color: var(--text); background: rgba(0, 0, 0, 0.03); }
html[data-theme="dark"] .nav-pill:hover { background: rgba(255, 255, 255, 0.06); }
.nav-pill--active {
color: var(--text);
background: rgba(0, 0, 0, 0.03);
}
html[data-theme="dark"] .nav-pill--active { background: rgba(255, 255, 255, 0.06); }
.nav-pill:focus-visible {
outline: 2px solid var(--icon-color);
outline-offset: 2px;
}
/* ─── Mobile hamburger (logram-style two-line → ✕ morph) ────── */
/* Hidden on desktop; the media query below flips it to inline-flex
and hides the .site-nav-menu pills. */
.nav-burger { display: none; }
.nav-burger-box {
position: relative;
width: 16px;
height: 16px;
display: block;
color: var(--icon-color-muted);
transition: color 0.15s ease;
}
.nav-burger:hover .nav-burger-box { color: var(--icon-color); }
.nav-burger-line {
position: absolute;
left: 1px;
right: 1px;
height: 1.5px;
border-radius: 2px;
background: currentColor;
transform-origin: center;
/* Slide to centre (top), then rotate into the ✕. Calm ease-out. */
transition:
top 0.3s cubic-bezier(0.22, 1, 0.36, 1),
transform 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.05s;
}
.nav-burger-line--top { top: 5px; }
.nav-burger-line--bottom { top: 9.5px; }
.nav-burger[aria-expanded="true"] .nav-burger-line {
/* Centre line of a 16px box with a 1.5px bar = (16 − 1.5)/2. */
top: 7.25px;
/* Rotate fires first on open so the lines cross as they meet. */
transition:
top 0.3s cubic-bezier(0.22, 1, 0.36, 1),
transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-burger[aria-expanded="true"] .nav-burger-line--top { transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] .nav-burger-line--bottom { transform: rotate(-45deg); }
/* ─── Mobile menu overlay + blurred backdrop ───────────────── */
/* Backdrop: white @ 90% with a 20px blur (per design). Sits below
the menu list but above page content; the top bar stays clickable
on top of it (.site-nav-inner z-index). */
.mobile-menu-backdrop {
position: fixed;
inset: 0;
z-index: 1;
background: rgba(255, 255, 255, 0.9);
-webkit-backdrop-filter: blur(20px);
backdrop-filter: blur(20px);
opacity: 0;
visibility: hidden;
transition:
opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear 0.35s;
}
html[data-theme="dark"] .mobile-menu-backdrop {
background: rgba(18, 18, 18, 0.9);
}
body.menu-open .mobile-menu-backdrop {
opacity: 1;
visibility: visible;
transition:
opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s;
}
body.menu-closing .mobile-menu-backdrop {
opacity: 0;
visibility: visible;
transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu {
position: fixed;
inset: 0;
z-index: 2;
display: flex;
flex-direction: column;
padding: 88px 30px calc(40px + env(safe-area-inset-bottom, 0px));
visibility: hidden;
pointer-events: none;
transition: visibility 0s linear 0.4s;
}
body.menu-open .mobile-menu,
body.menu-closing .mobile-menu {
visibility: visible;
transition: visibility 0s;
}
body.menu-open .mobile-menu { pointer-events: auto; }
.mobile-menu-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 24px;
}
.mobile-menu-link {
display: inline-block;
font-family: var(--font-sans);
font-size: 20px;
font-weight: 500;
line-height: 1.2;
letter-spacing: -0.01em;
color: var(--text);
text-decoration: none;
-webkit-tap-highlight-color: transparent;
/* Closed = pre-entrance (down + blurred + invisible). Opening
flips to resting; the stagger lands the eye top-to-bottom. */
opacity: 0;
transform: translateY(12px);
filter: blur(3px);
transition:
opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
filter 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu-link--2 { transition-delay: 40ms; }
.mobile-menu-link--3 { transition-delay: 80ms; }
.mobile-menu-link--4 { transition-delay: 120ms; }
.mobile-menu-link--pro { color: #0053e3; }
html[data-theme="dark"] .mobile-menu-link--pro { color: #7cd4ff; }
body.menu-open .mobile-menu-link {
opacity: 1;
transform: translateY(0);
filter: blur(0);
}
/* Exit decouples from the stagger: one quiet 200ms fade in place,
no Y-return / blur, so closing doesn't replay the reveal. */
body.menu-closing .mobile-menu-link {
opacity: 0;
transform: translateY(0);
filter: blur(0);
transition:
opacity 0.2s ease,
transform 0s linear,
filter 0s linear;
transition-delay: 0s;
}
/* Sign in — full-width pill pinned to the bottom (Figma 2332:82680). */
.mobile-menu-cta {
margin-top: auto;
width: 100%;
height: 44px;
display: flex;
align-items: center;
justify-content: center;
border: 0;
border-radius: 26px;
background: #f5f5f5;
color: #17181c;
font-family: var(--font-sans);
font-size: 16px;
font-weight: 500;
line-height: 1;
text-decoration: none;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
opacity: 0;
transform: translateY(12px);
filter: blur(3px);
transition: background 0.15s ease;
}
.mobile-menu-cta:hover { background: #ededed; }
html[data-theme="dark"] .mobile-menu-cta { background: rgba(255, 255, 255, 0.06); color: #fbfbfb; }
html[data-theme="dark"] .mobile-menu-cta:hover { background: rgba(255, 255, 255, 0.1); }
body.menu-open .mobile-menu-cta {
opacity: 1;
transform: translateY(0);
filter: blur(0);
transition:
opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) 160ms,
transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 160ms,
filter 0.5s cubic-bezier(0.22, 1, 0.36, 1) 160ms,
background 0.15s ease;
}
body.menu-closing .mobile-menu-cta {
opacity: 0;
transform: translateY(0);
filter: blur(0);
transition: opacity 0.2s ease;
}
/* When the menu is open, Get Pro lives in the list — drop the
duplicate pill from the top bar (Figma menu-open state). */
body.menu-open .nav-get-pro { display: none; }
body.menu-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
.nav-burger-line,
.mobile-menu-backdrop,
.mobile-menu,
.mobile-menu-link,
.mobile-menu-cta {
transition: none !important;
}
}
/* ─── Header (Figma demo page + border-beam vertical rhythm) ─ */
.header {
position: relative;
width: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 48px;
padding-bottom: 53px;
text-align: center;
}
.header-icon-wrap {
position: relative;
width: 136px;
height: 140px;
margin-top: -43px;
margin-bottom: -27px;
overflow: visible;
}
.header-icon-img {
position: absolute;
left: 0;
top: 0;
width: 136px;
height: 140px;
display: block;
user-select: none;
transform-origin: center;
transition:
filter 0.5s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Hover pose is gated to pointer-capable devices so iOS Safari's
sticky-hover doesn't pin the icon into the hover state after a
tap (which would leave it permanently rotated/saturated until
the user taps elsewhere). On touch devices `.is-tapped` is the
only trigger and is added/removed by JS — the existing 500ms
transition on `.header-icon-img` interpolates both directions. */
@media (hover: hover) {
.header-icon-wrap:hover .header-icon-img {
filter: hue-rotate(60deg) saturate(1.6);
transform: rotate(8deg) scale(1.06);
}
}
.header-icon-wrap.is-tapped .header-icon-img {
filter: hue-rotate(60deg) saturate(1.6);
transform: rotate(8deg) scale(1.06);
}
html[data-theme="dark"] .header-icon-img--light,
html:not([data-theme="dark"]) .header-icon-img--dark {
display: none;
}
html:not([data-theme="dark"]) .header-icon-img--light,
html[data-theme="dark"] .header-icon-img--dark {
display: block;
}
/* Hero Saans display title — mirrors /refine.html. */
.title {
margin-top: 9px;
font-family: "Saans", var(--font-sans);
font-size: 36px;
font-weight: 500;
line-height: 34px;
color: var(--text);
letter-spacing: -0.01em;
}
.subtitle {
margin-top: 16px;
max-width: 560px;
font-size: 16px;
font-weight: 400;
line-height: 24.2px;
color: var(--text-muted);
}
/* ─── Cards grid ──────────────────────────────────────────── */
.cards {
width: 100%;
display: grid;
grid-template-columns: repeat(3, 320px);
justify-content: center;
gap: 24px;
align-items: start;
}
/* ─── Card ────────────────────────────────────────────────── */
.card {
position: relative;
width: 320px;
height: 344px;
min-height: 344px;
max-height: 344px;
/* overflow stays `visible` so the copy tooltip can extend
slightly past the card's rounded corners when the label
swaps to its wider "Copied" state. The stage clips its
own content via `.card-stage { overflow: hidden }`. */
border-radius: 24px;
background-color: var(--card-bg);
box-shadow:
var(--card-shadow),
inset 0 0 0 1px var(--card-border),
inset 0 -1px 0 0 var(--card-border);
transition: box-shadow 0.15s ease, background-color 0.2s ease;
}
.card:hover {
background-color: color-mix(in srgb, var(--card-bg) 99%, #000 1%);
}
html[data-theme="dark"] .card {
background-color: #181818;
box-shadow:
0 1px 3px 0 rgba(0, 0, 0, 0.04),
inset 0 1px 0 0 rgba(255, 255, 255, 0.04),
inset 0 0 0 1px rgba(0, 0, 0, 0.06),
inset 0 -1px 0 0 rgba(0, 0, 0, 0.06),
inset 0 0 0 1px rgba(196, 196, 196, 0.07);
}
html[data-theme="dark"] .card:hover {
background-color: color-mix(in srgb, #181818 99.5%, #fff 0.5%);
}