Branchwell

Become a Pro / website · becomeapro.ai / src / app / home.css

Raw 7.6 KB on 5069836c1e4c4e369ebe86b13dc7d299c5bed8c0
1/* Home page. One fixed WebGL particle field sits behind tall scroll sections; each section's copy pins on one side
2 while the field morphs into that section's shape on the other. Everything is scoped under .xp. */
3
4body.xp-fine,
5body.xp-fine a,
6body.xp-fine button {
7 cursor: none;
8}
9
10.xp-gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
11
12.xp .wrap { box-sizing: content-box; max-width: 1320px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
13@media (min-width: 900px) { .xp .wrap { padding-left: max(48px, env(safe-area-inset-left, 0px)); padding-right: max(48px, env(safe-area-inset-right, 0px)); } }
14
15.xp .pill svg { width: 14px; height: 14px; }
16.xp .pill { will-change: transform; }
17
18/* sections */
19.xp .sec { position: relative; z-index: 2; }
20.xp .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
21/* each section's copy pins for the length of its section, centred in one full screen so nothing is cut off */
22.xp .copy { min-width: 0; position: sticky; top: 0; min-height: 100vh; min-height: 100svh; box-sizing: border-box; padding-block: 104px 48px; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 600px; }
23.xp .sec.r .copy { grid-column: 2; }
24.xp .sec.l .copy { grid-column: 1; }
25.xp .track { min-height: 230vh; }
26.xp .track > .grid { min-height: 230vh; align-items: start; }
27.xp .cost, .xp .cost > .grid { min-height: 200vh; }
28.xp .cost > .grid { align-items: start; }
29@media (max-width: 899px) {
30 .xp .grid { grid-template-columns: 1fr; }
31 .xp .sec.r .copy, .xp .sec.l .copy { grid-column: 1; }
32 .xp .copy { padding-block: 84px 28px; }
33 /* copy sits over the particles here: a soft shadow hugs the letters instead of a visible panel */
34 .xp .track .copy > * { text-shadow: 0 0 2px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 0, 0, 0.85); }
35}
36
37.xp h1, .xp h2 { font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance; }
38.xp h1 { font-size: clamp(54px, 8.8vw, 138px); line-height: 0.9; letter-spacing: -0.05em; }
39.xp h2 { font-size: clamp(36px, min(5.4vw, 9.5vh), 88px); line-height: 0.95; letter-spacing: -0.045em; }
40.xp .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
41.xp .wi { display: inline-block; will-change: transform; }
42.xp .ch { transition: color 0.4s; }
43.xp .lead { margin: 0; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.6; font-weight: 300; color: var(--mist); max-width: 33em; }
44.xp .row { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 32px; }
45
46/* hero (hidden until the motion script takes over; shown anyway after a few seconds if it never does) */
47.xp .hero { min-height: 100vh; display: flex; align-items: center; }
48.xp .hero .grid { width: 100%; }
49.xp .hero .copy { position: relative; top: 0; min-height: 0; padding-block: 120px 80px; gap: 30px; }
50/* phones: the hero copy runs down to the Scroll hint, so leave room for it below the buttons */
51@media (max-width: 899px) { .xp .hero .copy { padding-bottom: 150px; } }
52.xp-wait .hero [data-r], .xp-wait .hero .wi { opacity: 0; animation: xp-show 0.6s 3s forwards; }
53@keyframes xp-show { to { opacity: 1; } }
54.xp .hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
55.xp .hint span { width: 1px; height: 54px; background: linear-gradient(var(--brand), rgba(70, 170, 233, 0)); transform-origin: top; animation: xp-drip 2.2s cubic-bezier(0.6, 0, 0.2, 1) infinite; }
56@keyframes xp-drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
57
58/* marquee */
59.xp .marquee { position: relative; z-index: 2; padding-block: 34vh; overflow: hidden; white-space: nowrap; pointer-events: none; }
60.xp .mrow { display: inline-flex; align-items: center; gap: 0.3em; font-family: var(--font-display); font-weight: 300; font-size: clamp(44px, 6.6vw, 108px); line-height: 1.05; letter-spacing: -0.045em; text-shadow: 0 0 28px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.9); will-change: transform; }
61.xp .mline { display: block; }
62.xp .mline + .mline { margin-top: 0.25em; }
63.xp .mrow .o { color: var(--ice); opacity: 0.55; }
64.xp .mrow .f { color: var(--bone); }
65.xp .mrow svg { width: 0.32em; height: 0.32em; flex: none; }
66
67/* lessons */
68.xp .lessons { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
69.xp .lesson { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-block: 12px; font-family: var(--font-display); font-size: clamp(18px, min(1.6vw, 2.9vh), 24px); letter-spacing: -0.02em; transition: color 0.35s; }
70.xp .lesson .arr { font-family: var(--font-mono); font-size: 14px; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0, 1); color: var(--tc); }
71.xp .lesson:hover { color: var(--tc); }
72.xp .lesson:hover .arr { transform: translateX(10px); }
73.xp .lesson.more { color: var(--ash); font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.07em; text-transform: uppercase; }
74.xp .lesson.more:hover { color: var(--bone); }
75
76/* end */
77.xp .end { min-height: 140vh; display: flex; align-items: center; padding-bottom: 30vh; box-sizing: border-box; }
78.xp .end .copy { position: relative; top: 0; min-height: 0; max-width: 980px; margin: 0 auto; align-items: center; text-align: center; }
79.xp .end h2 { font-size: clamp(52px, 8.4vw, 132px); }
80.xp .end h2, .xp .end .lead { text-shadow: 0 0 30px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.9); }
81.xp .end .lead { text-align: center; }
82
83/* section dots */
84.xp-dots { position: fixed; right: max(22px, calc(env(safe-area-inset-right, 0px) + 12px)); top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 14px; }
85.xp-dots button { all: unset; display: flex; align-items: center; justify-content: flex-end; gap: 12px; height: 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); }
86.xp-dots button:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 4px; }
87.xp-dots button span { opacity: 0; transform: translateX(6px); transition: opacity 0.3s, transform 0.3s; }
88.xp-dots button:hover span, .xp-dots button.on span { opacity: 1; transform: none; }
89.xp-dots button i { width: 6px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.35); transition: height 0.45s cubic-bezier(0.2, 0.7, 0, 1), background 0.3s; }
90.xp-dots button.on { color: var(--bone); }
91.xp-dots button.on i { height: 18px; background: var(--brand); }
92@media (max-width: 899px) { .xp-dots { display: none; } }
93
94/* cursor */
95.xp-cur { display: none; }
96body.xp-fine .xp-cur { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 60; mix-blend-mode: difference; }
97.xp-cur .c-dot, .xp-cur .c-ring { position: fixed; left: 0; top: 0; border-radius: 50%; will-change: transform; }
98.xp-cur .c-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #ffffff; }
99.xp-cur .c-ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid #ffffff; transition: width 0.4s cubic-bezier(0.2, 0.7, 0, 1), height 0.4s cubic-bezier(0.2, 0.7, 0, 1), margin 0.4s cubic-bezier(0.2, 0.7, 0, 1), background 0.4s; }
100.xp-cur.hover .c-ring { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: #ffffff; }
101
102@media (prefers-reduced-motion: reduce) {
103 .xp .hint span { animation: none; }
104}