|
1 | | -/* ============================================================ |
2 | | - Shared nav |
3 | | - ============================================================ */ |
| 1 | +/* view-transition-name and ::view-transition-* have no Tailwind equivalent */ |
4 | 2 |
|
5 | | -.nx-nav { |
6 | | - position: sticky; |
7 | | - top: 0; |
8 | | - z-index: 50; |
9 | | - backdrop-filter: blur(14px) saturate(140%); |
10 | | - -webkit-backdrop-filter: blur(14px) saturate(140%); |
11 | | - background: color-mix(in oklch, var(--navy-050) 78%, transparent); |
12 | | - border-bottom: 1px solid color-mix(in oklch, var(--navy-300) 50%, transparent); |
13 | | -} |
14 | | -.nx-nav-inner { |
15 | | - max-width: var(--max); |
16 | | - margin: 0 auto; |
17 | | - padding: 18px var(--gutter); |
18 | | - display: flex; |
19 | | - align-items: center; |
20 | | - gap: 32px; |
21 | | -} |
22 | | -.nx-logo { |
23 | | - display: flex; |
24 | | - align-items: center; |
25 | | -} |
26 | | -.nx-logo-img { |
27 | | - height: 24px; |
28 | | - width: auto; |
29 | | - display: block; |
30 | | -} |
31 | | -.nx-footer-logo { |
32 | | - width: 144px; |
33 | | - height: auto; |
34 | | - display: block; |
35 | | - margin-bottom: 18px; |
36 | | - transition: filter 0.18s ease; |
37 | | -} |
38 | | -.nx-footer-logo:hover { |
39 | | - filter: brightness(1.1); |
40 | | -} |
41 | | - |
42 | | -.nx-toggle { |
43 | | - position: relative; |
44 | | - margin-left: auto; |
45 | | - display: flex; |
46 | | - background: var(--navy-200); |
47 | | - padding: 3px; |
48 | | - border-radius: 999px; |
49 | | - font-size: 13px; |
50 | | - font-weight: 500; |
51 | | - isolation: isolate; |
52 | | -} |
53 | 3 | .nx-toggle-thumb { |
54 | | - position: absolute; |
55 | | - top: 3px; |
56 | | - left: 3px; |
57 | | - bottom: 3px; |
58 | | - width: calc(50% - 3px); |
59 | | - background: var(--navy-1000); |
60 | | - border-radius: 999px; |
61 | | - transform: translate3d(0, 0, 0); |
62 | | - transition: transform 0.42s cubic-bezier(0.5, 1.4, 0.55, 1); |
63 | | - z-index: 0; |
64 | 4 | view-transition-name: nx-toggle-thumb; |
65 | 5 | } |
66 | | -.nx-toggle[data-active="talent"] .nx-toggle-thumb { |
67 | | - transform: translate3d(100%, 0, 0); |
68 | | -} |
69 | | -.nx-toggle a { |
70 | | - position: relative; |
71 | | - z-index: 1; |
72 | | - flex: 1 1 0; |
73 | | - text-align: center; |
74 | | - padding: 7px 18px; |
75 | | - border-radius: 999px; |
76 | | - color: var(--navy-600); |
77 | | - transition: color 0.22s ease; |
78 | | - white-space: nowrap; |
79 | | -} |
80 | | -.nx-toggle a.active { |
81 | | - color: white; |
82 | | -} |
83 | | -.nx-toggle a:hover:not(.active) { |
84 | | - color: var(--navy-1000); |
85 | | -} |
86 | | - |
87 | | -.nx-nav-links { |
88 | | - display: flex; |
89 | | - gap: 28px; |
90 | | - font-size: 14px; |
91 | | - color: var(--navy-600); |
92 | | -} |
93 | | -.nx-nav-links a:hover { |
94 | | - color: var(--navy-1000); |
95 | | -} |
96 | 6 |
|
97 | 7 | .nx-cta { |
98 | | - display: inline-flex; |
99 | | - align-items: center; |
100 | | - justify-content: center; |
101 | | - padding: 9px 18px; |
102 | | - border-radius: 999px; |
103 | | - background: var(--accent); |
104 | | - color: white; |
105 | | - font-size: 13px; |
106 | | - font-weight: 500; |
107 | | - overflow: hidden; |
108 | | - transition: |
109 | | - transform 0.15s ease, |
110 | | - background 0.15s ease; |
111 | 8 | view-transition-name: nx-cta; |
112 | 9 | } |
113 | | -.nx-cta:hover { |
114 | | - background: var(--accent-deep); |
115 | | - transform: translateY(-1px); |
116 | | -} |
| 10 | + |
117 | 11 | .nx-cta-text { |
118 | | - display: inline-block; |
119 | 12 | view-transition-name: nx-cta-text; |
120 | 13 | animation: nx-cta-text-fallback 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both; |
121 | 14 | } |
| 15 | + |
122 | 16 | @keyframes nx-cta-text-fallback { |
123 | | - from { |
124 | | - opacity: 0; |
125 | | - transform: translateY(6px); |
126 | | - } |
127 | | - to { |
128 | | - opacity: 1; |
129 | | - transform: translateY(0); |
130 | | - } |
| 17 | + from { opacity: 0; transform: translateY(6px); } |
| 18 | + to { opacity: 1; transform: translateY(0); } |
131 | 19 | } |
| 20 | + |
132 | 21 | ::view-transition-group(nx-cta) { |
133 | 22 | animation-duration: 360ms; |
134 | 23 | animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1); |
|
139 | 28 | ::view-transition-new(nx-cta-text) { |
140 | 29 | animation: nx-cta-text-in 260ms 60ms ease-out backwards; |
141 | 30 | } |
| 31 | + |
142 | 32 | @keyframes nx-cta-text-out { |
143 | | - to { |
144 | | - opacity: 0; |
145 | | - transform: translateY(-6px); |
146 | | - } |
| 33 | + to { opacity: 0; transform: translateY(-6px); } |
147 | 34 | } |
148 | 35 | @keyframes nx-cta-text-in { |
149 | | - from { |
150 | | - opacity: 0; |
151 | | - transform: translateY(6px); |
152 | | - } |
153 | | - to { |
154 | | - opacity: 1; |
155 | | - transform: translateY(0); |
156 | | - } |
| 36 | + from { opacity: 0; transform: translateY(6px); } |
| 37 | + to { opacity: 1; transform: translateY(0); } |
157 | 38 | } |
| 39 | + |
158 | 40 | @media (prefers-reduced-motion: reduce) { |
159 | | - .nx-toggle-thumb { |
160 | | - transition: none; |
161 | | - } |
162 | | - .nx-cta-text { |
163 | | - animation: none; |
164 | | - } |
| 41 | + .nx-toggle-thumb { transition: none; } |
| 42 | + .nx-cta-text { animation: none; } |
165 | 43 | ::view-transition-old(nx-cta-text), |
166 | | - ::view-transition-new(nx-cta-text) { |
167 | | - animation: none; |
168 | | - } |
169 | | -} |
170 | | - |
171 | | -/* ============================================================ |
172 | | - Footer |
173 | | - ============================================================ */ |
174 | | - |
175 | | -.nx-footer { |
176 | | - background: var(--navy-1000); |
177 | | - color: var(--navy-300); |
178 | | - padding: 80px var(--gutter) 40px; |
179 | | -} |
180 | | -.nx-footer-inner { |
181 | | - max-width: var(--max); |
182 | | - margin: 0 auto; |
183 | | - display: grid; |
184 | | - grid-template-columns: 1.5fr 1fr 1fr; |
185 | | - gap: 64px; |
186 | | -} |
187 | | -.nx-footer h4 { |
188 | | - color: white; |
189 | | - font-size: 13px; |
190 | | - font-weight: 500; |
191 | | - margin: 0 0 16px; |
192 | | - letter-spacing: -0.01em; |
193 | | -} |
194 | | -.nx-footer ul { |
195 | | - list-style: none; |
196 | | - padding: 0; |
197 | | - margin: 0; |
198 | | - display: flex; |
199 | | - flex-direction: column; |
200 | | - gap: 10px; |
201 | | - font-size: 14px; |
202 | | -} |
203 | | -.nx-footer a:hover { |
204 | | - color: white; |
205 | | -} |
206 | | -.nx-footer-base { |
207 | | - max-width: var(--max); |
208 | | - margin: 60px auto 0; |
209 | | - padding-top: 28px; |
210 | | - border-top: 1px solid var(--navy-800); |
211 | | - display: flex; |
212 | | - justify-content: space-between; |
213 | | - font-size: 12px; |
214 | | - color: var(--navy-500); |
215 | | - font-family: var(--font-mono); |
216 | | -} |
217 | | -@media (max-width: 800px) { |
218 | | - .nx-footer-inner { |
219 | | - grid-template-columns: 1fr 1fr; |
220 | | - } |
| 44 | + ::view-transition-new(nx-cta-text) { animation: none; } |
221 | 45 | } |
0 commit comments